/* ============================================================
   Multinacional de Autos — Base
   Reset, variables de marca, tipografía y utilidades
   ============================================================ */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
  /* clip en lugar de hidden: recorta el menú móvil fuera de pantalla
     sin romper los paneles con position: sticky */
  overflow-x: clip;
}

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--texto);
  background-color: var(--blanco);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: none; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid var(--oro-500);
  outline-offset: 3px;
}

::selection {
  background: var(--oro-500);
  color: var(--azul-900);
}

/* ---------- Variables ---------- */
:root {
  /* Marca — tomada del escudo del logo */
  --azul-900: #0B1B3A;
  --azul-800: #0E244C;
  --azul-700: #123163;
  --azul-500: #1E4FA0;
  --azul-300: #4F82D4;

  --oro-800: #6E520F;
  --oro-700: #8C6A16;
  --oro-500: #C9A227;
  --oro-400: #D9B441;
  --oro-300: #E8C86A;
  --oro-100: #F6EBC8;

  --naranja: #C4741C;

  --blanco: #FFFFFF;
  --crema: #FAF7F0;
  --gris-100: #F2F3F5;
  --gris-200: #E4E7EB;
  --gris-400: #9AA3AF;
  --gris-600: #5C6673;
  --negro: #0E1116;

  --texto: #1B2230;
  --texto-suave: #5C6673;
  --texto-claro: rgba(255, 255, 255, 0.78);

  --exito: #1E9E5A;
  --alerta: #D7263D;

  /* Degradados */
  --grad-oro: linear-gradient(135deg, var(--oro-700) 0%, var(--oro-400) 45%, var(--oro-300) 100%);
  --grad-oro-suave: linear-gradient(135deg, var(--oro-500) 0%, var(--oro-300) 100%);
  --grad-azul: linear-gradient(160deg, var(--azul-900) 0%, var(--azul-700) 100%);
  --grad-escudo: linear-gradient(120deg, var(--naranja) 0%, var(--azul-500) 100%);

  /* Tipografía */
  --ff-titulo: "Playfair Display", Georgia, "Times New Roman", serif;
  --ff-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-h1: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.9rem);
  --fs-h3: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  --fs-h4: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.78rem;

  /* Espaciado y formas */
  --contenedor: 1240px;
  --gap: clamp(1rem, 0.6rem + 1.4vw, 2rem);
  --seccion-y: clamp(3.5rem, 2rem + 5vw, 7rem);
  --radio-sm: 8px;
  --radio: 14px;
  --radio-lg: 22px;
  --radio-full: 999px;

  /* Sombras */
  --sombra-sm: 0 2px 8px rgba(11, 27, 58, 0.08);
  --sombra: 0 10px 30px rgba(11, 27, 58, 0.10);
  --sombra-lg: 0 22px 55px rgba(11, 27, 58, 0.18);
  --sombra-oro: 0 12px 30px rgba(201, 162, 39, 0.32);

  --trans: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 146px;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-titulo);
  font-weight: 700;
  line-height: 1.15;
  color: var(--azul-900);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--ff-body); font-weight: 700; }

p { color: var(--texto-suave); }

strong { color: var(--texto); font-weight: 600; }

/* ---------- Layout ---------- */
.contenedor {
  width: min(100% - 2.5rem, var(--contenedor));
  margin-inline: auto;
}

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

.seccion--crema { background: var(--crema); }
.seccion--gris { background: var(--gris-100); }

.seccion--oscura {
  background: var(--grad-azul);
  color: var(--texto-claro);
  position: relative;
  overflow: hidden;
}

/* .cta-final trae su propio fondo (imagen + degradado), así que no puede
   llevar la clase .seccion--oscura sin perderlo. Comparte, eso sí, el mismo
   fondo azul: hereda aquí los colores de texto en vez de duplicarlos. */
.seccion--oscura h1,
.seccion--oscura h2,
.seccion--oscura h3,
.seccion--oscura h4,
.cta-final h1,
.cta-final h2,
.cta-final h3,
.cta-final h4 { color: var(--blanco); }

.seccion--oscura p,
.cta-final p { color: var(--texto-claro); }

/* Encabezado de sección */
.encabezado {
  max-width: 680px;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.encabezado--centrado {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oro-700);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--grad-oro);
  border-radius: 2px;
}

.encabezado--centrado .eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--grad-oro);
  border-radius: 2px;
}

.seccion--oscura .eyebrow,
.cta-final .eyebrow { color: var(--oro-300); }

.encabezado p {
  margin-top: 0.9rem;
  font-size: 1.05rem;
}

/* Grids reutilizables */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ---------- Utilidades ---------- */
.texto-oro {
  background: var(--grad-oro-suave);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.centrado { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }

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

.saltar-a-contenido {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  background: var(--oro-500);
  color: var(--azul-900);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radio-sm);
  font-weight: 600;
  transition: top var(--trans);
}

.saltar-a-contenido:focus { top: 1rem; }

/* En móvil el logo baja a 92px, así que el header ocupa menos */
@media (max-width: 640px) {
  :root {
    --header-h: 126px;
    scroll-padding-top: 132px;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--gris-100); }
::-webkit-scrollbar-thumb {
  background: var(--azul-700);
  border-radius: var(--radio-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--oro-700); }

/* Preferencia de movimiento reducido */
@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;
  }
}
