/* Design tokens: DESIGN_SYSTEM.md §1–§3. The only file allowed to hold colour values.
   Launch ships the light theme; the dark values are defined but never switched on. */

:root {
  /* Colour (§1) */
  --paper-000: #f2e9d8;
  --paper-100: #fbf6ec;
  --paper-200: #ffffff;
  --ink: #221c17;
  --ink-muted: #6b5d4f;
  --ink-shadow: #221c17;
  --line: #e3d7c2;
  --line-strong: #8a7a66;
  --marigold: #f5a524;
  --on-marigold: #221c17;
  --marigold-ink: #8a4f00;
  --marigold-tint: #fde7b8;
  --peacock: #0e6b66;
  --on-peacock: #ffffff;
  --peacock-ink: #0b5e59;
  --peacock-tint: #d5efeb;
  --coral: #e4572e;
  --on-coral: #221c17;
  --danger: #a8172c;
  --on-danger: #ffffff;
  --danger-ink: #96132a;
  --danger-tint: #fbe1e4;
  --info: #5c4f42;
  --info-tint: #ebe3d6;
  --focus: var(--ink);
  --stage: #2a2420;
  --on-stage: #fbf6ec;

  /* Type (§2) */
  --font-display: "Baloo 2", "Mukta", system-ui, sans-serif;
  --font-body: "Mukta", system-ui, sans-serif;
  /* Mukta after Plex Mono (M23): Devanagari in a mono field falls back to it, as Script:59. */
  --font-mono: "IBM Plex Mono", "Mukta", ui-monospace, monospace;
  /* The scale's smallest step (12px), on a token so the app's desktop density (density.css) can
     raise it to 13px where the whole app draws at 85%: no text under 11px on the screen. */
  --fs-xs: 12px;

  /* Spacing (§3) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Radius (§3) */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Borders and shadows (§3): hard and offset, never blurred */
  --border-ink: 1.5px solid var(--ink);
  --border-hair: 1px solid var(--line);
  --shadow-ink: 3px 3px 0 var(--ink-shadow);
  --shadow-ink-lg: 5px 5px 0 var(--ink-shadow);
  --shadow-none: none;

  /* Every still and video preview is 9:16 */
  --aspect-reel: 9 / 16;

  /* Motion, "Ink & Cel" (canvas studio.css, M22): the interface glides (ease-out, under 300ms),
     things that land settle with a small spring, and nothing travels under reduced motion. */
  --t-press: 120ms;
  --t-quick: 160ms;
  --t-base: 220ms;
  --t-enter: 340ms;
  --t-scene: 520ms;
  --e-out: cubic-bezier(0.23, 1, 0.32, 1);
  --e-inout: cubic-bezier(0.77, 0, 0.175, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* A pressed card's 1px shadow (the canvas's chosen-card press). */
  --shadow-ink-sm: 1px 1px 0 var(--ink-shadow);

  /* The success stamp's paper confetti: ten dots thrown round the tick, in the brand's three inks. */
  --confetti-1: var(--marigold);
  --confetti-2: var(--peacock);
  --confetti-3: var(--coral);
  --confetti-burst:
    0 -46px 0 var(--confetti-1), 33px -33px 0 var(--confetti-2), 46px 0 0 var(--confetti-3),
    33px 33px 0 var(--confetti-1), 0 46px 0 var(--confetti-2), -33px 33px 0 var(--confetti-3),
    -46px 0 0 var(--confetti-1), -33px -33px 0 var(--confetti-2), 18px -58px 0 var(--confetti-3),
    -20px 56px 0 var(--confetti-1);

  /* Sketch-paper dots on sunk grounds (the sidebar), and the live barber stripe on work in progress. */
  --ink-wash: rgba(34, 28, 23, 0.09);
  --ink-stripe: rgba(34, 28, 23, 0.22);
  --paper-dots: radial-gradient(var(--ink-wash) 1px, transparent 1.3px);
  /* The character designer's grid paper (board 03), its hover and chosen zones, and the teal
     flash of a part that just changed. */
  --ink-grid: rgba(34, 28, 23, 0.05);
  --paper-grid: linear-gradient(var(--ink-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-grid) 1px, transparent 1px);
  --marigold-wash: rgba(245, 165, 36, 0.08);
  --marigold-glow: rgba(245, 165, 36, 0.12);
  --peacock-wash: rgba(14, 107, 102, 0.35);
  --barber-stripe: linear-gradient(
    -45deg,
    var(--ink-stripe) 25%,
    transparent 25%,
    transparent 50%,
    var(--ink-stripe) 50%,
    var(--ink-stripe) 75%,
    transparent 75%
  );
}

/* The storyboard studio (board 08, canvas v2): each place's wall swatch, the third music track's
   lane colours and the drawn props' and animals' fills. */
:root {
  --wall-kitchen: #8c5a3c;
  --wall-classroom: #5d6b4a;
  --wall-school-gate: #4f6b52;
  --wall-bus-stop: #8a6d3b;
  --wall-rooftop: #b0603f;
  --wall-market: #9a4f3a;
  --wall-bedroom: #5b4a3a;
  --wall-gully: #7a6a4a;
  --wall-living-room: #7b5b46;
  --wall-park: #5f7a48;
  --wall-backyard: #6f6a40;
  --wall-shop: #8a5a48;
  --coral-tint: #f6d8cc;
  --coral-ink: #7a2e16;
  --prop-steel: #c9c2b8;
  --prop-steel-dark: #b8b0a4;
  --prop-wood: #d9b37a;
  --prop-wood-dark: #6b4024;
  --prop-leather: #8c5a3c;
  --prop-mango: #f2b632;
  --prop-leaf: #5f7a48;
}

/* Analytics (boards 09c and 09d, M29): the chart palette (validated on paper and white; text
   never wears these) and the followers-online ramp, light to dark. */
:root {
  --chart-instagram: #c47a00;
  --chart-youtube: #00897b;
  --heat-1: #fdf0d3;
  --heat-2: #f9d999;
  --heat-3: #f0b54d;
  --heat-4: #c47a00;
  --heat-5: #7a4a00;
  --chart-beat-hover: rgba(245, 165, 36, 0.12);
  --chart-beat-worst: rgba(168, 23, 44, 0.07);
}

/* A spring with about 12% overshoot where linear() easing is supported. */
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --e-spring: linear(0, 0.33 7%, 0.68 14%, 0.93 21%, 1.07 28%, 1.12 35%, 1.1 42%, 1.05 50%, 1.01 60%, 0.995 72%, 1);
  }
}

:root[data-theme="dark"] {
  --paper-000: #13100d;
  --paper-100: #1a1613;
  --paper-200: #25201a;
  --ink: #f6efe3;
  --ink-muted: #b9ab98;
  --ink-shadow: #5a4a36;
  --line: #3a332b;
  --line-strong: #857767;
  --marigold: #f7b23b;
  --on-marigold: #221c17;
  --marigold-ink: #f7b23b;
  --marigold-tint: #4d3810;
  --peacock: #2a9d93;
  --on-peacock: #0b1f1d;
  --peacock-ink: #5cc7bc;
  --peacock-tint: #0f2f2c;
  --coral: #ff7a59;
  --on-coral: #221c17;
  --danger: #ff8fa3;
  --on-danger: #2a0a10;
  --danger-ink: #ff8fa3;
  --danger-tint: #3b141c;
  --info: #cfc2b0;
  --info-tint: #2e2822;
  --focus: var(--ink);
  --stage: #2a2420;
}
