/* The Pixel Council: design tokens (single source of truth for site + brand system)
   Direction: cinematic. Ink-dominant, colour comes from the work, slow and weighted motion. */

/* Self-hosted fonts (latin subset): faster, and no visitor IPs sent to Google (GDPR) */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-italic-latin.woff2") format("woff2"); }

/* Fallbacks tuned to the real fonts' widths so the swap doesn't reflow the page (CLS) */
@font-face { font-family: "Instrument Serif Fallback"; src: local("Times New Roman"), local("Times");
  size-adjust: 83.7%; ascent-override: 118.3%; descent-override: 37%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"), local("Helvetica");
  size-adjust: 97%; ascent-override: 97%; descent-override: 25%; line-gap-override: 0%; }

:root {
  /* Core palette */
  --tpc-pink: #FF33B4;
  --tpc-purple: #A855F7;
  --tpc-ink: #111827;
  --tpc-amber: #FBBF24;
  --tpc-fog: #F3F4F6;

  /* Highlight: gold is the only accent colour (strategy/05-colour-palette.md).
     Violet stays in scenes and atmosphere, never as a UI accent. */
  --tpc-highlight: var(--tpc-amber);

  /* Neutrals (extend the ink/fog family) */
  --tpc-ink-2: #1F2937;
  --tpc-ink-3: #374151;
  --tpc-ink-4: #4B5563;
  --tpc-mist: #9CA3AF;
  --tpc-white: #FFFFFF;

  /* Text-safe accents (AA 4.5:1 on their background) */
  --tpc-pink-deep: #C8007F;    /* on fog: 5.07 */
  --tpc-purple-soft: #C084FC;  /* on ink: 6.71 */
  --tpc-purple-deep: #7E22CE;  /* on fog: 6.35 */
  --tpc-amber-deep: #92400E;   /* on fog: 6.44 */

  /* Hairlines and glows */
  --line-soft: rgba(243, 244, 246, .10);
  --line: rgba(243, 244, 246, .16);
  --line-strong: rgba(243, 244, 246, .32);
  --tpc-glow: linear-gradient(100deg, var(--tpc-purple) 0%, var(--tpc-pink) 55%, var(--tpc-amber) 100%);

  /* Typography */
  --font-display: "Instrument Serif", "Instrument Serif Fallback", "Times New Roman", serif;
  --font-text: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --caps-track: .26em;   /* film-credit tracking for small capitals */

  /* Fluid type scale (min @ 360px, max @ 1440px) */
  --step--2: clamp(0.7rem, 0.68rem + 0.08vw, 0.75rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.42vw, 1.42rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.95vw, 2.2rem);
  --step-3: clamp(2rem, 1.55rem + 2.1vw, 3.5rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.8vw, 5.4rem);
  --step-5: clamp(3rem, 1.8rem + 6vw, 8.2rem);

  /* Space: 8px grid */
  --s-1: 4px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --s8: 128px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --section: clamp(96px, 13vw, 200px);

  /* Shape: crisp, near-square corners */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 6px;
  --radius-pill: 999px; /* buttons */

  /* Motion: slow, weighted, never bouncy */
  --ease-cine: cubic-bezier(.19, 1, .22, 1);        /* expo out: reveals, arrivals */
  --ease-cine-inout: cubic-bezier(.76, 0, .24, 1);  /* scene changes */
  --dur-fast: 280ms;
  --dur: 600ms;
  --dur-slow: 1400ms;

  --header-h: 76px;
}

/* All homepage sections sit on ink; light surfaces are reserved for rare emphasis */
.theme-ink {
  --bg: var(--tpc-ink);
  --surface: var(--tpc-ink-2);
  --fg: var(--tpc-fog);
  --muted: var(--tpc-mist);
  --accent: var(--tpc-highlight);
  --accent-2: var(--tpc-highlight);
  --accent-3: var(--tpc-highlight);
  background: var(--bg);
  color: var(--fg);
}

.theme-fog {
  --bg: var(--tpc-fog);
  --surface: var(--tpc-white);
  --fg: var(--tpc-ink);
  --muted: var(--tpc-ink-4);
  --line-soft: rgba(17, 24, 39, .08);
  --line: rgba(17, 24, 39, .14);
  --line-strong: rgba(17, 24, 39, .3);
  --accent: var(--tpc-highlight);   /* never as text on fog (1.5:1): see the marker rules in main.css */
  --accent-2: var(--tpc-highlight);
  --accent-3: var(--tpc-highlight);
  background: var(--bg);
  color: var(--fg);
}
