/* ===== Tokens (medidos en las referencias) ===== */
:root {
  --bg: #0B0B13;
  --bg-hero: #141414;
  --surface: #232325;
  --surface-2: #2C2C2E;
  --chip: rgb(58 58 62 / .78);
  --primary: #6D57E8;
  --primary-hi: #7D69F2;
  --primary-soft: #C8C1F7;
  --accent: #33BAE7;
  --blue: #2E7CF6;
  --danger: #E5243B;
  --online: #2BD94A;
  --gold: #F2C230;
  --text: #F4F4F6;
  --muted: #9C9CA8;
  --dim: #6E6E7A;
  --line: rgb(255 255 255 / .09);

  --font: "Outfit", system-ui, sans-serif;
  /* Escala tipográfica 1.25 (tercera mayor) */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  --fs-2xl: clamp(1.75rem, 1.2rem + 2.4vw, 3.4rem);

  --pad: clamp(16px, 2.4vw, 40px);
  --wrap: 1840px;
  --header-h: 80px;
  --genres-h: 92px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Curvas: ease-out fuerte para respuestas de UI; la del sheet de iOS para paneles */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  /* Resorte (bounce ≈ 0.15) expresado con linear() para transiciones CSS */
  --spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
  --t-press: 160ms;
  --t-ui: 220ms;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip; /* clip no crea contenedor de scroll: la cabecera sticky sigue funcionando */
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--primary); padding: 10px 16px; border-radius: var(--r-sm);
  transition: top var(--t-ui) var(--ease-out);
}
.skip-link:focus { top: 12px; }

.ico {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.ico--accent { color: var(--primary); }
.ico--accent-blue { color: var(--blue); }

.container { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
/* páginas cortas: el pie se pega al borde inferior en vez de flotar a media pantalla */
body { display: flex; flex-direction: column; min-height: 100svh; }
#main { flex: 1 0 auto; }

/* ===== Botones (respuesta táctil: se hunden al presionar) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .7em 1.5em; border-radius: var(--r-md);
  font-weight: 500; line-height: 1; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) var(--ease-out), box-shadow var(--t-ui) var(--ease-out);
  touch-action: manipulation; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--outline { border: 1px solid rgb(255 255 255 / .5); color: var(--text); }
.btn--pill { border-radius: var(--r-pill); }
.btn--sm { padding: .5em 1.1em; font-size: var(--fs-sm); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--primary-hi); box-shadow: 0 6px 22px -6px rgb(109 87 232 / .7); }
  .btn--ghost:hover { background: #38383b; }
}

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  position: relative; transition: transform var(--t-press) var(--ease-out);
}
.icon-btn:active { transform: scale(.92); }

.preload * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
}

[hidden] { display: none !important; }

/* iOS hace zoom (y no lo deshace) al tocar un campo con letra de menos de 16px: en pantallas táctiles nunca menos */
@media (pointer: coarse) {
  input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea { font-size: max(16px, 1em) !important; }
}
