/* The game's own fonts (SIL OFL), served from here: no third-party requests, no cookies. */
  @font-face { font-family: "Lilita One"; src: url("/media/fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
  @font-face { font-family: "Nunito"; src: url("/media/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

  /* The brand's tokens (docs/launch/BRAND.md). One look: the game's night. */
  :root {
    --night: #14111c;
    --ink: #1b1612;
    --panel: #1f1a24;
    --line: #3a3142;
    --parchment: #f3eadb;
    --muted: #b9ae9c;
    --gold: #f4c53c;
    --gold-light: #fff2b8;
    --gold-deep: #d8681c;
    --ui-gold: #e9c46a;
    --bronze: #2e1a0c;
    --lantern: #b8f2ff;
    --gem: #5ad8ff;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html { background: var(--night); }
  body {
    margin: 0; background: var(--night); color: var(--parchment);
    font: 400 1.0625rem/1.65 "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--gem); }
  h1, h2, .display { font-family: "Lilita One", "Nunito", system-ui, sans-serif; font-weight: 400; letter-spacing: 0.01em; text-wrap: balance; }
  .wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Hero: the key art, the wordmark, the line, the button. */
  .hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
  .hero picture, .hero img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; z-index: -2; }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(90deg, rgba(20,17,28,0.82) 0%, rgba(20,17,28,0.55) 34%, rgba(20,17,28,0) 56%),
      linear-gradient(0deg, var(--night) 0%, rgba(20,17,28,0.6) 12%, rgba(20,17,28,0) 34%);
  }
  /* Wide: the words in a column on the left, the hero on the right of the art, the Spire in the sky above the words. */
  .hero .wrap { width: 100%; padding-block: 0 clamp(56px, 12vh, 140px); display: grid; justify-items: start; text-align: left; gap: 14px; }
  .hero .copy { display: grid; justify-items: start; gap: 14px; max-width: 560px; }
  .wordmark { width: min(560px, 88vw); height: auto; filter: drop-shadow(0 6px 24px rgba(0,0,0,0.45)); }
  .tagline { font-size: clamp(1.7rem, 4.2vw, 2.6rem); margin: 6px 0 0; color: var(--parchment);
    text-shadow: 0 2px 0 var(--ink), 0 0 18px rgba(0,0,0,0.6); }
  .pitch { margin: 0; max-width: 40rem; color: var(--parchment); font-size: clamp(1.02rem, 1.9vw, 1.2rem); text-shadow: 0 1px 8px rgba(0,0,0,0.8); }
  .actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 12px; }
  .btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 10px;
    font: 400 1.2rem/1 "Lilita One", "Nunito", sans-serif; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  }
  .btn-gold { color: var(--bronze); background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-deep)); border: 2px solid var(--bronze);
    box-shadow: 0 4px 0 var(--bronze), 0 10px 30px rgba(244,197,60,0.28); }
  .btn-gold:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--bronze), 0 14px 36px rgba(244,197,60,0.38); }
  .btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bronze); }
  .btn-ghost { color: var(--parchment); background: rgba(20,17,28,0.55); border: 2px solid rgba(243,234,219,0.35); }
  .btn-ghost:hover { border-color: var(--lantern); color: var(--lantern); }
  .btn[aria-disabled="true"] { cursor: default; opacity: 0.9; }
  .btn svg { width: 22px; height: 22px; flex: none; }
  .platforms { margin: 2px 0 0; font-size: 0.95rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

  /* The thread between sections: lantern-light that frays into cubes (the wordmark's L). */
  .thread { display: block; width: min(560px, 80%); height: 24px; margin: 0 auto; }

  section { padding-block: clamp(48px, 9vw, 104px); }
  section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--gold); margin: 0 0 8px; text-align: center;
    text-shadow: 0 2px 0 var(--bronze); }
  .lede { text-align: center; color: var(--muted); max-width: 38rem; margin: 0 auto 32px; }
  .lede-tight { margin-bottom: 0; }
  /* The 404 page (built from this stylesheet by dev/holding_page.py). */
  .lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 48px 0;
    background: radial-gradient(60% 50% at 50% 40%, rgba(184,242,255,0.08), transparent 70%), var(--night); }
  .lost .copy { justify-items: center; display: grid; gap: 14px; }
  .lost h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--gold); margin: 8px 0 0; text-shadow: 0 2px 0 var(--bronze); }
  .lost p { margin: 0; color: var(--muted); max-width: 32rem; }
  .lost .wordmark { width: min(420px, 80vw); }

  .trailer { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: #000; aspect-ratio: 16 / 9;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(233,196,106,0.12); }
  .trailer video { display: block; width: 100%; height: 100%; }

  .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .tile { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .tile video, .tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
  .tile figcaption { padding: 16px 18px 18px; }
  .tile h3 { margin: 0 0 4px; font: 400 1.3rem/1.2 "Lilita One", "Nunito", sans-serif; color: var(--ui-gold); }
  .tile p { margin: 0; color: var(--muted); font-size: 0.98rem; }

  .signup { background: linear-gradient(180deg, rgba(31,26,36,0) 0%, var(--panel) 100%); }
  .card { max-width: 640px; margin: 0 auto; text-align: center; }
  form { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
  input[type=email] {
    flex: 1 1 260px; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--line);
    background: var(--ink); color: var(--parchment); font: inherit;
  }
  input[type=email]::placeholder { color: #8f8577; }
  input[type=email]:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; }
  .fine { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
  .soon { display: inline-block; margin-top: 18px; padding: 12px 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }

  footer { border-top: 1px solid var(--line); padding-block: 28px 36px; color: var(--muted); font-size: 0.92rem; }
  footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; }
  footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
  footer a { color: var(--parchment); text-decoration: none; }
  footer a:hover { color: var(--lantern); }

  @media (max-width: 820px) {
    .tiles { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
    /* Narrow: the hero stands in the top of the art, the words below him on the dark. */
    /* Narrow: the art in the flow, cropped round the hero, the words below it on the dark - never over him. */
    .hero { min-height: 0; display: block; }
    .hero picture { position: static; display: block; height: auto; }
    .hero picture img, .hero img.art { position: static; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 70% 62%; }
    .hero::after { inset: 0 0 auto 0; height: calc(100vw * 3.4 / 4); background: linear-gradient(0deg, var(--night) 0%, rgba(20,17,28,0) 26%); }
    .hero .wrap { justify-items: center; text-align: center; padding-block: 0 48px; margin-top: -28px; position: relative; }
    .hero .copy { justify-items: center; }
    .actions { justify-content: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
  }
