/* Megapari skin for the mega-pari.ch marketing site.
   Authority: docs/DESIGN_SYSTEM.md + design/tokens/*.md, which defer to
   design/brandbook md mcp/MEGAPARI_BRAND_GUIDE_AI.md.

   Split of work: the theme's own palette was substituted hex-for-hex in
   media/cache/static-site/assets/*.css (originals kept as *.css.orig).
   This layer does what a colour swap cannot — typography, shape, components,
   the ambient canvas and focus states. Loaded after the theme, so it wins.

   No hex is written here. Everything resolves through tokens.css. */

/* ---------------------------------------------------------------- 1. remap
   The theme is Bootstrap 5. Repointing its variables carries most
   components across without touching their rules. */
:root {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-font-sans-serif: var(--font-ui);
  --bs-body-font-family: var(--font-ui);
  --bs-body-font-size: var(--body);
  --bs-body-line-height: 1.65;

  --bs-primary: var(--ui-blue);
  --bs-secondary: var(--surface-2);
  --bs-success: var(--ui-blue);
  --bs-danger: var(--mp-red);
  --bs-warning: var(--mp-yellow);
  --bs-dark: var(--surface-2);

  --bs-link-color: var(--mp-blue);
  --bs-link-hover-color: var(--ui-blue-bright);
  --bs-border-color: var(--hairline);
  --bs-emphasis-color: var(--text);

  /* theme's own shape knobs -> brand radii (guide §6.5) */
  --theme-rounded: var(--radius-card);
  --theme-rounded-button: var(--radius-pill);
  --theme-rounded-images: var(--radius-card);
}

/* The theme also ships a customizer layer of its own. These defaulted to a
   light grey, which is what made the header read as a pale bar. Declared on
   :root and body both, because a value set on body beats one on :root for
   everything inside it. */
:root,
body {
  --header_bg_color: rgba(0, 4, 19, 0.82);
  --header_secondary_menu_bg_color: var(--surface-2);
  --header_footer_link_color: var(--text);
  --header_footer_text_color: var(--text-muted);
  --header_table_background: var(--surface);
  --footer_bg_color: var(--surface-2);
  --bottom_panel_bg: var(--surface);
}

/* ------------------------------------------------------- 2. canvas & base
   "deep #000413 canvas with radial blue ambient light, never flat black" */
body {
  background-color: var(--bg);
  background-image: var(--sport-glow);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 48rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--body);
  line-height: 1.65;
  word-spacing: 0.12em;
  -webkit-font-smoothing: antialiased;
}

main.wrap,
.custom-page {
  background: transparent;
}

/* ------------------------------------------------------------ 3. headings
   Druk Wide for h1, Druk Text for h2, Gilroy above that (§5).
   Druk is a wide face and Polish words are long, so headings are told
   explicitly that they may break rather than push the page sideways. */
h1, .h1,
h2, .h2,
h3, .h3,
h4, h5, h6 {
  color: var(--text);
  overflow-wrap: break-word;
  word-break: normal;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--h1);
  line-height: 1.14;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

h2, .h2 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: var(--h2);
  line-height: 1.22;
  text-transform: uppercase;
}

/* The guide's h3 is a caption-sized label. Here h3 is a real sub-heading —
   38 of them carry the page's sub-structure — so it keeps heading weight in
   Gilroy instead of shrinking to a label. Deviation noted in the README. */
h3, .h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--h3);
  line-height: 1.32;
}

h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 700;
}

p, li, dd, dt, figcaption {
  font-family: var(--font-ui);
}

/* --------------------------------------------------------------- 4. links
   Identity blue for prose links; controls keep the UI blue (§3 rule:
   brand-blue is identity, ui-blue is controls — never swapped). */
main a:not(.btn):not(.nav-link):not(.dropdown-item):not(.custom-logo-link):not(.game_button) {
  color: var(--mp-blue);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease);
}

main a:not(.btn):not(.nav-link):not(.dropdown-item):not(.custom-logo-link):not(.game_button):hover {
  color: var(--ui-blue-bright);
}

