/* bonus-d one-screen page: the one token file. Every colour, size, space and timing of the page
   lives here; page.css only reads these. One theme (tunnel 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: near-black + Melbet yellow, one hot orange for the glow at the tunnel's end ---- */
  --ground: #0b0a08;
  --ground-deep: #050504;
  --accent: #ffb805;
  --on-accent: #3b3b3b;
  --text: #ffffff;
  --focus: #ffffff;
  --black: #000000;
  --hot: #ff5a14;

  /* hit of the number on the entrance: flash and shock wave */
  --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);
  --lead-shade: rgb(0 0 0 / 0.85);

  /* the void: warm haze around the vanishing point, dark rim */
  --void-hot: rgb(255 90 20 / 0.26);
  --void-amber: rgb(255 184 5 / 0.14);
  --void-0: rgb(255 184 5 / 0);
  --vignette: rgb(0 0 0 / 0.7);
  --vignette-0: rgb(0 0 0 / 0);

  /* light at the end of the tunnel */
  --core-white: rgb(255 250 232 / 0.95);
  --core-yellow: rgb(255 214 90 / 0.75);
  --core-amber: rgb(255 184 5 / 0.32);
  --core-hot: rgb(255 90 20 / 0.16);
  --core-0: rgb(255 90 20 / 0);
  --ray: rgb(255 200 80 / 0.07);
  --ray-0: rgb(255 200 80 / 0);

  /* tunnel frames: a hot core line, an amber body and a wide soft glow, so a frame reads as neon */
  --ring-core: #fff1c4;
  --ring-mid: rgb(255 184 5 / 0.85);
  --ring-glow: rgb(255 184 5 / 0.16);
  --ring-dots: #ffd25a;
  --ring-dots-glow: rgb(255 184 5 / 0.22);
  --ring-thin: rgb(255 184 5 / 0.32);
  --ring-hot: rgb(255 90 20 / 0.95);
  --ring-hot-glow: rgb(255 90 20 / 0.24);

  /* walls and rails of the tunnel */
  --rail: rgb(255 196 60 / 0.42);
  --rail-0: rgb(255 196 60 / 0);
  --lane: rgb(255 196 60 / 0.22);
  --wall-0: rgb(255 184 5 / 0);
  --ceil: rgb(255 184 5 / 0.07);
  --floor: rgb(255 110 20 / 0.17);
  --side: rgb(255 184 5 / 0.045);

  /* warp streaks and near lights out of focus */
  --streak-0: rgb(255 214 120 / 0);
  --streak-mid: rgb(255 200 80 / 0.55);
  --streak-hot: rgb(255 248 225 / 0.95);
  --bk-a: rgb(255 184 5 / 0.12);
  --bk-hot: rgb(255 90 20 / 0.1);
  --bk-w: rgb(255 230 170 / 0.07);
  --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);
  --lens-rest: 0.4;
  --whiteout: rgb(255 248 232 / 0.85);
  --whiteout-edge: rgb(255 214 128 / 0);

  /* flying objects: ghost copies of a fast object */
  --ghost-1: 0.4;
  --ghost-2: 0.2;

  /* the 3D numeral: lit top face, a deep extrusion from amber to burnt orange toward the back,
     a hot rim glow and a soft cast below */
  --num-hi: #fff0c2;
  --num-hi-0: rgb(255 240 194 / 0);
  --ex-1: #e59f00;
  --ex-2: #cc8000;
  --ex-3: #a85a00;
  --ex-4: #7a3500;
  --num-cast: rgb(0 0 0 / 0.6);
  --num-glow: rgb(255 120 20 / 0.45);
  --extrude:
    0.004em 0.006em 0 var(--ex-1),
    0.008em 0.012em 0 var(--ex-1),
    0.012em 0.018em 0 var(--ex-1),
    0.016em 0.024em 0 var(--ex-2),
    0.02em 0.03em 0 var(--ex-2),
    0.024em 0.036em 0 var(--ex-2),
    0.028em 0.042em 0 var(--ex-3),
    0.032em 0.048em 0 var(--ex-3),
    0.036em 0.054em 0 var(--ex-3),
    0.04em 0.06em 0 var(--ex-4),
    0.044em 0.066em 0 var(--ex-4),
    0.048em 0.072em 0 var(--ex-4),
    0.06em 0.1em 0.06em var(--num-cast),
    0 0 0.22em var(--num-glow);

  /* 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(10 9 7 / 0.82);
  --tag-cut: rgb(255 184 5 / 0.55);

  /* ---- type ---- */
  --font-display: "Sofia Sans Extra Condensed", "Sofia XCond Fallback", "Arial Narrow", sans-serif;
  /* the translated words (lead, button label); :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 number's size, with a floor */
  --k-offer-lead: 0.085;
  --k-offer-free: 0.19;
  --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: 1rem;

  /* ---- shape ---- */
  --skew: -12deg;
  --cta-h: 4.75rem;
  --cta-w: 22rem;
  --ring-w: 3px;
  /* flying object: base size, and the most it grows to (the element is drawn at that size) */
  --fly: min(8.5vw, 7.5rem);
  --fly-max: 2.8;

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

@media (min-width: 48rem) {
  :root {
    --pad: 2rem;
    --cta-h: 5.5rem;
    --cta-w: 28rem;
  }
}
@media (min-width: 80rem) {
  :root {
    --pad: 3rem;
    --cta-h: 6rem;
    --cta-w: 32rem;
  }
}

/* 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);
}
@media (max-aspect-ratio: 1 / 1) {
  :root {
    --fly: min(21vw, 7rem);
  }
}
