/* =========================================================
   BASE
   Reset, tipografía global, layout genérico y utilidades.
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px); /* que el header fijo no tape los títulos */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* sin recuadro gris al tocar en celular */
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { padding: 0; list-style: none; }

/* Sprite de íconos: oculto pero disponible para <use> */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--c-bg-alt); }

.section__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}
.section__lead {
  margin-top: 12px;
  font-size: var(--fs-lg);
  color: var(--c-muted);
}

/* ---------- Tipografía ---------- */
.title {
  font-family: var(--ff-title);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--c-title);
}
.title--sm { font-size: clamp(1.5rem, 3vw, 2rem); }

/* Palabras destacadas en verde dentro de los títulos */
.hl { color: var(--c-green); }

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-green-dark);
}

p + p { margin-top: 14px; }
strong { font-weight: 700; }

/* ---------- Utilidades ---------- */
.text-green { color: var(--c-green-dark); }
.muted { color: var(--c-muted); font-weight: 400; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

/* Foco visible para navegación con teclado */
:focus-visible {
  outline: 3px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Animación de aparición al scrollear ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Sin JS o con "reducir movimiento": todo visible sin animar */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
}
