/* =========================================================================
   TOKENS — single source of truth for the visual system.
   Colours, fonts, type scale, spacing, glass, easing, durations, sequence.
   Change values here; every other stylesheet only references these.
   ========================================================================= */

/* ---- Fonts (self-hosted woff2, latin subset, font-display: swap) ------- */
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display-latin-italic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Colour: chocolate base (mandatory #241D17) + derived depths ----- */
  --c-bg: #241D17;            /* base background (mandatory) */
  --c-bg-deep: #1A1511;       /* recessed areas */
  --c-bg-abyss: #0E0B08;      /* near-black for edges / vignette */
  --c-bg-raised: #2F261F;     /* lifted surfaces */

  /* ---- Colour: warm gold accent (mandatory #9C7B3C) -------------------- */
  --c-gold: #9C7B3C;          /* lines, markers, small accents only */
  --c-gold-light: #C4A468;    /* tiny gold glyphs needing more contrast */
  --c-gold-a55: rgba(156, 123, 60, .55);
  --c-gold-a25: rgba(156, 123, 60, .25);
  --c-gold-glow: rgba(156, 123, 60, .20);

  /* ---- Colour: electric blue, audio only (hero waveforms) -------------- */
  --c-blue-1: #4DA3FF;
  --c-blue-2: #7FD6FF;

  /* ---- Colour: warm ivory text (AA on --c-bg) -------------------------- */
  --c-ivory: #F1E8DA;         /* primary text  ~14:1 */
  --c-ivory-muted: #C9BBA6;   /* secondary     ~8.8:1 */
  --c-ivory-dim: #9A8C79;     /* micro labels  ~5:1 */
  --c-line: rgba(241, 232, 218, .10);   /* hairlines */
  --c-line-soft: rgba(241, 232, 218, .06);

  /* ---- Smoked glass ---------------------------------------------------- */
  --glass-fill: linear-gradient(155deg, rgba(64, 51, 40, .42) 0%, rgba(28, 22, 17, .58) 100%);
  --glass-fallback: rgba(33, 27, 21, .94);
  --glass-blur: 18px;
  --glass-border: 1px solid rgba(241, 232, 218, .09);
  --glass-highlight: inset 0 1px 0 rgba(241, 232, 218, .06);
  --glass-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65);
  --radius-panel: 14px;
  --radius-chip: 10px;

  /* ---- Film grain (static SVG noise) ----------------------------------- */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-opacity: .10;

  /* ---- Typography ------------------------------------------------------ */
  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h1: clamp(2.7rem, 0.9rem + 5vw, 6.4rem);
  --fs-lead: clamp(.9rem, .82rem + .3vw, 1.05rem);
  --fs-nav: .8125rem;
  --fs-micro: .6875rem;       /* 11px labels */
  --fs-nano: .59rem;          /* panel labels */
  --track-wide: .28em;
  --track-mid: .18em;

  /* ---- Layout ---------------------------------------------------------- */
  --pad-x: clamp(20px, 5.5vw, 120px);
  --nav-h: clamp(60px, 9svh, 88px);

  /* ---- Motion: easing + durations ------------------------------------- */
  --ease-out: cubic-bezier(.22, .61, .21, 1);     /* soft settle, no overshoot */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-xs: 220ms;            /* hovers */
  --dur-sm: 450ms;
  --dur-md: 600ms;
  --dur-lg: 700ms;
  --rise-sm: 10px;            /* scroll reveals (sections.css) */
  --rise-md: 18px;
  --rise-hero: 4px;           /* hero entrance: almost a pure fade */

  /* ---- Motion: entrance (one single, near-simultaneous appearance) ----- */
  --seq-bg: 0ms;              /* atmosphere / glow   */
  --seq-glass: 0ms;           /* glass panel         */
  --seq-figure: 0ms;          /* figure              */
  --seq-text: 0ms;            /* headline (lines stagger) */
  --seq-stagger: 60ms;
  --seq-ui: 120ms;            /* playhead, chip, bbox, micro copy */
  --motion-start-cap: 500ms;  /* max wait for image/fonts before playing */
  --ambient-glow: 16s;        /* very slow luminosity drift of one glow */
}
