:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --fg: #f0eee6;
  --fg-dim: #a5a39a;
  --fg-mute: #6b6962;
  --rule: #1f1f24;
  --r: #ff3a4a;
  --g: #42dd72;
  --b: #4a9bff;
  --w: #fffce6;
  --accent: var(--w);
  --ease: cubic-bezier(.2,.7,.2,1);
  --maxw: 1080px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--rule); }
.wordmark {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.wordmark .wm-mark {
  display: inline-block;
  border-bottom: 2px solid var(--w);
  padding: 0 1px;
  margin: 0 1px;
  line-height: 1;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--fg-dim);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px var(--pad) 120px;
  overflow: hidden;
}
#ray-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.85;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 60%, transparent 0%, var(--bg) 78%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 820px;
  text-align: center;
}
.hero-pre {
  display: block;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 18px;
}
.hero-headline {
  display: block;
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: var(--fg);
}
.hero-sub {
  margin: 28px auto 36px;
  max-width: 560px;
  color: var(--fg-dim);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.55;
}
.cta-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  will-change: transform;
}
.cta:hover { transform: translateY(-1px); }
.cta-primary {
  background: var(--fg);
  color: var(--bg);
}
.cta-primary:hover { background: var(--w); }
.cta-ghost {
  border: 1px solid var(--rule);
  color: var(--fg-dim);
}
.cta-ghost:hover { color: var(--fg); border-color: var(--fg-dim); }
.cta-big { padding: 18px 30px; font-size: 16px; }
.hero-meta {
  color: var(--fg-mute);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-mute);
  animation: drift 2.4s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(-50%, 0); opacity: .55; }
  50% { transform: translate(-50%, 4px); opacity: 1; }
}

/* bands */
.band {
  padding: clamp(72px, 12vw, 140px) var(--pad);
  border-top: 1px solid var(--rule);
}
.band-tight { padding-top: clamp(56px, 10vw, 110px); padding-bottom: clamp(56px, 10vw, 110px); }
.band-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 18px;
}
.band-title {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0 0 28px;
}
.band-lede {
  max-width: 640px;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--fg-dim);
  margin: 0 0 40px;
}
.prose p { color: var(--fg-dim); max-width: 56ch; margin: 0 0 18px; }
.prose p.muted { color: var(--fg-mute); font-size: 14px; }
.muted { color: var(--fg-mute); }
.small { font-size: 13px; }

/* spectrum */
.spectrum-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .spectrum-grid { grid-template-columns: repeat(2, 1fr); }
}
.sp {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 18px;
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.sp:hover { transform: translateY(-2px); }
.sp-dot {
  width: 14px; height: 14px; border-radius: 50%;
  box-shadow: 0 0 24px currentColor;
}
.sp-r { color: var(--r); }
.sp-r:hover { border-color: color-mix(in oklab, var(--r) 50%, var(--rule)); }
.sp-g { color: var(--g); }
.sp-g:hover { border-color: color-mix(in oklab, var(--g) 50%, var(--rule)); }
.sp-b { color: var(--b); }
.sp-b:hover { border-color: color-mix(in oklab, var(--b) 50%, var(--rule)); }
.sp-w { color: var(--w); }
.sp-w:hover { border-color: color-mix(in oklab, var(--w) 35%, var(--rule)); }
.sp-r .sp-dot { background: var(--r); }
.sp-g .sp-dot { background: var(--g); }
.sp-b .sp-dot { background: var(--b); }
.sp-w .sp-dot {
  background: linear-gradient(90deg, var(--r), var(--g), var(--b));
  color: var(--w);
}
.sp-name {
  font-size: 18px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.sp-nm {
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* elements grid */
.element-grid {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 760px) { .element-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .element-grid { grid-template-columns: 1fr; } }
.element-grid li {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 22px;
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.element-grid li:hover { border-color: var(--fg-mute); transform: translateY(-2px); }
.el-glyph {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 28px;
  color: var(--w);
  line-height: 1;
  margin-bottom: 6px;
}
.element-grid strong { font-weight: 500; color: var(--fg); }
.element-grid span:last-child { color: var(--fg-dim); font-size: 14px; }

/* loop */
.loop-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  counter-reset: step;
}
@media (max-width: 860px) { .loop-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .loop-list { grid-template-columns: 1fr; } }
.loop-list li {
  border-top: 1px solid var(--fg);
  padding: 20px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.loop-num {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.loop-list strong { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.loop-list span:last-child { color: var(--fg-dim); font-size: 14px; }

/* features */
.feature-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-grid li {
  background: var(--bg);
  padding: 26px 22px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 130px;
  transition: background .2s var(--ease);
}
.feature-grid li:hover { background: var(--bg-2); }
.feature-grid strong { font-weight: 500; color: var(--fg); font-size: 15px; }
.feature-grid span { color: var(--fg-dim); font-size: 13px; line-height: 1.5; }

/* cta band */
.band-cta { text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta-inner .band-title { margin-bottom: 0; }
.cta-inner .band-lede { margin: 0 auto 12px; }

/* footer */
.foot {
  border-top: 1px solid var(--rule);
  padding: 30px var(--pad) 60px;
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.wordmark-small { font-size: 15px; color: var(--fg-dim); }
.foot-meta { color: var(--fg-mute); font-size: 13px; }
.foot-link { color: var(--fg-dim); font-size: 13px; }
.foot-link:hover { color: var(--fg); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* subpages (support, privacy) */
.subpage .nav-links a[aria-current="page"] { color: var(--fg); }
.page-hero {
  padding: clamp(80px, 12vw, 140px) var(--pad) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.page-hero-inner {
  max-width: var(--maxw); margin: 0 auto;
}
.page-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 24px;
}
.page-lede {
  max-width: 640px;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--fg-dim);
  margin: 0 0 14px;
}
.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 56px);
  max-width: 760px;
}
.page-grid > div { display: flex; flex-direction: column; gap: 12px; }
.sub-h2 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--fg);
}
.page-grid p { margin: 0; color: var(--fg-dim); max-width: 64ch; }
.page-grid p strong { color: var(--fg); font-weight: 500; }
.page-grid a:not(.big-link):not(.cta) {
  color: var(--fg);
  border-bottom: 1px solid var(--fg-mute);
  transition: border-color .2s var(--ease);
}
.page-grid a:not(.big-link):not(.cta):hover { border-color: var(--fg); }
.big-link {
  display: inline-block;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.big-link:hover { border-color: var(--w); color: var(--w); }
.bullet {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex; flex-direction: column; gap: 10px;
}
.bullet li {
  position: relative;
  padding-left: 22px;
  color: var(--fg-dim);
  max-width: 64ch;
}
.bullet li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 10px; height: 1px;
  background: var(--fg-mute);
}
.bullet li strong { color: var(--fg); font-weight: 500; }
.faq { margin: 0; display: flex; flex-direction: column; gap: 22px; }
.faq dt {
  font-weight: 500;
  color: var(--fg);
  font-size: 16px;
  letter-spacing: -0.005em;
}
.faq dd { margin: 6px 0 0; color: var(--fg-dim); max-width: 64ch; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #ray-canvas { display: none; }
  .hero { background:
    radial-gradient(ellipse at 30% 40%, color-mix(in oklab, var(--r) 14%, transparent), transparent 60%),
    radial-gradient(ellipse at 70% 60%, color-mix(in oklab, var(--b) 14%, transparent), transparent 60%);
  }
}
