/* ===========================================================================
   YACINE PLAYER — World Cup 2026
   Design system: modern sports-broadcast premium. Apple × ESPN × FIFA.
   Single stylesheet, mobile-first, AA+ contrast, reduced-motion aware.
   =========================================================================== */

/* ---- Design tokens -------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy-900: #061427;
  --navy-800: #0a1f3c;
  --navy-700: #0f2a4f;
  --green: #19d27c;
  --green-600: #11b96b;
  --gold: #ffd34e;

  /* Semantic (dark = default) */
  --bg: var(--navy-900);
  --bg-elev: #0b2240;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eaf2ff;
  --text-muted: #9fb3cc;
  --text-dim: #6f86a3;
  --accent: var(--green);
  --accent-contrast: #04130b;
  --highlight: var(--gold);
  --glass: rgba(8, 24, 47, 0.62);
  --shadow-color: 0deg 40% 2%;

  /* Type */
  --font-display: 'Sora', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale (8pt) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --container: 1140px;

  --ring: 0 0 0 3px rgba(25, 210, 124, 0.45);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme='light'] {
  --bg: #f5f8fd;
  --bg-elev: #ffffff;
  --surface: rgba(6, 20, 39, 0.03);
  --surface-2: rgba(6, 20, 39, 0.05);
  --border: rgba(6, 20, 39, 0.10);
  --border-strong: rgba(6, 20, 39, 0.18);
  --text: #0a1f3c;
  --text-muted: #44617f;
  --text-dim: #6f86a3;
  --accent-contrast: #04130b;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow-color: 215deg 35% 55%;
}

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { background: var(--surface); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.2em; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}

::selection { background: var(--green); color: var(--accent-contrast); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---- Layout helpers ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.section { padding-block: var(--s-9); position: relative; }
.section--tight { padding-block: var(--s-8); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.section-head { max-width: 720px; margin-bottom: var(--s-7); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-top: var(--s-3); }
.section-head p { color: var(--text-muted); margin-top: var(--s-4); font-size: 1.1rem; }
.text-grad {
  background: linear-gradient(100deg, var(--green) 10%, var(--gold) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -64px; z-index: 200;
  background: var(--green); color: var(--accent-contrast);
  padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ---- Decorative gradient blobs ------------------------------------------- */
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.5; z-index: 0; pointer-events: none;
  animation: drift 18s var(--ease) infinite alternate;
}
.glow--green { background: radial-gradient(circle, var(--green), transparent 70%); }
.glow--gold { background: radial-gradient(circle, var(--gold), transparent 70%); }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(30px,-24px,0) scale(1.12); }
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: var(--s-3) var(--s-5); border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-600) 100%);
  color: var(--accent-contrast);
  box-shadow: 0 8px 22px -8px rgba(25, 210, 124, 0.7);
}
.btn--primary:hover { box-shadow: 0 14px 30px -8px rgba(25, 210, 124, 0.85); }
.btn--ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--accent); }
.btn--lg { padding: var(--s-4) var(--s-6); font-size: 1.05rem; }
.btn--block { width: 100%; }

/* App store badge buttons */
.store-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.store-btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  background: #050d18; color: #fff; border: 1px solid var(--border-strong);
  border-radius: 14px; padding: var(--s-3) var(--s-5);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
