/*
 * Lunar — one visual world: night. The page is lit by the moon behind it (see moon.js); solid sections
 * slide over it like an eclipse, and it rises again, full, behind the contact section.
 *
 * Type: Archivo stretched wide for display (the extended grotesks of mission patches and launch
 * schedules), Archivo at normal width for reading, Martian Mono for telemetry-style labels.
 */
:root {
  --void: #05070B;
  --night: #0A0D14;
  --panel: #10141D;
  --panel-2: #161B26;
  --line: rgba(214, 222, 240, .09);
  --line-2: rgba(214, 222, 240, .16);
  --text: #ECE8DF;
  --muted: #9AA0AD;
  --faint: #626A79;
  --gold: #E9CF9A;
  --gold-2: #F6E6C2;
  --earth: #8AB4FF;
  --ok: #6FD3A0;
  --warn: #F0B45C;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4.5vw, 56px);
  --max: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--void); color: var(--text);
  font: 400 17px/1.6 var(--f-body); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Film grain, barely there: keeps large dark areas from banding and looking flat. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.kicker {
  font: 400 11.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 22px; display: flex; align-items: center; gap: 12px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
h2 {
  font: 600 clamp(38px, 5.4vw, 80px)/.98 var(--f-display); font-stretch: 118%;
  letter-spacing: -.045em; margin: 0; text-wrap: balance;
}

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.moon { position: absolute; left: 0; top: 0; width: 600px; height: 600px; will-change: transform, opacity; visibility: hidden; }
.moon-in { position: absolute; inset: 0; }
.halo {
  position: absolute; inset: -38%; border-radius: 50%; opacity: var(--glow, .5);
  background: radial-gradient(circle, rgba(233, 207, 154, .26) 0%, rgba(233, 207, 154, .09) 32%, rgba(138, 180, 255, .035) 48%, transparent 66%);
}
.moon-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.moon-css { display: none; }
.no-webgl .moon-gl { display: none; }
.no-webgl .moon-css {
  display: block; position: absolute; inset: 1%; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #F3EEE2 0%, #D8D2C4 45%, #A39D90 100%);
  box-shadow: inset -40px -30px 80px rgba(0, 0, 0, .35);
}

main, .foot { position: relative; z-index: 1; }

/* ---------- header ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); pointer-events: none; }
.top .bar {
  pointer-events: auto; width: min(calc(100% - 24px), calc(var(--max) - 2 * var(--gutter) + 40px));
  margin: 12px auto 0; height: 62px; padding: 0 8px 0 20px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid transparent; transition: background .5s var(--ease), border-color .5s, backdrop-filter .5s;
}
.top.scrolled .bar { background: rgba(10, 13, 20, .62); border-color: var(--line); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand span { font: 600 15px/1 var(--f-display); font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 4px; }
nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; padding: 10px 14px; border-radius: 999px; transition: color .25s, background .25s; }
nav a:hover { color: var(--text); background: rgba(236, 232, 223, .05); }
nav .nav-cta { color: var(--void); background: var(--gold); font-weight: 500; margin-left: 8px; }
nav .nav-cta:hover { color: var(--void); background: var(--gold-2); }
@media (max-width: 820px) { nav a:not(.nav-cta) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 26px;
  border-radius: 999px; font: 500 16px/1 var(--f-body); text-decoration: none; transition: transform .4s var(--ease), background .3s, border-color .3s, color .3s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--gold); color: var(--void); box-shadow: 0 0 0 1px rgba(246, 230, 194, .4) inset, 0 10px 40px -12px rgba(233, 207, 154, .55); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transition: transform .9s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-2); background: rgba(10, 13, 20, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(236, 232, 223, .4); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; min-height: max(100svh, 680px); display: flex; align-items: center; }
.hero > .wrap { padding-block: 130px 170px; }
.eyebrow {
  font: 400 12px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 30px;
}
.eyebrow span { color: var(--gold); margin: 0 6px; }
h1 {
  font: 560 clamp(48px, 7.8vw, 128px)/.94 var(--f-display); font-stretch: 125%;
  letter-spacing: -.05em; margin: 0; max-width: 9.6ch;
}
h1 .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
h1 .line > span { display: inline-block; }
h1 .lit {
  background: linear-gradient(100deg, var(--gold-2) 0%, var(--gold) 45%, #C9A86A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: #B6BBC6; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; max-width: 35rem; margin: 34px 0 0; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.telemetry { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: max(26px, env(safe-area-inset-bottom, 0px)); }
.telemetry .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.telemetry dl { display: flex; flex-wrap: wrap; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.telemetry dl > div { padding: 14px 26px 0 0; margin-right: 26px; border-right: 1px solid var(--line); }
.telemetry dl > div:last-child { border-right: 0; margin-right: 0; }
.telemetry dt { font: 400 10px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.telemetry dd { margin: 0; font: 400 12.5px/1.2 var(--f-mono); font-stretch: 87.5%; letter-spacing: .04em; color: var(--text); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(111, 211, 160, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(111, 211, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 211, 160, 0); } }
.scroll-hint { font: 400 10.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.scroll-hint i { position: relative; width: 1px; height: 36px; background: var(--line-2); overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }
@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero > .wrap { padding-block: 38svh 150px; }
  .telemetry dl > div { padding-right: 14px; margin-right: 14px; }
  .telemetry dl > div:nth-child(4) { display: none; }
  .scroll-hint { display: none; }
}
@media (max-width: 380px) { .telemetry dl > div:nth-child(3) { display: none; } }

/* ---------- statement ---------- */
.statement { background: linear-gradient(to bottom, transparent 0, var(--night) 260px); }
.statement .wrap { padding-block: clamp(200px, 30vh, 320px) clamp(110px, 16vh, 200px); }
.statement-text {
  margin: 0; max-width: 24ch; font: 500 clamp(30px, 4.1vw, 64px)/1.1 var(--f-display); font-stretch: 108%;
  letter-spacing: -.035em; text-wrap: balance;
}
.statement-text .w { opacity: .16; }
.no-motion .statement-text .w { opacity: 1; }

/* ---------- section heads ---------- */
.section-head { margin-bottom: clamp(48px, 7vw, 88px); }
.section-head.split { display: grid; gap: 28px; }
@media (min-width: 960px) { .section-head.split { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; } }
.section-sub { color: var(--muted); margin: 0; max-width: 38ch; font-size: 17.5px; }

/* ---------- capabilities ---------- */
.caps { background: var(--night); padding-top: clamp(40px, 6vw, 80px); }
.caps .section-head { margin-bottom: clamp(32px, 4vw, 48px); }
.caps-grid { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); display: grid; gap: 56px; }
.cap-list { list-style: none; margin: 0; padding: 0; }
.cap { border-top: 1px solid var(--line); }
.cap:last-child { border-bottom: 1px solid var(--line); }
.cap-title {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; gap: 10px; padding: 26px 0 22px;
}
.cap-title:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.cap-tag { font: 400 11px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.cap-name { font: 600 clamp(22px, 2.1vw, 30px)/1.12 var(--f-display); font-stretch: 112%; letter-spacing: -.03em; transition: color .4s; }
.cap-body p { margin: 0; color: var(--muted); max-width: 42ch; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.tags li { font: 400 10.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 11px; }

.stage { position: relative; border-radius: 30px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(70% 60% at 70% 20%, rgba(233, 207, 154, .09), transparent 70%), radial-gradient(60% 50% at 10% 100%, rgba(138, 180, 255, .07), transparent 70%), var(--panel); }
.stage-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000, transparent); mask-image: radial-gradient(80% 70% at 50% 45%, #000, transparent); }
.scene { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .7s var(--ease), transform .9s var(--ease); pointer-events: none; }
.scene.is-live { opacity: 1; transform: none; }
.art { position: absolute; left: 50%; top: 50%; width: 520px; height: 560px; margin: -280px 0 0 -260px; transform: scale(var(--s, 1)); }

/* Desktop: the list on the left, one stage on the right, pinned while the demos play. */
@media (min-width: 1000px) {
  .caps-pin { height: 100vh; display: flex; align-items: center; }
  .caps-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; width: 100%; }
  .cap { transition: opacity .5s; opacity: .42; }
  .cap.is-active, .cap:hover { opacity: 1; }
  .cap-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
  .cap-body > * { overflow: hidden; }
  .cap-body > p { min-height: 0; }
  .cap.is-active .cap-body { grid-template-rows: 1fr; padding-bottom: 26px; }
  .cap-body .tags { display: none; }
  .cap.is-active .cap-body .tags { display: flex; }
  .cap-stage { display: none; }
  .stage-col { position: relative; }
  .stage { height: min(640px, calc(100vh - 170px)); }
  .stage-progress { position: absolute; left: 30px; right: 30px; bottom: -22px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .stage-progress i { position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
}
/* Phones, tablets and reduced motion: each demo sits under its own heading and plays when it scrolls in. */
@media (max-width: 999px) {
  .caps { padding-bottom: 40px; }
  .stage-col { display: none; }
  .cap-title { padding-top: 34px; }
  .cap-body { padding-bottom: 24px; }
  .cap-stage { margin: 0 auto 40px; }
  .cap:last-child { border-bottom: 0; }
}
.cap-stage { position: relative; aspect-ratio: 520 / 560; max-height: 620px; width: 100%; border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(70% 60% at 70% 20%, rgba(233, 207, 154, .09), transparent 70%), var(--panel); }
/* Reduced motion on a wide screen: no pinning; each capability is a row with its finished demo beside it. */
.no-motion .caps-pin { height: auto; }
@media (min-width: 1000px) {
  .no-motion .caps-grid { grid-template-columns: minmax(0, 1fr); }
  .no-motion .stage-col { display: none; }
  .no-motion .cap { opacity: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: 1fr auto auto 1fr; column-gap: 56px; padding-block: 32px; }
  .no-motion .cap-title { grid-column: 1; grid-row: 2; }
  .no-motion .cap-body { grid-column: 1; grid-row: 3; }
  .no-motion .cap-body { grid-template-rows: 1fr; padding-bottom: 0; }
  .no-motion .cap-body .tags { display: flex; }
  .no-motion .cap-stage { display: block; grid-column: 2; grid-row: 1 / 5; }
}

/* ---------- shared demo chrome ---------- */
.phone { position: absolute; left: 50%; top: 50%; width: 270px; height: 548px; margin: -274px 0 0 -135px; border-radius: 46px; padding: 9px;
  background: linear-gradient(145deg, #2A303C, #0D1017 40%, #1B202A); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(233, 207, 154, .25); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #0C0F15; font-size: 12px; line-height: 1.35; }
.screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 84px; height: 24px; margin-left: -42px; border-radius: 20px; background: #000; z-index: 5; }
.sbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 0 28px; height: 40px; font: 600 12px/1 var(--f-body); }
.sbar-i { display: flex; gap: 3px; }
.sbar-i i { width: 4px; height: 4px; border-radius: 50%; background: var(--text); }
.chip { display: inline-block; font: 500 10px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .04em; padding: 5px 7px; border-radius: 6px; background: rgba(236, 232, 223, .07); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.dot-ok { background: var(--ok); box-shadow: 0 0 10px rgba(111, 211, 160, .6); }
.dot-warn { background: var(--warn); box-shadow: 0 0 10px rgba(240, 180, 92, .5); }
.dot-info { background: var(--earth); box-shadow: 0 0 10px rgba(138, 180, 255, .5); }
.win { position: absolute; left: 50%; top: 50%; width: 500px; translate: -50% -50%; border-radius: 18px; overflow: hidden; background: #0C0F15;
  border: 1px solid var(--line-2); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85), 0 0 140px -50px rgba(233, 207, 154, .22); }
.win-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(236, 232, 223, .025); }
.win-bar > i { width: 10px; height: 10px; border-radius: 50%; background: rgba(236, 232, 223, .14); }
.win-bar > span { margin-left: 10px; font: 400 10.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .06em; color: var(--muted); }

/* Each scene's steps run on CSS delays; adding .is-live (again) replays them. */

/* ---------- scene: app ---------- */
.app-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 12px; }
.app-head small { display: block; color: var(--faint); font-size: 10.5px; }
.app-head b { font: 600 18px/1.2 var(--f-display); font-stretch: 108%; letter-spacing: -.02em; }
.ring { position: relative; width: 42px; height: 42px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: rgba(236, 232, 223, .1); stroke-width: 3; }
.ring .ring-fill { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 37.7; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 500 10px/1 var(--f-mono); color: var(--muted); }
.ring span b { color: var(--text); font: inherit; display: inline-grid; }
.ring span b > * { grid-area: 1 / 1; }
.ring .n4 { opacity: 0; }
.ring b i { font-style: normal; }
.is-live .ring .n3 { animation: fade-out .3s 4.6s forwards; }
.is-live .ring .n4 { animation: msg .3s 4.6s forwards; }
@keyframes fade-out { to { opacity: 0; } }
.job { margin: 0 12px; padding: 14px; border-radius: 18px; background: #151A24; border: 1px solid var(--line); }
.job-top { display: flex; gap: 6px; margin-bottom: 10px; }
.chip-live { background: rgba(233, 207, 154, .14); color: var(--gold); }
.job-name { display: block; font: 600 14px/1.25 var(--f-body); }
.job > small { color: var(--muted); font-size: 11px; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #C9CDD6; }
.checks li::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid rgba(236, 232, 223, .25); flex: none;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%230A0D14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0 no-repeat; background-color: transparent; }
.photos { display: flex; gap: 6px; margin-top: 12px; }
.ph { width: 46px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-style: normal; color: var(--faint); }
.ph1 { background: linear-gradient(135deg, #4A5568, #2B3341 60%, #8E9AAB); }
.ph2 { background: linear-gradient(160deg, #6B5A42, #3A3226 55%, #A88B5E); }
.ph-add { border: 1px dashed rgba(236, 232, 223, .2); }
.sign { margin-top: 12px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.sign svg { width: 100%; height: 30px; }
.sig { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; }
.sign small { font-size: 10px; color: var(--faint); }
.app-btn { margin: 12px 12px 0; height: 40px; border-radius: 13px; background: var(--gold); color: var(--void); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; }
.toast { position: absolute; left: 12px; right: 12px; top: 46px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: rgba(30, 36, 48, .92); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 500; opacity: 0; transform: translateY(-18px); }
.toast span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: var(--void); font-size: 11px; font-weight: 700; }

.is-live .checks li:nth-child(1)::before { animation: tick .35s .5s var(--ease) forwards; }
.is-live .checks li:nth-child(2)::before { animation: tick .35s .9s var(--ease) forwards; }
.is-live .checks li:nth-child(3)::before { animation: tick .35s 1.3s var(--ease) forwards; }
.is-live .checks li:nth-child(4)::before { animation: tick .35s 1.7s var(--ease) forwards; }
@keyframes tick { to { background-color: var(--ok); background-size: 14px; border-color: var(--ok); } }
.is-live .ph1 { animation: pop .5s 2.1s var(--ease) both; }
.is-live .ph2 { animation: pop .5s 2.35s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.is-live .sig { animation: sign 1.1s 2.7s ease-in-out forwards; }
@keyframes sign { to { stroke-dashoffset: 0; } }
.is-live .app-btn { animation: press .5s 4s var(--ease); }
@keyframes press { 40% { transform: scale(.95); filter: brightness(1.15); } }
.is-live .toast { animation: toast .6s 4.3s var(--ease) forwards; }
@keyframes toast { to { opacity: 1; transform: none; } }
.is-live .ring-fill { animation: ring 1s 4.4s var(--ease) forwards; }
@keyframes ring { to { stroke-dashoffset: 18.85; } }

/* ---------- scene: chat ---------- */
.chat { background: #0B0E14; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2E6F5A, #1B3F35); color: #DFF5EC; font-weight: 600; }
.chat-head b { display: block; font-size: 13px; }
.chat-head small { color: var(--ok); font-size: 10.5px; }
.chat-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; height: 404px; overflow: hidden;
  background-image: radial-gradient(rgba(236, 232, 223, .035) 1px, transparent 1px); background-size: 14px 14px; }
.day { align-self: center; font: 400 9.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 5px 9px; border-radius: 8px; background: rgba(236, 232, 223, .05); }
.bub { position: relative; max-width: 82%; padding: 9px 11px 18px; border-radius: 14px; font-size: 12px; line-height: 1.4; }
.bub time { position: absolute; right: 10px; bottom: 5px; font-size: 9px; color: var(--faint); }
.bub.in { align-self: flex-start; background: #1A202B; border-top-left-radius: 4px; }
.bub.out { align-self: flex-end; background: #1E4A3D; color: #E3F5ED; border-top-right-radius: 4px; padding-right: 46px; padding-bottom: 9px; }
.bub.out time { color: rgba(227, 245, 237, .6); }
.quick { display: flex; gap: 6px; max-width: 82%; }
.q { flex: 1; text-align: center; padding: 9px 6px; border-radius: 11px; background: #1A202B; color: var(--earth); font-weight: 500; font-size: 11.5px; border: 1px solid var(--line); }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 0 12px; border-radius: 14px; background: #1A202B; height: 0; overflow: hidden; align-items: center; opacity: 0; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; } }
.chat-input { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 38px; border-radius: 20px; background: #161B25; border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 14px; color: var(--faint); }
.chat-input i { width: 28px; height: 28px; border-radius: 50%; background: #2E6F5A; }
.m1, .m2, .m3, .m5 { opacity: 0; transform: translateY(12px); }
.is-live .m1 { animation: msg .5s .4s var(--ease) forwards; }
.is-live .m2 { animation: msg .5s 1.1s var(--ease) forwards; }
.is-live .q-yes { animation: tap .6s 2s var(--ease) forwards; }
@keyframes tap { 50% { transform: scale(.94); } 100% { background: rgba(138, 180, 255, .16); border-color: rgba(138, 180, 255, .4); } }
.is-live .m3 { animation: msg .45s 2.4s var(--ease) forwards; }
.is-live .m4 { animation: typing 1.3s 2.9s var(--ease) forwards; }
@keyframes typing { 0% { opacity: 0; height: 0; } 15%, 80% { opacity: 1; height: 30px; } 100% { opacity: 0; height: 0; margin-top: -8px; } }
.is-live .m5 { animation: msg .5s 4.2s var(--ease) forwards; }
@keyframes msg { to { opacity: 1; transform: none; } }
.float { position: absolute; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px; background: rgba(22, 27, 38, .9);
  border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7); opacity: 0; font-size: 12.5px; }
.float b { display: block; font-weight: 600; }
.float small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.f1 { right: -18px; top: 86px; transform: translateX(20px); }
.f2 { left: -10px; bottom: 96px; transform: translateX(-20px); }
.is-live .f1 { animation: slide .7s 4.7s var(--ease) forwards; }
.is-live .f2 { animation: slide .7s .9s var(--ease) forwards; }
@keyframes slide { to { opacity: 1; transform: none; } }

/* ---------- scene: dashboard ---------- */
.live-dot { margin-left: auto; font: 500 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ok); font-style: normal; display: flex; align-items: center; gap: 6px; }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.dash-body { padding: 16px; display: grid; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px; border-radius: 12px; background: #131822; border: 1px solid var(--line); }
.kpi small { display: block; color: var(--muted); font-size: 10.5px; }
.kpi b { display: block; font: 600 24px/1.2 var(--f-display); font-stretch: 110%; letter-spacing: -.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 10px; }
.up { color: var(--ok); } .warn { color: var(--warn); }
.chart { padding: 14px; border-radius: 12px; background: #131822; border: 1px solid var(--line); }
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; margin-bottom: 12px; }
.chart-head span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.chart-head span i { width: 8px; height: 8px; border-radius: 2px; background: var(--gold); margin-left: 6px; }
.chart-head span i.ghost { background: rgba(138, 180, 255, .35); }
.bars { height: 130px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; align-items: end; }
.bars i { position: relative; height: 100%; display: block; }
.bars i::before, .bars i::after { content: ""; position: absolute; bottom: 0; border-radius: 4px 4px 1px 1px; transform-origin: 50% 100%; transform: scaleY(0); }
.bars i::before { left: 0; right: 0; height: var(--g); background: rgba(138, 180, 255, .16); }
.bars i::after { left: 22%; right: 22%; height: var(--h); background: linear-gradient(to top, #B8955B, var(--gold) 60%, var(--gold-2)); }
.is-live .bars i::before { animation: grow .9s .3s var(--ease) forwards; }
.is-live .bars i::after { animation: grow 1s var(--ease) forwards; }
.is-live .bars i:nth-child(1)::after { animation-delay: .5s; } .is-live .bars i:nth-child(2)::after { animation-delay: .56s; }
.is-live .bars i:nth-child(3)::after { animation-delay: .62s; } .is-live .bars i:nth-child(4)::after { animation-delay: .68s; }
.is-live .bars i:nth-child(5)::after { animation-delay: .74s; } .is-live .bars i:nth-child(6)::after { animation-delay: .8s; }
.is-live .bars i:nth-child(7)::after { animation-delay: .86s; } .is-live .bars i:nth-child(8)::after { animation-delay: .92s; }
.is-live .bars i:nth-child(9)::after { animation-delay: .98s; } .is-live .bars i:nth-child(10)::after { animation-delay: 1.04s; }
.is-live .bars i:nth-child(11)::after { animation-delay: 1.1s; } .is-live .bars i:nth-child(12)::after { animation-delay: 1.16s; }
@keyframes grow { to { transform: scaleY(1); } }
.axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 9px/1 var(--f-mono); color: var(--faint); }
.feed { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #131822; border: 1px solid var(--line); font-size: 11.5px; opacity: 0; transform: translateY(-10px); }
.row span:not(.dot) { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row em { font-style: normal; font: 400 9.5px/1 var(--f-mono); color: var(--faint); }
.is-live .r1 { animation: msg .5s 2.6s var(--ease) forwards; }
.is-live .r2 { animation: msg .5s 1.9s var(--ease) forwards; }
.is-live .r3 { animation: msg .5s 1.3s var(--ease) forwards; }

/* ---------- scene: agent ---------- */
.agent-body { padding: 18px; display: grid; gap: 12px; font-size: 12px; }
.ask { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #131822; border: 1px solid var(--line); font: 400 11.5px/1.3 var(--f-mono); font-stretch: 87.5%; }
.caret { color: var(--gold); }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; border-right: 1.5px solid var(--gold); }
.is-live .typed { animation: type 1.5s .3s steps(37) forwards, caret .8s step-end 6; }
@keyframes type { to { width: 37ch; } }
@keyframes caret { 50% { border-color: transparent; } }
.step { display: flex; align-items: center; gap: 10px; color: var(--muted); opacity: 0; }
.step b { color: var(--text); font-weight: 500; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(236, 232, 223, .15); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prog { height: 4px; border-radius: 4px; background: rgba(236, 232, 223, .07); overflow: hidden; opacity: 0; }
.prog i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transform-origin: 0 50%; transform: scaleX(0); }
.inv { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.inv li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 12px; background: #131822; border: 1px solid var(--line); opacity: 0; transform: translateX(-12px); }
.inv b { font: 500 11.5px/1.3 var(--f-mono); font-stretch: 87.5%; }
.inv small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 500; }
.mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--void); }
.mark.ok { background: var(--ok); } .mark.warn { background: var(--warn); }
.inv .flag { border-color: rgba(240, 180, 92, .35); background: linear-gradient(90deg, rgba(240, 180, 92, .09), #131822 70%); }
.summary { display: flex; flex-wrap: wrap; gap: 8px; opacity: 0; }
.pill { font: 500 10.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .04em; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.pill-ok { color: var(--ok); border-color: rgba(111, 211, 160, .35); }
.pill-warn { color: var(--warn); border-color: rgba(240, 180, 92, .35); }
.is-live .step { animation: msg .4s 1.9s forwards; }
.is-live .prog { animation: msg .3s 2s forwards; }
.is-live .prog i { animation: grow-x 2.6s 2.1s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes grow-x { to { transform: scaleX(1); } }
.is-live .i1 { animation: msg .45s 2.5s var(--ease) forwards; }
.is-live .i2 { animation: msg .45s 3s var(--ease) forwards; }
.is-live .i3 { animation: msg .45s 3.5s var(--ease) forwards; }
.is-live .i4 { animation: msg .45s 4s var(--ease) forwards; }
.is-live .summary { animation: msg .5s 4.8s var(--ease) forwards; }

/* ---------- process ---------- */
.process { background: var(--night); padding-block: clamp(110px, 14vw, 180px) clamp(90px, 10vw, 140px); }
.phases-wrap { position: relative; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.phase { position: relative; display: grid; gap: 12px; align-content: start; }
.phase svg { width: 64px; height: 64px; margin-bottom: 14px; position: relative; overflow: visible; }
.m-dark { fill: #171C27; }
.m-lit { fill: var(--gold); filter: drop-shadow(0 0 14px rgba(233, 207, 154, .45)); }
.m-rim { fill: none; stroke: rgba(236, 232, 223, .22); stroke-width: 1; }
.phase-moon { font: 400 10.5px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.phase h3 { font: 600 28px/1.1 var(--f-display); font-stretch: 115%; letter-spacing: -.035em; margin: 0; }
.phase p { margin: 0; color: var(--muted); max-width: 32ch; }
.phase-track { position: absolute; height: 1px; background: var(--line-2); }
.phase-track i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold), rgba(233, 207, 154, .2)); transform-origin: 0 50%; }
@media (min-width: 900px) {
  .phases { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
  .phase-track { left: 32px; right: 32px; top: 32px; }
}
@media (max-width: 899px) {
  .phases { gap: 44px; padding-left: 92px; }
  .phase svg { position: absolute; left: -92px; top: -6px; }
  .phase-track { left: 32px; top: 32px; bottom: 60px; width: 1px; height: auto; }
  .phase-track i { transform-origin: 50% 0; background: linear-gradient(180deg, var(--gold), rgba(233, 207, 154, .2)); }
}

/* ---------- principles ---------- */
.principles { background: var(--night); padding-bottom: clamp(100px, 12vw, 160px); }
.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(28px, 3vw, 40px); background: var(--panel); border: 1px solid var(--line); isolation: isolate; transition: border-color .4s; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(233, 207, 154, .11), transparent 45%); }
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 30px; }
.card h3 { font: 600 clamp(22px, 2vw, 27px)/1.15 var(--f-display); font-stretch: 112%; letter-spacing: -.03em; margin: 0 0 12px; }
.card p { margin: 0; color: var(--muted); max-width: 40ch; }

.stack { margin-top: clamp(90px, 11vw, 140px); }
.stack .kicker { color: var(--muted); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.track { list-style: none; margin: 0; padding: 6px 0; display: flex; width: max-content; animation: marquee 48s linear infinite; }
.track li { font: 500 clamp(24px, 2.6vw, 38px)/1 var(--f-display); font-stretch: 115%; letter-spacing: -.03em; color: rgba(236, 232, 223, .32); white-space: nowrap; display: flex; align-items: center; }
.track li::after { content: ""; width: 10px; height: 10px; margin: 0 clamp(28px, 3vw, 48px); border-radius: 50%; background: linear-gradient(90deg, #262C38 50%, var(--gold) 50%); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .track { animation-play-state: paused; }

/* ---------- contact: the moon rises behind it ---------- */
.contact { min-height: calc(100svh - 96px); background: linear-gradient(to bottom, var(--night) 0, rgba(10, 13, 20, 0) 300px); text-align: center; }
.contact .wrap { padding-block: clamp(120px, 15vh, 170px) 0; display: flex; flex-direction: column; align-items: center; }
.contact .kicker { justify-content: center; }
.contact .kicker::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.contact h2 { font-size: clamp(44px, 6.6vw, 108px); font-stretch: 125%; line-height: .95; letter-spacing: -.055em; }
.contact-sub { color: #B6BBC6; max-width: 46ch; margin: 30px auto 0; font-size: clamp(17px, 1.4vw, 19px); text-wrap: balance; }
.mail { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 38px; padding: 8px 8px 8px 26px; border-radius: 999px;
  background: rgba(10, 13, 20, .55); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mail-address { font: 500 clamp(18px, 2vw, 24px)/1 var(--f-display); font-stretch: 108%; letter-spacing: -.02em; text-decoration: none; }
.mail-address:hover { color: var(--gold-2); }
.copy { all: unset; cursor: pointer; font: 400 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 14px 18px; border-radius: 999px; background: var(--gold); color: var(--void); transition: background .3s; }
.copy:hover { background: var(--gold-2); }
.copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.where { font: 400 11px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 26px 0 0; }

/* The footer is the horizon the moon rises from. */
.foot { background: var(--void); box-shadow: 0 80px 0 0 var(--void); }
.foot::before { content: ""; display: block; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 207, 154, .55) 50%, transparent); box-shadow: 0 -10px 40px 6px rgba(233, 207, 154, .12); }
.foot .wrap { min-height: 96px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 24px max(24px, env(safe-area-inset-bottom, 0px));
  font: 400 11px/1.4 var(--f-mono); font-stretch: 87.5%; letter-spacing: .08em; color: var(--faint); }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--text); }
.brand-s { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 600 13px/1 var(--f-display); font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; }
.brand-s svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .track { animation: none; }
}
