/* Self-hosted fonts (SIL OFL) — replaces the Google Fonts <link> in the source design,
   so the page loads only same-origin assets (Content-Security-Policy: default-src 'self'). */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/chakra-petch-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
}

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

:root {
  --bg:        #0c0c12;
  --surface:   #111118;
  --surface-2: #18181f;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.12);
  --text-1:    #f4f4f4;
  --text-2:    rgba(244,244,244,0.6);
  --text-3:    rgba(244,244,244,0.3);
  --accent:    #0062CC;
  --green:     #34d399;
  --amber:     #fbbf24;
}

html { height: 100%; }

body {
  min-height: 100%;
  font-family: "Chakra Petch", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text-1);
  /* Static dot grid — texture without competing motion */
  background-image: radial-gradient(circle, rgba(0,98,204,0.12) 1px, transparent 1px);
  background-size: 22px 22px;
}

.page { position: relative; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 160px 30px 120px;
}

.slogan {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; margin-bottom: 44px;
}

.brand {
  font-size: 14px; font-weight: 400; color: var(--text-2);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 28px;
}

.headline {
  font-size: 62px; font-weight: 400; line-height: 1.05;
  letter-spacing: -0.02em; text-align: center; color: var(--text-1);
}

.headline-dim {
  font-size: 62px; font-weight: 400; line-height: 1.05;
  letter-spacing: -0.02em; text-align: center; color: var(--text-2);
}

.cta-area {
  display: flex; flex-direction: column; align-items: center; gap: 36px;
  width: 520px; max-width: 100%;
}

.subheading {
  font-size: 16px; font-weight: 400; letter-spacing: -0.01em;
  line-height: 1.65; text-align: center; color: var(--text-2);
}

.btn-group {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}

.btn-cta {
  display: inline-flex; align-items: center;
  height: 48px; padding: 0 28px;
  font-family: inherit; font-size: 15px; font-weight: 400;
  letter-spacing: -0.01em; color: #fff; background: var(--accent);
  border: none; border-radius: 10px; cursor: pointer;
  text-decoration: none; transition: opacity 0.2s; white-space: nowrap;
}
.btn-cta:hover { opacity: 0.85; }

.btn-watch {
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 22px;
  font-family: inherit; font-size: 15px; font-weight: 400;
  letter-spacing: -0.01em; color: var(--text-2); background: none;
  border: 1px solid var(--border-hi); border-radius: 10px;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-watch:hover { color: var(--text-1); border-color: rgba(255,255,255,0.22); }

.ph-icon { fill: currentColor; flex-shrink: 0; }

/* ── Fleet panel section — a live-feeling preview of the real product screens:
   the Spotlight ("what do you want to build?") typing a prompt, then a
   crossfade into the actual On Stage build canvas (rail/spine/stage/studio),
   matching what the product screens actually look like today. ─────────── */
.demo-section {
  display: flex; justify-content: center;
  padding: 0 32px 120px;
}

.demo-wrap { width: 100%; max-width: 960px; }

.fleet-panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 48px 96px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.03);
}

.demo-stage { position: relative; aspect-ratio: 16 / 9; }
.scene {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}
.scene.is-visible { opacity: 1; pointer-events: auto; }

/* ── Scene 1: Spotlight ───────────────────────────────────────────────── */
.scene-spotlight {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 60px 40px;
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(0,98,204,0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}
.spot-headline {
  font-size: 27px; font-weight: 400; letter-spacing: -0.01em; color: var(--text-1);
}
.spot-input-row {
  display: flex; align-items: center;
  width: 480px; max-width: 100%;
  font-size: 16px; letter-spacing: -0.01em; color: var(--text-1);
  border-bottom: 1px solid var(--border-hi); padding-bottom: 13px;
}
.fp-caret {
  display: inline-block; width: 2px; height: 19px;
  background: var(--accent); margin-left: 2px; flex-shrink: 0;
  animation: caret-blink 1s step-end infinite;
}
@keyframes caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.spot-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.spot-chip {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-hi);
  font-size: 12px; color: var(--text-2);
}