/* ------------------------------------------------------------- 5. buttons
   Pill, Gilroy 500, four states from guide §6.1. Label colour is --text,
   not --text-on-accent: the documented accessibility deviation in
   DESIGN_SYSTEM.md §3 (4.37:1 fails AA at this size, 5.32:1 passes). */
.btn {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--button);
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn-success,
.btn-primary,
.btn-normal {
  background: var(--ui-blue);
  border-color: transparent;
  color: var(--text);
}

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn-success:hover,
.btn-primary:hover,
.btn-normal:hover {
  background: var(--btn-hover);
  color: var(--text);
  transform: translateY(-1px);
}

/* Header pair echoes the logo dots: Anmelden = blue, Registrierung = red.
   Scoped to the site chrome only — inner page <header> wrappers also
   contain .buttons (promo card CTA) and must stay UI-blue. */
header.header .buttons .btn-success,
.offcanvas .buttons .btn-success {
  background: var(--mp-red);
}

header.header .buttons .btn-success:hover,
.offcanvas .buttons .btn-success:hover {
  background: color-mix(in srgb, var(--mp-red) 78%, var(--bg));
  color: var(--text);
}

/* Gutenberg CTAs kept the old megapari green. */
.wp-block-button__link,
.wp-element-button,
a.wp-block-button__link {
  background: var(--ui-blue) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--text) !important;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 500;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
a.wp-block-button__link:hover {
  background: var(--btn-hover) !important;
  color: var(--text) !important;
}

.btn-link {
  color: var(--mp-blue);
  text-decoration: none;
}

.btn-link:hover {
  color: var(--ui-blue-bright);
}

/* ghost / outline controls read as chips in the bright UI blue */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light {
  border-color: var(--ui-blue-bright);
  color: var(--text);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover {
  background: rgba(32, 102, 218, 0.14);
  border-color: var(--ui-blue-bright);
  color: var(--text);
}

/* ------------------------------------------------------------ 6. surfaces
   Borderless dark surfaces, 12px radius, hairline separation. No nested
   elevated cards (§7). `.item` on its own is a menu element — never a card. */
.faq-section .item,
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: none;
}

