/* ============================================================
   base.css — El Recreo FM (Rediseño)
   Reset moderno + tipografía + utilidades.
   Depende de tokens.css (debe cargarse ANTES).
   ============================================================ */

/* ── RESET ──────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;          /* fallback navegadores viejos */
  min-height: 100dvh;         /* alto dinámico real en móvil */
  /* Bloque contenedor de las .page (absolute): así el overflow-x
     hidden de abajo SÍ recorta las páginas estacionadas fuera de
     pantalla (translateX(100%)). Sin esto, ese desborde invisible
     hace que el navegador expanda el viewport (zoom-out) ahora que
     el zoom del usuario está permitido. */
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Respeta notch/gestos en los 4 bordes */
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

img, picture, svg, canvas, video {
  display: block;
  max-width: 100%;
}

img, canvas { height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

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

/* ── TIPOGRAFÍA ─────────────────────────────────────────────*/
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 700;
}

/* Título de sección: display + neón (texto HTML real, NUNCA imagen) */
.titulo-seccion {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-xl);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: var(--text-glow);
  line-height: var(--lh-tight);
}

/* Variante con degradado neón (cian → lima como en los mockups) */
.titulo-degradado {
  background: linear-gradient(90deg, var(--neon-cian), var(--neon-lima));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px var(--cian-soft));
}

/* ── LAYOUT / CONTENEDORES ──────────────────────────────────*/
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

/* Deja espacio para la barra inferior fija + safe area */
.has-nav {
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + var(--sp-4));
}

/* ── UTILIDADES NEÓN ────────────────────────────────────────*/
.glow-1 { box-shadow: var(--glow-1); }
.glow-2 { box-shadow: var(--glow-2); }
.glow-3 { box-shadow: var(--glow-3); }

/* Borde neón reutilizable (cards, chips, botones) */
.neon-border {
  border: 1.5px solid var(--neon);
  box-shadow: var(--glow-1), inset 0 0 8px var(--neon-soft);
}

/* Pastilla / chip */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.pill:active { transform: scale(0.96); }

.pill.is-active {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: var(--glow-1);
}

/* Tarjeta base */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* ── ACCESIBILIDAD ──────────────────────────────────────────*/
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── HELPERS ────────────────────────────────────────────────*/
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.mt-4 { margin-top: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }

/* Animaciones desactivadas si el usuario lo pide */
@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;
  }
}
