:root {
  --fog: #e9eef2;      /* page: the grey-blue of passthrough */
  --panel: #f7f9fb;    /* raised surfaces */
  --ink: #0f1b2d;      /* text */
  --muted: #5d6b80;    /* secondary text */
  --boundary: #3d5afe; /* guardian-boundary blue: links, grid, focus */
  --live: #ffb020;     /* "open now" only */
  --line: #cfd8e1;

  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--boundary); }
code { font-family: var(--mono); font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--boundary); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--fog); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Header floats over the lobby */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  max-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: linear-gradient(to bottom, rgba(233, 238, 242, 0.92), rgba(233, 238, 242, 0));
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font: 700 1.25rem/1 var(--display); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.top nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--boundary); }

/* Journey: a tall scroll track with a sticky 3D view; text beats fade in over it */
.journey { position: relative; height: 900vh; background: var(--fog); }
.journey-sticky {
  position: sticky; top: 0; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  padding: 88px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) 56px;
}
.journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.journey-fade { position: absolute; inset: 0; z-index: -1; background: var(--fog); opacity: 0; pointer-events: none; }
.journey:not(.is-ready) .journey-sticky {
  background: radial-gradient(120% 80% at 70% 60%, #d7deea 0%, var(--fog) 60%);
}
.journey-loading {
  position: absolute; right: var(--gutter); bottom: 20px; margin: 0;
  font: 400 0.85rem/1 var(--mono); color: var(--muted);
}

.beat {
  position: absolute; left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  max-width: min(34rem, calc(100% - 2 * var(--gutter)));
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.beat.on { opacity: 1; transform: none; pointer-events: auto; }

/* Glass panels: the same frosted look a headset UI uses */
.beat-intro, .beat-card, .beat-end {
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(247, 249, 251, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
          backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 30px 60px -36px rgba(15, 27, 45, 0.5);
}
.beat-intro { top: clamp(88px, 14vh, 140px); }
.beat-card { bottom: clamp(56px, 10vh, 96px); max-width: min(28rem, calc(100% - 2 * var(--gutter))); }
.beat-end { top: 50%; transform: translateY(calc(-50% + 16px)); }
.beat-end.on { transform: translateY(-50%); }
.beat-card h2, .beat-end h2 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); }
.beat-card > p, .beat-end > p { margin: 10px 0 0; }
.when { margin: 0 0 8px !important; font: 600 0.85rem/1 var(--mono); color: var(--boundary); text-transform: uppercase; letter-spacing: 0.04em; }


.scroll-cue { margin: 18px 0 0; font-size: 0.9rem; color: var(--muted); }
.scroll-cue::after { content: " \2193"; color: var(--boundary); }

.hero-h1 { margin: 0 0 18px; font: 700 clamp(1.5rem, 2.6vw, 2.125rem)/1.15 var(--display); letter-spacing: -0.02em; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; }
.address { margin: 0; }
.address-bar {
  display: inline-flex; align-items: baseline; max-width: 100%;
  font: 600 clamp(1.75rem, 5vw, 3.5rem)/1.05 var(--mono);
  letter-spacing: -0.04em;
  padding: 0.2em 0.45em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 0 #fff inset, 0 14px 30px -20px rgba(15, 27, 45, 0.4);
}
.host { color: var(--muted); font-weight: 400; }
.path { color: var(--boundary); min-width: 2ch; }
.caret {
  display: inline-block; width: 0.08em; height: 0.9em; margin-left: 0.04em;
  background: var(--boundary); align-self: center;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lede { margin: 16px 0 0; font-size: clamp(1rem, 1.4vw, 1.125rem); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.status-pill {
  display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--line); color: var(--ink); font-size: 0.7rem; letter-spacing: 0.04em;
}
.status-pill.live { background: var(--live); }
.stops { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.stops li {
  padding: 6px 12px; border-radius: 999px; font-size: 0.875rem;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.stops li.on { background: var(--ink); border-color: var(--ink); color: var(--fog); }
.card-link {
  display: inline-block; margin-top: 16px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 700 1rem/1.4 var(--body); color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--boundary); text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.card-link:hover { color: var(--boundary); }

/* Without WebGL: show the beats as a plain stacked story */
.journey.no-webgl { height: auto; }
.no-webgl .journey-sticky { position: static; height: auto; display: grid; gap: 16px; }
.no-webgl .beat { position: static; opacity: 1; transform: none; pointer-events: auto; }
.no-webgl .journey-loading { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); transition: transform 0.15s ease, background 0.15s ease;
}
.btn.primary { background: var(--ink); color: var(--fog); }
.btn.primary:hover { background: var(--boundary); border-color: var(--boundary); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--panel); }
.btn:active { transform: translateY(1px); }

/* Sections */
.catalog, .steps, .waitlist { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head p { margin: 0; color: var(--muted); }
h2 { margin: 0; font: 700 clamp(1.5rem, 3vw, 2.125rem)/1.15 var(--display); letter-spacing: -0.02em; }
h3 { margin: 0; font: 700 1.375rem/1.2 var(--display); letter-spacing: -0.01em; }

/* Catalog: one featured live subject, then the coming ones */
.featured {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center;
  padding: clamp(14px, 1.6vw, 18px); background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 30px 60px -40px rgba(15, 27, 45, 0.45);
}
.featured-media { border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; background: #1d232c; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-media img[height] { height: 100%; }
.featured-body { padding: clamp(4px, 1vw, 12px) clamp(4px, 1vw, 16px) clamp(4px, 1vw, 12px) 0; min-width: 0; }
.featured .status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; font-weight: 700; }
.featured h3 { margin: 10px 0 0; font-size: clamp(1.75rem, 3.4vw, 2.5rem); overflow-wrap: anywhere; }
.address-chip {
  display: inline-block; margin-top: 14px; padding: 8px 16px; border-radius: 999px;
  background: var(--fog); border: 1px solid var(--line);
  font: 600 clamp(1.1rem, 1.8vw, 1.35rem)/1 var(--mono); color: var(--boundary); letter-spacing: -0.02em;
}
.address-chip span { color: var(--muted); font-weight: 400; }
.featured-line { margin: 16px 0 0; }
.topics { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.topics li { padding: 6px 12px; border-radius: 999px; font-size: 0.875rem; border: 1px solid var(--line); background: var(--fog); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25); }

.coming-title { margin: clamp(40px, 6vw, 64px) 0 16px; font-size: 1.125rem; color: var(--muted); font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.coming { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.tile img, .tile .blueprint { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tile .blueprint {
  display: grid; place-items: center; background-color: #1b2a4a;
  background-image: linear-gradient(rgba(233, 238, 242, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(233, 238, 242, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
}
.blueprint span { font: 600 0.8rem/1 var(--mono); color: var(--fog); padding: 6px 10px; border: 1px solid rgba(233, 238, 242, 0.5); border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.tile-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tile h4 { margin: 0; font: 700 1.2rem/1.2 var(--display); letter-spacing: -0.01em; }
.tile code { color: var(--boundary); font-size: 0.95rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; flex: 1; }
.notify {
  align-self: flex-start; margin-top: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: 700 0.875rem/1 var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line);
}
.notify:hover { border-color: var(--boundary); color: var(--boundary); }

@media (max-width: 960px) {
  .featured { grid-template-columns: 1fr; }
  .featured-body { padding: 4px 8px 8px; }
  .coming { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .coming { grid-template-columns: 1fr; }
}

/* Free vs Pro */
.plans { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 0; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.plan-pro { background: var(--ink); color: var(--fog); border-color: var(--ink); }
.plan-name { margin: 0 0 12px; font: 700 1.25rem/1.2 var(--display); display: flex; align-items: center; gap: 10px; }
.plan ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.plan-pro li::marker { color: var(--live); }
.plan-pro .notify { margin-top: 18px; color: var(--fog); border-color: rgba(233, 238, 242, 0.4); }
.plan-pro .notify:hover { color: var(--live); border-color: var(--live); }
.ai-note { margin: 14px 0 0; font-size: 0.875rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-badge { padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--fog); font: 600 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr; } }

/* Steps: a real sequence, so it's numbered */
.step-list { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; }
.step-list li {
  counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 16px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.step-list li:last-child { border-bottom: 1px solid var(--line); }
.step-list li::before {
  content: counter(step); font: 600 1.25rem/1.4 var(--mono); color: var(--boundary);
}
.step-list strong { display: block; }

/* Waitlist */
.waitlist { text-align: left; }
.waitlist > p { margin: 8px 0 24px; color: var(--muted); }
.wl-form { display: flex; flex-wrap: wrap; gap: 12px; max-width: 560px; }
.wl-form input[type='email'] {
  flex: 1 1 240px; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: inherit;
}
.wl-form input[type='email']:focus-visible { border-color: var(--boundary); }
.wl-msg { min-height: 1.6em; margin: 12px 0 0; }
.wl-msg.error { color: #b42318; }

/* Footer */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line);
}

/* 404 */
.lost { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 12vw, 140px) var(--gutter); }
.lost p { color: var(--muted); max-width: 34rem; }

@media (max-width: 560px) {
  .top nav a:not(:last-child) { display: none; }
  .address-bar { border-radius: 18px; }
}

/* Phones: every panel becomes a compact sheet at the bottom so the 3D scene keeps the top of the screen */
@media (max-width: 760px) {
  .journey-sticky { padding: 64px 12px 12px; }
  .beat, .beat-intro, .beat-card, .beat-end {
    top: auto; bottom: 12px; left: 12px; right: 12px; max-width: none;
    padding: 14px 16px 16px; border-radius: 20px;
    background: rgba(247, 249, 251, 0.86);
  }
  .beat-end, .beat-end.on { transform: none; }
  .beat { transform: translateY(12px); transition-duration: 0.25s; }
  .beat.on { transform: none; }
  .hero-h1 { font-size: 1.3rem; margin-bottom: 10px; }
  .eyebrow { margin-bottom: 6px; font-size: 0.8rem; }
  .address-bar { font-size: 1.45rem; padding: 0.18em 0.4em; }
  .lede { display: none; }
  .scroll-cue { margin-top: 10px; font-size: 0.8rem; }
  .actions { gap: 8px; margin-top: 12px; }
  .beat .btn { min-height: 40px; padding: 0 14px; font-size: 0.875rem; }
  .beat-intro .actions a[href="#subjects"] { display: none; }
  .beat-card h2, .beat-end h2 { font-size: 1.2rem; }
  .beat-card > p:not(.when), .beat-end > p {
    margin-top: 6px; font-size: 0.875rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .when { font-size: 0.72rem !important; }
  .stops { margin-top: 10px; gap: 6px; }
  .stops li { padding: 4px 10px; font-size: 0.78rem; }
  .card-link { margin-top: 10px; font-size: 0.9rem; }
  .journey-loading { bottom: auto; top: 70px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beat { transition: none; }
  .caret { animation: none; }
  .btn { transition: none; }
}
