/* ============================================================
   Fix-U · base.css
   Reset, normalización y estilos tipográficos de base.
   ============================================================ */

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Listas sin viñetas por defecto (se activan donde haga falta) */
ul,
ol {
  list-style: none;
}

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

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

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

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

/* ---- Tipografía ---- */
h1,
h2,
h3 {
  line-height: 1.12;
  font-weight: var(--fw-extra);
  letter-spacing: -0.02em;
}

/* ----------------------------------------------------------
   CONTROL DE VIUDAS / HUÉRFANAS
   Evita que la última línea de un título o párrafo quede con
   una sola palabra ("viuda"), en cualquier resolución.
   - balance: reparte las líneas de los titulares de forma pareja
   - pretty:  optimiza los saltos del texto largo evitando viudas
   Como refuerzo, main.js une las dos últimas palabras con un
   espacio duro (&nbsp;) en navegadores sin soporte de text-wrap.
   ---------------------------------------------------------- */
h1,
h2,
h3,
h4,
.balance {
  text-wrap: balance;
}

p,
.pretty {
  text-wrap: pretty;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

/* Texto resaltado en degradado de marca (para títulos de dos líneas) */
.text-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Utilidades de accesibilidad ---- */
.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;
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
