/* NEXCORD website.
   Self-contained: no web fonts, no outside requests. Colors come from the app icon.
   Motion is opt-out: everything animated is wrapped in prefers-reduced-motion checks,
   and the last block of this file switches motion off for people who ask for that. */

:root {
  color-scheme: dark;
  --bg: #04060d;
  --bg-2: #070b18;
  --navy: #0b1226;
  --surface: rgb(255 255 255 / 0.035);
  --surface-2: rgb(255 255 255 / 0.065);
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.14);
  --text: #eef1ff;
  --muted: #a7afcc;
  --faint: #8a93b2;
  --violet: #8373fc;
  --blue: #4a92f6;
  --cyan: #38b0f2;
  --ice: #7df0ff;
  --grad: linear-gradient(115deg, #b3a6ff 0%, #8373fc 25%, #4a92f6 60%, #7df0ff 100%);
  --radius: 24px;
  --shadow: 0 30px 80px -30px rgb(0 0 0 / 0.75);
  --header-h: 72px;
  --font: "Segoe UI Variable Display", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Base ---------------------------------------------------------------- */

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

[hidden] { display: none !important; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.0625rem/1.65 var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page-wide ambient color, painted once on its own layer. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgb(74 146 246 / 0.1), transparent 62%),
    radial-gradient(900px 700px at -12% 32%, rgb(131 115 252 / 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
strong { font-weight: 600; color: var(--text); }

.icon { width: 24px; height: 24px; flex: none; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
main:focus { outline: none; }
::selection { background: rgb(131 115 252 / 0.45); color: #fff; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 24px;
  pointer-events: none;
}

.container { width: min(100% - 32px, 1200px); margin-inline: auto; }
@media (min-width: 768px) { .container { width: min(100% - 64px, 1200px); } }

/* ---- Type ---------------------------------------------------------------- */

.grad-text { color: var(--ice); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad-text {
    background: var(--grad);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 0.8rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-title {
  margin-top: 18px;
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 22px;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.22rem);
}

/* ---- Buttons and chips --------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-center { justify-content: center; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
.btn:focus-visible { outline-offset: 4px; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

.btn-primary {
  color: #050713;
  background: linear-gradient(115deg, #b9adff 0%, #8f80ff 32%, #63a2f8 70%, #8ff2ff 100%);
  box-shadow: 0 10px 30px -10px rgb(131 115 252 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.5);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgb(131 115 252 / 0.85), inset 0 1px 0 rgb(255 255 255 / 0.5); }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgb(255 255 255 / 0.24); }

@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover .icon { transform: translateX(3px); }
  .btn:active { transform: translateY(0) scale(0.98); }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgb(131 115 252 / 0.3);
  border-radius: 999px;
  background: rgb(131 115 252 / 0.12);
  color: #d0c9ff;
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip-testing {
  border-color: rgb(125 240 255 / 0.28);
  background: rgb(125 240 255 / 0.08);
  color: #b4f7ff;
}

.pulse-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 12px rgb(125 240 255 / 0.8);
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid rgb(125 240 255 / 0.6);
    border-radius: 50%;
    animation: ping 2.4s var(--ease-out) infinite;
  }
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgb(4 6 13 / 0.85), rgb(4 6 13 / 0));
  transition: border-color 0.35s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(6 9 20 / 0.94);
  opacity: 0;
  transition: opacity 0.35s ease;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header::before {
    background: rgb(6 9 20 / 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }
}
.site-header.is-scrolled,
.site-header.is-solid { border-bottom-color: var(--border); }
.site-header.is-scrolled::before,
.site-header.is-solid::before { opacity: 1; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
  border-radius: 10px;
}
.brand img { width: 34px; height: 34px; }

.nav { display: flex; align-items: center; gap: 8px; }

.nav-links { display: none; gap: 4px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--text); background: var(--surface-2); }

.status-pill {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-menu { position: relative; }
.nav-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::marker { content: ""; }
.nav-menu .icon-close,
.nav-menu[open] .icon-open { display: none; }
.nav-menu[open] .icon-close { display: block; }

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(300px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgb(10 14 30 / 0.97);
  box-shadow: var(--shadow);
}
.menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 500;
  text-decoration: none;
}
.menu-panel a span { font: 500 0.75rem var(--mono); color: var(--faint); }
.menu-panel a:hover,
.menu-panel a[aria-current="true"] { background: var(--surface-2); }
.menu-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 14px 16px 8px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.85rem;
}

@media (min-width: 860px) {
  .nav-links, .status-pill { display: inline-flex; }
  .nav-menu { display: none; }
}

/* ---- Email-link notice --------------------------------------------------- */

.notice {
  position: fixed;
  z-index: 60;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: min(680px, calc(100% - 32px));
  padding: 18px 12px 18px 20px;
  border: 1px solid rgb(125 240 255 / 0.25);
  border-radius: 18px;
  background: rgb(12 17 36 / 0.97);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}
.notice-icon { color: var(--ice); margin-top: 2px; }
.notice-body { flex: 1; min-width: 0; }
.notice-title { font-weight: 600; }
.notice-text { margin-top: 4px; color: var(--muted); font-size: 0.95rem; }
.notice-body .btn { margin-top: 14px; }
.notice-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin-top: -8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.notice-close:hover { background: var(--surface-2); color: var(--text); }
.notice-close .icon { width: 20px; height: 20px; }

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 40px) 0 112px;
}

.hero-stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-light {
  position: absolute;
  z-index: -2;
  left: 64%;
  top: 40%;
  width: 1100px;
  height: 1100px;
  max-width: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(131 115 252 / 0.3), rgb(74 146 246 / 0.12) 45%, transparent 75%);
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: -20%;
  bottom: -30%;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(56 176 242 / 0.13), transparent 70%);
  pointer-events: none;
}

.hero-floor {
  position: absolute;
  z-index: -2;
  left: -50%;
  right: -50%;
  bottom: -12%;
  height: 52%;
  background-image:
    linear-gradient(rgb(125 160 255 / 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 160 255 / 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(700px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 85%);
  mask-image: linear-gradient(to top, #000 8%, transparent 85%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 32px; }
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgb(125 240 255 / 0.22);
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(125 240 255 / 0.08), rgb(131 115 252 / 0.06));
  color: #cfeaff;
  font: 500 0.82rem/1.3 var(--mono);
  letter-spacing: 0.05em;
}

.display {
  margin-top: 28px;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}
.display .line { display: block; text-wrap: balance; }

.lead {
  margin-top: 28px;
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem);
}

.hero-copy .actions { margin-top: 40px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 44px;
  color: var(--faint);
  font-size: 0.92rem;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 10px; }
.hero-facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--grad);
  transform: rotate(45deg);
}

