/* =====================================================================
   Betwinner Ecuador — hoja de estilos. Tema oscuro, dorado de marca, mobile-first.
   Tokens here are the single source of truth.
   - monolingual es-EC (no language switch)
   - review source attribution + honest no-aggregate disclaimer
   Critical CSS lives inline in <head>; this file loads non-blocking.
   ===================================================================== */

/* ---------- 1. Design tokens (named CSS custom properties) ---------- */
:root {
  /* palette */
  --brand: #FFCE06;
  --brand-600: #F2B400;
  --ink: #0E1726;
  --surface: #18243D;
  --surface-2: #1F2D4A;
  --line: #2A3756;
  --paper: #FFFFFF;
  --muted: #9AA6BE;
  --live: #22C55E;
  --warn: #F0584F;

  /* typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-h1: clamp(1.9rem, 5vw, 3rem);
  --fs-h2: clamp(1.5rem, 3.5vw, 2.1rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.35rem);
  --fs-body: 1rem;
  --fs-sm: .875rem;

  /* spacing scale 4/8/12/16/24/32/48/64/96 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* section rhythm — ONE rule owns this */
  --space-section: clamp(40px, 7vw, 88px);

  /* radii */
  --r: 14px;
  --r-pill: 999px;
  --r-media: 12px;

  /* shadow (single elevation token) */
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);

  /* layout */
  --container: 1240px;
  --header-h: 64px;

  color-scheme: dark;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* no horizontal page scroll ever */
}
img, svg, picture { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

/* utility */
.mono, .ticker, .odds { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only {
  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: var(--sp-4); top: -100px; z-index: 200;
  background: var(--brand); color: var(--ink); padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill); font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: var(--sp-3); text-decoration: none; }

/* ---------- 3. Focus (a11y) ---------- */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 4. Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  width: 100%;
}
.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(28px, 5vw, 56px); }
.section__head { margin-bottom: var(--sp-6); max-width: 70ch; text-align: center; margin-inline: auto; }
.section__head h2 { margin-bottom: var(--sp-3); }
.section__head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: var(--sp-3);
}
.lead { font-size: 1.075rem; color: var(--muted); }

/* Centered CTAs + section titles (body copy stays left-aligned for readability) */
.card__cta { text-align: center; }
p:has(> .btn) { text-align: center; }
.seo-text > h2 { text-align: center; }
.cards + p:has(> .btn), .table-wrap + p:has(> .btn) { margin-top: var(--sp-5); }
/* below-fold lazy paint */
.cv-auto { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ---------- 5. Header / nav / burger ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 23, 38, .95);
  border-bottom: 1px solid var(--line);
  transition: min-height .2s, background .2s;
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: var(--sp-5);
  transition: min-height .2s;
}
.site-header.is-scrolled .site-header__inner { min-height: 56px; }
.site-header.is-scrolled .brand-mark { transform: scale(.94); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.brand-mark { transition: transform .2s; }

.nav { margin-inline: auto; }
.nav__list { list-style: none; display: flex; align-items: center; gap: var(--sp-2); }
.nav__link {
  display: inline-block; padding: var(--sp-2) var(--sp-3);
  color: var(--paper); font-weight: 600; border-radius: var(--r-pill);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--surface); text-decoration: none; }
.nav__link.is-active { color: var(--ink); background: var(--brand); }

.header__actions { display: flex; align-items: center; gap: var(--sp-3); }

.burger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  background: transparent; border-radius: var(--r-pill); position: relative;
}
.burger span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--paper);
  transition: transform .25s, opacity .2s, top .25s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* mobile nav panel */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; background: var(--ink);
  border-bottom: 1px solid var(--line); padding: var(--sp-4) clamp(16px,4vw,32px) var(--sp-6);
  transform: translateY(-120%); transition: transform .28s ease; z-index: 99;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav__list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-1); }
.mobile-nav__link {
  display: block; padding: var(--sp-3) var(--sp-4); color: var(--paper); font-weight: 600;
  border-radius: var(--r); text-decoration: none;
}
.mobile-nav__link:hover, .mobile-nav__link.is-active { background: var(--surface); text-decoration: none; }
.mobile-nav__link.is-active { color: var(--brand); }
.mobile-nav .header__actions { margin-top: var(--sp-4); flex-wrap: wrap; }