/* Split blocks sit on the page canvas — a surface fill made a stray grey slab. */
.media_block,
.media_block_v2 {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.media_block .title,
.media_block_v2 .title,
.media_block h2,
.wp-block-hc-alternate-group-section h2 {
  font-family: var(--font-ui);
  text-transform: none;
  color: var(--text);
}

.media_block .image,
.media_block_v2 .image {
  background: transparent;
}

/* Font Awesome 6 Pro is not in the mirror — theme check glyphs render empty. */
.wp-block-hc-alternate-group-section ul > li:before {
  font-family: var(--font-ui) !important;
  content: "" !important;
  width: 1.35rem;
  height: 1.35rem;
  background-color: var(--ui-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23EFF1F8' d='M6.2 10.6 3.7 8.1l-.9.9 3.4 3.4 7-7-.9-.9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem 0.75rem;
  border: 0;
  color: transparent;
}

.nav_column {
  background: var(--surface-2);
  border-radius: var(--radius-card);
}

img,
.get-image img {
  border-radius: var(--radius-images, var(--radius-card));
}

.custom-logo,
.flag img,
.flag,
img[src$=".svg"] {
  border-radius: 0;
}

/* ------------------------------------------------------- 7. header & nav
   Sticky blurred chrome, as on our own sites (§6 nav). */
/* Site chrome only. Page-level <header> (welcome / breadcrumbs) and the
   promo-card <header> must not inherit the sticky bar. */
header.header {
  background-color: rgba(0, 4, 19, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

header.header .header__container {
  gap: 1.75rem;
}

header.header .logo {
  flex-shrink: 0;
  margin-right: 0.5rem;
}

header.header .primary_menu_desktop_ver {
  max-width: none;
  margin-left: 1.25rem;
}

header.header .primary_menu_desktop_ver > ul > li > a,
header.header .primary_menu_mobile_ver > ul > li > a,
body.home header.header .primary_menu_desktop_ver > ul > li > a,
header .nav-link,
.offcanvas .nav-link {
  color: var(--text) !important;
  font-family: var(--font-ui);
  font-weight: 500;
  word-spacing: 0.12em;
}

header.header .primary_menu_desktop_ver > ul > li > a:hover,
header .nav-link:hover,
.offcanvas .nav-link:hover {
  color: var(--mp-blue) !important;
}

header.header .primary_menu_desktop_ver .dropdown-menu,
header.header .primary_menu_mobile_ver .dropdown-menu,
header.header .lang .dropdown-menu,
header .dropdown-menu,
.dropdown-menu {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card);
  min-width: 12rem;
}

.dropdown-menu.show,
header.header .primary_menu_desktop_ver li.dropdown:hover > .dropdown-menu {
  display: block;
}

header.header .primary_menu_desktop_ver .dropdown-menu .dropdown-item,
header.header .primary_menu_mobile_ver .dropdown-menu li > .dropdown-item,
header .dropdown-item,
.dropdown-item {
  display: block;
  width: 100%;
  color: var(--text) !important;
  background: transparent !important;
  font-family: var(--font-ui);
  font-weight: 500;
  white-space: normal;
  word-spacing: 0.12em;
}

header.header .primary_menu_desktop_ver .dropdown-menu .dropdown-item:hover,
header.header .primary_menu_desktop_ver .dropdown-menu .dropdown-item:focus,
header.header .primary_menu_desktop_ver .dropdown-menu .dropdown-item.active,
header.header .primary_menu_mobile_ver .dropdown-menu .dropdown-item:hover,
header.header .primary_menu_mobile_ver .dropdown-menu .dropdown-item:focus,
header.header .primary_menu_mobile_ver .dropdown-menu .dropdown-item.active,
.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(32, 102, 218, 0.16) !important;
  color: var(--text) !important;
}

header.header .primary_menu_mobile_ver > ul > li .arrow {
  color: var(--text);
}

.offcanvas {
  background: var(--bg);
  color: var(--text);
  border-left: 1px solid var(--hairline);
}

/* the swapped-in Megapari logo is an SVG, so it scales by height only */
.custom-logo {
  height: 2.25rem;
  width: auto;
  max-width: 11rem;
}

/* -------------------------------------------------------------- 8. footer */
footer {
  background: var(--surface-2);
  border-top: 1px solid var(--hairline);
}

footer,
footer p,
footer li,
footer a:not(.btn) {
  font-family: var(--font-ui);
  color: var(--text-muted);
}

footer h2,
footer .heading,
footer .footer__container .heading {
  color: var(--text);
  font-family: var(--font-ui);
  text-transform: none;
}

footer a:not(.btn):hover {
  color: var(--text);
}

/* -------------------------------------------------------------- 9. tables
   Card of data: one surface, hairlines, Gilroy — not a Druk grid. */
.wp-block-table {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow-x: auto;
  overflow-y: hidden;
}

.wp-block-table table,
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
}

.wp-block-table table {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.wp-block-table thead,
.wp-block-table table > thead,
table thead {
  border-bottom: 0;
  background: transparent;
  color: var(--text-muted);
}

.wp-block-table table > :not(:first-child) {
  border-top: 0;
}

.wp-block-table table > :not(caption) > * > *,
.wp-block-table table tr th,
.wp-block-table table tr td,
table th,
table td {
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-right: 0;
  border-left: 0;
  border-top: 0;
  background: transparent;
  box-shadow: none;
  vertical-align: middle;
}

.wp-block-table table tr th:first-child,
.wp-block-table table tr td:first-child,
.wp-block-table table > *:first-child tr:first-child th:first-child,
.wp-block-table table > *:first-child tr:first-child td:first-child,
.wp-block-table table > *:first-child tr:first-child th:last-child,
.wp-block-table table > *:first-child tr:first-child td:last-child,
.wp-block-table table tr:last-child td:first-child,
.wp-block-table table tr:last-child td:last-child {
  border-left: 0;
  border-top: 0;
  border-radius: 0;
}

.wp-block-table table tr th,
table th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--body-sm);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0.03em;
  word-spacing: normal;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}

.wp-block-table table tr td,
table td {
  font-family: var(--font-ui);
  font-size: var(--body-sm);
  color: var(--text);
  word-spacing: normal;
}