/* Orbit graphic */
.hero-visual {
  position: relative;
  width: min(500px, 100%);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  perspective: 1200px;
}
@media (max-width: 999px) {
  .hero-visual { width: min(380px, 78vw); }
}

.orbit-stage { position: absolute; inset: 0; transform-style: preserve-3d; }

.orbit { position: absolute; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 50%; }
.orbit-outer { inset: 0; border-color: rgb(255 255 255 / 0.05); }
.orbit-mid { inset: 11%; }
.orbit-inner { inset: 23%; border-style: dashed; border-color: rgb(125 240 255 / 0.12); }

/* Each ring starts at its own angle (the rotate property), so the icons are spread out even
   when nothing moves; the animation then turns the ring with transform. Icons turn the
   other way so they stay upright. */
.orbit-spin { position: absolute; border-radius: 50%; rotate: var(--angle, 0deg); }
.spin-outer { inset: 0; --spin: 46s; --angle: 150deg; }
.spin-mid { inset: 11%; --spin: 34s; --angle: -115deg; }
.spin-inner { inset: 23%; --spin: 24s; --angle: 55deg; }
.comet { inset: 11%; --spin: 9s; --angle: -30deg; }

.orbit-node {
  position: absolute;
  left: 50%;
  top: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  rotate: calc(var(--angle, 0deg) * -1);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgb(12 17 36 / 0.92);
  color: var(--ice);
  box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.8), 0 0 26px -6px rgb(125 240 255 / 0.45);
}
.orbit-node .icon { width: 22px; height: 22px; }
.spin-mid .orbit-node { color: #c3b9ff; box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.8), 0 0 26px -6px rgb(131 115 252 / 0.55); }

.orbit-dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 10px;
  margin: 0 0 -5px -5px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 16px var(--violet);
}

