/* base.css — reset, tipografía, tokens de color, utilidades */
:root {
  --color-fondo-oscuro: #121D2E;
  --color-superficie: #1B2A40;
  --color-acento: #D98A3C;
  --color-acento-oscuro: #B8701F;
  --color-fondo-claro: #F6F4EE;
  --color-texto-claro: #161A1F;
  --color-texto-oscuro: #ECF0F6;
  --color-advertencia: #A8471F;
  --color-exito: #2E7D5B;
  --fuente-titulos: "Fraunces", Georgia, serif;
  --fuente-texto: "Inter", -apple-system, Segoe UI, Roboto, sans-serif;
  --radio: 10px;
  --espacio-s: 0.5rem;
  --espacio-m: 1rem;
  --espacio-l: 2rem;
  --espacio-xl: 3.5rem;
  --ancho-max: 1120px;
}

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

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-texto);
  font-weight: 400;
  color: var(--color-texto-claro);
  background-color: var(--color-fondo-claro);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 500; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a { color: var(--color-acento-oscuro); text-decoration: underline; }
a:hover { color: var(--color-advertencia); }

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

ul, ol { padding-left: 1.3rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
th, td {
  border: 1px solid #d7d2c4;
  padding: 0.55rem 0.7rem;
  text-align: left;
  font-size: 0.95rem;
}
th { background: #ece7d8; }

/* Foco visible en todo elemento interactivo */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-acento-oscuro);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-acento);
  color: #161A1F;
  padding: 0.6rem 1rem;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

/* Oculta visualmente, deja accesible a lectores */
.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;
}

/* Reduce movimiento */
@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;
  }
}

/* Oculta main hasta que el age gate decida (controlado por edadgate.js) */
html.gate-pendiente main,
html.gate-pendiente .pie-responsable-inline {
  visibility: hidden;
}
html.gate-rechazado main {
  display: none;
}
