/* Dusk: a night field, firefly motes and Murmur's own dark pill.
   Hero = the pitch and download on the left, a live "you talk, it types" stage on the right. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0c111e;
  --bg-glow: #1a1f3d;
  --surface: #151b2c;
  --ink: #e8ebf4;
  --mute: #8b94ad;
  --line: #263049;
  --accent: #e3f07a;
  --accent-ink: #10131c;
  --wrong: #ff9a85;
  --glow: 226, 242, 120;
  --pill: #202020;
  --pill-bar: #60d060;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
  --gap-section: 44px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(70% 55% at 85% 0%, var(--bg-glow) 0%, var(--bg) 70%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
kbd { padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: 500 0.9em var(--mono); color: var(--ink); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 7px; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { color: var(--mute); text-decoration: none; transition: color var(--motion-duration-hover) var(--motion-easing-standard); }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding-block: 24px var(--gap-section); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--mute); }
.facts span + span::before { content: "·"; margin-right: 8px; color: var(--line); }
h1 { margin: 0; font-family: var(--display); font-weight: 780; letter-spacing: -0.035em; font-size: clamp(42px, 5.3vw, 76px); line-height: 0.98; text-wrap: balance; }
h1 .nw { white-space: nowrap; }
h1 .lg { color: var(--accent); text-shadow: 0 0 28px rgba(var(--glow), 0.45); }
.lede { margin: 20px 0 0; max-width: 34ch; font-size: 19px; color: var(--mute); }
.lede b { color: var(--ink); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px; text-decoration: none;
  transition: transform var(--motion-duration-hover) var(--motion-easing-standard), box-shadow var(--motion-duration-hover) var(--motion-easing-standard);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(var(--glow), 0.8); }
.btn:active { transform: none; }
.btn svg { width: 18px; height: 18px; }
.alt { font-weight: 600; font-size: 15px; }
.meta { margin: 14px 0 0; font-size: 13px; color: var(--mute); }

/* the stage: the mess, the motes and the window they land in */
.stage-col { min-width: 0; }
.stage { position: relative; height: clamp(380px, 38vw, 460px); }
.win {
  position: absolute; left: 10%; right: 0; top: 9%; bottom: 25%;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.win-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.win-bar .ctl { letter-spacing: 10px; font-size: 12px; }
.field { flex: 1; padding: 18px 22px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; overflow: hidden; transition: opacity 500ms ease; }
.field.clearing { opacity: 0; }
.field .line { min-height: 1.5em; }
.field .w {
  display: inline-block; white-space: pre; opacity: 0; filter: blur(4px);
  transform: translate(var(--dx, 0), var(--dy, 6px)) scale(0.25);
  transition: opacity 300ms ease, transform 460ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 300ms ease;
}
.field .w.in { opacity: 1; transform: none; filter: none; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: text-bottom; background: var(--ink); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.status { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 8px 14px; border-top: 1px solid var(--line); font: 500 12.5px/1.3 var(--mono); color: var(--mute); }
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--pill-bar); box-shadow: 0 0 8px rgba(96, 208, 96, 0.7); }
.status span { opacity: 0; transition: opacity 400ms ease; }
.status span.show { opacity: 1; }
.pill {
  position: absolute; left: 55%; bottom: 7%; display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 112px; height: 34px; margin-left: -56px; padding: 0; border: 0; border-radius: 17px; background: var(--pill);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.6); transition: transform 200ms ease, box-shadow 200ms ease;
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
}
.pill:hover { box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px #3a3a3a; }
.pill.pulse, .pill.held { transform: scale(1.08); }
.pill.held { box-shadow: 0 0 0 1px var(--pill-bar), 0 0 22px -4px rgba(96, 208, 96, 0.6); }
.pill i { display: block; width: 4px; height: 18px; border-radius: 2px; background: var(--pill-bar); transform: scaleY(0.18); }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.try { margin: 6px 0 0; padding-left: 10%; text-align: center; font-size: 14px; color: var(--mute); }

/* sections below the hero */
.said, .private, .film, .get { padding-block: 0 var(--gap-section); }
h2 { margin: 0 0 18px; font-family: var(--display); font-weight: 760; letter-spacing: -0.03em; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.05; text-wrap: balance; }
.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pair { min-width: 0; padding: 18px 20px 20px; border-top: 2px solid var(--line); }
.pair .lbl { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.pair .raw { margin: 0 0 14px; font: 500 15px/1.55 var(--mono); color: var(--mute); }
.pair .raw s { color: var(--wrong); text-decoration-thickness: 1.5px; }
.pair .raw em { font-style: normal; color: var(--wrong); text-decoration: underline wavy; text-underline-offset: 4px; }
.pair .out { margin: 0; font-size: 18px; font-weight: 500; white-space: pre-line; }
.pair .why { margin: 12px 0 0; font-size: 14px; color: var(--mute); }
.private p { margin: 0; max-width: 62ch; font-size: 19px; color: var(--mute); }
.private b { color: var(--ink); font-weight: 600; }
.film video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 14px; }
.plats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.plat { min-width: 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.plat h3 { margin: 0 0 4px; font-size: 22px; }
.plat .req { margin: 0 0 16px; font-size: 15px; color: var(--mute); }
.plat .note { margin: 14px 0 0; font-size: 14px; color: var(--mute); }
.plat .note b { color: var(--ink); font-weight: 600; }
.plat .btn { padding: 12px 18px; font-size: 16px; }
/* the other platform's button is quieter; app.js marks the visitor's own */
.plat:not(.you) .btn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.plat.you { order: -1; border-color: rgba(var(--glow), 0.45); }
footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-block: 12px var(--gap-section); }
  .stage { height: 370px; }
  .win { left: 0; }
  .pill { left: 50%; }
  .try { padding-left: 0; }
  .pairs, .plats { grid-template-columns: 1fr; }
  .top nav { gap: 16px; }
  .top nav a:not(:last-child):not(:nth-last-child(2)) { display: none; }
  footer { flex-direction: column; }
  :root { --gap-section: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .btn:hover { transform: none; }
  .field .w, .field, .pill, .status span { transition: none; }
}
