/* ============================================================
   BASE.CSS · Reset, tipografía base, utilidades y red de
   seguridad de las animaciones de entrada (.reveal).
   ============================================================ */

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;           /* scroll suave nativo entre anclas */
  scroll-padding-top: var(--header-h); /* compensa el header fijo */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -.02em;
}

/* ---------- Foco visible (accesibilidad) ---------- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Utilidades de layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, .5rem + 2.5vw, 2rem);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
/* Fondos de sección "corridos": en vez de un color sólido (que crea una
   línea dura en la unión entre módulos), el tono vive en el CENTRO de la
   sección y se DESVANECE hacia los bordes a la base común (--bg). Así la
   unión entre dos secciones siempre se encuentra en el mismo tono y no se
   ve ninguna costura. */
.section--deep {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 15%,
    rgba(0, 0, 0, 0.55) 85%,
    transparent 100%);
}
.section--alt {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.028) 15%,
    rgba(255, 255, 255, 0.028) 85%,
    transparent 100%);
}

.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;
}

/* Salto al contenido (teclado) */
.skip-link {
  position: absolute;
  left: 50%; top: -60px;
  transform: translateX(-50%);
  background: var(--c-accent);
  color: var(--c-accent-ink);
  padding: .6rem 1.2rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  z-index: 2000;
  transition: top var(--t-base);
}
.skip-link:focus { top: 12px; }

/* ---------- Cabecera de sección (etiqueta numerada + título) ---------- */
/* Todos los encabezados de sección van centrados. */
.section-head {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 1rem + 2vw, 3.25rem);
  text-align: center;
}
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.eyebrow__num {
  font-variant-numeric: tabular-nums;
  padding: .2rem .55rem;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
}

.section-title { font-size: var(--fs-3xl); }
.section-title .accent { color: var(--c-accent); }

.section-sub {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: var(--fs-lg);
  max-width: 60ch;
}
/* El subtítulo se centra bajo cualquier encabezado de sección */
.section-head .section-sub { margin-inline: auto; }

/* ============================================================
   RED DE SEGURIDAD DE REVEALS
   El contenido DEBE verse aunque el JS falle o esté desactivado.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Sin JS → se ve igual (main.js quita .no-js al cargar) */
.no-js .reveal { opacity: 1; transform: none; }

/* --- Variantes direccionales (dan variedad al scroll) --- */
.reveal--left  { transform: translateX(-56px); }   /* entra desde la izquierda */
.reveal--right { transform: translateX(56px); }     /* entra desde la derecha */
.reveal--scale { transform: scale(.9); }            /* entra escalando */
.reveal--blur  {
  filter: blur(12px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft), filter .8s var(--ease-soft);
}
.reveal--left.is-visible,
.reveal--right.is-visible,
.reveal--scale.is-visible { transform: none; }
.reveal--blur.is-visible { filter: blur(0); }

/* Retrasos escalonados opcionales (cascada) */
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }
.reveal[data-delay="6"] { transition-delay: .48s; }

/* ---------- Marcador visible de PENDIENTES ---------- */
.pendiente {
  display: inline-block;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 10px, rgba(255,255,255,.1) 10px 20px);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .7rem;
  border-radius: var(--r-sm);
}
