/* ==========================================================================
   PETROCERT — base.css
   Reset moderno, tipografía global, utilidades transversales.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  font-family: var(--f-texto);
  font-size: var(--fs-body);
  line-height: var(--lh-texto);
  color: var(--grafito);
  background: var(--hueso);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-abierta { overflow: hidden; }

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

/* ---- Titulares --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--tinta);
  line-height: var(--lh-titulo);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); font-weight: 700; font-stretch: 100%; letter-spacing: 0; }

p { text-wrap: pretty; }

strong { font-weight: 600; color: var(--tinta); }

/* ---- Utilidades tipográficas ------------------------------------------- */

.dato {
  font-family: var(--f-dato);
  font-size: var(--fs-dato);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--f-dato);
  font-size: 1rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--verde-700);
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: var(--e-4);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--ambar);
  flex: none;
}

.eyebrow--claro { color: var(--verde-300); }

.entradilla {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--humo);
  max-width: 62ch;
}

.texto-verde { color: var(--verde-700); }
.texto-ambar { color: var(--ambar); }

/* ---- Accesibilidad ------------------------------------------------------ */

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 2px;
}

.salto-contenido {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--verde-700);
  color: var(--blanco);
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top var(--t-rapido);
}

.salto-contenido:focus { top: 0; }

.solo-lectores {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Animación de entrada ---------------------------------------------- */

.revelar {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-lento), transform var(--t-lento);
}

.revelar.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .revelar { opacity: 1; transform: none; }
}