.comet-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 240deg, rgb(131 115 252 / 0.65) 320deg, rgb(125 240 255 / 0.95) 358deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
}
.comet-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 3px rgb(125 240 255 / 0.9);
}

.orbit-core {
  position: absolute;
  inset: 35%;
  display: grid;
  place-items: center;
}
.orbit-core::before {
  content: "";
  position: absolute;
  inset: -70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(131 115 252 / 0.42), rgb(74 146 246 / 0.14) 55%, transparent 75%);
}
.orbit-core img {
  position: relative;
  width: 100%;
  filter: drop-shadow(0 18px 36px rgb(80 90 255 / 0.45));
}

@media (prefers-reduced-motion: no-preference) {
  .orbit-spin, .orbit-node { animation: spin var(--spin, 30s) linear infinite; }
  .orbit-node { animation-direction: reverse; }
  .orbit-core::before { animation: breathe 7s ease-in-out infinite; }
  .orbit-core img { animation: float 8s ease-in-out infinite; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 64px;
  margin-left: -22px;
  border-radius: 999px;
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--ice));
  transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-line { animation: drip 2.6s var(--ease-out) infinite; }
}
@media (max-height: 640px) { .scroll-cue { display: none; } }

/* Hero entrance (pure CSS, so it also runs without JavaScript) */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter 1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 110ms + 120ms); }
  .grad-text { animation: grad-shift 10s ease-in-out infinite alternate; }
}
.d1 { --d: 1; }
.d2 { --d: 2; }
.d3 { --d: 3; }
.d4 { --d: 4; }
.d5 { --d: 5; }

/* ---- Sections ------------------------------------------------------------ */

.section { position: relative; padding: clamp(88px, 11vw, 160px) 0; }
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1200px, calc(100% - 32px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.1), transparent);
  transform: translateX(-50%);
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }

/* Spotlight that follows the pointer (position set by site.js). */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 0%), rgb(131 115 252 / 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }

/* Vision */
.vision-layout { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .vision-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 80px; align-items: start; }
  .vision-head { position: sticky; top: calc(var(--header-h) + 48px); margin-bottom: 0; }
}

.pillars { display: grid; gap: 14px; }
.pillar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 20px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.012));
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.45s var(--ease-out);
}
.pillar:hover { border-color: rgb(131 115 252 / 0.35); }
.pillar .chip { grid-column: 2; justify-self: start; }
.pillar-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgb(131 115 252 / 0.25);
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(131 115 252 / 0.18), rgb(56 176 242 / 0.1));
  color: var(--ice);
}
.pillar h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.pillar-index { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; color: var(--faint); }
.pillar p { margin-top: 8px; color: var(--muted); }
@media (min-width: 560px) {
  .pillar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pillar .chip { grid-column: auto; align-self: start; }
}

/* Features */
.bento { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-wide, .card-full { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-wide { grid-column: span 2; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012));
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.3s ease, box-shadow 0.45s ease;
}
.card:hover {
  border-color: rgb(255 255 255 / 0.16);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.85);
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-4px); }
  .pillar:hover { transform: translateY(-2px); }
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: auto; padding-bottom: 28px; }
.card-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgb(125 240 255 / 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(125 240 255 / 0.12), rgb(131 115 252 / 0.1));
  color: var(--ice);
}
.card h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.card p { color: var(--muted); }
.card-text { display: flex; flex-direction: column; gap: 14px; }

