/* ==========================================================================
   ZION FILMS · BRAND TOKENS · v1 (30 Nov 2026)
   The single source of truth for colour, type, space, shape and motion.
   The guideline, the mocks and the website all read this file.

   HOW TO RE-THEME
   Only the four BRAND INPUTS below are hand-picked. Every other colour is
   mixed from them, so changing one line re-colours everything:
     1. edit --key / --deep / --tone / --on-key here, or
     2. pick a preset:  <html data-palette="copper">
   Never hard-code a colour in a page. Transparent variants are mixed:
     color-mix(in srgb, var(--ink) 8%, transparent)

   THE RATIO (per page, measured by area)
     60  Light   white + paper       canvas and white space
     30  Dark    ink + deep          type, film blocks, footer
     10  Brand   7 tone + 3 key      colour blocks · actions and live status
   ========================================================================== */

:root{
  /* ---------- 1. BRAND INPUTS (default palette: Oak) ---------- */
  --key:#8A4520;      /* Accent. Buttons, links, live status, the road. Max ~3% of a page */
  --deep:#241814;     /* Brand dark. Film blocks, cinema sections, footer */
  --tone:#B39B7E;     /* Brand mid. Colour-block sections, tints, quiet surfaces */
  --on-key:#FFFFFF;   /* Text and icons on --key */

  /* ---------- 2. FIXED NEUTRAL ANCHORS (never themed) ---------- */
  --white:#FFFFFF;
  --black:#0A0908;

}

/* Mixed tokens are declared wherever a palette can be set, so they re-mix for
   that element (custom properties resolve var() where they are declared). */
:root, [data-palette]{
  /* ---------- 3. DERIVED NEUTRALS (the 60 + 30) ---------- */
  --paper:   color-mix(in oklch, var(--tone) 11%, var(--white));   /* second light surface */
  --mist:    color-mix(in oklch, var(--tone) 24%, var(--white));   /* image placeholders, wells */
  --ink:     color-mix(in oklch, var(--deep) 45%, var(--black));   /* headlines, primary buttons */
  --ink-2:   color-mix(in oklch, var(--ink) 82%, var(--white));    /* body copy */
  --mute:    color-mix(in oklch, var(--ink) 62%, var(--white));    /* captions, labels, meta */
  --line:    color-mix(in oklch, var(--ink) 12%, var(--white));    /* hairlines on light */

  /* ---------- 4. DERIVED DARK SURFACE (film blocks) ---------- */
  --deep-2:      color-mix(in oklch, var(--deep) 90%, var(--white));  /* cards on deep */
  --deep-line:   color-mix(in oklch, var(--deep) 80%, var(--white));  /* hairlines on deep */
  --on-deep:     color-mix(in oklch, var(--tone) 10%, var(--white));  /* headlines on deep */
  --on-deep-2:   color-mix(in oklch, var(--tone) 62%, var(--white));  /* body on deep */
  --on-deep-mute:color-mix(in oklch, var(--tone) 75%, var(--deep));   /* meta on deep */

  /* ---------- 5. DERIVED BRAND TINTS (the 10) ---------- */
  --tone-ink:  color-mix(in oklch, var(--deep) 88%, var(--black));    /* text on --tone */
  --tone-soft: color-mix(in oklch, var(--tone) 40%, var(--white));    /* soft colour block */
  --key-text:  color-mix(in oklch, var(--key) 74%, var(--black));     /* key used as text on light */
  --key-soft:  color-mix(in oklch, var(--key) 12%, var(--white));     /* selected rows, chips */
  --key-glow:  color-mix(in oklch, color-mix(in oklch, var(--key) 60%, var(--tone)) 80%, var(--white)); /* key as light on dark: status text, glows */

  /* Light as material: the key colour used as a glow on dark, never as a big flat area */
  --glow: radial-gradient(60% 70% at 85% 30%,
            color-mix(in srgb, var(--key-glow) 55%, transparent) 0%,
            color-mix(in srgb, var(--key) 18%, transparent) 45%,
            transparent 75%);

  /* Status (release road). Live = key; everything else stays neutral */
  --status-live: var(--key);
  --status-next: var(--ink);
  --status-done: var(--mute);

}

