/* Design tokens: "Candlelight", chosen by Renco on 26 Nov 2026 (P4).
   One light source: a warm candle glow low on the table that grows warmer as the evening
   goes deeper. Everything else stays quiet. Every later phase uses these names; change the
   look here, not in the screen styles. Animate only transform and opacity. */

:root {
  /* Ground (the table at night), per heat level; theme.css cross-fades between them. */
  --ground-1-top: #10142a;
  --ground-1-bottom: #1d1934;
  --ground-1-glow: rgb(255 170 96 / 0.24);
  --ground-2-top: #111329;
  --ground-2-bottom: #2a1a2f;
  --ground-2-glow: rgb(255 164 84 / 0.36);
  --ground-3-top: #140f27;
  --ground-3-bottom: #35172c;
  --ground-3-glow: rgb(255 124 112 / 0.38);
  --ground-4-top: #170c20;
  --ground-4-bottom: #3e1419;
  --ground-4-glow: rgb(255 96 58 / 0.44);

  /* Surfaces */
  --ink: #10142a; /* deepest ground, behind overlays */
  --card: #1e1833; /* card stock */
  --card-hi: #2a2140; /* top of a card */
  --raised: rgb(255 255 255 / 0.045); /* quiet fills on the ground */
  --scrim: rgb(9 8 20 / 0.82);

  /* Text: parchment on navy. All pass 4.5:1 on every ground. */
  --text: #f3e9d8;
  --text-soft: #d9cfe3; /* body copy that is not the main thing */
  --muted: #c4b9d2; /* hints and labels, still 7:1 on the ground */

  /* Candle gold: the one accent. */
  --gold: #f4c77b;
  --gold-hi: #ffe7b3;
  --gold-deep: #d98f4a;
  --gold-ink: #2a1606; /* text on gold */
  --line: rgb(244 199 123 / 0.42); /* gold hairline */
  --line-soft: rgb(243 233 216 / 0.2); /* parchment hairline */
  --danger: #ff9a8a;

  /* Heat levels: cool blue Icebreaker, amber, rose, ember Vault. */
  --heat-1: #7cc4f0;
  --heat-2: #f2b35b;
  --heat-3: #f07a9a;
  --heat-4: #ff6a3d;
  --heat-1-ink: #071a26;
  --heat-2-ink: #2a1606;
  --heat-3-ink: #2a0614;
  --heat-4-ink: #2a0a02;

  /* Kept for P1 and P3 code that still names them. */
  --accent: var(--gold);
  --accent-text: var(--gold-ink);
  --bg: var(--ink);
  --bg-raised: var(--card);
  --bg-sunk: #0b0e1f;

  /* Type: Fraunces (soft old-style serif) for what is said aloud, Atkinson Hyperlegible
     Next for everything you tap (designed for low vision, so it holds up in a dim room). */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;
  --fs-small: 15px;
  --fs-body: 17px;
  --fs-lead: 20px;
  --fs-card: 30px; /* the question itself */
  --fs-title: 32px;
  --fs-hero: 46px;

  /* Space and shape: small radii on controls, large on cards, round on coins. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
  --pad: 20px;
  --gap: 12px;
  --tap: 52px;
  --r-control: 16px;
  --r-card: 26px;
  --r-tile: 14px;
  --radius: var(--r-control);

  /* Depth */
  --shadow-card: 0 26px 60px rgb(0 0 0 / 0.5);
  --shadow-lift: 0 12px 28px rgb(0 0 0 / 0.45);
  --glow-gold: 0 0 48px rgb(255 170 80 / 0.45);
  --foil: inset 0 0 0 1px rgb(244 199 123 / 0.6), inset 0 0 0 7px var(--card), inset 0 0 0 8px rgb(244 199 123 / 0.24);

  /* Motion. UI 150 to 300 ms; only the reveal is long. Springs are sampled damped springs
     (tools in the P4 report), used with Web Animations and transitions. */
  --dur-tap: 120ms;
  --dur-ui: 220ms;
  --dur-screen: 340ms;
  --dur-sheet: 420ms;
  --dur-flip: 820ms;
  --dur-heat: 1400ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* gentle settle, about 0.6% overshoot */
  --spring-soft: linear(0, 0.0321, 0.1138, 0.212, 0.3275, 0.433, 0.5397, 0.6279, 0.7108, 0.7755, 0.8332, 0.8763, 0.9131, 0.9395, 0.9611, 0.9759, 0.9874, 0.9948, 1.0001, 1.0032, 1.005, 1.0059, 1.0061, 1.0058, 1.0054, 1.0047, 1.004, 1.0034, 1.0028, 1.0022, 1.0017, 1.0013, 1.001, 1.0007, 1.0005, 1.0003, 1);
  /* bouncy, about 19% overshoot: coins landing, the score bump */
  --spring-pop: linear(0, 0.0762, 0.2532, 0.4751, 0.6977, 0.8909, 1.0377, 1.1331, 1.1803, 1.1883, 1.1683, 1.1319, 1.0892, 1.0479, 1.0132, 0.9877, 0.9719, 0.9649, 0.965, 0.97, 0.9774, 0.9856, 0.9931, 0.9992, 1.0034, 1.0059, 1.0068, 1.0065, 1.0054, 1.0039, 1.0024, 1.001, 0.9999, 0.9992, 0.9988, 0.9987, 1);
  /* card flip, about 5% overshoot */
  --spring-flip: linear(0, 0.0436, 0.1452, 0.2861, 0.4271, 0.5626, 0.6842, 0.7874, 0.8756, 0.9384, 0.984, 1.0148, 1.0337, 1.0438, 1.0464, 1.0445, 1.0399, 1.0338, 1.0269, 1.0206, 1.0149, 1.0101, 1.0062, 1.0031, 1.0008, 0.9994, 0.9985, 0.998, 0.9978, 0.9979, 0.9981, 0.9984, 0.9987, 0.999, 0.9993, 0.9995, 1);
}

/* Browsers without linear() get a plain ease-out. */
@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-soft: var(--ease-out);
    --spring-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-flip: cubic-bezier(0.34, 1.3, 0.64, 1);
  }
}
