/* ==========================================================================
   Base: reset, tipografía y utilidades
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--superficie-pagina);
  color: var(--texto);
  font-family: var(--fuente-texto);
  font-size: var(--t-cuerpo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* overflow-x:clip conserva position:sticky donde está disponible */
@supports (overflow: clip) {
  body { overflow-x: clip; }
}

h1, h2, h3, h4 {
  margin: 0;
  color: inherit;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 700; letter-spacing: -0.015em; }
h4 { font-weight: 700; letter-spacing: -0.01em; }

::selection { background: var(--petroleo-suave); color: var(--grafito); }

p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

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

/* Sobre superficies de marca intensas el foco pasa a amarillo para destacar */
.sobre-oscuro :focus-visible,
.hero :focus-visible,
.tipo--petroleo :focus-visible,
.cierre :focus-visible,
.contacto-v__panel :focus-visible,
.menu-movil :focus-visible,
.marquesina :focus-visible,
.ubicacion :focus-visible,
.footer :focus-visible,
.tour__panel :focus-visible { outline-color: var(--foco-sobre-oscuro); }

/* Los paneles blancos dentro de bloques de marca recuperan el foco petróleo */
.contacto-v__panel .canal:focus-visible,
.ubicacion .cercanos :focus-visible { outline-color: var(--foco-sobre-oscuro); }

/* Utilidades ------------------------------------------------------------- */

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

.seccion { padding-block: var(--seccion); }

.saltar {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radio-s);
  background: var(--petroleo-oscuro);
  color: var(--texto-invertido);
  transform: translateY(-200%);
}

.saltar:focus { transform: none; }

.antetitulo {
  font-family: var(--fuente-titulo);
  font-size: var(--t-chico);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texto-marca);
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Iconografía del manual: lineal, trazo 2.4 y esquinas redondeadas.
   El viewBox es de 24, así que a 24px el trazo mide exactamente 2.4px. */
.icono {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A 32px se compensa el grosor para mantener los 2.4px reales (2.4 × 24/32) */
.icono--grande {
  width: 32px;
  height: 32px;
  stroke-width: 1.8;
}

.icono--relleno { fill: currentColor; stroke: none; }

/* Animación de entrada: solo opacity y transform (no provocan reflow).
   Sin JS, la clase .js no existe y todo se ve desde el inicio. */
.js .aparece {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--retraso, 0s);
}

.js .aparece.visible {
  opacity: 1;
  transform: none;
}

.js .aparece--izq { transform: translateX(-32px); }
.js .aparece--der { transform: translateX(32px); }
.js .aparece--zoom { transform: scale(0.94); }

/* En pantallas angostas la entrada lateral empujaría el ancho de la página */
@media (max-width: 1199px) {
  .js .aparece--izq,
  .js .aparece--der { transform: translateY(20px); }
}

@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;
    transition-delay: 0s !important;
  }

  .js .aparece,
  .js .aparece--izq,
  .js .aparece--der,
  .js .aparece--zoom { opacity: 1; transform: none; }
}