[data-theme='light'] .store-btn { background: #0a1f3c; }
.store-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .lbl { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn .lbl small { font-size: 0.66rem; color: #b9c6d8; letter-spacing: 0.02em; }
.store-btn .lbl strong { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }

/* ---- Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: var(--glass);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: var(--s-5); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--text); }
.brand span { color: var(--accent); }
.nav-links { display: none; align-items: center; gap: var(--s-5); margin-left: auto; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.96rem; transition: color 0.15s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }
.nav-cta { display: none; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); display: inline-grid; place-items: center;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme='light'] .theme-toggle .sun { display: none; }
[data-theme='light'] .theme-toggle .moon { display: block; }

.hamburger {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); display: inline-grid; place-items: center;
}
.mobile-menu {
  display: none; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4) var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: var(--s-3); border-radius: var(--radius-sm); color: var(--text); font-weight: 500; }
.mobile-menu a:hover { background: var(--surface-2); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .hamburger { display: none; }
  .nav-actions { margin-left: 0; }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: var(--s-8) var(--s-9); }
.hero .glow--green { width: 540px; height: 540px; top: -160px; left: -120px; }
.hero .glow--gold { width: 420px; height: 420px; bottom: -160px; right: -100px; opacity: 0.35; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: var(--s-8); align-items: center; }
.live-eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; font-weight: 600;
  font-family: var(--font-display); letter-spacing: 0.04em; color: var(--text-muted);
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 0 rgba(255,77,77,0.7); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,77,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255,77,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); }
}
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); margin-top: var(--s-4); }
.hero .sub { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--text-muted); margin-top: var(--s-5); max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-7); }
.trust-row .item { display: flex; flex-direction: column; }
.trust-row .item strong { font-family: var(--font-display); font-size: 1.5rem; }
.trust-row .item span { color: var(--text-dim); font-size: 0.85rem; }
.stars { color: var(--gold); letter-spacing: 2px; }

@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-9); }
}

/* ---- Phone mockup --------------------------------------------------------- */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone {
  position: relative; width: 300px; max-width: 78vw; aspect-ratio: 300 / 620;
  background: linear-gradient(160deg, #0c2547, #061427);
  border-radius: 44px; padding: 12px;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 1px 0 1px rgba(255,255,255,0.04) inset,
    0 40px 80px -30px rgba(0,0,0,0.7),
    0 0 0 11px rgba(255,255,255,0.02);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.phone::before {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px; background: #02080f; border-radius: 999px; z-index: 3;
}
.phone-screen {
  height: 100%; border-radius: 34px; overflow: hidden; position: relative;
  background:
    radial-gradient(120% 60% at 50% 0%, #103a6b 0%, transparent 60%),
    linear-gradient(180deg, #0a1f3c, #050f1f);
  padding: var(--s-6) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-3);
}
.scr-top { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-3); }
.scr-top .live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: #ff6b6b; font-family: var(--font-display); }
.scr-top .min { font-size: 0.72rem; color: var(--text-dim); }
.scr-match {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--s-3); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-2);
}
.scr-team { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--text-muted); text-align: center; }
.scr-flag { width: 30px; height: 22px; border-radius: 4px; }
.scr-score { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; }
.scr-list { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-1); }
.scr-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.74rem; color: var(--text-muted); background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.scr-row .badge-live { color: #ff6b6b; font-weight: 700; font-size: 0.66rem; }
.scr-row .badge-up { color: var(--text-dim); font-size: 0.66rem; }
.phone .ticker { animation: tick 5s steps(1) infinite; }
@keyframes tick { 0%,45% { opacity: 1; } 50%,95% { opacity: 1; } }

.float-card {
  position: absolute; background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 10px 14px;
  font-family: var(--font-display); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
  display: flex; align-items: center; gap: 10px; font-size: 0.8rem; animation: float 7s ease-in-out infinite;
}
.float-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.float-card.fc-1 { top: 8%; left: -6%; }
.float-card.fc-2 { bottom: 12%; right: -8%; animation-delay: 1.2s; }
@media (max-width: 520px) { .float-card { display: none; } }

/* ---- Fact strip ----------------------------------------------------------- */
.fact-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.fact {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-5); position: relative; overflow: hidden;
}
.fact::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--green), var(--gold)); }
.fact .v { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; }
.fact .l { font-weight: 600; margin-top: 4px; }
.fact .s { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }
@media (min-width: 760px) { .fact-strip { grid-template-columns: repeat(4, 1fr); } }

/* ---- Feature grid --------------------------------------------------------- */
.feature-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-6); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.feature:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.feature .ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(25,210,124,0.18), rgba(255,211,78,0.12));
  border: 1px solid var(--border-strong); margin-bottom: var(--s-4); color: var(--accent);
}
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--text-muted); margin-top: var(--s-2); font-size: 0.98rem; }

/* ---- Tables (schedule / standings) --------------------------------------- */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-5); border-bottom: 1px solid var(--border); }
.table-head h3 { font-size: 1.15rem; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 520px; }
table.data th, table.data td { padding: var(--s-3) var(--s-4); text-align: left; border-bottom: 1px solid var(--border); }
table.data th { font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-weight: 600; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: center; }
.badge-sample {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 700;
  font-family: var(--font-display); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold); background: rgba(255,211,78,0.12); border: 1px solid rgba(255,211,78,0.3);
  padding: 4px 10px; border-radius: 999px;
}
.watch-link { color: var(--accent); font-weight: 600; font-family: var(--font-display); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px; }
.watch-link:hover { text-decoration: underline; }
.qual { color: var(--green); font-weight: 700; }

.two-col { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }

/* ---- Download band -------------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--border-strong); padding: var(--s-8);
  text-align: center;
}
.cta-band .glow--green { width: 380px; height: 380px; top: -140px; left: 50%; transform: translateX(-50%); opacity: 0.4; }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); position: relative; }
.cta-band p { color: var(--text-muted); margin: var(--s-4) auto 0; max-width: 52ch; position: relative; }
.cta-band .store-btns { justify-content: center; margin-top: var(--s-6); position: relative; }
.cta-proof { display: inline-flex; gap: var(--s-5); margin-top: var(--s-6); flex-wrap: wrap; justify-content: center; position: relative; }
.cta-proof .item { color: var(--text-muted); font-size: 0.9rem; }
.cta-proof strong { color: var(--text); font-family: var(--font-display); }

/* ---- Long-form SEO prose -------------------------------------------------- */
.prose { max-width: 72ch; }
.prose.wide { max-width: 80ch; }
.prose p { color: var(--text-muted); margin-top: var(--s-4); }
.prose h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-top: var(--s-7); }
.prose h3 { font-size: 1.25rem; margin-top: var(--s-6); }
.prose ul, .prose ol { margin-top: var(--s-4); color: var(--text-muted); display: grid; gap: var(--s-2); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--gold); }
.prose strong { color: var(--text); }
.prose table { margin-top: var(--s-5); }
.callout {
  margin-top: var(--s-5); padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--gold); background: rgba(255,211,78,0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-size: 0.95rem;
}