.wp-block-table table tbody td:first-child,
table tbody td:first-child {
  color: var(--text-muted);
}

.wp-block-table table tbody tr:nth-child(even) td,
table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.wp-block-table table tbody tr:hover td,
table tbody tr:hover td {
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
}

.wp-block-table table tr:last-child td,
table tbody tr:last-child td {
  border-bottom: 0;
}

/* 3-col comparison (e.g. Schweiz | mobile | app): X / ✓ are plain text.
   CSS cannot key off glyph text, so both stay --text; FA Pro is not loaded. */
.wp-block-table table:has(thead th:nth-child(3):last-child) tbody td:not(:first-child),
table:has(thead th:nth-child(3):last-child) tbody td:not(:first-child) {
  text-align: center;
  color: var(--text);
}

@media (min-width: 64rem) {
  .wp-block-table table > :not(caption) > * > *,
  .wp-block-table table tr th,
  .wp-block-table table tr td,
  table th,
  table td {
    padding: var(--space-4) var(--space-5);
  }
}

/* -------------------------------------------------------- 9b. breadcrumbs
   Air under the sticky header; quiet trail, not a glued caption. */
nav.breadcrumbs {
  padding-top: var(--space-3);
  padding-bottom: var(--space-4);
}

nav.breadcrumbs .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--body-sm);
  line-height: 1.4;
  list-style: none;
}

nav.breadcrumbs .breadcrumb-item + .breadcrumb-item {
  padding-left: var(--space-3);
}

nav.breadcrumbs .breadcrumb-item + .breadcrumb-item::before,
nav.breadcrumbs .breadcrumb-item + .breadcrumb-item:before {
  float: none;
  padding-right: var(--space-3);
  color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  content: "/";
}

main nav.breadcrumbs a,
nav.breadcrumbs .breadcrumb-item a {
  color: var(--text-muted) !important;
  font-family: var(--font-ui);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

main nav.breadcrumbs a:hover,
nav.breadcrumbs .breadcrumb-item a:hover {
  color: var(--text) !important;
}

nav.breadcrumbs .breadcrumb-item.active {
  color: var(--text);
  opacity: 1;
}

@media (min-width: 64rem) {
  nav.breadcrumbs {
    padding-top: var(--space-4);
    padding-bottom: var(--space-5);
  }

  nav.breadcrumbs .breadcrumb-item + .breadcrumb-item {
    padding-left: var(--space-4);
  }

  nav.breadcrumbs .breadcrumb-item + .breadcrumb-item::before,
  nav.breadcrumbs .breadcrumb-item + .breadcrumb-item:before {
    padding-right: var(--space-4);
  }
}

/* --------------------------------------------------- 10. FAQ & TOC blocks
   Theme paints .question in --bs-primary and draws the open icon with
   Font Awesome 6 Pro (U+F068). FA Pro is not in the mirror, so the
   open state was an empty tofu. Plus/minus are CSS bars. */
.faq-section .item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  box-shadow: none;
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.faq-section .item:hover {
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
}

.faq-section .item.show {
  border-color: color-mix(in srgb, var(--mp-blue) 48%, transparent);
  box-shadow: inset 3px 0 0 var(--mp-yellow);
}

.faq-section .item .question {
  position: relative;
  padding-right: 2.25rem;
  cursor: pointer;
}

.faq-section .item .question,
.faq-section .item .question a,
.faq-section .item .question [itemprop="name"] {
  color: var(--text) !important;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.45;
  word-spacing: 0.14em;
  text-transform: none;
}

/* Hit target is the whole question row; the +/− stays a small mark on the right. */
.faq-section .item .question button,
.faq-section .item .question button.toggler {
  inset: 0;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  transform: none;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  z-index: 1;
  cursor: pointer;
}

.faq-section .item .question button:before,
.faq-section .item .question button:after {
  content: "" !important;
  font-family: inherit !important;
  position: absolute;
  left: calc(100% - 0.7rem);
  top: 50%;
  width: 0.55rem;
  height: 1.5px;
  background: var(--mp-yellow);
  border-radius: 1px;
  color: transparent !important;
  font-size: 0 !important;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.faq-section .item .question button:after {
  width: 1.5px;
  height: 0.55rem;
  opacity: 1;
  transition:
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.faq-section .item.show .question button,
.faq-section .item.show .question button.toggler {
  border: 0 !important;
  background: transparent !important;
}

.faq-section .item.show .question button:before {
  content: "" !important;
}

.faq-section .item.show .question button:after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0);
}

.faq-section .item .answer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  padding-right: 0;
  border-top: 1px solid var(--hairline);
}

