/* bonus-d one-screen page, variant l3-3 (jackpot reels): the one token file. Every colour, size, space and timing of the page
   lives here; page.css only reads these. One theme (graphite night), so every token is defined once. */

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts/sofia-sans-xcond-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts/sofia-sans-xcond-italic-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Same family, more scripts for js/i18n.mjs locales (pl, tr, cs..., kk, el). Loaded only when a
   character of the range is on the page. */
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/sofia-sans-xcond-italic-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/sofia-sans-xcond-italic-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/sofia-sans-xcond-italic-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Scripts Sofia has no letters for: subsets of the page copy only (scratchpad build script), one
   upright face each. unicode-range keeps them off the digits, "%", "$" and "+". */
@font-face {
  font-family: "Noto Sans Georgian i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-georgian.woff2") format("woff2");
  unicode-range: U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F;
}
@font-face {
  font-family: "Noto Sans Armenian i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-armenian.woff2") format("woff2");
  unicode-range: U+0530-058F, U+FB13-FB17;
}
@font-face {
  font-family: "Heebo i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-hebrew.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
@font-face {
  font-family: "Noto Sans Arabic i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Noto Sans Devanagari i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-devanagari.woff2") format("woff2");
  unicode-range: U+0900-097F, U+A8E0-A8FF, U+1CD0-1CFF;
}
@font-face {
  font-family: "Noto Sans Bengali i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-bengali.woff2") format("woff2");
  unicode-range: U+0980-09FF;
}
@font-face {
  font-family: "Noto Sans Thai i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-thai.woff2") format("woff2");
  unicode-range: U+0E00-0E7F;
}
/* No unicode-range: these go first in the stack of the translated words only (--font-copy), so a
   Latin letter inside a word ("eスポーツ") stays in the same face as the rest of it. */
@font-face {
  font-family: "Noto Sans JP i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-japanese.woff2") format("woff2");
}
@font-face {
  font-family: "Black Han Sans i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-korean.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-chinese-hans.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans TC i18n";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-chinese-hant.woff2") format("woff2");
}
/* Vietnamese and Azerbaijani: Sofia lacks the Vietnamese letters and the schwa, so whole words
   are set in Barlow Condensed Black Italic instead of switching face mid-word. */
