/* ==========================================================================
   BASE — Design tokens, reset, tipografía y utilidades globales
   Proyecto: SOLEM · Transporte y Logística
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Marca */
  --azul-950: #0b1e4a;
  --azul-900: #12256a;
  --azul-800: #1e3a8a;
  --azul-700: #2551b8;
  --amarillo: #fbbf24;
  --amarillo-hover: #f59e0b;

  /* Neutros */
  --gris-100: #f4f6fa;
  --gris-300: #e2e6ee;
  --gris-500: #8791a3;
  --gris-700: #4a5568;
  --texto: #1a2540;
  --blanco: #ffffff;

  /* Tipografía */
  --font-base: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;

  /* Espaciado y forma */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 24px rgba(11, 30, 74, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --container: 1180px;
  --gutter: 24px;
  --section-y: 72px;

  /* Capas */
  --z-header: 100;
  --z-float: 90;
}

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

html {
  scroll-behavior: smooth;
  /* Compensa el header sticky al navegar con anclas (#servicios, #contacto...) */
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  color: var(--texto);
  line-height: 1.5;
  background: var(--blanco);
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   3. Tipografía
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  line-height: 1.25;
  text-wrap: balance;
}

.eyebrow {
  color: var(--amarillo-hover);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. Utilidades
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Texto visible sólo para lectores de pantalla y motores de búsqueda */
.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;
}

/* Enlace de salto — accesibilidad (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 999;
  background: var(--amarillo);
  color: var(--azul-950);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Foco visible consistente en toda la navegación por teclado */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 2px;
}

/* Helper de iconos SVG inline */
.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   5. Preferencias del usuario
   -------------------------------------------------------------------------- */
@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;
  }
}

/* --------------------------------------------------------------------------
   6. Impresión
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .whatsapp-float,
  .hero-actions {
    display: none !important;
  }

  body {
    color: #000;
  }
}