/* ── Scene 2: On Stage — the real build canvas, scaled to fit the card ── */
.scene-onstage { display: flex; background: var(--bg); }
.os-rail {
  width: 46px; flex-shrink: 0; background: var(--surface-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0;
}
.os-rail-dot { width: 18px; height: 18px; border-radius: 6px; background: rgba(255,255,255,0.06); }
.os-rail-dot.active { background: rgba(0,98,204,0.3); }
.os-spine { width: 148px; flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--border); padding: 22px 16px; }
.os-spine-label {
  font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 16px;
}
.os-node { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); margin-bottom: 15px; }
.os-node.done { color: var(--text-2); }
.os-node.current { color: var(--text-1); }
.os-node-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--text-3); flex-shrink: 0; }
.os-node.done .os-node-dot { background: var(--green); border-color: var(--green); }
.os-node.current .os-node-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,98,204,0.25); }
.os-stage {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px;
  background-image: radial-gradient(circle, rgba(0,98,204,0.09) 1px, transparent 1px);
  background-size: 20px 20px;
}
.os-flow-mini { display: flex; flex-direction: column; align-items: center; }
.fm-pill {
  padding: 7px 16px; border-radius: 20px; font-size: 11px; border: 1px solid var(--green);
  color: var(--green);
}
.fm-pill.fm-end { background: rgba(52,211,153,0.08); }
.fm-rect {
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border-hi);
  background: var(--surface); font-size: 11px; color: var(--text-1); white-space: nowrap;
}
.fm-rect.small { font-size: 10px; padding: 6px 10px; }
.fm-line { width: 1px; height: 16px; background: var(--border-hi); }
.fm-diamond-wrap { width: 74px; height: 74px; position: relative; margin: 2px 0; }
.fm-diamond {
  position: absolute; inset: 9px; border: 1px solid var(--accent);
  background: rgba(0,98,204,0.08); transform: rotate(45deg);
}
.fm-diamond-in {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--text-1); text-align: center; padding: 0 6px;
}
.fm-branches { display: flex; gap: 20px; margin-top: 2px; }
.fm-branch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fm-branch-label {
  font-family: "IBM Plex Mono", monospace; font-size: 8px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-3);
}

/* Staggered build-in — each flow node/connector appears in turn, like it's
   being drawn by the agent rather than dumped on screen all at once. */
.fm-step {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.fm-step.in { opacity: 1; transform: translateY(0); }
.fm-line-step {
  opacity: 0; transform: scaleY(0); transform-origin: top;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.fm-line-step.in { opacity: 1; transform: scaleY(1); }
.os-step {
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.os-step.in { opacity: 1; transform: translateY(0); }
.os-studio {
  width: 224px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 12px;
}
.os-studio-head { font-size: 12px; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.os-studio-head::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.os-msg {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px 8px 8px 2px;
  padding: 10px 12px; font-size: 11px; color: var(--text-1); line-height: 1.5;
}
.os-gate {
  background: var(--accent); color: #fff; text-align: center;
  border-radius: 8px; padding: 9px; font-size: 11px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  display: flex; align-items: center; justify-content: center;
  padding: 64px 0 88px;
}
.footer a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-3); text-decoration: none;
  transition: color 0.3s;
}
.footer-logo { height: 13px; width: auto; opacity: 0.5; transition: opacity 0.3s; }
.footer a:hover { color: var(--text-2); }
.footer a:hover .footer-logo { opacity: 0.8; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 809px) {
  .headline, .headline-dim { font-size: 36px; }
  .subheading { font-size: 15px; }
  .hero { padding: 100px 24px 60px; }
  .demo-section { padding: 0 20px 60px; }
  .cta-area { width: 100%; }
  .demo-stage { aspect-ratio: unset; height: 920px; }
  .scene-onstage { flex-direction: column; overflow-y: auto; }
  .os-rail { width: 100%; flex-direction: row; justify-content: center; border-right: none; border-bottom: 1px solid var(--border); }
  .os-spine { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .os-studio { width: 100%; border-left: none; border-top: 1px solid var(--border); }
}

@media (min-width: 810px) and (max-width: 1199px) {
  .headline, .headline-dim { font-size: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
  .fp-caret { animation: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