.faq-section .item .answer,
.faq-section .item .answer p,
.faq-section .item .answer [itemprop="text"] {
  color: var(--text-muted);
  word-spacing: 0.14em;
  line-height: 1.65;
}

.faq-section .title,
.faq-section h2 {
  font-family: var(--font-ui);
  text-transform: none;
  color: var(--text);
}

@media (max-width: 991px) {
  .faq-section .item .question {
    padding-right: 2rem;
  }

  .faq-section .item .answer {
    padding-right: 0;
  }
}

.lwptoc {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.lwptoc_item_label {
  font-family: var(--font-ui);
}

.lwptoc_item_number {
  color: var(--mp-blue);
  font-family: var(--font-accent);
}

/* ------------------------------------------- 11. section rules & accents
   Brand gradients appear as 3px top rules and ambient washes only —
   never as button or card fills (§7). Sport blue leads; casino red and
   promo gold stay the second accent (§3.2). */
section.wp-block-hc-alternate-group-section {
  position: relative;
  padding-top: var(--space-6);
}

section.wp-block-hc-alternate-group-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-blue);
  opacity: 0.85;
}

/* `.bonus` is the promo amount inside a banner, not a card. Promo/rewards
   read in gold on this palette (§3), set in the accent face.
   The theme paints it at `.home-page .welcome-section .banner .bonus`, so the
   selector below has to match that weight to win. */
.home-page .welcome-section .banner .bonus,
.welcome-section .banner .bonus,
.banner .bonus,
.bottom_panel .bonus {
  font-family: var(--font-accent);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mp-yellow);
  background: none;
  border: 0;
}

/* The sticky bottom panel carried the same casino red. It becomes a surface
   with a gold promo rule, so red stops competing with the sport lead. */
.bottom_panel {
  --bottom_panel_bg: var(--surface);
  --bottom_panel_border: var(--mp-yellow);
  background: var(--surface);
  border-top: 3px solid transparent;
  border-image: var(--grad-gold) 1;
}

/* Theme dumps a casino-red panel var and a lime TOC link inline.
   Tokens win; structure of those blocks stays. */
.bottom_panel.bonus {
  color: var(--text);
}

.lwptoc_header {
  color: var(--text) !important;
}

.lwptoc .lwptoc_i a,
.lwptoc .lwptoc_i A {
  color: var(--mp-blue) !important;
}

.flx-popup__holder a {
  background: var(--ui-blue) !important;
  color: var(--text) !important;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 500;
}

.flx-popup__content-single {
  color: var(--text) !important;
}

.flx-popup__content-single .title {
  font-family: var(--font-accent);
  color: var(--text);
}

/* ----------------------------------------------------- 12. a11y & motion */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

