/* ==========================================================================
   vision-iic.com — Mostbet UZ affiliate landing
   Design tokens + reset + shared chrome (header/footer/cookie/crumbs/back-to-top)
   Owner of this file: tech-seo (tokens/reset/shared chrome) — html-front adds
   block/component styles BELOW the marker at the bottom of this file.
   ========================================================================== */

:root {
  --bg: #084992;
  --bg-2: #0A5FC2;
  --accent: #428CDC;
  --cta: #FB5E01;
  --gold: #FFC24B;
  --card: #FFFFFF;
  --card-2: #E3F2FF;
  --text: #0E1B2C;
  --text-inv: #F3F7FC;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 4px 16px rgba(8, 73, 146, 0.14);
  --shadow-2: 0 12px 32px rgba(8, 73, 146, 0.22);
  --container: 1180px;
  --header-h: 72px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--card-2);
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@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; }
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--text);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 1000; transition: top .15s ease;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons (base — html-front may extend) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md); font-weight: 700;
  font-size: 0.95rem; line-height: 1; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta); color: #17100A; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: #e2530a; }
.btn-ghost { background: transparent; color: var(--text-inv); border: 1.5px solid rgba(243,247,252,0.55); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  box-shadow: var(--shadow-1);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; color: var(--text-inv);
  letter-spacing: -0.01em;
}
.brand img, .brand svg { width: 32px; height: 32px; flex: none; }
.brand-mark { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-inv); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex; align-items: center; gap: 24px; flex: 1; justify-content: flex-end;
}
.site-nav ul { display: flex; align-items: center; gap: 20px; }
.site-nav a:not(.btn) {
  color: var(--text-inv); font-weight: 600; font-size: 0.95rem; opacity: 0.88;
  padding: 8px 2px; position: relative;
}
.site-nav a:not(.btn):hover { opacity: 1; }
.site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 8px 20px 20px; gap: 16px; box-shadow: var(--shadow-2);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .site-nav.is-open { max-height: 80vh; opacity: 1; visibility: visible; overflow-y: auto; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav ul a { display: block; padding: 12px 4px; }
  .nav-cta { flex-direction: column; align-items: stretch; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Breadcrumbs (content depth-1 pages) ---------- */
nav.crumbs {
  font-size: 0.85rem; color: var(--text); opacity: 0.75;
  padding: 14px 0;
}
nav.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
nav.crumbs a { font-weight: 600; }
nav.crumbs a:hover { text-decoration: underline; }
nav.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; opacity: 0.6; }
nav.crumbs li[aria-current="page"] { opacity: 0.85; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg); color: var(--text-inv); margin-top: 64px;
}
.footer-inner { padding: 40px 20px 28px; display: grid; gap: 20px; }
.footer-top {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { font-weight: 600; font-size: 0.92rem; opacity: 0.85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 28px; padding-inline: 8px; border-radius: 6px;
  background: var(--gold); color: var(--text); font-weight: 800; font-size: 0.8rem;
}
.footer-legal {
  font-size: 0.82rem; line-height: 1.6; opacity: 0.72; max-width: 78ch;
}
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 0.8rem; opacity: 0.65; border-top: 1px solid rgba(243,247,252,0.14); padding-top: 16px;
}

/* ---------- "Last updated" line (home + canonical target only) ---------- */
.last-updated {
  text-align: center; font-size: 0.8rem; color: var(--text); opacity: 0.55;
  padding: 18px 20px 0;
}

/* ==========================================================================
   Cookie consent
   ========================================================================== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--card); color: var(--text); border-radius: var(--radius-md);
  box-shadow: var(--shadow-2); padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  max-width: 720px; margin-inline: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 0.88rem; line-height: 1.5; flex: 1 1 320px; }
.cookie-actions { display: flex; gap: 10px; flex: none; }

/* ==========================================================================
   Back-to-top
   ========================================================================== */
.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--cta); color: #fff; font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background-color .15s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #e2530a; }
.back-to-top[hidden] { display: none; }

/* ==========================================================================
   404 page (root-absolute paths, self-contained)
   ========================================================================== */
.error-page main {
  min-height: 60vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 18px; padding: 64px 20px;
}
.error-page .error-code {
  font-size: clamp(3rem, 10vw, 6rem); font-weight: 800; color: var(--bg); line-height: 1;
}
.error-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 640px; }
.error-links a {
  font-size: 0.88rem; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--card-2); color: var(--bg);
}
.error-links a:hover { background: var(--gold); }