/* ---------- 5b. Section scroll-spy nav (sticky under header) ---------- */
.section-nav {
  position: sticky; top: var(--header-h); z-index: 90;
  background: rgba(14,23,38,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav__list {
  list-style: none; display: flex; gap: var(--sp-1); overflow-x: auto;
  scrollbar-width: none; padding-block: var(--sp-2); margin: 0;
}
.section-nav__list::-webkit-scrollbar { display: none; }
.section-nav__link {
  display: inline-block; padding: 6px 12px; color: var(--muted); font-weight: 600;
  font-size: var(--fs-sm); white-space: nowrap; border-radius: var(--r-pill);
  text-decoration: none; transition: color .15s, background .15s;
}
.section-nav__link:hover { color: var(--paper); background: var(--surface); text-decoration: none; }
.section-nav__link.is-active { color: var(--ink); background: var(--brand); }

/* ---------- 6. Buttons / CTAs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 12px 22px; border-radius: var(--r-pill); border: 0; font-weight: 700;
  text-decoration: none; line-height: 1; white-space: nowrap; transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--ink); box-shadow: 0 6px 18px rgba(255,206,6,.25); }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: var(--surface); color: var(--paper); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--outline { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn--outline:hover { background: rgba(255,206,6,.10); }
.btn--lg { padding: 15px 30px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn-text { background: transparent; border: 0; color: var(--muted); padding: 0; font-weight: 600; }
.btn-text:hover { color: var(--paper); }

/* ---------- 6b. Inline SVG icons (emoji replacements) ---------- */
/* Sized in em units so they track the surrounding font-size (inline: ~1em,
   feature spots inherit the larger tile/heading sizes). currentColor lets each
   icon pick up the text color of its container (gold on CTAs, paper/muted
   elsewhere). flex/grid parents already center them; inline contexts use
   vertical-align to sit on the baseline. */
svg.ico {
  width: 1em; height: 1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
  display: inline-block;
}
svg.ico-line  { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.ico-fill  { fill: currentColor; stroke: none; }
svg.ico-lead  { width: 18px; height: 18px; }            /* slightly larger nav arrows */
.ico--text { color: inherit; }                          /* opt-in color hook */

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,206,6,.10), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #111c30 100%);
  border-bottom: 1px solid var(--line);
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28;
  z-index: 0; pointer-events: none;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(130% 120% at 50% 32%, rgba(14,23,38,.50) 0%, rgba(14,23,38,.80) 55%, rgba(14,23,38,.93) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr; justify-items: center; gap: var(--sp-7); align-items: center;
  padding-block: clamp(48px,8vw,96px);
}
.hero__content { max-width: 720px; text-align: center; margin-inline: auto; }
.hero__media { display: none; }
.hero__media img { width: 100%; border-radius: var(--r-media); box-shadow: var(--shadow); }
.hero__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-5); color: var(--muted); font-size: var(--fs-sm); list-style: none; padding: 0; }
.hero__trust li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hero__trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero--short .hero__inner { padding-block: clamp(32px,5vw,56px); }
.hero__trustfoot { margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-sm); }

/* ---------- 8. Live odds ticker (signature) ---------- */
.ticker {
  position: relative; background: var(--surface); border-block: 1px solid var(--line);
  overflow: hidden; padding-block: var(--sp-3);
}
.ticker__label {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-5);
  background: linear-gradient(90deg, var(--surface) 70%, transparent);
  font-weight: 800; font-size: var(--fs-sm); letter-spacing: .06em; text-transform: uppercase; color: var(--paper);
}
.ticker__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 1.6s infinite; }
.ticker__viewport { overflow: hidden; contain: paint; } /* contain:paint isolates the max-content track so it never leaks into page scrollWidth */
.ticker__track {
  display: flex; gap: var(--sp-6); width: max-content; padding-left: 130px;
  animation: ticker-scroll 38s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: var(--sp-3); white-space: nowrap; font-size: var(--fs-sm);
  color: var(--paper); text-decoration: none; padding: 2px 0;
}
.ticker__item:hover { text-decoration: none; }
.ticker__item:hover .ticker__odd { border-color: var(--brand); }
.ticker__teams { color: var(--paper); font-weight: 600; }
.ticker__sep { color: var(--muted); }
.ticker__odd {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--brand);
  padding: 2px 8px; border-radius: 6px; font-weight: 700;
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6);} 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0);} 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0);} }