.card-wide, .card-full { gap: 32px; }
@media (min-width: 720px) {
  .card-wide, .card-full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); align-items: center; }
  .card-wide .card-top, .card-full .card-top { margin-bottom: 0; }
}

/* Call illustration */
.call-visual {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: radial-gradient(120% 140% at 50% 0%, rgb(131 115 252 / 0.14), transparent 60%), rgb(255 255 255 / 0.02);
}
.peer {
  position: relative;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a596ff, #4a92f6);
  box-shadow: 0 0 0 4px rgb(4 6 13 / 0.9), 0 0 0 5px rgb(131 115 252 / 0.4);
}
.peer-b { background: linear-gradient(135deg, #4a92f6, #7df0ff); box-shadow: 0 0 0 4px rgb(4 6 13 / 0.9), 0 0 0 5px rgb(125 240 255 / 0.4); }
.peer::after {
  content: "";
  position: absolute;
  inset: 30% 30% 30% 30%;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.85);
}
.call-link {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgb(131 115 252 / 0.6), rgb(125 240 255 / 0.6));
  border-radius: 2px;
}
.packet-track { position: absolute; left: 0; top: 50%; width: 100%; }
.packet {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px 3px rgb(125 240 255 / 0.85);
}
.wave {
  position: absolute;
  left: 50%;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  transform: translateX(-50%);
}
.wave i {
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--ice), var(--violet));
  transform: scaleY(0.35);
  transform-origin: center;
}
.wave i:nth-child(2n) { transform: scaleY(0.6); }
.wave i:nth-child(3n) { transform: scaleY(0.85); }

@media (prefers-reduced-motion: no-preference) {
  .packet-track { animation: travel 2.6s ease-in-out infinite alternate; }
  .wave i { animation: bar 1.4s ease-in-out infinite; }
  .wave i:nth-child(2) { animation-delay: -0.2s; }
  .wave i:nth-child(3) { animation-delay: -0.5s; }
  .wave i:nth-child(4) { animation-delay: -0.8s; }
  .wave i:nth-child(5) { animation-delay: -0.3s; }
  .wave i:nth-child(6) { animation-delay: -1s; }
  .wave i:nth-child(7) { animation-delay: -0.6s; }
  .wave i:nth-child(8) { animation-delay: -0.15s; }
  .wave i:nth-child(9) { animation-delay: -0.9s; }
}

