:root {
  --bg: #040814;
  --bg-2: #08122a;
  --ink: #eef5ff;
  --ink-dim: #9fb3d1;
  --ink-mute: #7c90b4;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --ice: #bfe0ff;
  --line: rgba(147, 197, 253, 0.16);
  --card: #f6faff;
  --card-ink: #0b1630;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- shared ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
.mono-label.sm { font-size: 11px; }
.mono-label.blue { color: var(--blue-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; box-shadow: 0 0 10px var(--blue); }
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .22s; } .d3 { animation-delay: .38s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.round-btn, .pill-btn {
  background: rgba(4, 8, 20, .7);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  transition: border-color .2s, transform .2s var(--ease);
}
.round-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.pill-btn { height: 30px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.round-btn:hover, .pill-btn:hover { border-color: var(--blue-2); }
.round-btn:active, .pill-btn:active { transform: scale(.96); }

/* ---------- hero ---------- */
/* hero is one screen tall; the character's video frames are scrubbed
   while the hero scrolls out, so the dance ends as the next section arrives */
.hero { position: relative; height: 100svh; }
.hero-sticky { position: relative; height: 100%; display: flex; align-items: center; overflow: hidden; }
.seq-aura {
  /* the video's own blue, spread across the hero and sinking into night at the edges */
  position: absolute; inset: 0;
  background: radial-gradient(70vh 75vh at var(--cx, 60%) 46%, #045ef2 0%, #0452d8 38%, #063a9a 62%, #071d4d 82%, #040814 100%);
}
.seq-wrap {
  position: absolute; left: 60%; top: -6vh; height: 118vh; aspect-ratio: 600 / 1066; translate: -50% 0;
  will-change: transform;
  /* feather the video's blue rectangle into the night background */
  -webkit-mask-image: radial-gradient(50% 50% at 50% 46%, #000 58%, transparent 100%);
  mask-image: radial-gradient(50% 50% at 50% 46%, #000 58%, transparent 100%);
}
.seq-poster, .seq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.seq-poster { object-fit: cover; }
.seq-canvas { opacity: 0; transition: opacity .3s; }
.seq-canvas.ready { opacity: 1; }
.seq-hud { position: absolute; right: 24px; bottom: 24px; z-index: 3; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.seq-hud b { color: var(--ice); font-weight: 700; }
.hero-bg { position: absolute; inset: 0; }
.char { position: absolute; display: block; max-width: none; pointer-events: none; user-select: none; }

.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 55% 35%, rgba(37, 99, 235, .28), transparent 70%),
    linear-gradient(90deg, rgba(4, 8, 20, .94) 0%, rgba(4, 8, 20, .62) 32%, rgba(4, 8, 20, 0) 52%, rgba(4, 8, 20, 0) 80%, rgba(4, 8, 20, .4) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(4, 8, 20, .6) 14%, transparent 38%);
}
#sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hero-inner {
  position: relative; z-index: 2; will-change: transform, opacity; width: 100%; max-width: 1200px; margin: 0 auto;
  /* copy sits in the lower part of the screen, like a title card over the character */
  align-self: flex-end; padding: 110px 6vw 11vh;
  display: grid; grid-template-columns: 1fr 340px; align-items: end; gap: 40px;
}
.brand-row { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.logo-tile {
  width: 52px; height: 52px; border-radius: 10px;
  background: linear-gradient(140deg, #60a5fa, #1d4ed8);
  display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(59, 130, 246, .45), inset 0 1px 0 rgba(255,255,255,.35);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 26px; font-weight: 700;
}
.brand-line { width: 44px; height: 1px; background: var(--ink-mute); }
h1 {
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: .98; letter-spacing: -.035em; font-weight: 600;
  margin-bottom: 22px;
}
.grad { color: var(--blue-2); text-shadow: 0 0 40px rgba(59, 130, 246, .45); }
.lede { font-family: var(--mono); font-size: 14px; line-height: 1.75; color: var(--ink-dim); max-width: 440px; }

/* auth card */
.auth-card {
  background: var(--card); color: var(--card-ink);
  border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255,255,255,.6) inset;
  font-family: var(--mono);
}
.auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-head .mono-label { color: #1d4ed8; font-size: 11px; }
.auth-head .fp { margin-left: auto; color: #94a3b8; }
.auth-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid #e3ebf6;
}
.auth-row .mono-label { color: #64748b; }
.mono-val { font-size: 13px; font-weight: 700; text-align: right; }
.mono-val.dim { color: #94a3b8; }
.mono-val.ok { color: #1d4ed8; }
.mono-val.bad { color: #dc2626; }
.init-btn {
  margin-top: 18px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  background: #eef4fc; border: 1px solid #d6e2f2; color: var(--card-ink);
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .14em;
  transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.init-btn:hover { background: #e2edfb; border-color: var(--blue-2); }
.init-btn:active { transform: scale(.98); }
.init-btn .chev { color: #94a3b8; font-size: 18px; line-height: 0; }
.init-btn.granted { background: #2563eb; color: #fff; border-color: #2563eb; }
.init-btn.granted .chev { color: #fff; }
.init-btn[disabled] { opacity: .6; cursor: wait; }
.auth-msg { font-size: 11px; line-height: 1.5; color: #64748b; margin-top: 10px; min-height: 1em; }

.scroll-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--ink-mute); }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- story ---------- */
.story { height: 190vh; position: relative; }
.story-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.story-bg {
  position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover;
  filter: blur(40px) saturate(1.2) brightness(.35); transform: scale(1.1);
}
.story-char {
  left: 50%; bottom: 0; height: 100%; width: auto; translate: -50% 0;
  transform-origin: 43% 50%; will-change: transform, filter;
}
.reticle {
  /* sits over the eyes at the zoomed keyframe (scale 1.75, origin 43% 50%) */
  position: absolute; left: calc(50% + 2vh); top: 69%; width: 46vh; height: 22vh;
  translate: -50% -50%; opacity: 0; scale: 1.25; z-index: 1;
  transition: opacity .5s var(--ease), scale .7s var(--ease);
}
.reticle.on { opacity: 1; scale: 1; }
.reticle i { position: absolute; width: 26px; height: 26px; border: 2px solid #fff; filter: drop-shadow(0 0 1px #0b1630) drop-shadow(0 1px 3px rgba(4, 8, 20, .8)); }
.reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.reticle span { position: absolute; left: 0; top: calc(100% + 10px); color: #fff; white-space: nowrap; background: rgba(4, 8, 20, .7); padding: 4px 8px; border-radius: 4px; }
.story-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 70% at 50% 50%, transparent 30%, rgba(4, 8, 20, .75) 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 22%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.step {
  z-index: 2; padding: 18px 20px; border-radius: 12px;
  background: rgba(4, 8, 20, .62); border: 1px solid rgba(147, 197, 253, .18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.step p { color: #c9d8ee; }
.story-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-lines path {
  fill: none; stroke: var(--blue-2); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px var(--blue));
}
.step {
  position: absolute; max-width: 300px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.step.on { opacity: 1; transform: none; }
.step h2 { font-size: 26px; letter-spacing: .02em; margin: 6px 0 10px; }
.step p { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-dim); }
.s1 { top: 14%; right: 18%; text-align: right; }
.s2 { top: 40%; left: 14%; }
.s3 { top: 66%; right: 16%; text-align: right; }
.story-progress { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 2px; height: 120px; background: var(--line); border-radius: 2px; }
.story-progress span { display: block; width: 100%; height: 0%; background: var(--blue-2); border-radius: 2px; box-shadow: 0 0 8px var(--blue); }

/* ---------- manifesto ---------- */
.manifesto {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 6vw; position: relative;
  background: radial-gradient(40% 50% at 50% 50%, rgba(59, 130, 246, .14), transparent 70%);
}
.manifesto { overflow: hidden; }
.mf-bg {
  position: absolute; left: 50%; top: 50%; height: 120%; translate: -50% -50%;
  filter: blur(46px) saturate(1.3); opacity: .32; pointer-events: none; will-change: transform;
}
.manifesto > :not(.mf-bg) { position: relative; }
.mf-line { width: 100%; max-width: 1100px; height: 1px; background: var(--line); }
.mf-text { font-size: clamp(34px, 5.6vw, 72px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; padding: 56px 0; }
.mf-text .w { color: rgba(238, 245, 255, .16); transition: color .5s var(--ease); }
.mf-text .w.lit { color: var(--ink); }
.mf-text .w.hi.lit { color: var(--blue-2); text-shadow: 0 0 30px rgba(96, 165, 250, .45); }
.mf-cta { margin-top: 40px; color: var(--ink-mute); transition: color .2s; }
.mf-cta:hover { color: var(--blue-2); }

/* ---------- features ---------- */
.features { padding: 40px 6vw 120px; }
.feat-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.feat { padding: 30px 24px 34px; border-right: 1px solid var(--line); background: rgba(8, 18, 42, .4); transition: background .3s; }
.feat:last-child { border-right: 0; }
.feat:hover { background: rgba(37, 99, 235, .08); }
.feat h3 { font-size: 20px; margin: 14px 0 8px; font-weight: 600; }
.feat p { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-dim); }

/* ---------- community + faq ---------- */
/* one blue dome: community card on top, FAQ panel floating inside, blue continues below it */
.signal {
  position: relative; overflow: hidden; padding-bottom: 150px;
  background: linear-gradient(180deg, #0a5cf0, #0b63ff);
  border-radius: 50% 50% 0 0 / 90px 90px 0 0;
}
.signal-band { position: relative; padding: 110px 6vw 220px; }
.signal-art {
  position: absolute; left: 50%; top: 30px; height: calc(100% - 30px); width: auto; max-width: none;
  translate: -50% 0; pointer-events: none; will-change: transform;
  opacity: .72; filter: saturate(.5) brightness(1.3) contrast(.85);
}
.comm-card {
  position: relative; z-index: 1; max-width: 940px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
  padding: 52px 46px 50px; border-radius: 10px;
  background: rgba(244, 248, 255, .9); color: #0b1630;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px -30px rgba(4, 8, 20, .55);
}
.comm-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .22em; color: #1d4ed8; }
.comm-label i { width: 6px; height: 6px; border-radius: 50%; background: #1d4ed8; }
.comm-card h2 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; margin: 20px 0 22px; max-width: 420px; }
.comm-card p { font-family: var(--mono); font-size: 13px; line-height: 1.75; color: #4b5872; max-width: 400px; }
.comm-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .14em;
  padding: 15px 22px; border-radius: 4px; transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn.primary { background: #1d4ed8; color: #fff; }
.btn.primary:hover { background: #1e40af; }
.btn.ghost { background: #e9effb; color: #0b1630; border: 1px solid #d3def3; }
.btn.ghost:hover { border-color: #1d4ed8; }

/* FAQ: a white sheet sliding over the band, notched at the top-right */
.faq {
  position: relative; z-index: 2; margin: -120px 12vw 0 0; padding: 72px 6vw 64px 4vw;
  background: #fbfcff; color: #0b1630; border-radius: 0 64px 64px 0;
  box-shadow: 0 40px 90px -40px rgba(4, 8, 20, .5);
}
.faq-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .26em; color: #2563eb; }
.faq h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.03em; font-weight: 600; margin: 16px 0 14px; }
.faq-sub { font-size: 15.5px; line-height: 1.6; color: #4b5872; max-width: 560px; margin-bottom: 52px; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
.faq-item { border-bottom: 1px solid #e3eaf5; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; text-align: left; font-family: var(--mono); font-size: 14px; color: #0b1630; }
.faq-q:hover { color: #1d4ed8; }
.faq-q .plus { color: #2563eb; font-size: 18px; transition: transform .3s var(--ease); }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { font-size: 14.5px; line-height: 1.75; color: #4b5872; padding-bottom: 24px; max-width: 560px; }

/* ---------- footer (light, like a sheet of paper under the night page) ---------- */
.footer {
  position: relative; overflow: hidden; color: #4b5872;
  background: #fbfcff; padding: 44px 6vw 0;
}
.footer::before {
  content: ""; position: absolute; left: 50%; bottom: -260px; width: 1100px; height: 420px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(37, 99, 235, .12), rgba(37, 99, 235, 0));
  pointer-events: none;
}
.foot-main { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 48px; max-width: 1400px; margin: 0 auto; }
.foot-logo {
  width: 46px; height: 46px; border-radius: 9px; object-fit: cover; object-position: 42% 36%;
  background: #066afb; display: block;
}
.foot-brand p { font-size: 15.5px; line-height: 1.75; max-width: 500px; margin: 26px 0 26px; }
.foot-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid #dbe5f6; background: #f2f6ff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #1d4ed8;
}
.foot-pill i { width: 6px; height: 6px; border-radius: 50%; background: #1d4ed8; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 6px; }
.foot-cols div { display: flex; flex-direction: column; gap: 16px; }
.foot-cols h3 { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .24em; color: #2563eb; margin-bottom: 6px; }
.foot-cols a { font-size: 15.5px; color: #4b5872; width: fit-content; transition: color .2s; }
.foot-cols a:hover { color: #0b1630; }
/* giant wordmark sitting on the bottom rule */
.foot-mark {
  position: relative; max-width: 1400px; margin: 40px auto 0;
  overflow: hidden; display: flex; justify-content: center; align-items: flex-end;
}
.foot-mark::before {
  content: ""; position: absolute; left: 50%; bottom: -30%; width: 90%; height: 130%; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .3), rgba(59, 130, 246, .08) 60%, rgba(59, 130, 246, 0));
  filter: blur(20px);
}
.foot-mark span {
  position: relative; display: block;
  font-family: "Anton", "Space Grotesk", sans-serif; font-weight: 400;
  font-size: clamp(60px, 20vw, 360px); letter-spacing: .01em; white-space: nowrap;
  /* Anton: line-height 1 fits the full caps; pull the empty descent so letters sit on the rule */
  line-height: 1; margin-bottom: -.06em;
  color: rgba(37, 99, 235, .3);
  translate: 0 var(--rise, 0%); will-change: translate;
}
.foot-x { display: inline-flex; align-items: center; gap: 8px; color: #4b5872; transition: color .2s; }
.foot-x:hover { color: #0b1630; }
.foot-bottom {
  position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1400px; margin: 0 auto; padding: 20px 0 24px; border-top: 1px solid #c9d7f1;
  font-family: var(--mono); font-size: 11.5px; color: #5d6a82;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .comm-card { grid-template-columns: 1fr; padding: 36px 26px; gap: 28px; }
  .faq { margin-right: 5vw; padding: 52px 24px 40px; border-radius: 0 32px 32px 0; }
  .faq-list { grid-template-columns: 1fr; }
  .signal { border-radius: 50% 50% 0 0 / 40px 40px 0 0; padding-bottom: 90px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 100px; }
  .auth-card { max-width: 360px; }
  .seq-wrap { left: 50%; }
  .seq-aura { --cx: 50%; }
  .seq-wrap { opacity: .55; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feat:nth-child(2) { border-right: 0; }
  .feat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .s1, .s2, .s3 { left: 8%; right: 8%; text-align: left; max-width: none; }
  .foot-main { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 520px) {
  .foot-cols { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.logo-tile { overflow: hidden; padding: 0; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