/* ---------- 9. Category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.tile {
  display: block; padding: var(--sp-5); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: var(--paper); transition: transform .15s, border-color .15s, background .15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--brand); background: var(--surface-2); text-decoration: none; }
.tile__icon { font-size: 1.6rem; line-height: 1; margin-bottom: var(--sp-3); }
.tile h3 { color: var(--brand); margin-bottom: var(--sp-2); }
.tile p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- 10. Carousel ---------- */
.carousel { position: relative; }
.carousel__head { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.carousel__title { margin: 0; }
.carousel__viewport { overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track { display: flex; gap: var(--sp-4); padding-bottom: var(--sp-2); align-items: stretch; }
.carousel__track > * { flex: 0 0 auto; }
.carousel__nav { display: flex; gap: var(--sp-2); flex-shrink: 0; }
.carousel__btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--paper); font-size: 1.1rem; display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.carousel__btn:hover { background: var(--surface-2); border-color: var(--brand); }
.carousel__btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 11. Game card (accordion) ---------- */
.game-card {
  width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: border-color .15s, transform .15s; display: flex; flex-direction: column;
}
.game-card:hover { border-color: var(--brand); }
.game-card__btn { all: unset; display: block; width: 100%; cursor: pointer; text-align: left; }
.game-card__media { position: relative; aspect-ratio: 339/180; background: var(--surface-2); overflow: hidden; }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; }
.game-card__badge {
  position: absolute; top: var(--sp-2); left: var(--sp-2); font-size: .6875rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); color: var(--paper);
}
.game-card__badge--new { background: var(--brand); color: var(--ink); }
.game-card__badge--live { background: var(--live); color: var(--ink); }
.game-card__badge--hot { background: var(--warn); color: var(--paper); }
.game-card__body { padding: var(--sp-3) var(--sp-4); }
.game-card__title { font-weight: 700; font-size: .95rem; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
.game-card__provider { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.game-card__panel {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease;
}
.game-card__panel-inner { overflow: hidden; }
.game-card.is-open .game-card__panel { grid-template-rows: 1fr; }
.game-card__desc { padding: 0 var(--sp-4) var(--sp-3); color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-3); }
.game-card__play { margin-top: var(--sp-3); }
.game-card__chevron { transition: transform .25s; }
.game-card.is-open .game-card__chevron { transform: rotate(180deg); }
.game-card__head { display: flex; align-items: start; justify-content: space-between; gap: var(--sp-2); }

/* ---------- 12. Featured grid (Live highlight) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-5); }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.feature-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.feature-card__media { aspect-ratio: 640/720; background: var(--surface-2); overflow: hidden; position: relative; }
.feature-card__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-card__body { padding: var(--sp-5); }
.feature-card__title { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.feature-card__provider { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.feature-card__cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- 13. Promo cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--sp-5); display: flex; flex-direction: column; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card h3 { color: var(--paper); margin-bottom: var(--sp-2); }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card__cta { margin-top: var(--sp-4); }
.card--promo {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--line);
}
.card--promo h3 { color: var(--brand); }

/* ---------- 14. Provider strip (DARK bg) ---------- */
.strip { background: var(--ink); border-block: 1px solid var(--line); }
.strip__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-6) var(--sp-8); padding-block: var(--sp-6); }
.strip__logo { height: 40px; width: auto; filter: grayscale(0); opacity: .95; }
.strip__logo--mono { filter: brightness(0) invert(1) opacity(.85); } /* white out mono logos on dark */