::selection {
  background: var(--ui-blue);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------- 13. small screens
   Mobile is the surface that matters here, and Druk Wide is the widest face
   in the set — the display step is pulled back so an uppercase Polish h1
   cannot push the page sideways at 320px. */
@media (max-width: 40rem) {
  body {
    background-size: 100% 26rem;
  }

  h1, .h1 {
    font-size: clamp(1.4rem, 6.4vw, 1.9rem);
    letter-spacing: 0;
  }

  h2, .h2 {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  }

  .custom-logo {
    height: 1.75rem;
  }

  .btn {
    min-height: 2.625rem;
  }
}

/* ------------------------------------------------ 14. first-screen repair
   Long Polish hero copy cannot wear Druk Wide + uppercase. Keep the
   original 2-column layout; paint with tokens only. */
.home-page .welcome-section .welcome-section__container {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-page .welcome-section .welcome-section__container h1 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: calc(1.375rem + 1.5vw);
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (min-width: 1200px) {
  .home-page .welcome-section .welcome-section__container h1 {
    font-size: 2.5rem;
  }
}

.home-page .welcome-section .banner {
  background: var(--surface) !important;
  border: 1px solid var(--hairline);
}

.home-page .welcome-section .banner .title,
.home-page .welcome-section .banner .comment,
.home-page .welcome-section .banner .bonus {
  font-family: var(--font-ui);
  text-transform: none;
  letter-spacing: normal;
  word-spacing: normal;
}

.home-page .welcome-section .banner .bonus {
  font-weight: 800;
  color: var(--mp-yellow);
  background: none;
  border: 0;
}

.home-page .welcome-section .banner .comment {
  color: var(--text);
}

/* Play overlay is a 60px icon, not a pill CTA. Our .btn fill was painting
   a solid blue disc over the thumbnail. */
.game_section .game_section__container li .game_button {
  display: none;
  background: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='28' fill='%23000413' fill-opacity='0.45' stroke='%23EFF1F8' stroke-width='2'/%3E%3Cpath d='M37.65 27.85c.39.21.72.52.95.9.23.38.35.81.35 1.25s-.12.87-.35 1.25c-.23.38-.56.69-.95.9L27.23 37.82c-1.68.91-3.74-.27-3.74-2.15V24.33c0-1.88 2.06-3.07 3.74-2.15l10.42 5.67z' fill='%23EFF1F8'/%3E%3C/svg%3E") !important;
  background-size: 60px 60px !important;
  background-repeat: no-repeat !important;
  border: 0 !important;
  border-radius: 0 !important;
  width: 60px;
  height: 60px;
  min-height: 0;
  padding: 0;
  transform: translate(-50%, -50%) !important;
  box-shadow: none;
}

.game_section .game_section__container li:hover img {
  filter: brightness(55%);
}

/* Catalog rails used --bs-primary (UI blue). That fill is for controls,
   not section chrome — the bright bar fought the yellow CTAs. Neutral
   surface + hairline keeps the rail, drops the colour shout. */
.game_section1 header,
.game_section2 header {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
}

.game_section1 header h2,
.game_section2 header h2 {
  color: var(--text);
}

.game_section2 .game_section__container .name {
  background-color: var(--surface);
  color: var(--text);
}

/* Category row: one surface, one title colour, readable supporting line.
   The theme faded each chip to transparent so contrast jumped card to card. */
.categories .categories__container .link {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--hairline);
}

.categories .categories__container .link .description {
  color: var(--text-muted);
  opacity: 1;
  font-size: var(--caption);
}

.categories .categories__container .link img {
  width: 61px;
  height: 61px;
  object-fit: contain;
}

.advantages .advantages__container .item h3 {
  color: var(--text);
  text-transform: none;
  font-family: var(--font-ui);
}

.advantages .advantages__container .item > div {
  color: var(--text-muted);
}

/* Geo switcher HTML is removed from the footer. */

/* App download strip: inline #606060 + success-blue title is 2.3:1. */
.home-page .welcome-section .banner .bg {
  background-size: 250px 150px;
  background-position: left bottom;
}

@media (max-width: 991px) {
  .home-page .welcome-section .banner .bg {
    background-size: 220px 132px;
    background-position: center bottom;
  }
}

.app_banner {
  background: var(--surface) !important;
  border: 1px solid var(--hairline);
  color: var(--text);
}

.app_banner .title {
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 700;
}

.app_banner p {
  color: var(--text-muted);
}

/* Missing plugin asset 119.png → 404. Keep the control, drop the broken img. */
#wpfront-scroll-top-container img {
  display: none;
}

#wpfront-scroll-top-container {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--ui-blue);
  border-radius: var(--radius-pill);
}

#wpfront-scroll-top-container::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-left: 2px solid var(--text);
  border-top: 2px solid var(--text);
  transform: rotate(45deg) translateY(2px);
}

/* ------------------------------------------- 15. promo-code welcome card
   Theme leftover was grey (#bcc0c2) + casino red. This is the promo/
   rewards surface: dark card, gold 3px rule, gold amounts, gold ticket.
   Tokens only. Structure of the original block stays. */
