@font-face {
  font-family: "Space Grotesk";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #05070d;
  --bg-soft: #0b1220;
  --bg-panel: #0e1626;
  --line: #1c2740;
  --blue: #1c6fa8;
  --blue-bright: #3fa9e8;
  --orange: #c9601f;
  --orange-bright: #f0923c;
  --red: #d8402e;
  --red-bright: #ef5842;
  --ink: #f4f1ea;
  --ink-dim: #a9b0be;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  #cursorHand { display: none; }
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; }

.cursor-hand {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  background-image: url("/assets/cursor-hand.png");
  background-size: cover;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  box-shadow: 0 0 0 1px rgba(244, 241, 234, 0.15);
  transition: transform 0.06s linear, scale 0.15s var(--ease);
}
.cursor-hand.active { scale: 1.25; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}
.topbar-ca {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.ca-value {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: none;
}
.ca-value.copied { color: var(--blue-bright); border-color: var(--blue-bright); }
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.choir-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: none;
}
.choir-toggle .i-choir-off { display: none; }
.choir-toggle[aria-pressed="false"] .i-choir-on { display: none; }
.choir-toggle[aria-pressed="false"] .i-choir-off { display: block; }
.buy-pill {
  position: relative;
  background: var(--red);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.18s;
  display: inline-block;
}
.buy-pill:hover { background: var(--red-bright); }
.buy-pill.given-up { transform: none !important; }

/* ---------- layout shell ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin: 0 0 10px;
}
.section-title {
  font-size: clamp(24px, 4vw, 34px);
  margin: 0 0 10px;
  font-weight: 700;
}
.section-sub {
  color: var(--ink-dim);
  max-width: 56ch;
  margin: 0 0 28px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 0;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}
.hero-art {
  position: absolute;
  inset: 0;
  background-image: url("/assets/hero.webp");
  background-size: cover;
  background-position: 82% 30%;
}
@media (min-width: 720px) {
  .hero-art { background-position: center 30%; }
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.1) 0%, rgba(5, 7, 13, 0.35) 55%, rgba(5, 7, 13, 0.96) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 0 16px 56px;
  max-width: 640px;
}
.hero-kicker {
  font-family: var(--font-mono);
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  margin: 0 0 6px;
}
.hero-title {
  font-size: clamp(34px, 8vw, 64px);
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.05;
}
.hero-sub { color: var(--ink-dim); max-width: 52ch; margin: 0 0 14px; }
.hero-note { font-family: var(--font-mono); font-size: 13px; color: var(--orange-bright); margin: 0; }

/* ---------- counter ---------- */
.counter { text-align: center; }
.counter-label { color: var(--ink-dim); margin: 0 0 8px; font-family: var(--font-mono); font-size: 13px; }
.counter-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(40px, 10vw, 84px);
  margin: 0;
  color: var(--blue-bright);
  font-variant-numeric: tabular-nums;
}
.counter-unit { color: var(--ink-dim); margin: 8px 0 0; font-size: 13px; }

/* ---------- hmm machine ---------- */
.machine-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.machine-input {
  flex: 1 1 260px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
}
.machine-input:focus { outline: none; border-color: var(--blue-bright); }
.machine-btn {
  background: var(--blue);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 14px 22px;
  font-weight: 700;
  cursor: none;
  transition: background 0.15s;
}
.machine-btn:hover { background: var(--blue-bright); }
.machine-btn:disabled { opacity: 0.5; }
.machine-stage {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.machine-orb {
  position: relative;
  width: 72px;
  height: 72px;
}
.orb-planet {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--blue-bright), var(--bg-panel) 45%, var(--orange-bright) 60%, var(--bg-panel) 95%);
}
.machine-stage[data-state="thinking"] .orb-planet { animation: spin 1.8s linear infinite; }
.orb-hand {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 30px;
  height: 30px;
  background-image: url("/assets/cursor-hand.png");
  background-size: cover;
  border-radius: 50%;
  transform-origin: 70% 30%;
}
.machine-stage[data-state="thinking"] .orb-hand { animation: tap 0.5s ease-in-out infinite alternate; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tap { from { transform: rotate(-6deg); } to { transform: rotate(4deg); } }
.machine-answer { font-size: 22px; font-weight: 700; margin: 0; min-height: 1.4em; }
.machine-answer.rare { color: var(--orange-bright); }
.machine-tally { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); margin: 0; }

/* ---------- hmmmeter ---------- */
.hold-btn {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: border-color 0.15s;
}
.hold-btn.holding { border-color: var(--orange-bright); }
.meter-track {
  position: relative;
  margin-top: 22px;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-bright), var(--orange-bright));
  transition: width 0.05s linear;
}
.meter-tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 16px;
  background: var(--ink-dim);
  opacity: 0.6;
}
.meter-label { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); margin: 10px 0 0; }
.unlock-panel {
  margin-top: 24px;
  border: 1px solid var(--orange-bright);
  border-radius: 14px;
  padding: 22px;
  background: rgba(240, 146, 60, 0.06);
}
.unlock-kicker { font-family: var(--font-mono); color: var(--orange-bright); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; }
.unlock-body { margin: 0 0 12px; color: var(--ink-dim); }
.unlock-code { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.06em; margin: 0; }

/* ---------- choir ---------- */
.choir-visual { display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-bottom: 12px; }
.choir-visual span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  transition: height 0.4s var(--ease), background 0.4s;
}
.choir-visual span.live {
  background: linear-gradient(180deg, var(--blue-bright), var(--orange-bright));
  border-color: transparent;
}
.choir-count { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); margin: 0; }

/* ---------- forge ---------- */
.forge-drop {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 48px 20px;
  text-align: center;
  cursor: none;
  color: var(--ink-dim);
  transition: border-color 0.15s, color 0.15s;
}
.forge-drop:hover, .forge-drop.drag { border-color: var(--blue-bright); color: var(--ink); }
.forge-canvas { width: 100%; max-width: 480px; border-radius: 14px; margin-top: 20px; border: 1px solid var(--line); }
.forge-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.forge-btn {
  background: var(--blue);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: none;
  display: inline-block;
}
.forge-btn-share { background: var(--red); }
.forge-btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-dim); }

/* ---------- chart ---------- */
.chart-box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  padding: 24px;
  color: var(--ink-dim);
}
.chart-line { width: 100%; height: 80px; display: block; }
.chart-label {
  position: absolute;
  right: 24px;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 0;
}

/* ---------- roadmap ---------- */
.roadmap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.roadmap-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--bg-panel);
}
.roadmap-phase { font-family: var(--font-mono); color: var(--orange-bright); font-size: 13px; min-width: 72px; }
.roadmap-body { font-weight: 500; }

/* ---------- footer ---------- */
.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 16px 60px;
  text-align: center;
  color: var(--ink-dim);
}
.footer-line { margin: 0 0 16px; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; }
.footer-link { color: var(--ink-dim); transition: color 0.15s; }
.footer-link:hover { color: var(--ink); }
.footer-ca { font-family: var(--font-mono); font-size: 12px; margin: 0 0 8px; }
.footer-canary { font-family: var(--font-mono); font-size: 11px; opacity: 0.5; margin: 0; }

/* ---------- motion & breakpoints ---------- */
@media (prefers-reduced-motion: reduce) {
  .machine-stage[data-state="thinking"] .orb-planet,
  .machine-stage[data-state="thinking"] .orb-hand {
    animation: none;
  }
  .cursor-hand { transition: none; }
}

@media (min-width: 720px) {
  .topbar-ca { display: flex; }
  section { padding: 96px 0; }
  .machine-form { flex-wrap: nowrap; }
}
