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

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--signal); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 56px; } /* the platform page's header */
/* The home page's header stays on screen; the platform page's does not (its scene is sticky itself). */
.topbar.sticky { position: sticky; top: 0; z-index: 20; background: rgba(14, 22, 32, 0.94); backdrop-filter: blur(8px); }
.topbar-in { display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 32px; }
.site-nav { display: flex; gap: 24px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--text); }
html:not([data-world]) .nav-demo { display: none; }
.topbar-cta { margin-left: auto; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid #2b3b4d; border-radius: var(--radius); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; background: rgba(19, 30, 41, 0.7); }
.topbar-cta[hidden] { display: none; }
.topbar-cta .short { display: none; }
.nav-toggle { display: none; }
section[id] { scroll-margin-top: 64px; }
@media (max-width: 860px) {
  .topbar-in { gap: 10px; padding: 0 16px; height: 56px; }
  .topbar-cta { background: var(--teal); color: var(--ink); border-color: transparent; }
  .topbar-cta .long { display: none; }
  .topbar-cta .short { display: inline; }
  .nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #2b3b4d; border-radius: var(--radius); background: transparent; cursor: pointer; }
  .topbar-cta[hidden] + .nav-toggle { margin-left: auto; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 16px; height: 2px; background: var(--text); content: ''; position: relative; }
  .nav-toggle span::before { position: absolute; top: -5px; }
  .nav-toggle span::after { position: absolute; top: 5px; }
  .site-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
  html[data-nav-open] .site-nav { display: flex; }
  .site-nav a { padding: 14px 16px; border-top: 1px solid var(--line-soft); font-size: 16px; }
  section[id] { scroll-margin-top: 56px; }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand img { width: 28px; height: 28px; }
.topbar .tag { margin-left: auto; color: var(--muted); font-size: 13px; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin: 0 0 12px; }
h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: clamp(22px, 4vw, 30px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lede { color: var(--muted); max-width: 64ch; font-size: 18px; }

.intro { padding: 56px 0 40px; }
.hint { color: var(--faint); font-size: 13px; margin-top: 20px; }

.scene-track { position: relative; height: 500vh; }
.scene-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; background: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scene-frame { display: block; width: 100%; height: 100%; border: 0; }
.scene-fallback { padding: 48px var(--gutter); max-width: var(--maxw); margin: 0 auto; color: var(--muted); }

section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--muted); margin: 0; }
.card .stage { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.stage.finished { color: var(--green); }
.stage.shipping { color: var(--signal); }
.stage.building { color: var(--amber); }
.card.ahead { border-style: dashed; }

.episode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.episode-head { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font: 12px var(--font-mono); margin-bottom: 8px; }
.episode-title { margin: 0 0 6px; }
.episode-summary { color: var(--muted); margin: 0 0 12px; }
.episode-soon { color: var(--amber); font-size: 14px; margin: 0; }
.player { aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.player video, .player iframe { width: 100%; height: 100%; border: 0; display: block; }

.status-line { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* Start with us: plain DOM, no motion. The contact links stay hidden until contact.json has loaded. */
#about .who { color: var(--muted); max-width: 64ch; }
.start .routes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 24px 0 8px; }
.start .route-note { flex-basis: 100%; margin: 0; color: var(--faint); font-size: 14px; }
.start [hidden] { display: none !important; } /* .cta sets display, which would beat the hidden attribute */
.start .contact-number { font-family: var(--font-mono); }
.start .cta.secondary { background: transparent; color: var(--signal); border: 1px solid var(--teal); }
.start .composer { margin-top: 32px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 720px; }
.start .fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 16px; }
.start .fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.start .fields .wide { grid-column: 1 / -1; }
.start input, .start select { font: inherit; color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
.start input:focus-visible, .start select:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.start .hint { margin-top: 12px; }
footer { border-top: 1px solid var(--line); padding: 32px 0 56px; color: var(--faint); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-track { height: 100vh; height: 100svh; }
}

/* ---- the privacy note, and the footer's links ---- */
.legal { padding-block: 48px 72px; max-width: 72ch; }
.legal h2 { margin-top: 28px; font-size: 20px; }
.legal p { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
