/* Tokens. ACSS vocabulary, no project prefix. Fluid sizes interpolate 360 to 1440 (house rules).
   Default = Eesti MMA Liiga CVI on paper (the guide's light theme: paper ground, ink bands, garnet as the brand
   ground and the accent on paper, glow as the accent on ink). [data-profile="template"] = the Brixton template
   values (1:1 check only: open any page with ?profile=template). main.css reads only these names. */
@layer tokens {
  @font-face { font-family: "Voltera"; src: url(fonts/voltera-900.woff2) format("woff2"); font-weight: 900; font-display: swap; }
  @font-face { font-family: "Voltera"; src: url(fonts/voltera-900i.woff2) format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
  @font-face { font-family: "Voltera"; src: url(fonts/voltera-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
  @font-face { font-family: "Glavia"; src: url(fonts/glavia-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }   /* Bold only: Regular draws š ž with a circumflex */
  @font-face { font-family: "Ironexa"; src: url(fonts/ironexa-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "Ironexa"; src: url(fonts/ironexa-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
  @font-face { font-family: "Ironexa Mono"; src: url(fonts/ironexa-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }

  :root {
    color-scheme: light;
    /* colour roles */
    --paper: #F2F0EA;            /* page ground */
    --paper-image: none;         /* the template's grain */
    --surface: #FFFFFF;          /* rows, panels, cards on paper */
    --ink: #0E0E10;              /* dark bands, the hero plate, bars */
    --ink-raised: #202024;
    --text: #0E0E10;             /* on paper: 16.9:1 */
    --text-soft: #3B3835;        /* body copy on paper: 10.2:1 */
    --muted: #5D5952;            /* secondary on paper: 6.1:1 */
    --on-ink: #F2F0EA;
    --on-ink-soft: #CDC8C2;
    --muted-on-ink: #A99D97;
    --accent: #4A0E19;           /* garnet: accent text, rules and buttons on paper (13.5:1) */
    --accent-on-ink: #FFB547;    /* glow: never on paper */
    --brand: #4A0E19;            /* the template's red bands */
    --on-brand: #F2F0EA;
    --btn: #4A0E19;
    --on-btn: #F2F0EA;
    --btn-hover: #0E0E10;
    --btn-on-ink: #FFB547;
    --on-btn-on-ink: #0E0E10;
    --line: #DAD6CE;
    --line-on-ink: #2A2A2E;
    --tint: #E9E6DF;             /* the grey behind the hero photo and the standings name panel */
    --photo-filter: none;
    --red: #B42318;
    --blue: #2F5F9E;
    --live: #EF5A52;
    --shadow: 0 0 20px rgba(14, 14, 16, .06);

    /* type */
    --font-display: "Voltera", "Arial Narrow", sans-serif;
    --font-body: "Ironexa", system-ui, sans-serif;
    --font-ui: "Ironexa", system-ui, sans-serif;
    --font-num: "Voltera", "Arial Narrow", sans-serif;
    --font-lead: "Glavia", system-ui, sans-serif;               /* leads only, Bold only */
    --font-data: "Ironexa Mono", ui-monospace, monospace;      /* dates, weights, method + time, standings numbers */
    --display-weight: 900;
    --display-style: italic;     /* display headlines: Voltera Black Italic (the guide's text pack) */
    --lead-weight: 700;
    --lead-size: var(--text-l);
    --text-tag: .9375rem;        /* 15: the guide's UI tag minimum; the plate is 2 em (6.4u for 3.2u type) */
    --data-track: .04em;         /* data: mono caps, tracked .04 em */
    --text-data: clamp(.875rem, .792rem + .37vw, 1.125rem);   /* 14 to 18: mono data lines (mono caps run wide) */
    --display-track: 0;
    --display-lh: 1.13;          /* Voltera caps .75 em, accents reach 1.026 em: Estonian accent room on every line */
    --accent-cap: .28em;         /* Voltera accents reach 1.03 em, caps .75 em: room above a cap-trimmed caps line */
    --h1-lh: var(--display-lh);
    --h3-lh: var(--display-lh);
    --body-track: 0;
    --ui-track: .04em;
    --text-h1: clamp(2.625rem, 1.208rem + 6.296vw, 6.875rem);    /* 42 to 110 */
    --text-h2: clamp(2rem, 1.167rem + 3.704vw, 4.5rem);          /* 32 to 72 */
    --text-h3: clamp(1.625rem, 1.375rem + 1.111vw, 2.375rem);    /* 26 to 38 */
    --text-h4: clamp(1.5rem, 1.333rem + .741vw, 2rem);           /* 24 to 32 */
    --text-h6: 1.125rem;
    --text-score: clamp(3.5rem, 3.083rem + 1.852vw, 4.75rem);    /* 56 to 76 */
    --text-404: clamp(5rem, 2.083rem + 12.963vw, 13.75rem);      /* 80 to 220 */
    --text-l: 1.125rem;
    --text-m: 1rem;
    --text-s: .875rem;
    --text-xs: .8125rem;

    /* space + layout */
    --section-space: clamp(3.75rem, 2.917rem + 3.704vw, 6.25rem); /* 60 to 100 */
    --section-y: calc(var(--section-space) * 2);                  /* the rhythm guard's section interval: every section
                                                                     owns its padding on both sides (the template's bands) */
    --gutter: clamp(1.25rem, .708rem + 2.407vw, 3.125rem);       /* 20 to 50 */
    --content-width: 81.25rem;                                    /* 1300 */
    --nav-pad: 1.25rem;
    --nav-height: 4rem;                                           /* scrolled bar */
    --space-2xs: .375rem; --space-xs: .625rem; --space-s: 1rem; --space-m: 1.5rem; --space-l: 2.5rem; --space-xl: 3.125rem;
    --btn-pad: 1.25rem 3.75rem;
    --radius: 0;
    --ink-hang: -.04em;           /* Voltera's left side bearing is .040 em on every cap and figure: hang it so the ink meets the margin */
    --lsb-i: .0475em;             /* Voltera Black Italic: most caps start .040 to .055 em in; T V W Y 1 4 7 get their own --lsb */
    --btn-large-h: clamp(5rem, 2.3rem + 5.8vw, 7.9375rem);

    /* faas: the brand's one device, a 45° cut. Photos, cards, panels: top-left + bottom-right (the guide's 8u).
       Tags, buttons: bottom-right only, .293 × the element's height. Drawn in main.css (@layer brand). */
    --cut-l: clamp(1rem, .667rem + 1.481vw, 2rem);               /* 16 to 32: photos, cards (8u of a 200 to 400 px frame) */
    --cut-m: clamp(.625rem, .5rem + .556vw, 1rem);               /* 10 to 16: bars and compact panels under ~120 px */
    --cut-ratio: .293;                                            /* tags + buttons: the mark's octagon chamfer ratio */
    /* full-bleed photo under text: the guide's charcoal shade (55 % top, clear middle, 82 % bottom) */
    --photo-shade: linear-gradient(180deg, rgb(14 14 16 / .55), rgb(14 14 16 / 0) 35%, rgb(14 14 16 / 0) 50%, rgb(14 14 16 / .82));
  }

  [data-profile="template"] {
    --paper: #fff; --paper-image: url(img/template/paper-grain.webp);
    --surface: #fff; --ink: #232323; --ink-raised: #2e2e2e;
    --text: #232323; --text-soft: #232323; --muted: #535353;
    --on-ink: #fff; --on-ink-soft: #fff; --muted-on-ink: #afafaf;
    --accent: #ea391c; --accent-on-ink: #ea391c; --brand: #ea391c; --on-brand: #fff;
    --btn: #ea391c; --on-btn: #fff; --btn-hover: #fff; --btn-on-ink: #ea391c; --on-btn-on-ink: #fff;
    --line: #e6e6e6; --line-on-ink: #ffffff1a; --tint: #e6e6e6; --photo-filter: grayscale(1);
    --red: #ea391c; --blue: #232323;
    --shadow: 0 0 20px #0000000f;
    --font-display: "Geist", sans-serif; --font-body: "Geist", sans-serif; --font-ui: "Geist", sans-serif; --font-num: "Geist", sans-serif;
    --display-weight: 700; --display-track: -.05em; --display-lh: 1; --h1-lh: .9; --h3-lh: 1.2;
    --body-track: -.05em; --ui-track: -.05em;
    --text-h1: clamp(2.875rem, 1.125rem + 7.778vw, 8.125rem);    /* 46 to 130 */
    --text-h2: clamp(2.25rem, 1.333rem + 4.074vw, 5rem);          /* 36 to 80 */
    --text-h3: clamp(2rem, 1.833rem + .741vw, 2.5rem);           /* 32 to 40 */
    --text-h4: clamp(1.75rem, 1.625rem + .556vw, 2.125rem);      /* 28 to 34 */
    --text-score: clamp(4.375rem, 4.167rem + .926vw, 5rem);      /* 70 to 80 */
    --gutter: .9375rem;
    --ink-hang: 0em; --accent-cap: 0em;
  }
}
