/* PROVENANCE (pretix_kia_theme): VERBATIM copy of styles/tokens.css from gowthamchelikam/kia2026-voting
 * branch feat/kia-jury @ 13529832b1d275615c56d83bb55646ef58ba9229 (2026-12-03T07:58:31+05:30). Copied 2026-12-03 08:14 IST by W2-design. Do not edit below this comment;
 * re-copy from the repo instead. Everything in kia-theme.css consumes these variables. */
/*
 * KIA 2026 design tokens.
 * Brand foundation: Figma "KRAFTON Awards 2026 - handoff" (62AH94DnOzDawLGmIKQphE).
 * Approved ember key visual: burgundy surfaces on a dark wine ground, warm ivory text,
 * champagne/gold actions.
 * Typography retains the established four-role system and compact award-title scale.
 * Everything in the app consumes these variables (directly or via tailwind.config.ts).
 * Never hardcode a colour, font size or easing anywhere else.
 */

:root {
  /* ── Primitive ramps (approved warm-ivory / champagne palette) ─────── */
  --accent-50: #fff1dc;
  --accent-100: #ffe7cf;
  --accent-200: #f8d9b8;
  --accent-300: #f3ca9b;
  --accent-400: #edbe87;
  --accent-500: #e9b373; /* primary gold, not atmospheric ember */
  --accent-600: #bd8750;
  --accent-700: #8e5d38;
  --accent-800: #603925;
  --accent-900: #321a12;

  /* Legacy utility names retained; no neutral-grey islands in the warm theme. */
  --grey-50: var(--accent-50);
  --grey-100: #d6bfb2;
  --grey-200: #bd9e90;
  --grey-300: #a27f72;
  --grey-400: #79524c;
  --grey-500: #39131a;
  --grey-600: #3d151c;
  --grey-700: #41171e;
  --grey-800: #451920;
  --grey-900: #491b22;

  /* Warm ink: text on gold and the hero title shadow. */
  --ink: #1b080b;

  /* ── Semantic colour roles ─────────────────────────────────────────── */
  /* The page is a dark wine ground, about one step (1.11:1) under the burgundy cards, the same
     step a card's mark tile takes above the card. Do not lift it back toward --bg-raised. */
  --bg: #120407;             /* page */
  --bg-raised: #2a0c12;      /* award cards, sheets, sticky bars, footer */
  --surface: var(--grey-500);        /* cards */
  --surface-hover: var(--grey-900);
  --line: rgb(121 82 76 / 0.55);     /* warm grey-400 decorative hairlines */
  --line-strong: var(--grey-400);
  --line-input: var(--grey-300); /* ≥ 3.97:1 on every dark surface, including hover */
  --line-gold: rgb(233 179 115 / 0.35);

  /* Warm-ivory reading ladder; gold remains the action / earned-state role.
     Minimum contrast across bg, raised, surface and hover: fg 12.89:1,
     muted 8.17:1, subtle/placeholder 5.78:1. Disabled is not a placeholder role. */
  --fg: var(--grey-50);
  --fg-warm: var(--accent-50);
  --fg-muted: var(--grey-100);
  --fg-subtle: var(--grey-200);
  --fg-disabled: var(--grey-300);    /* large/non-essential text only */
  --gold: var(--accent-500);
  --gold-bright: var(--accent-300);
  --gold-deep: var(--accent-600);
  --gold-shadow: var(--accent-800);
  --award-title-gold: linear-gradient(115deg, var(--accent-400) 0%, var(--accent-200) 48%, var(--accent-500) 100%);
  --on-gold: var(--ink);             /* ≥ 6.21:1 at every gold-metal stop */

  --success: var(--accent-300);      /* light gold + confirmation icon/text */
  --danger: #e5877a;                 /* errors + alert icon/text; ≥ 5.52:1 on dark surfaces */

  /* Atmospheric ember belongs to the key visual, never an action/error substitute. */
  --ember: #ed5a25;
  --hero-title-fill: var(--fg-warm);
  --hero-title-edge: var(--accent-400);
  --hero-title-shadow: var(--ink);

  /* Browser chrome follows the same accessible foreground/action roles. */
  --selection-bg: var(--gold);
  --selection-fg: var(--on-gold);
  --caret: var(--gold);
  --scrollbar-thumb: var(--line-input);
  --scrollbar-thumb-hover: var(--fg-subtle);
  --scrollbar-track: var(--bg);

  /* Translucent roles. Tailwind can't alpha-modify var() colours (`bg-bg/60` compiles
     to nothing), so every tint the UI needs is named here. */
  --scrim: rgb(7 2 3 / 0.8);                  /* sheet / dialog backdrop, photo chips: darker than the page so it dims */
  --gold-wash: rgb(233 179 115 / 0.07);       /* hover / pressed tint on dark */
  --gold-halo: rgb(233 179 115 / 0.16);       /* existing selected-state / portrait lighting */
  --fg-ghost: rgb(255 241 220 / 0.05);        /* giant ghosted type behind broadcast frames */
  --danger-wash: rgb(229 135 122 / 0.08);      /* errored input fill */

  /* Brushed gold for primary CTAs and winner bars (broadcast L3 treatment).
     Stops never go darker than accent-600 so --on-gold text stays ≥ 5.5:1 everywhere. */
  --gold-metal: linear-gradient(
    100deg,
    var(--accent-600) 0%,
    var(--accent-500) 22%,
    var(--accent-200) 48%,
    var(--accent-500) 74%,
    var(--accent-600) 100%
  );
  /* Decorative only (no text on it): deep edges like the trophy renders */
  --gold-metal-deep: linear-gradient(
    100deg,
    var(--accent-800) 0%,
    var(--accent-600) 25%,
    var(--accent-300) 50%,
    var(--accent-600) 75%,
    var(--accent-800) 100%
  );
  --gold-sheen: linear-gradient(
    100deg,
    transparent 30%,
    rgb(255 241 220 / 0.55) 50%,
    transparent 70%
  );
  /* Silk vignette: clears the centre, sinks the edges into --bg (broadcast frames) */
  --vignette: radial-gradient(
    ellipse 120% 90% at 50% 40%,
    transparent 0%,
    transparent 35%,
    rgb(18 4 7 / 0.7) 72%,
    var(--bg) 100%
  );
  /* Bottom fade so a silk section melts into the page */
  --fade-bottom: linear-gradient(180deg, transparent 55%, var(--bg) 100%);

  /* ── Gold rarity ladder (docs/AUDIENCE-DIRECTION.md §1: "gold is earned") ──
     Gold is a drop, not a dress code: it goes to what the fan earned or chose.
       common    line / fg-subtle / fg-muted   chrome, unpicked cards, labels, headings, eyebrows
       rare      accent-700 + gold-wash        pressed / hover states
       epic      accent-500 2px frame + halo   the card you picked, the live matchup side
       legendary gold-metal + gold-sheen       locked-in vote, tier-up, 12/12, winners, share-card frame
     Utilities: .rarity-common / -rare / -epic / -legendary (+ .rarity-legendary-frame) in
     app/globals.css; components/ui/rarity.ts maps a lib/rank rarity to its class. */
  --rarity-common: var(--line);
  --rarity-rare: var(--accent-700);
  --rarity-epic: var(--accent-500);
  --rarity-epic-halo: 0 0 0 1px var(--accent-500), 0 0 28px -4px var(--gold-halo), 0 14px 40px -18px rgb(233 179 115 / 0.45);

  /* ── Typography ─────────────────────────────────────────────────────
     Four voices, each tightly scoped. KRAFTON Headline is the brand masthead only.
     Arpona carries high-value display, award titles, numerals and primary CTAs.
     Instrument Sans carries every sentence a fan reads. ArponaSans is uppercase metadata only. */
  --font-brand: "KRAFTONHeadline", "Arial Black", sans-serif;
  --font-display: "Arpona", "Iowan Old Style", Georgia, serif;
  /* Big headlines only (hero, page titles, section headings): Forevs from the KRAFTON Adobe Fonts kit
     (styles/fonts.ts ADOBE_FONTS_KIT). Falls back to Arpona until the kit loads, or wherever it isn't linked. */
  --font-headline: "forevs", "Arpona", "Iowan Old Style", Georgia, serif;
  --font-ui: "InstrumentSans", "Helvetica Neue", Arial, sans-serif;      /* body / UI copy */
  --font-label: "ArponaSans", "Helvetica Neue", Arial, sans-serif;       /* uppercase labels only */

  /* Fluid sizes: mobile value at 390px → desktop value at 1440px. A step below the Figma
     specimen across the board — the specimen is a broadcast scale; the site reads at arm's
     length on a phone. */
  --fs-display: clamp(3rem, 0.714rem + 9.381vw, 9.125rem);          /* 48 → 146  Arpona Bold */
  --fs-display-2: clamp(2.5rem, 1.071rem + 5.857vw, 6.375rem);       /* 40 → 102  Arpona SemiBold */
  --fs-h1: clamp(2rem, 1.048rem + 3.905vw, 4.5rem);                  /* 32 → 72   Arpona SemiBold */
  --fs-h2: clamp(1.625rem, 1.113rem + 2.095vw, 3rem);                /* 26 → 48   Arpona SemiBold */
  --fs-h3: clamp(1.25rem, 1.036rem + 0.857vw, 1.875rem);             /* 20 → 30   Arpona SemiBold */
  --fs-h4: clamp(1.125rem, 1.054rem + 0.286vw, 1.3125rem);          /* 18 → 21   award names in cards / rows */
  --fs-award-compact: clamp(1rem, 0.5rem + 2.5vw, 1.125rem);       /* 16 → 18   two-up mobile award cards */
  --fs-award-card: calc(var(--fs-h4) + 0.125rem);                 /* 20 → 23   larger-screen award cards */
  --fs-body-lg: clamp(1rem, 0.952rem + 0.19vw, 1.125rem);            /* 16 → 18   body lead */
  --fs-body: 1rem;        /* 16px — body */
  --fs-small: 0.875rem;   /* 14px — secondary copy */
  --fs-label: 0.6875rem;  /* 11px — uppercase eyebrow labels only (wide tracking makes up the size) */

  /* Home's coronation poster: natural-width Arpona, never condensed/scaled glyphs. */
  --fs-poster-lead: clamp(4.25rem, 19.5vw, 6rem);
  --fs-poster-lead-long: clamp(2.5rem, 11.7vw, 4.75rem);
  --fs-poster-flank: clamp(2rem, 8.5vw, 5.5rem);
  --fs-poster-flank-long: clamp(1.25rem, 5.4vw, 3.5rem);

  --lh-display: 0.95;
  --lh-heading: 1.04;
  --lh-body: 1.6;
  --tracking-label: 0.14em;
  --tracking-wordmark: 0.24em;  /* "KIA 2026" header wordmark, echoes the spaced "2026" in the lockup */
  --tracking-display: -0.01em;

  --weight-display: 700;
  --weight-heading: 600;  /* Figma H2/H3 are Arpona Medium (500) — not in the licensed files; 600 is the nearest */
  --weight-light: 400;    /* Instrument Sans has no 300 that reads on black; 400 is the light voice */
  --weight-regular: 400;
  --weight-strong: 600;

  /* ── Space, size, shape ────────────────────────────────────────────── */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  --section-gap: clamp(5.5rem, 3.5rem + 7vw, 12rem);
  --maxw: 90rem;
  --touch: 2.75rem;       /* 44pt minimum hit target */
  --touch-lg: 3.5rem;     /* primary CTA height */

  --radius-0: 0px;
  --radius-1: 2px;        /* cards, tiles — the brand is angular */
  --radius-2: 6px;        /* sheets, inputs */
  --radius-pill: 999px;   /* badges only */

  /* ── Elevation ─────────────────────────────────────────────────────── */
  --shadow-sheet: 0 -24px 60px rgb(7 2 3 / 0.6);
  --glow-gold: 0 0 0 1px var(--line-gold), 0 18px 60px -20px rgb(233 179 115 / 0.35);

  /* ── Motion ────────────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);      /* GSAP "expo.out"-like */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);   /* fast settle without overshoot */
  /* Two tempos (AUDIENCE-DIRECTION §2). MATCH tempo — voting, bracket, streak, counters,
     post-vote: ≤ 400ms, snap/punch/strike beats, no idle loops (--dur-hit, --dur-1, --dur-2).
     CEREMONY tempo — sealed, KIA Night, /winners, shortlist-reveal header, archive hero only
     (--dur-3, --dur-4, expo.out). JS mirror: components/ui/motion-tokens.ts (matchTempo / ceremonyTempo). */
  --dur-hit: 80ms; /* the hit: a tap landing, a counter tick */
  --dur-1: 120ms;  /* press feedback */
  --dur-2: 240ms;  /* state change */
  --dur-3: 480ms;  /* reveal (ceremony) */
  --dur-4: 900ms;  /* choreography (ceremony) */

  /* ── Safe areas (KIA app webview) ──────────────────────────────────── */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Layout: sticky header height (hero sections may pull up under it with -mt-header),
     and the height of any sticky bottom action bar currently mounted (set at runtime by
     that bar on <html>; floating UI like toasts and the demo switcher sit above it). */
  --header-h: calc(var(--touch-lg) + var(--safe-top));
  --sticky-offset: 0px;

  --z-sticky: 30;
  --z-nav: 40;
  --z-sheet: 50;
  --z-toast: 60;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-hit: 0ms;
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
    --dur-4: 0ms;
  }
}