/* Marketplace illustration */
.market-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 24px 24px 56px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.02);
}
.swatch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 120px;
  padding: 34px 10px 10px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--swatch-top) 0 26px, var(--swatch-body) 26px);
}
.swatch i { height: 8px; border-radius: 4px; background: rgb(255 255 255 / 0.18); }
.swatch i:nth-child(2) { width: 70%; }
.swatch i:nth-child(3) { width: 45%; background: var(--swatch-accent); }
.swatch-1 { --swatch-top: #2a2468; --swatch-body: #12122e; --swatch-accent: #a596ff; }
.swatch-2 { --swatch-top: #0f3a52; --swatch-body: #0a1a26; --swatch-accent: #7df0ff; }
.swatch-3 { --swatch-top: #3b1f4a; --swatch-body: #1a1022; --swatch-accent: #ff9ad5; }
@media (prefers-reduced-motion: no-preference) {
  .swatch { transition: transform 0.5s var(--ease-out); }
  .card-full:hover .swatch-1 { transform: translateY(-6px) rotate(-2deg); }
  .card-full:hover .swatch-2 { transform: translateY(-10px); }
  .card-full:hover .swatch-3 { transform: translateY(-6px) rotate(2deg); }
}
.reviewed {
  position: absolute;
  right: 20px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border: 1px solid rgb(125 240 255 / 0.3);
  border-radius: 999px;
  background: rgb(4 6 13 / 0.85);
  color: #b4f7ff;
  font: 500 0.75rem var(--mono);
  letter-spacing: 0.05em;
}
.reviewed .icon { width: 16px; height: 16px; }

/* Status */
.status-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.status-col {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.02);
}
.status-col header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.status-col h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; }
.state-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.state-mark .icon { width: 20px; height: 20px; }
.state-built .state-mark { border: 1px solid rgb(125 240 255 / 0.3); background: rgb(125 240 255 / 0.1); color: var(--ice); }
.state-testing .state-mark { border: 1px solid rgb(131 115 252 / 0.35); background: rgb(131 115 252 / 0.12); }
.state-testing .pulse-dot { background: #b3a6ff; box-shadow: 0 0 12px rgb(131 115 252 / 0.9); }
.state-testing .pulse-dot::after { border-color: rgb(131 115 252 / 0.7); }
.state-next .state-mark { color: var(--faint); }
.status-col li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
  color: var(--muted);
}
.status-col li:last-child { border-bottom: 0; }
.status-col li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.68em;
  border-radius: 50%;
  background: var(--ice);
  opacity: 0.7;
}
.state-testing li::before { background: #b3a6ff; }
.state-next li::before { background: transparent; border: 1px solid var(--faint); }

.status-note { margin-top: 28px; color: var(--faint); font: 0.85rem var(--mono); letter-spacing: 0.04em; }

/* Final call to action */
.final-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  border: 1px solid transparent;
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(70% 80% at 50% 0%, rgb(131 115 252 / 0.2), transparent 70%) padding-box,
    linear-gradient(180deg, #0b1124, #060914) padding-box,
    linear-gradient(130deg, rgb(131 115 252 / 0.8), rgb(255 255 255 / 0.06) 35%, rgb(255 255 255 / 0.06) 65%, rgb(125 240 255 / 0.7)) border-box;
}
/* A slow band of light sweeping across the card (transform only, so it stays cheap). */
.final-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.04) 42%, rgb(125 240 255 / 0.08) 50%, rgb(255 255 255 / 0.04) 58%, transparent);
  transform: translateX(-120%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .final-card::before { animation: sweep 9s var(--ease-out) infinite; }
}
.final-mark { width: 72px; height: 72px; filter: drop-shadow(0 14px 30px rgb(80 90 255 / 0.5)); }
.final-title {
  font-size: clamp(2.3rem, 1.3rem + 4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.final-card p { max-width: 560px; color: var(--muted); font-size: 1.1rem; }
.final-card .actions { justify-content: center; margin-top: 8px; }

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  padding: 56px 0 36px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.015));
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand .brand img { width: 30px; height: 30px; }
.footer-brand p { margin-top: 12px; max-width: 340px; color: var(--faint); font-size: 0.95rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.05);
  color: var(--faint);
  font-size: 0.875rem;
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.site-footer-compact { padding-top: 0; border-top: 0; }
.site-footer-compact .footer-bottom { margin-top: 0; }

/* ---- Invite and 404 pages ------------------------------------------------ */

.page-center {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 40px) 16px 64px;
}
.page-glow {
  position: absolute;
  z-index: -2;
  left: 50%;
  top: 45%;
  width: 1000px;
  height: 1000px;
  margin: -500px 0 0 -500px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(131 115 252 / 0.24), rgb(74 146 246 / 0.08) 50%, transparent 72%);
  pointer-events: none;
}