:root{
  /* ---------- 6. TYPE ---------- */
  --font-display: "Inter Tight", "Noto Sans Tamil", system-ui, sans-serif;
  --font-text:    "Inter", "Noto Sans Tamil", system-ui, sans-serif;
  --font-tamil:   "Noto Sans Tamil", "Inter", sans-serif;
  --w-light:300; --w-regular:400; --w-medium:500; --w-semibold:600;

  /* Fluid scale: mobile (360px) → desktop (1440px). Ratio ≈1.25 on mobile, ≈1.333 on desktop */
  --t-hero:  clamp(52px, 4.2rem + 6vw, 168px);  /* one per page */
  --t-h1:    clamp(40px, 2rem + 4.4vw, 112px);
  --t-h2:    clamp(32px, 1.6rem + 2.6vw, 72px);
  --t-h3:    clamp(24px, 1.2rem + 1vw, 36px);
  --t-lead:  clamp(19px, 1rem + .5vw, 26px);
  --t-body:  clamp(16px, .95rem + .15vw, 18px);
  --t-small: 14px;
  --t-label: 12px;                               /* uppercase, +.14em tracking */
  --lh-tight:1.02; --lh-head:1.1; --lh-body:1.55;
  --track-display:-.035em; --track-label:.14em;
  --measure: 62ch;

  /* ---------- 7. SPACE (8-point) ---------- */
  --s-1:4px;  --s-2:8px;  --s-3:12px; --s-4:16px; --s-5:24px; --s-6:32px;
  --s-7:48px; --s-8:64px; --s-9:96px; --s-10:128px; --s-11:192px;
  --section: clamp(96px, 5rem + 8vw, 192px);    /* vertical padding of every section */
  --gutter:  clamp(16px, 1rem + 1.6vw, 40px);   /* column gap and page margin */
  --max:     1440px;

  /* ---------- 8. SHAPE ---------- */
  --r-0:0;          /* images and film frames: always square, like a screen */
  --r-1:8px;        /* cards, inputs */
  --r-pill:999px;   /* buttons, status chips */
  --hair:1px;

  /* ---------- 9. MOTION ---------- */
  --ease-out:   cubic-bezier(.16,1,.3,1);   /* UI: settles softly */
  --ease-film:  cubic-bezier(.65,0,.35,1);  /* reveals: like a slow dolly */
  --dur-1:160ms; --dur-2:320ms; --dur-3:640ms; --dur-4:1200ms;
}

/* ---------- PALETTE PRESETS: each is just the four inputs ---------- */
[data-palette="oak"]    { --key:#8A4520; --deep:#241814; --tone:#B39B7E; --on-key:#FFFFFF; }
[data-palette="copper"] { --key:#B4602C; --deep:#2A100B; --tone:#D2B59C; --on-key:#FFFFFF; }
[data-palette="brass"]  { --key:#B08A3E; --deep:#1B1915; --tone:#CBBFA6; --on-key:#16130E; }
[data-palette="cinema"] { --key:#A12A2C; --deep:#1A1112; --tone:#C4A7A0; --on-key:#FFFFFF; }
[data-palette="monsoon"]{ --key:#2E6A6C; --deep:#0F1B1C; --tone:#A7BCB8; --on-key:#FFFFFF; }
[data-palette="mono"]   { --key:#1A1A1A; --deep:#141414; --tone:#BDBBB8; --on-key:#FFFFFF;
                          --key-glow:color-mix(in oklch, var(--tone) 60%, var(--white)); } /* key ≈ deep here, so light is drawn from tone */

/* ---------- SECTION SCHEMES: drop a block on a page, its contents adapt ----------
   Components inside only ever use --bg, --fg, --fg-2, --fg-mute, --rule, --accent, --on-accent */
.s-white { --bg:var(--white); --fg:var(--ink);     --fg-2:var(--ink-2);     --fg-mute:var(--mute);         --rule:var(--line);      --accent:var(--key); --accent-text:var(--key-text); --on-accent:var(--on-key); }
.s-paper { --bg:var(--paper); --fg:var(--ink);     --fg-2:var(--ink-2);     --fg-mute:var(--mute);         --rule:var(--line);      --accent:var(--key); --accent-text:var(--key-text); --on-accent:var(--on-key); }
.s-deep  { --bg:var(--deep);  --fg:var(--on-deep); --fg-2:var(--on-deep-2); --fg-mute:var(--on-deep-mute); --rule:var(--deep-line); --accent:var(--key-glow); --accent-text:var(--key-glow); --on-accent:var(--deep); }
.s-ink   { --bg:var(--ink);   --fg:var(--white);   --fg-2:var(--on-deep-2); --fg-mute:var(--on-deep-mute); --rule:var(--deep-line); --accent:var(--key-glow); --accent-text:var(--key-glow); --on-accent:var(--ink); }
.s-tone  { --bg:var(--tone);  --fg:var(--tone-ink);--fg-2:var(--tone-ink);  --fg-mute:color-mix(in oklch, var(--tone-ink) 72%, var(--tone)); --rule:color-mix(in srgb, var(--tone-ink) 22%, transparent); --accent:var(--tone-ink); --accent-text:var(--tone-ink); --on-accent:var(--tone); }
.s-key   { --bg:var(--key);   --fg:var(--on-key);  --fg-2:color-mix(in oklch, var(--on-key) 82%, var(--key)); --fg-mute:color-mix(in oklch, var(--on-key) 68%, var(--key)); --rule:color-mix(in srgb, var(--on-key) 25%, transparent); --accent:var(--on-key); --accent-text:var(--on-key); --on-accent:var(--key); }
.s-white,.s-paper,.s-deep,.s-ink,.s-tone,.s-key{ background-color:var(--bg); color:var(--fg) }