/* ==========================================================================
   html-front: block/component styles (hero, cards, tables, calculator, FAQ,
   payments/providers grids, etc.) go BELOW this marker. Tokens above are the
   single source of truth — reuse var(--bg)/var(--cta)/var(--gold)/etc.,
   don't hardcode hex values in new rules.
   ========================================================================== */

/* ---------- Shared measure helpers ---------- */
.container-narrow { max-width: 680px; margin-inline: auto; padding-inline: 20px; }
.table-wrap { overflow-x: auto; }

/* ==========================================================================
   Home — hero
   ========================================================================== */
.hero-strip { padding-block: clamp(32px, 6vw, 56px) 8px; }
.hero-strip h1 {
  font-size: clamp(1.6rem, 3.4vw + 1rem, 2.5rem); font-weight: 800; line-height: 1.18;
  color: var(--bg); margin-bottom: 16px; letter-spacing: -0.01em;
}
.hero-strip p { font-size: 1.02rem; color: var(--text); opacity: 0.92; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.hero-note {
  font-size: 0.82rem; font-weight: 700; color: var(--bg); opacity: 0.75;
  padding: 6px 12px; border-radius: 999px; background: var(--card);
}

/* ==========================================================================
   Prose strips — literal article text, narrow measure, between pinboard clusters
   ========================================================================== */
.prose-strip { padding-block: clamp(20px, 4vw, 36px); }
.prose-strip h2 {
  font-size: clamp(1.25rem, 1.7vw + 1rem, 1.6rem); font-weight: 800; color: var(--bg);
  margin-bottom: 14px; line-height: 1.25;
}
.prose-strip h3 {
  font-size: 1.1rem; font-weight: 800; color: var(--bg-2); margin: 20px 0 10px;
}
.prose-strip p { margin-bottom: 14px; }
.prose-strip p:last-child { margin-bottom: 0; }
.prose-strip ul { margin: 4px 0 0; display: grid; gap: 10px; }
.prose-strip ul li {
  position: relative; padding-left: 22px; line-height: 1.55;
}
.prose-strip ul li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px;
  border-radius: 2px; background: var(--gold); transform: rotate(45deg);
}
.prose-strip--faq h3 { color: var(--bg); }

/* ---------- Literal tables, coupon-framed ---------- */
.coupon-hero-table { padding-block: 8px clamp(20px, 4vw, 36px); }
.coupon-hero-table table { font-size: 0.94rem; }
.coupon-hero-table th, .coupon-hero-table td { text-align: left; padding: 11px 6px; }
.coupon-hero-table thead th {
  color: var(--bg); font-weight: 800; border-bottom: 2px solid var(--gold);
}
.coupon-hero-table tbody tr:not(:last-child) td { border-bottom: 1px dashed rgba(8,73,146,0.16); }
.coupon-hero-table tbody td:last-child { text-align: right; font-weight: 700; color: var(--bg-2); }

/* ==========================================================================
   Coupon card — signature formal language (perforated-ticket look), used on
   EVERY card/panel/table-wrap across the site (bonus badges, calculator,
   promo, access, payment/providers logo tiles, literal tables).
   ========================================================================== */
.coupon-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 20px 22px 22px;
  border-top: 3px solid var(--gold);
  transition: transform .18s ease, box-shadow .18s ease;
}
.coupon-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.coupon-head { display: flex; flex-direction: column; gap: 6px; }
.coupon-eyebrow {
  display: inline-block; align-self: flex-start;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cta); background: rgba(251,94,1,0.1); padding: 4px 10px; border-radius: 999px;
}
.widget-title { font-size: 1.08rem; font-weight: 800; color: var(--bg); line-height: 1.3; }
.coupon-figure { font-size: 1.9rem; font-weight: 800; color: var(--bg); line-height: 1; font-variant-numeric: tabular-nums; }
.coupon-caption { font-size: 0.85rem; opacity: 0.75; margin-top: 4px; }
.coupon-body { margin-top: 2px; }

/* Perforated divider — dashed line + two punched circles matching page bg */
.coupon-divider {
  position: relative; height: 0; margin: 16px -22px 16px; overflow: visible;
  border-top: 2px dashed rgba(8,73,146,0.22);
}
.coupon-divider::before, .coupon-divider::after {
  content: ""; position: absolute; top: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--card-2); transform: translateY(-50%);
}
.coupon-divider::before { left: -9px; }
.coupon-divider::after { right: -9px; }

/* ==========================================================================
   Pinboard — masonry cluster of coupon cards (CSS columns, varying heights)
   ========================================================================== */