@font-face {
  font-family: "Barlow Condensed i18n";
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
  src: url("../assets/fonts-i18n/i18n-barlow-vi-az.woff2") format("woff2");
}
/* Metric fallback so "150%" does not jump when the display face swaps in. */
@font-face {
  font-family: "Sofia XCond Fallback";
  font-style: italic;
  font-weight: 800 900;
  src: local("Arial Narrow Bold Italic"), local("ArialNarrow-BoldItalic"), local("Arial Narrow");
  size-adjust: 82%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  /* ---- palette: graphite + one yellow (BRIEF.md section 6) ---- */
  --ground: #1a1a1a;
  --ground-deep: #121212;
  --accent: #ffb805;
  --on-accent: #3b3b3b;
  --text: #ffffff;
  --focus: #ffffff;
  --black: #000000;

  /* hero light: a floodlight pool from above, the hit flash, the shock wave */
  --pool: rgb(255 255 255 / 0.09);
  --pool-0: rgb(255 255 255 / 0);
  --floor: rgb(18 18 18 / 0.9);
  --floor-0: rgb(18 18 18 / 0);
  --flash: rgb(255 236 190 / 0.6);
  --flash-0: rgb(255 236 190 / 0);
  --wave: rgb(255 184 5 / 0.8);
  --cast: rgb(0 0 0 / 0.6);
  --glint-ink: rgb(255 255 255 / 0.7);
  --cta-glint: rgb(255 255 255 / 0.55);
  --cta-drop: rgb(0 0 0 / 0.55);
  --cta-ring: var(--accent);

  /* stage light: a warm spot behind the number, dark corners, fine grain on the ground */
  --spot: rgb(255 184 5 / 0.25);
  --spot-mid: rgb(255 184 5 / 0.08);
  --spot-0: rgb(255 184 5 / 0);
  --vignette: rgb(0 0 0 / 0.62);
  --vignette-0: rgb(0 0 0 / 0);
  --grain-o: 0.07;

  /* the 3D numeral: lit top face, amber extrusion to the bottom right, a soft cast below */
  --num-hi: #fff0c2;
  --num-hi-0: rgb(255 240 194 / 0);
  --ex-1: #e59f00;
  --ex-2: #c28400;
  --ex-3: #9c6a00;
  --num-cast: rgb(0 0 0 / 0.55);
  --extrude:
    0.006em 0.009em 0 var(--ex-1), 0.012em 0.018em 0 var(--ex-1), 0.018em 0.027em 0 var(--ex-2),
    0.024em 0.036em 0 var(--ex-2), 0.03em 0.045em 0 var(--ex-3), 0.036em 0.054em 0 var(--ex-3),
    0.05em 0.08em 0.05em var(--num-cast);

  /* kinetic impact: the hit sparks, the speed streak behind a flying object, the impact rays */
  --spark-1: var(--accent);
  --spark-2: var(--num-hi);
  --spark-0: rgb(255 184 5 / 0);
  --streak: rgb(255 184 5 / 0.5);
  --streak-hot: rgb(255 240 194 / 0.85);
  --streak-0: rgb(255 184 5 / 0);
  --ghost-1: 0.42;
  --ghost-2: 0.24;
  --ghost-3: 0.11;
  --ray: rgb(255 184 5 / 0.04);
  --ray-0: rgb(255 184 5 / 0);
  --t-rays: 120s;

  /* stadium light (from v4): floodlight beams, lamp glare, far bokeh, the hit whiteout and lens
     streak. Beams stay thin haze so the black ground keeps its depth under the offer. */
  --beam: rgb(255 232 178 / 0.26);
  --beam-soft: rgb(255 222 150 / 0.11);
  --beam-0: rgb(255 222 150 / 0);
  --beam-rest: 0.85;
  --beam-mask-mid: rgb(0 0 0 / 0.5);
  --lamp: rgb(255 251 240 / 0.95);
  --lamp-halo: rgb(255 214 128 / 0.4);
  --lamp-0: rgb(255 214 128 / 0);
  --bk-a: rgb(255 184 5 / 0.11);
  --bk-a-rim: rgb(255 200 70 / 0.17);
  --bk-w: rgb(255 214 128 / 0.045);
  --bk-w-rim: rgb(255 214 128 / 0.05);
  --bk-0: rgb(255 214 128 / 0);
  --lens: rgb(255 246 226 / 0.95);
  --lens-soft: rgb(255 200 90 / 0.35);
  --lens-0: rgb(255 200 90 / 0);
  --whiteout: rgb(255 248 232 / 0.8);
  --whiteout-edge: rgb(255 214 128 / 0);
  --t-drift: 11s;
  --t-twinkle: 4.6s;

  /* button: the amber side of the plate under it */
  --cta-edge: #a86f00;
  --cta-edge-h: 0.4375rem;

  /* "+ FreeBet" ticket */
  --tag-line: var(--accent);
  --tag-fill: rgb(18 18 18 / 0.72);
  --tag-cut: rgb(255 184 5 / 0.55);

  /* jackpot machine: chrome cabinet, gold bezel, warm-dark bulb lane, dark reel drums */
  --chrome-1: #fbfbf8;
  --chrome-2: #c9ccd2;
  --chrome-3: #868a93;
  --chrome-4: #3d4047;
  --chrome-5: #1d1f23;
  --gold-1: #fff3c4;
  --gold-2: #ffcc3a;
  --gold-3: #e09a00;
  --gold-4: #8f5a00;
  --gold-5: #4d2f00;
  --lane: #23170a;
  --lane-deep: #0c0804;
  --reel-dark: #050403;
  --reel-mid: #1e1810;
  --reel-glow: rgb(255 184 5 / 0.2);
  --reel-glow-0: rgb(255 184 5 / 0);
  --drum-shade: rgb(0 0 0 / 0.88);
  --drum-shade-mid: rgb(0 0 0 / 0.4);
  --drum-shade-0: rgb(0 0 0 / 0);
  --bulb-socket: #3a2508;
  --bulb-off: rgb(255 184 5 / 0.28);
  --bulb-core: #fffdf0;
  --bulb: #ffd34d;
  --bulb-halo: rgb(255 190 30 / 0.62);
  --bulb-halo-0: rgb(255 190 30 / 0);
  --glass-hi: rgb(255 255 255 / 0.17);
  --glass-hi-soft: rgb(255 255 255 / 0.06);
  --glass-0: rgb(255 255 255 / 0);
  --glass-in: rgb(0 0 0 / 0.75);
  --glass-glint: rgb(255 255 255 / 0.32);
  --winline: rgb(255 240 194 / 0.95);
  --winline-0: rgb(255 184 5 / 0);
  --cabinet-drop: rgb(0 0 0 / 0.7);
  --cabinet-glow: rgb(255 184 5 / 0.28);
  --crest-ray: rgb(255 184 5 / 0.22);
  --crest-ray-0: rgb(255 184 5 / 0);
  --knob-hi: #fff6d6;
  /* coins: gold disc, raised rim, a thick edge under it */
  --coin-hi: rgb(255 255 255 / 0.9);
  --coin-hi-0: rgb(255 255 255 / 0);
  --confetti-1: var(--accent);
  --confetti-2: #ffffff;
  --confetti-3: var(--gold-3);
  --confetti-4: var(--gold-1);
  /* timings of the machine idle */
  --t-chase: 0.75s;
  --t-chase-fast: 0.27s;
  --t-sweep: 6.5s;
  --t-coin: 4.2s;

  /* ---- type ---- */
  --font-display: "Sofia Sans Extra Condensed", "Sofia XCond Fallback", "Arial Narrow", sans-serif;
  /* the translated words (lead, button label, band words); :lang() below swaps it for CJK, vi, az */
  --font-copy: var(--font-display);
  /* Per-script stacks for js/i18n.mjs locales, all self-hosted (assets/fonts-i18n). Sofia covers
     Latin, Latin Extended, Cyrillic and Greek itself. For the other scripts Sofia stays first, so
     digits, "%", "$" and "+" keep the brand face, and the script face (unicode-range) takes the
     letters. System faces are only the last fallback. */
  --font-xcond: "Sofia Sans Extra Condensed", "Sofia XCond Fallback";
  --font-georgian: var(--font-xcond), "Noto Sans Georgian i18n", Sylfaen, sans-serif;
  --font-armenian: var(--font-xcond), "Noto Sans Armenian i18n", Mshtakan, sans-serif;
  --font-hebrew: var(--font-xcond), "Heebo i18n", "Arial Hebrew", sans-serif;
  --font-arabic: var(--font-xcond), "Noto Sans Arabic i18n", "Geeza Pro", Tahoma, sans-serif;
  --font-devanagari: var(--font-xcond), "Noto Sans Devanagari i18n", "Nirmala UI", sans-serif;
  --font-bengali: var(--font-xcond), "Noto Sans Bengali i18n", "Nirmala UI", sans-serif;
  --font-thai: var(--font-xcond), "Noto Sans Thai i18n", Tahoma, sans-serif;
  /* whole-face stacks for --font-copy only: the CJK or Barlow face first, Sofia behind it */
  --font-sc: "Noto Sans SC i18n", var(--font-xcond), "PingFang SC", sans-serif;
  --font-tc: "Noto Sans TC i18n", var(--font-xcond), "PingFang TC", sans-serif;
  --font-ja: "Noto Sans JP i18n", var(--font-xcond), "Hiragino Sans", sans-serif;
  --font-ko: "Black Han Sans i18n", var(--font-xcond), "Apple SD Gothic Neo", sans-serif;
  --font-vi-az: "Barlow Condensed i18n", var(--font-xcond), "Arial Narrow", sans-serif;

  /* offer lines as a share of the reel glyph size (--g), with a floor */
  --k-offer-lead: 0.12;
  --k-offer-free: 0.25;
  --fs-offer-min: 1.5rem;
  --fs-free-min: 2.5rem;
  /* floor is 2.125rem from 375 px up; below that it follows the viewport (9.07vw = 34 px at 375),
     so the longest label (ka, el, fr) still fits the plate at 320 */
  --fs-cta: clamp(min(2.125rem, 9.07vw), 1.4rem + 2.2vw, 3.5rem);
  /* button label in ar: the Arabic label runs wider than the plate, it steps down for 375 px */
  --fs-cta-wide: calc(var(--fs-cta) * 0.8);

  /* ---- space (base 4) ---- */
  --s-2: 0.5rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --pad: 0.5rem;

  /* ---- shape ---- */
  --skew: -12deg;
  --cta-h: 4.75rem;
  --cta-w: 22rem;
  --ring-w: 3px;
  --cta-gap: clamp(1rem, 3.2svh, 2.5rem);
  --copy-top: max(0.75rem, 2.5svh);
  --copy-bottom: max(1rem, 3.5svh);

  /* ---- the machine (machine.css); --g is set on .hero in page.css ---- */
  --m-chrome: 0.25rem;
  --m-lane: 1.25rem;
  --m-rim: 0.1875rem;
  --m-side: 0.375rem;
  --reel-gap: 0.25rem;
  /* reel width in g: a digit is 0.43 em wide */
  --reel-k: 0.47;
  /* heights in g: glyph row, the rows above and below it (min, max), crest, coin tray */
  --cell-k: 0.84;
  --peek-min: 0.26;
  --peek-max: 0.56;
  --crest-k-h: 0.34;
  --crest-k-w: 1.3;
  --tray-k: 0.1;
  --m-frame: calc(var(--m-chrome) + var(--m-lane) + var(--m-rim));
  --m-frame-x: calc(2 * (var(--m-frame) + var(--m-side) + var(--pad)) + 3 * var(--reel-gap));
  /* heights that do not scale with g: the frame, the button and the screen padding */
  --m-fixed-y: calc(
    2 * var(--m-frame) + var(--cta-gap) + var(--cta-h) + var(--cta-edge-h) + var(--copy-top) +
      var(--copy-bottom) + 0.75rem
  );
  /* machine and offer height in g with the shortest reel rows (crest, glyph row, two rows of
     0.26 g, tray, lead, ticket) */
  --m-k-y: 2.42;
  --g-max: 19rem;

  /* ---- motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 120ms;
  --t-pulse: 2.8s;
  --t-breathe: 5.5s;
}

/* Landscape: wider drums, the machine turns into a broad cabinet. */
@media (min-aspect-ratio: 1 / 1) {
  :root {
    --reel-k: 0.6;
    --crest-k-h: 0.4;
    --crest-k-w: 1.75;
  }
}
@media (min-width: 48rem) {
  :root {
    --m-chrome: 0.375rem;
    --m-lane: 1.75rem;
    --m-rim: 0.3125rem;
    --m-side: 2rem;
    --reel-gap: 0.4375rem;
    --pad: 2rem;
    --cta-h: 5.5rem;
    --cta-w: 28rem;
  }
}
@media (min-width: 80rem) {
  :root {
    --pad: 3rem;
    --cta-h: 6rem;
    --cta-w: 32rem;
  }
}
/* Desktop landscape: the machine takes the height. Tighter rows round the glyph, a low crest, a
   thin tray and a smaller offer, so "150%" reaches the size of the main page's number with the
   button still on screen. */
@media (min-width: 64rem) and (min-aspect-ratio: 1 / 1) {
  :root {
    --reel-k: 0.54;
    --cell-k: 0.76;
    --peek-min: 0.17;
    --peek-max: 0.3;
    --crest-k-h: 0.2;
    --crest-k-w: 1.6;
    --tray-k: 0.05;
    --k-offer-lead: 0.085;
    --k-offer-free: 0.16;
    --m-k-y: 1.7;
    --g-max: 29rem;
    --cta-gap: clamp(1rem, 2.2svh, 1.75rem);
    --copy-top: max(0.75rem, 1.6svh);
    --copy-bottom: max(1rem, 2.4svh);
  }
}

/* Display face per page language (html lang is set by js/i18n.mjs). Scripts with a unicode-range
   face change the whole page stack; CJK, vi and az change only the translated words, so "150%"
   and "FreeBet $250" stay in Sofia. */
:root:lang(ka) {
  --font-display: var(--font-georgian);
}
:root:lang(hy) {
  --font-display: var(--font-armenian);
}
:root:lang(he) {
  --font-display: var(--font-hebrew);
}
:root:is(:lang(ar), :lang(fa)) {
  --font-display: var(--font-arabic);
}
:root:lang(hi) {
  --font-display: var(--font-devanagari);
}
:root:lang(bn) {
  --font-display: var(--font-bengali);
}
:root:lang(th) {
  --font-display: var(--font-thai);
}
:root:lang(zh-Hans) {
  --font-copy: var(--font-sc);
}
:root:lang(zh-Hant) {
  --font-copy: var(--font-tc);
}
:root:lang(ja) {
  --font-copy: var(--font-ja);
}
:root:lang(ko) {
  --font-copy: var(--font-ko);
}
:root:is(:lang(vi), :lang(az)) {
  --font-copy: var(--font-vi-az);
}