.panel {
  width: min(580px, 100%);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background: rgb(9 13 28 / 0.86);
  box-shadow: var(--shadow);
  text-align: center;
}
.panel-mark { width: 64px; height: 64px; margin: 0 auto 22px; }
.panel .eyebrow { justify-content: center; }
.panel-title {
  margin-top: 14px;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.panel-text { margin: 18px auto 28px; max-width: 440px; color: var(--muted); }
.panel-note { margin-top: 24px; color: var(--faint); font-size: 0.9rem; }

.invite-label { margin-top: 28px; color: var(--faint); font: 500 0.75rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.invite-code {
  margin: 10px auto 26px;
  padding: 14px 18px;
  border: 1px dashed rgb(125 240 255 / 0.4);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.04);
  font: 600 clamp(1.4rem, 1.1rem + 1.6vw, 2rem)/1.2 var(--mono);
  letter-spacing: 0.12em;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
.copy-status { min-height: 1.6em; margin-top: 14px; color: #b4f7ff; font-size: 0.9rem; }
.steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.02);
  text-align: left;
  counter-reset: step;
}
.steps li { position: relative; padding-left: 36px; color: var(--muted); counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgb(131 115 252 / 0.18);
  color: #d0c9ff;
  font: 600 0.75rem var(--mono);
}

.lost-code {
  font-size: clamp(5rem, 3rem + 10vw, 8.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}

/* ---- Forms (account pages) ---------------------------------------------- */

.panel-form { text-align: left; }
.panel-form .panel-mark, .panel-form .panel-title, .panel-form > .panel-text, .panel-form .spinner, .panel-form .state-icon { text-align: center; margin-inline: auto; }
.panel-form > .panel-text { margin-bottom: 0; }
.panel-footer { margin-top: 24px; text-align: center; color: var(--muted); font-size: 0.95rem; }
.panel-footer a, .field-link, .check a, .legal-body a, .panel-note a { color: var(--ice); text-underline-offset: 3px; }

.form { display: grid; gap: 18px; margin-top: 28px; }
.form fieldset { display: grid; gap: 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form fieldset:disabled { opacity: 0.55; }
.form h3 { font-size: 1.05rem; font-weight: 650; }
.form-separated { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }

.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.field-link { font-size: 0.875rem; }
.optional { color: var(--faint); font-weight: 400; }

.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.04);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: rgb(255 255 255 / 0.24); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgb(125 240 255 / 0.18); background: rgb(255 255 255 / 0.06); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff8a9b; }
.field-help { color: var(--faint); font-size: 0.85rem; }
.field-help:empty { display: none; }
.field-help[data-kind="ok"] { color: #b4f7ff; }
.field-help[data-kind="error"], .field-error { color: #ffb3bf; font-size: 0.875rem; }

.input-with-button { position: relative; }
.input-with-button input { padding-right: 52px; }
.reveal-button {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}
.reveal-button:hover { color: var(--text); background: var(--surface-2); }
.reveal-button[aria-pressed="true"] { color: var(--ice); }
.reveal-button .icon { width: 20px; height: 20px; }

.check { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.95rem; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--violet); }

.strength { display: flex; align-items: center; gap: 10px; min-height: 18px; color: var(--faint); font-size: 0.8rem; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 120px; }
.strength-bar i { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.1); }
.strength[data-level="1"] i:nth-child(-n + 1) { background: #ff8a9b; }
.strength[data-level="2"] i:nth-child(-n + 2) { background: #ffc46b; }
.strength[data-level="3"] i:nth-child(-n + 3) { background: var(--blue); }
.strength[data-level="4"] i { background: var(--ice); }

.form-alert {
  padding: 12px 14px;
  border: 1px solid rgb(255 138 155 / 0.4);
  border-radius: 12px;
  background: rgb(255 138 155 / 0.08);
  color: #ffd1d8;
  font-size: 0.95rem;
}
.form-alert[data-kind="success"] { border-color: rgb(125 240 255 / 0.35); background: rgb(125 240 255 / 0.08); color: #c9f9ff; }

.btn-block { width: 100%; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-danger { color: #fff; background: #c43a55; border-color: #d65872; }
.btn-danger:hover { background: #d0425f; }

.spinner {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border: 3px solid rgb(255 255 255 / 0.12);
  border-top-color: var(--ice);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .spinner { border-top-color: var(--ice); border-right-color: var(--violet); } }

.state-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
}
.state-icon .icon { width: 30px; height: 30px; }
.state-icon-ok { border: 1px solid rgb(125 240 255 / 0.35); background: rgb(125 240 255 / 0.1); color: var(--ice); }
.state-icon-warn { border: 1px solid rgb(255 196 107 / 0.4); background: rgb(255 196 107 / 0.1); color: #ffd28a; }

/* ---- Account page -------------------------------------------------------- */

.account-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) 0 80px;
}
.account-page > .panel { margin: 10vh auto 0; }
.account-layout { display: grid; gap: 20px; max-width: 820px; }

.account-card {
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(9 13 28 / 0.82);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.account-card > h2 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.card-intro { margin-top: 6px; color: var(--muted); }
.account-card .form { margin-top: 22px; }
.account-card .actions { margin-top: 20px; }
.account-danger { border-color: rgb(214 88 114 / 0.35); }

.account-overview { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar { flex: none; width: 72px; height: 72px; padding: 8px; border-radius: 20px; background: rgb(255 255 255 / 0.04); border: 1px solid var(--border); }
.avatar img { width: 100%; height: 100%; }
.overview-text { min-width: 0; }
.overview-text h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.overview-username { color: var(--ice); font-family: var(--mono); }
.overview-meta { margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }

.account-banner, .account-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 22px;
  border-radius: 18px;
}
.account-banner { border: 1px solid rgb(214 88 114 / 0.5); background: rgb(196 58 85 / 0.14); }
.account-notice { border: 1px solid rgb(255 196 107 / 0.4); background: rgb(255 196 107 / 0.08); }
.account-notice .copy-status { flex-basis: 100%; margin: 0; }

.account-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.account-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.account-nav a:hover { color: var(--text); background: var(--surface-2); }

.session-list, .event-list { display: grid; margin-top: 18px; }
.session-row, .event-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.session-row:last-child, .event-row:last-child { border-bottom: 0; }
.session-title { font-weight: 600; }
.session-detail { color: var(--faint); font-size: 0.875rem; overflow-wrap: anywhere; }

/* ---- Legal pages --------------------------------------------------------- */

.legal { padding: calc(var(--header-h) + 56px) 0 96px; }
.legal-body { max-width: 760px; }
.legal-body h1 { margin-top: 16px; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; }
.legal-updated { margin-top: 10px; color: var(--faint); font-family: var(--mono); font-size: 0.85rem; }
.legal-body h2 { margin-top: 44px; font-size: 1.4rem; font-weight: 650; letter-spacing: -0.02em; }
.legal-body h3 { margin-top: 24px; font-size: 1.1rem; font-weight: 650; }
.legal-body p, .legal-body ul { margin-top: 14px; color: var(--muted); }
.legal-body > p:first-of-type { margin-top: 0; }
.legal-body ul { padding-left: 1.2em; }
.legal-body li + li { margin-top: 8px; }
.legal-body code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }

/* ---- Scroll reveal (classes added by site.js only when motion is allowed) - */

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

/* Animations pause while their section is off screen. */
.is-paused, .is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }

/* ---- Keyframes ----------------------------------------------------------- */

@keyframes enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes grad-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.8; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2); opacity: 0; } }
@keyframes drip {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: translateY(20px) scaleY(1); opacity: 0; }
}
@keyframes travel { to { transform: translateX(100%); } }
@keyframes sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(260%); } }
@keyframes bar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* ---- Preferences --------------------------------------------------------- */

@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;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (forced-colors: active) {
  .grad-text { background: none; -webkit-text-fill-color: currentColor; }
  .btn, .card, .pillar, .status-col, .panel, .notice { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .hero-stars, .hero-light, .hero-floor, .hero-visual, .scroll-cue, .notice { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
