/* ==========================================================================
   ELEFONT · Base
   Reset moderno + tipografía + layout primitives (container, section, grid)
   ========================================================================== */

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

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

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

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: var(--lh-snug); font-weight: var(--fw-bold); text-wrap: balance; }
p { text-wrap: pretty; }

/* El atributo hidden siempre gana (los componentes definen su propio display) */
[hidden] { display: none !important; }

::selection { background: var(--c-orange); color: var(--c-white); }

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

/* Accesibilidad: saltar al contenido */
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  background: var(--c-ink); color: var(--c-white);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  z-index: calc(var(--z-modal) + 1);
}
.skip-link:focus { top: var(--sp-4); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

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

.section { padding-block: var(--section-y); position: relative; }
.section--paper { background: var(--c-paper); }
.section--dark  { background: var(--c-ink-900); color: var(--c-text-invert); }

/* Cabecera estándar de sección */
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.section-head p  { margin-top: var(--sp-5); font-size: var(--fs-lg); color: var(--c-text-muted); max-width: 62ch; }
.section-head--center p { margin-inline: auto; }
.section--dark .section-head p { color: var(--c-text-invert-muted); }

/* Eyebrow: etiqueta superior con la "pisada" naranja */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: ""; width: 10px; height: 9px;
  background: currentColor;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; /* forma de pisada */
}

/* Texto destacado en naranjo dentro de titulares */
.hl { color: var(--c-orange); }

/* ---- Reveal on scroll (lo activa assets/js/modules/reveal.js) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