/* ---------- 15. Payments ---------- */
.pay-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-4); }
.pay-icon {
  background: var(--paper); border-radius: var(--r-media); padding: var(--sp-3); height: 56px; width: auto;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.pay-icon img { max-height: 30px; width: auto; }
.pay-icon--sq img { max-height: 36px; } /* square app-style icons (AirTM) */

/* ---------- 16. App block ---------- */
.app-block { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }
.app-block__shots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.app-block__shots img { width: 100%; border-radius: var(--r-media); box-shadow: var(--shadow); }
.app-block__steps { list-style: none; counter-reset: step; margin: var(--sp-5) 0; }
.app-block__steps li { counter-increment: step; padding: var(--sp-3) 0 var(--sp-3) var(--sp-7); position: relative; border-bottom: 1px solid var(--line); color: var(--paper); }
.app-block__steps li:last-child { border-bottom: 0; }
.app-block__steps li::before {
  content: counter(step); position: absolute; left: 0; top: var(--sp-3);
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--ink);
  font-weight: 800; display: grid; place-items: center; font-size: var(--fs-sm);
}
.app-block__note { background: var(--surface); border-left: 3px solid var(--brand); padding: var(--sp-3) var(--sp-4); border-radius: 0 var(--r) var(--r) 0; color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-4); }
.store-badges { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.store-badge { display: inline-flex; height: 48px; }
.store-badge img { height: 48px; width: auto; }

/* ---------- 17. Trust / responsible gaming ---------- */
.rg-block {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn);
  border-radius: var(--r); padding: var(--sp-5) var(--sp-6);
}
.rg-block h2, .rg-block h3 { color: var(--paper); }
.rg-block p { color: var(--muted); }
.rg-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-5); margin-top: var(--sp-4); }
.rg-row img { height: 34px; width: auto; }
.cert-badge { height: 56px; }
.rg-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.rg-tool { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-media); padding: var(--sp-3) var(--sp-4); }
.rg-tool strong { color: var(--brand); display: block; margin-bottom: 2px; }
.rg-tool span { color: var(--muted); font-size: var(--fs-sm); }
.help-links { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-4); }

/* ---------- 18. Tables (responsive card-transform <640px) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table-wrap caption { caption-side: top; text-align: left; padding: var(--sp-3) var(--sp-4); color: var(--muted); font-size: var(--fs-sm); font-style: italic; }
.legal-source { color: var(--muted); font-size: var(--fs-sm); font-style: italic; margin-top: var(--sp-3); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); font-size: .95rem; }
th { background: var(--surface-2); color: var(--paper); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
td .mono { color: var(--brand); }

/* trust-card details table */
.details-wrap { margin-top: var(--sp-5); }
details.trust-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4) var(--sp-5); }
details.trust-details summary { cursor: pointer; font-weight: 700; color: var(--paper); list-style: none; }
details.trust-details summary::-webkit-details-marker { display: none; }
/* inline-SVG chevron markers (gold) so no pictograph glyphs are emitted */
details.trust-details summary::after {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .35em;
  vertical-align: -0.15em; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFCE06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}
details.trust-details[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFCE06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}
details.trust-details .table-wrap { border: 0; margin-top: var(--sp-4); }

/* ---------- 19. FAQ accordion ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__btn {
  all: unset; cursor: pointer; display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-4) 0; text-align: left; font-weight: 700; color: var(--paper);
}
.faq__btn:hover { color: var(--brand); }
.faq__icon { flex-shrink: 0; transition: transform .25s; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq__item.is-open .faq__icon { transform: rotate(45deg); }
.faq__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.faq__panel-inner { overflow: hidden; }
.faq__item.is-open .faq__panel { grid-template-rows: 1fr; }
.faq__a { padding: 0 0 var(--sp-4); color: var(--muted); }
.faq__a a:not(.btn) { color: var(--brand); }

/* ---------- 20. SEO text ---------- */
/* Centered narrow column: heading + CTAs center, long prose stays left-aligned for readability */
.seo-text { max-width: 760px; margin-inline: auto; color: var(--muted); }
.seo-text h2 { color: var(--paper); margin-bottom: var(--sp-4); }
.seo-text p { margin-bottom: var(--sp-4); }
.seo-text a:not(.btn) { color: var(--brand); }

