/* Raink LAB - research modules under lab.rainkdesign.com. */

:root {
  --accent: 152, 196, 255;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --muted: rgba(255, 255, 255, 0.56);
  --dim: rgba(255, 255, 255, 0.3);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #050509;
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(52% 46% at 18% 8%, rgba(var(--accent), 0.16), transparent 68%),
    radial-gradient(46% 42% at 88% 22%, rgba(74, 58, 120, 0.22), transparent 72%),
    radial-gradient(58% 48% at 50% 106%, rgba(20, 60, 74, 0.18), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a {
  color: inherit;
}

::selection {
  background: rgba(var(--accent), 0.32);
  color: #fff;
}

.lab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ---------------------------------------------------------------- topbar */

.lab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}

.lab-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.lab-brand__logo {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(var(--accent), 0.75);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(var(--accent), 0.28);
}

.lab-brand__logo::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 9px;
  border-radius: 50%;
  background: rgba(var(--accent), 0.95);
}

.lab-brand__word {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.lab-brand__word span {
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--dim);
}

.lab-link {
  position: relative;
  padding-bottom: 4px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.35s var(--ease);
}

.lab-link:hover {
  color: #fff;
}

/* ------------------------------------------------------------------ main */

.lab-main {
  flex: 1;
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 4vw, 48px) clamp(48px, 8vh, 90px);
}

.lab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(var(--accent), 0.85);
}

.lab-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(var(--accent), 0.7);
}

.lab-hero h1,
.lab-module h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 250;
  line-height: 1.03;
  letter-spacing: -0.038em;
}

.lab-hero h1 em,
.lab-module h1 em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.42);
}

.lab-lede {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

/* ------------------------------------------------------------------ grid */

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 6vh, 64px);
}

.lab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 228px;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.01));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    background-color 0.45s var(--ease);
}

.lab-card::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto;
  height: 70%;
  background: radial-gradient(closest-side, rgba(var(--accent), 0.22), transparent 78%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.lab-card:hover,
.lab-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(var(--accent), 0.48);
  outline: none;
}

.lab-card:hover::before,
.lab-card:focus-visible::before {
  opacity: 1;
}

.lab-card__index {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(var(--accent), 0.8);
}

.lab-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.lab-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.78;
  color: var(--muted);
}

.lab-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.35s var(--ease);
}

.lab-card:hover .lab-card__more,
.lab-card:focus-visible .lab-card__more {
  color: #fff;
}

/* ---------------------------------------------------------- module pages */

.lab-module {
  max-width: 880px;
}

.lab-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  padding: 7px 13px;
  border: 1px solid rgba(var(--accent), 0.35);
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--accent), 0.9);
}

.lab-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(var(--accent), 0.95);
  box-shadow: 0 0 12px rgba(var(--accent), 0.8);
}

.lab-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: clamp(34px, 5vh, 52px);
}

.lab-panel {
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
}

.lab-panel h2 {
  margin: 0 0 10px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}

.lab-panel p {
  margin: 0;
  font-size: 12px;
  line-height: 1.82;
  color: var(--muted);
}

.lab-panel ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.lab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.lab-button:hover {
  color: #fff;
  border-color: rgba(var(--accent), 0.6);
  background: rgba(var(--accent), 0.08);
}

/* ------------------------------------------------------------------ foot */

.lab-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 46px);
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.24);
}

.lab-foot a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.lab-foot a:hover {
  color: #fff;
}

@media (max-width: 600px) {
  .lab-top {
    padding: 14px 18px;
  }

  .lab-brand__word span {
    display: none;
  }

  .lab-main {
    padding-top: 44px;
  }

  .lab-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-card,
  .lab-card::before,
  .lab-link,
  .lab-button {
    transition: none;
  }
}