.pinboard-section { padding-block: clamp(10px, 3vw, 22px); }
.pinboard {
  columns: 1; column-gap: 20px;
}
.pinboard > * { break-inside: avoid; margin-bottom: 20px; }
@media (min-width: 48em) { .pinboard { columns: 2; } }
@media (min-width: 64em) { .pinboard { columns: 3; } }

/* ---------- Quick bonus badge cards ---------- */
.coupon-card--badge { text-align: center; padding-top: 22px; }
.coupon-card--badge .coupon-figure { font-size: 2.1rem; }

/* ---------- Calculator (signature feature) ---------- */
.calc-field { display: grid; gap: 8px; }
.calc-label { font-size: 0.85rem; font-weight: 700; color: var(--text); opacity: 0.85; }
.calc-controls { display: grid; grid-template-columns: 1fr 96px; gap: 12px; align-items: center; }
.calc-controls input[type="range"] {
  width: 100%; accent-color: var(--cta); height: 6px; cursor: pointer;
}
.calc-controls input[type="number"] {
  width: 100%; padding: 9px 10px; border: 1.5px solid var(--card-2); border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--card-2);
  color: var(--text);
}
.calc-controls input[type="number"]:focus-visible { border-color: var(--gold); }
.calc-results { display: grid; gap: 10px; margin-top: 16px; }
.calc-result-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--card-2); border-radius: var(--radius-sm);
}
.calc-result-label { font-size: 0.86rem; font-weight: 600; }
.calc-result-value { font-weight: 800; color: var(--bg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-disclaimer { font-size: 0.76rem; opacity: 0.65; margin-top: 14px; line-height: 1.5; }

/* ---------- Promo code panel ---------- */
.promo-note { font-size: 0.9rem; line-height: 1.55; margin-bottom: 16px; }

/* ---------- Access / mirror panel (div-based honest table) ---------- */
.access-table { display: grid; gap: 12px; }
.access-row {
  display: grid; grid-template-columns: 128px 1fr; gap: 4px 14px;
  padding-bottom: 12px; border-bottom: 1px dashed rgba(8,73,146,0.16);
}
.access-row:last-child { border-bottom: 0; padding-bottom: 0; }
.access-cell--label { font-weight: 800; color: var(--bg-2); font-size: 0.88rem; }
.access-table .access-cell:not(.access-cell--label) { font-size: 0.88rem; opacity: 0.85; }
@media (max-width: 30em) {
  .access-row { grid-template-columns: 1fr; }
}

/* ---------- Payment / providers logo tiles ---------- */
.logo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px,100%), 1fr));
  gap: 14px; align-items: center;
}
.logo-tile {
  height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--card-2); border-radius: var(--radius-sm); padding: 8px 12px;
}
.logo-tile img { max-height: 100%; width: auto; object-fit: contain; }

/* ==========================================================================
   Internal pages (bonuslar/slotlar/ilova + 3 legal) — plain skeleton,
   deliberately NOT the homepage masonry pinboard (see TEMPLATE_SPEC).
   ========================================================================== */
.page-hero { padding-block: clamp(28px, 5vw, 48px) 6px; }
.page-hero h1 {
  font-size: clamp(1.5rem, 3vw + 1rem, 2.2rem); font-weight: 800; color: var(--bg);
  line-height: 1.22; margin-bottom: 14px;
}
.page-hero p { font-size: 1rem; opacity: 0.9; }

.content-block { padding-block: clamp(18px, 3.5vw, 32px); }
.content-block h2 {
  font-size: clamp(1.15rem, 1.6vw + 1rem, 1.45rem); font-weight: 800; color: var(--bg);
  margin-bottom: 12px;
}
.content-block p { margin-bottom: 12px; }
.content-block p:last-child { margin-bottom: 0; }

.mini-faq { padding-block: clamp(18px, 3.5vw, 32px) clamp(32px, 5vw, 48px); }
.mini-faq h2 { font-size: 1.3rem; font-weight: 800; color: var(--bg); margin-bottom: 14px; }
.mini-faq details {
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-1);
  padding: 4px 18px; margin-bottom: 12px; border-top: 3px solid var(--gold);
}
.mini-faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--bg);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mini-faq summary::-webkit-details-marker { display: none; }
.mini-faq summary::after { content: "+"; font-size: 1.3rem; color: var(--cta); flex: none; }
.mini-faq details[open] summary::after { content: "\2212"; }
.mini-faq details p { padding-bottom: 16px; opacity: 0.88; }