.promocode-page .welcome-section .welcome-section-promocode {
  --promocode-page-background-color: var(--surface);
  --promocode-page-accent-color: var(--mp-yellow);
  position: relative;
  max-width: 44rem;
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.promocode-page .welcome-section .welcome-section-promocode::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-gold);
}

.promocode-page .welcome-section .welcome-section-promocode header {
  position: static;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  margin-bottom: var(--space-5);
}

.promocode-page .welcome-section .welcome-section-promocode header .title {
  font-family: var(--font-ui);
  font-size: var(--h3);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.promocode-page .welcome-section .welcome-section-promocode hr {
  opacity: 1;
  color: transparent;
  background: var(--hairline);
  border: 0;
  height: 1px;
}

.promocode-page .welcome-section .welcome-section-promocode .bonus_value,
.promocode-page .welcome-section .welcome-section-promocode .free_spin_value {
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--mp-yellow);
}

.promocode-page .welcome-section .welcome-section-promocode .bonus_value {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.2;
}

.promocode-page .welcome-section .welcome-section-promocode .free_spin_value {
  font-size: var(--body-lg);
}

.promocode-page .welcome-section .welcome-section-promocode .bonus_description,
.promocode-page .welcome-section .welcome-section-promocode .free_spin {
  color: var(--text-muted);
  font-weight: 400;
}

.promocode-page .welcome-section .welcome-section-promocode .promocode-arrows svg {
  fill: var(--mp-yellow);
}

.promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block {
  height: 2.75rem;
  border: 1px dashed var(--mp-yellow);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}

.promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block input {
  background: transparent;
  color: var(--mp-yellow);
  font-family: var(--font-accent);
  font-size: var(--body);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block .copy-icon {
  filter: invert(78%) sepia(62%) saturate(1200%) hue-rotate(6deg) brightness(98%);
}

.promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block .copy-msg {
  color: var(--bg);
  background: var(--mp-yellow);
  border-radius: var(--radius-control);
}

.promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block .copy-msg:before {
  border-top-color: var(--mp-yellow);
  border-left-color: var(--mp-yellow);
}

.promocode-page .welcome-section .welcome-section-promocode .buttons .btn {
  min-height: 2.75rem;
  background: var(--ui-blue);
  border-color: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 500;
}

.promocode-page .welcome-section .welcome-section-promocode .buttons .btn:hover {
  background: var(--btn-hover);
  color: var(--text);
}

@media (max-width: 991px) {
  .promocode-page .welcome-section .welcome-section-promocode .copy-block-wrap .copy-block.copy-ok .copy-msg {
    display: none;
  }
}

/* lang-switch */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  align-items: center;
  margin-block-start: var(--space-5, 1.5rem);
}
.lang-switch__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 0.5rem);
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding-inline: var(--space-3, 0.75rem);
  border: 1px solid var(--hairline, rgba(239, 241, 248, 0.1));
  border-radius: var(--radius-control, 6px);
  color: var(--text-muted, #a3a7b0);
  font-size: var(--body-sm, 0.9375rem);
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-switch__item:hover { border-color: var(--mp-blue, #1b9dd9); color: var(--text, #eff1f8); }
.lang-switch__item:focus-visible { outline: 2px solid var(--focus, #1a5dce); outline-offset: 2px; }
.lang-switch__item.is-active {
  border-color: var(--mp-blue, #1b9dd9);
  color: var(--text, #eff1f8);
  font-weight: 600;
  cursor: default;
}
.lang-switch__flag {
  display: block;
  width: 1.125rem;
  height: 0.75rem;
  border-radius: 1px;
  /* Хайрлайн: белая полоса французского и итальянского флага иначе
     сливается со светлым фоном, а на тёмном пропадает граница. */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.lang-switch__code { letter-spacing: 0.04em; }
@media (max-width: 30rem) {
  .lang-switch { gap: var(--space-1, 0.25rem); }
  .lang-switch__item { padding-inline: var(--space-2, 0.5rem); }
  .lang-switch__name { display: none; }
}
@media (min-width: 48rem) { .lang-switch__code { display: none; } }
/* /lang-switch */
