/* ==========================================================================
   WowCita · Base (Módulo 13A)
   Reglas generales. MOBILE-FIRST: todo se escribe primero para el celular;
   las pantallas grandes se ajustan con @media (min-width: ...).
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box; /* el ancho incluye relleno y borde: más fácil de calcular */
}

html {
  -webkit-text-size-adjust: 100%; /* el iPhone no agranda el texto solo al girar */
}

body {
  margin: 0;
  font-family: var(--letra-texto);
  font-size: var(--texto-m);
  line-height: var(--interlineado);
  color: var(--ciruela);
  background: var(--porcelana);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--letra-titulos);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--espacio-2);
  text-wrap: balance; /* reparte las palabras del título en líneas parejas */
}

h1 { font-size: var(--texto-xl); }
h2 { font-size: var(--texto-l); }
h3 { font-size: var(--texto-m); }

p { margin: 0 0 var(--espacio-4); }

a { color: var(--frambuesa); text-underline-offset: 0.18em; }
a:hover { color: var(--frambuesa-oscura); }

img { max-width: 100%; }

/* Contorno visible al navegar con teclado (accesibilidad). Solo con teclado, no al tocar. */
:focus-visible {
  outline: 3px solid var(--frambuesa);
  outline-offset: 2px;
}

/* El atributo hidden SIEMPRE oculta, aunque una clase ponga display: flex o block. */
[hidden] { display: none !important; }

/* Oculto a la vista pero leído por lectores de pantalla */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.texto-suave { color: var(--lila-humo); }

/* Contenedor de cada página: angosto en el celular, centrado y con límite en pantallas grandes */
.contenedor {
  width: 100%;
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: var(--espacio-5) var(--espacio-4) var(--espacio-10);
}

.contenedor--angosto { max-width: 640px; }

/* Quien pidió menos animación en su teléfono o computador no la ve */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 720px) {
  h1 { font-size: var(--texto-xxl); }
  .contenedor { padding: var(--espacio-8) var(--espacio-6) var(--espacio-10); }
}