/* ---------- 21. Reviews ---------- */
.reviews-summary { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.reviews-summary .score { font-size: 2rem; font-weight: 800; color: var(--brand); font-family: var(--font-mono); }
.reviews-summary .count { color: var(--muted); }
.reviews-disclaimer {
  background: rgba(240,88,79,.10); border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: var(--r-media); padding: var(--sp-3) var(--sp-4); color: var(--paper); font-size: var(--fs-sm);
  margin-bottom: var(--sp-5); max-width: 760px; margin-inline: auto;
}
.reviews-disclaimer strong { color: var(--brand); }
.reviews-platform-note { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); max-width: 760px; margin-inline: auto; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-4); }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.review__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.review__author { font-weight: 700; }
.stars { display: inline-flex; gap: 2px; color: var(--brand); font-size: 1rem; letter-spacing: 1px; }
.stars .off { color: var(--line); }
.review__date { color: var(--muted); font-size: var(--fs-sm); }
.review__body { color: var(--paper); font-size: .95rem; }
.review__source { color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); padding-top: var(--sp-2); margin-top: var(--sp-1); }
.review__source a:not(.btn) { color: var(--brand); }

/* review form */
.review-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-6); max-width: 640px; margin-inline: auto; }
.review-form h3 { margin-bottom: var(--sp-4); }
.review-form .intro { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.field { margin-bottom: var(--sp-4); }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: var(--sp-2); }
.field .req { color: var(--brand); }
.field input, .field textarea, .field select {
  width: 100%; padding: var(--sp-3) var(--sp-4); background: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-media); color: var(--paper); font: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.field .hint { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.field .error { color: var(--warn); font-size: var(--fs-sm); margin-top: var(--sp-1); display: none; }
.field.is-invalid .error { display: block; }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--warn); }
.field--check { display: flex; align-items: flex-start; gap: var(--sp-3); }
.field--check input { width: auto; margin-top: 5px; }
.field--check label { margin-bottom: 0; font-weight: 600; font-size: .95rem; }
.rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label { cursor: pointer; font-size: 1.6rem; color: var(--line); padding: 0 2px; margin: 0; }
.rating-input input:checked ~ label,
.rating-input input:focus-visible ~ label { color: var(--brand); }
.rating-input:hover label { color: var(--line); }
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--brand); }
.form-feedback { margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-media); display: none; }
.form-feedback.is-visible { display: block; }
.form-feedback--ok { background: rgba(34,197,94,.12); border: 1px solid var(--live); color: var(--paper); }
.form-feedback--err { background: rgba(240,88,79,.12); border: 1px solid var(--warn); color: var(--paper); }
.form-privacy { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-3); }
.form-privacy a:not(.btn) { color: var(--brand); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 22. Footer ---------- */
.site-footer { background: #0A1120; border-top: 1px solid var(--line); padding-block: var(--sp-7) var(--sp-5); margin-top: var(--space-section); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--sp-6); }
.footer-col h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a:not(.btn) { color: var(--paper); font-size: .95rem; }
.footer-col a:hover { color: var(--brand); }
.footer-brand img { height: 34px; margin-bottom: var(--sp-3); }
.footer-brand p { color: var(--muted); font-size: var(--fs-sm); max-width: 34ch; }
.footer-trust { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.footer-trust img { height: 34px; width: auto; }
.footer-trust .cert-badge { height: 50px; }
.footer-legal { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.footer-legal p { margin: 0 0 var(--sp-2); max-width: 90ch; }
.footer-rg { margin-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.footer-lang-note { margin-top: var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }

/* ---------- 23. Breadcrumbs ---------- */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-4); }
.crumbs li::after { content: "›"; margin-left: var(--sp-2); color: var(--line); }
.crumbs li:last-child::after { content: ""; }
.crumbs a:not(.btn) { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current] { color: var(--paper); }

/* ---------- 24. Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE BREAKPOINTS
   ===================================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__media { order: -1; max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 58px; }
  .site-header__inner .nav,
  .site-header__inner .header__actions .btn--primary { display: none; } /* nav + CTA collapse into burger panel on phones */
  .burger { display: inline-grid; place-items: center; }
  .header__actions { gap: var(--sp-2); min-width: 0; }
  .brand img { height: 22px; }
  .site-header__inner { gap: var(--sp-3); overflow-x: clip; } /* clip residual so the page can never scroll horizontally */
  .lite-toggle { padding: 6px 8px; }
  .lite-toggle > span:not(.lite-toggle__dot) { display: none; } /* icon-only lite toggle on phones */
  .app-block { grid-template-columns: 1fr; }
  .app-block__shots { max-width: 420px; }
  .ticker__track { animation-duration: 48s; } /* slower on mobile */
  .section__head { margin-bottom: var(--sp-5); }
  .hero__cta .btn { flex: 1 1 auto; }
  .hero__overlay { background: linear-gradient(180deg, rgba(14,23,38,.80) 0%, rgba(14,23,38,.60) 100%); }
}

/* ---------- Tablet (≤820px): las tablas pasan a tarjetas para legibilidad; scroll-spy con barra fina ---------- */
@media (max-width: 820px) {
  /* tables → card transform (copy of the ≤640 rule, raised so tablets benefit) */
  .table-wrap { overflow-x: visible; border: 0; }
  .table-wrap caption { padding: 0 0 var(--sp-3); }
  table { min-width: 0; }
  thead { display: none; }
  tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--sp-3); padding: var(--sp-2); }
  td { display: block; border: 0; padding: var(--sp-2) var(--sp-3); }
  td::before { content: attr(data-label); display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
  td:first-child { font-weight: 700; color: var(--brand); }
  /* section-nav: show a slim scrollbar so trailing items read as scrollable */
  .section-nav__list { scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
  .section-nav__list::-webkit-scrollbar { display: block; height: 5px; }
  .section-nav__list::-webkit-scrollbar-track { background: transparent; }
  .section-nav__list::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: var(--r-pill); }
}

@media (max-width: 640px) {
  /* tables → card transform */
  .table-wrap { overflow-x: visible; border: 0; }
  .table-wrap caption { padding: 0 0 var(--sp-3); }
  table { min-width: 0; }
  thead { display: none; }
  tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--sp-3); padding: var(--sp-2); }
  td { display: block; border: 0; padding: var(--sp-2) var(--sp-3); }
  td::before { content: attr(data-label); display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
  td:first-child { font-weight: 700; color: var(--brand); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__trust { gap: var(--sp-2) var(--sp-4); }
  .review-form { padding: var(--sp-5); }
}

/* =====================================================================
   MOTION PREFERENCES
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .ticker__track { animation: none; transform: none; }
  .ticker__dot { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* =====================================================================
   LITE MODE (3G-lite): imágenes ligeras, frozen ticker, drop heavy anim
   Triggered by [data-lite] on <html>
   ===================================================================== */
[data-lite] .ticker__track { animation: none; transform: none; }
[data-lite] .ticker__dot { animation: none; }
[data-lite] img[data-lite-placeholder] {
  background: var(--surface-2);
  /* hide the image source to save bandwidth; show alt + colored block */
}
[data-lite] .lazy-img { content-visibility: auto; }
[data-lite] .ticker__label { background: var(--surface); }
[data-lite] [data-reveal] { opacity: 1; transform: none; }

/* lite toggle control */
.lite-toggle {
  display: inline-flex; align-items: center; gap: var(--sp-2); border: 1px solid var(--line);
  background: transparent; color: var(--muted); padding: 6px 12px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600;
}
.lite-toggle[aria-pressed="true"] { background: var(--surface-2); color: var(--brand); border-color: var(--brand); }
.lite-toggle__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; position: relative; }
.lite-toggle[aria-pressed="true"] .lite-toggle__dot { background: var(--brand); border-color: var(--brand); }

/* print fallback so non-blocking stylesheet is applied once loaded */
@media print { .no-print { display: none !important; } }