/* In-article CTA box */
.cta-box {
  margin-block: var(--s-6); padding: var(--s-6);
  background: linear-gradient(135deg, rgba(25,210,124,0.10), rgba(255,211,78,0.06));
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); justify-content: space-between;
}
.cta-box .txt strong { font-family: var(--font-display); font-size: 1.15rem; display: block; }
.cta-box .txt span { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Blog cards ----------------------------------------------------------- */
.card-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.post-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.post-card .thumb { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.post-card .thumb svg { width: 100%; height: 100%; }
.post-card .body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.post-card .cat { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-card h3 { font-size: 1.18rem; line-height: 1.22; }
.post-card p { color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.post-card .meta { color: var(--text-dim); font-size: 0.8rem; margin-top: auto; }

/* ---- FAQ accordion -------------------------------------------------------- */
.faq-list { display: grid; gap: var(--s-3); max-width: 820px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5); background: none; border: none; color: var(--text); text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.faq-q:hover { color: var(--accent); }
.faq-q .chev { flex: none; transition: transform 0.25s var(--ease); color: var(--text-dim); }
.faq-item[open] .faq-q .chev, .faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 var(--s-5) var(--s-5); color: var(--text-muted); margin: 0; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding-block: var(--s-8) var(--s-6); margin-top: var(--s-9); }
.footer-grid { display: grid; gap: var(--s-7); grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: var(--s-4); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.footer-col a { color: var(--text-muted); font-size: 0.94rem; }
.footer-col a:hover { color: var(--text); }
.footer-about p { color: var(--text-muted); font-size: 0.94rem; margin-top: var(--s-3); max-width: 38ch; }
.footer-legal { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; }
.disclaimer { color: var(--text-dim); font-size: 0.82rem; margin-top: var(--s-4); max-width: 70ch; }

/* ---- Breadcrumb ----------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; font-size: 0.85rem; color: var(--text-dim); margin-bottom: var(--s-5); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }

/* ---- Article layout ------------------------------------------------------- */
.article-hero { padding-block: var(--s-7) var(--s-5); position: relative; overflow: hidden; }
.article-hero .glow--green { width: 420px; height: 420px; top: -180px; right: -120px; opacity: 0.35; }
.article-cat { color: var(--accent); font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.article-title { font-size: clamp(2rem, 5vw, 3.1rem); margin-top: var(--s-3); max-width: 20ch; position: relative; }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-5); color: var(--text-dim); font-size: 0.9rem; }
.article-layout { display: grid; gap: var(--s-8); }
@media (min-width: 1000px) { .article-layout { grid-template-columns: 1fr 260px; align-items: start; } }
.toc { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.toc h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: var(--s-3); }
.toc ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.toc a { color: var(--text-muted); font-size: 0.9rem; }
.toc a:hover { color: var(--accent); }
@media (max-width: 999px) { .toc { position: static; } }
.related { display: grid; gap: var(--s-4); grid-template-columns: 1fr; margin-top: var(--s-5); }
@media (min-width: 640px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related a { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s-4); transition: border-color 0.2s var(--ease); }
.related a:hover { border-color: var(--accent); }
.related .cat { font-size: 0.7rem; color: var(--accent); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; }
.related strong { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 0.98rem; line-height: 1.25; }

/* ---- Sticky mobile download bar ------------------------------------------ */
.dl-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: var(--s-3); justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  background: var(--glass); backdrop-filter: blur(14px); border-top: 1px solid var(--border-strong);
  transform: translateY(120%); transition: transform 0.3s var(--ease);
}
.dl-bar.show { transform: translateY(0); }
.dl-bar .info { display: flex; align-items: center; gap: var(--s-3); }
.dl-bar .info .mark { width: 36px; height: 36px; }
.dl-bar .info b { font-family: var(--font-display); font-size: 0.95rem; display: block; }
.dl-bar .info span { color: var(--text-dim); font-size: 0.78rem; }
@media (min-width: 900px) { .dl-bar { display: none; } }

/* ---- Scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- 404 ------------------------------------------------------------------ */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; }
.notfound .code { font-family: var(--font-display); font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: 1; }

/* ---- Utility -------------------------------------------------------------- */
.center { text-align: center; }
.mt-6 { margin-top: var(--s-6); }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); }
.muted { color: var(--text-muted); }
.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; }
