/* ==========================================================================
   BASE — reset, tipografía global y utilidades de layout.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  color: inherit;
}
p  { margin: 0 0 var(--space-4); }
ul { margin: 0; padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
a  { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--ink); padding: .75rem 1rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-8); }
@media (min-width: 900px) { .section { padding-block: var(--space-9); } }

.section--dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section--white { background: var(--surface); }

.section__head { max-width: 720px; margin-bottom: var(--space-7); }
.section__title { font-size: var(--fs-2xl); }
.section__lead  { font-size: var(--fs-lg); color: var(--text-soft); margin: 0; }
.section--dark .section__lead { color: var(--text-on-dark-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--accent); }

/* ---------- Animación de entrada (ver modules/reveal.js) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* El atributo hidden debe ganarle a cualquier display definido arriba */
[hidden] { display: none !important; }
