/* WillowinWorlds type roles. Font files and unicode ranges live in fonts.css. */
/* Match Commissioner advances and vertical metrics while local WOFF2 files load. */
@font-face {
  font-family: "Willow Sans Fallback";
  src: local("Arial"), local("Liberation Sans");
  font-display: swap;
  font-weight: 100 500;
  size-adjust: 101.999%;
  ascent-override: 99.707%;
  descent-override: 20.196%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Willow Sans Fallback";
  src: local("Arial Bold"), local("Liberation Sans Bold");
  font-display: swap;
  font-weight: 501 900;
  size-adjust: 99.727%;
  ascent-override: 101.978%;
  descent-override: 20.656%;
  line-gap-override: 0%;
}

:root {
  --font-brand: "Commissioner", "Willow Sans Fallback", system-ui, sans-serif;
  --font-body: var(--font-brand);
  --font-heading: var(--font-body);
  --font-art: "Bellota Text", var(--font-body);
  --font-promo: "Dela Gothic One", var(--font-body);
  --font-data: var(--font-body);
  --font-marketing: var(--font-heading);
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --type-display: clamp(2.45rem, 1.35rem + 3.8vw, 4.75rem);
  --type-h1: clamp(1.75rem, 1.15rem + 2.65vw, 3.5rem);
  --type-h2: clamp(1.625rem, 1.2rem + 1.8vw, 2.625rem);
  --type-h3: clamp(1.35rem, 1.15rem + 0.95vw, 2rem);
  --type-h4: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --type-reading-h2: clamp(1.375rem, 1.2rem + 0.75vw, 1.875rem);
  --type-card-title: clamp(1.2rem, 1.1rem + 0.45vw, 1.5rem);
  --type-body: clamp(1rem, 0.97rem + 0.15vw, 1.125rem);
  --type-legal: clamp(1rem, 0.985rem + 0.08vw, 1.0625rem);
  --type-nav: clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem);
  --type-button: 1rem;
  --type-art: clamp(1.125rem, 1.05rem + 0.3vw, 1.375rem);
  --type-promo: clamp(2.25rem, 1.25rem + 3vw, 4rem);
  --weight-body: 400;
  --weight-nav: 600;
  --weight-button: 700;
  --weight-h1: 800;
  --weight-h2: 750;
  --weight-h3: 700;
  --weight-h4: 650;
  --weight-display: 900;
  --weight-promo: 400;
  --line-body: 1.65;
  --line-heading: 1.12;
  --line-display: 1.02;
  --line-promo: 1.12;
  --tracking-heading: -0.025em;
  --axes-body: "FLAR" 0, "VOLM" 0, "slnt" 0;
  --axes-heading: "FLAR" 35, "VOLM" 12, "slnt" 0;
  --axes-display: "FLAR" 55, "VOLM" 22, "slnt" 0;
}

/* The main family covers Latin, Greek and extended Cyrillic, including Tatar/Bashkir. */
:root:lang(ar), :root:lang(fa), :root:lang(ur) {
  --font-body: "Commissioner", "Noto Sans Arabic", system-ui, sans-serif;
  --line-body: 1.85;
  --line-heading: 1.3;
  --line-display: 1.22;
  --tracking-heading: 0;
}

:root:lang(he) { --font-body: "Commissioner", "Noto Sans Hebrew", system-ui, sans-serif; }
:root:lang(hy) { --font-body: "Commissioner", "Noto Sans Armenian", system-ui, sans-serif; }
:root:lang(bn) { --font-body: "Commissioner", "Noto Sans Bengali", system-ui, sans-serif; }
:root:lang(hi) { --font-body: "Commissioner", "Noto Sans Devanagari", system-ui, sans-serif; }
:root:lang(th) { --font-body: "Commissioner", "Noto Sans Thai", system-ui, sans-serif; }
:root:lang(ja) { --font-body: "Commissioner", "Noto Sans JP", system-ui, sans-serif; }
:root:lang(ko) { --font-body: "Commissioner", "Noto Sans KR", system-ui, sans-serif; }
:root:lang(zh-Hans) { --font-body: "Commissioner", "Noto Sans SC", system-ui, sans-serif; }
:root:lang(zh-Hant) { --font-body: "Commissioner", "Noto Sans TC", system-ui, sans-serif; }

:root:is(:lang(he), :lang(hy)) {
  --line-body: 1.75;
  --line-heading: 1.25;
  --line-display: 1.2;
}

:root:is(:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(hy), :lang(bn), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh), :lang(el), :lang(kk), :lang(tt), :lang(uk)) {
  --font-art: var(--font-body);
  --font-promo: var(--font-body);
  --weight-promo: var(--weight-h1);
  --line-promo: var(--line-display);
  --tracking-heading: 0;
}

:root:is(:lang(bn), :lang(hi), :lang(th)) {
  --line-body: 1.85;
  --line-heading: 1.4;
  --line-display: 1.3;
}

:root:is(:lang(ja), :lang(ko), :lang(zh)) {
  --line-body: 1.8;
  --line-heading: 1.32;
  --line-display: 1.2;
}

body {
  font-family: var(--font-body);
  font-kerning: normal;
  font-variation-settings: var(--axes-body);
}

/* Preserve the homepage composition while giving tall scripts room for their marks. */
html:is(:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(hy), :lang(bn), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) body.home-polish-2026 :is(h1, h2, h3, .section-title) {
  line-height: var(--line-display) !important;
  letter-spacing: 0 !important;
}

/* The homepage keeps its existing sizes, spacing, weights and composition. */
body:not(.home-polish-2026) {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: var(--line-body);
}

body[data-theme="dark"]:not(.home-polish-2026) {
  --weight-body: 420;
}

body:not(.home-polish-2026) h1 {
  font-family: var(--font-heading);
  font-size: var(--type-h1);
  font-weight: var(--weight-h1);
  font-variation-settings: var(--axes-heading);
  line-height: var(--line-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

body:not(.home-polish-2026) :is(.nature-hero-copy, .candy-hero-copy, .paint-hero-copy, .ball-hero-copy, .ug-hero-copy) h1 {
  font-size: var(--type-display);
  font-weight: var(--weight-display);
  font-variation-settings: var(--axes-display);
  line-height: var(--line-display);
}

body:not(.home-polish-2026) :is(.press-kit-hub, .trust-hero) h1 {
  font-size: var(--type-h1);
  line-height: var(--line-heading);
}

body:not(.home-polish-2026) :is(h2, .section-title) {
  font-family: var(--font-heading);
  font-size: var(--type-h2);
  font-weight: var(--weight-h2);
  font-variation-settings: var(--axes-heading);
  line-height: var(--line-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

body:not(.home-polish-2026) h3 {
  font-family: var(--font-heading);
  font-size: var(--type-h3);
  font-weight: var(--weight-h3);
  line-height: 1.25;
  text-wrap: balance;
}

body:not(.home-polish-2026) h4 {
  font-size: var(--type-h4);
  font-weight: var(--weight-h4);
  line-height: 1.3;
}

body:not(.home-polish-2026) :is(.trust-section, .doc-page .detail-card) h2 {
  font-size: var(--type-reading-h2);
  line-height: var(--line-heading);
}

body:not(.home-polish-2026) :is(.trust-section, .detail-card) h3 {
  font-size: var(--type-card-title);
  line-height: 1.3;
}

body:not(.home-polish-2026) :is(.game-detail-nav a, .trust-hub-nav a) {
  font-size: var(--type-nav);
  font-weight: var(--weight-nav);
  letter-spacing: 0;
  line-height: 1.3;
}

body:not(.home-polish-2026) :is(.btn, .pill, .trust-tab, .trust-app-chip, .filter-btn) {
  font-family: var(--font-body);
  font-size: var(--type-button);
  font-weight: var(--weight-button);
  letter-spacing: 0;
  line-height: 1.3;
}

body:not(.home-polish-2026) :is(input, select, textarea) {
  font-family: var(--font-body);
  font-size: 1rem;
  font-variation-settings: var(--axes-body);
  line-height: 1.5;
}

body:not(.home-polish-2026) :is(.trust-section, .doc-page) :is(p, li) {
  font-size: var(--type-legal);
  font-weight: var(--weight-body);
  line-height: var(--line-body);
}

body.nature-seed-page .nature-hero-copy .hero-copy {
  font-family: var(--font-art);
  font-size: var(--type-art);
  font-weight: 400;
  line-height: var(--line-body);
}

body.paint-blasters-page .paint-hero-copy .game-hero-tagline {
  font-family: var(--font-promo);
  font-size: var(--type-promo);
  font-weight: var(--weight-promo);
  font-variation-settings: var(--axes-display);
  line-height: var(--line-promo);
  letter-spacing: var(--tracking-heading);
}

body[data-game="vacuum-shot"] :is(.ug-hero-copy h1, .game-page-section h2) {
  font-variation-settings: "FLAR" 80, "VOLM" 45, "slnt" 0;
}

body[data-game="blastblast"] .ug-hero-copy h1 {
  font-variation-settings: "FLAR" 20, "VOLM" 15, "slnt" -4;
}

:is(.nature-hero-stats, .candy-hero-stats, .paint-hero-stats, .ball-hero-stats) strong,
.trust-capability-list dd,
.trust-timeline-date,
.game-page-facts dd {
  font-family: var(--font-data);
  font-variant-numeric: lining-nums tabular-nums;
}

.trust-code, .trust-app-package { font-family: var(--font-code); }

.language-options a:lang(ar), .language-options a:lang(fa), .language-options a:lang(ur) { font-family: "Noto Sans Arabic", var(--font-brand); }
.language-options a:lang(he) { font-family: "Noto Sans Hebrew", var(--font-brand); }
.language-options a:lang(hy) { font-family: "Noto Sans Armenian", var(--font-brand); }
.language-options a:lang(bn) { font-family: "Noto Sans Bengali", var(--font-brand); }
.language-options a:lang(hi) { font-family: "Noto Sans Devanagari", var(--font-brand); }
.language-options a:lang(th) { font-family: "Noto Sans Thai", var(--font-brand); }
.language-options a:lang(ja) { font-family: "Noto Sans JP", var(--font-brand); }
.language-options a:lang(ko) { font-family: "Noto Sans KR", var(--font-brand); }
.language-options a:lang(zh-Hans) { font-family: "Noto Sans SC", var(--font-brand); }
.language-options a:lang(zh-Hant) { font-family: "Noto Sans TC", var(--font-brand); }

/* Closed language menus must not trigger every script's font download. */
.language-switcher details:not([open]) .language-options { display: none; }
