/* =========================================================================
   BASE — variables de diseño, reset y tipografía
   Cambiar los colores aquí afecta a todo el sitio.
   ========================================================================= */

:root {
  /* ---- Color ---- */
  --blue: #4267a9;
  --blue-dark: #294a78;
  --blue-darker: #1f3a5f;
  --blue-soft: #eaf1f8;
  --white: #ffffff;
  --gray-050: #f5f7f9;
  --gray-100: #eceff3;
  --gray-200: #dfe4ea;
  --gray-300: #c8d0da;
  --text: #1c2733;
  --text-muted: #64748b;

  /* Roles semánticos (usar estos en los componentes) */
  --bg: var(--white);
  --bg-alt: var(--gray-050);
  --bg-accent: var(--blue-soft);
  --surface: var(--white);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --brand: var(--blue);
  --brand-strong: var(--blue-dark);
  --on-brand: var(--white);

  /* ---- Tipografía ---- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --fs-eyebrow: 0.78rem;
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);
  --fs-h2: clamp(1.625rem, 1.36rem + 1.5vw, 2.625rem);
  --fs-h1: clamp(1.75rem, 1.2rem + 2.9vw, 3.875rem);

  /* ---- Espaciado y medidas ---- */
  --container: 1180px;
  --gutter: 18px;
  --section-y: clamp(52px, 8vw, 116px);
  /* Altura del navbar y de la barra CTA inferior: el hero se calcula con ellas */
  --header-h: 54px;
  --mobile-cta-h: 68px;

  /* ---- Formas ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* ---- Sombra (uso moderado) ---- */
  --shadow-sm: 0 1px 2px rgba(28, 39, 51, 0.06);
  --shadow-md: 0 12px 32px -18px rgba(28, 39, 51, 0.35);

  /* ---- Movimiento ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.18s var(--ease);
  --t-base: 0.28s var(--ease);
}

@media (min-width: 600px) {
  :root {
    --gutter: 28px;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --header-h: 68px;
  }
}

/* -------------------------------------------------------------------------
   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) + 16px);
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  /* clip (no hidden) para no romper position: sticky del navbar */
  overflow-x: clip;
}

/* Sin retardo de 300 ms ni destello gris al tocar en móvil */
a,
button,
[role='button'],
label,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

img {
  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;
}

/* -------------------------------------------------------------------------
   Tipografía
   ------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

/* -------------------------------------------------------------------------
   Utilidades de layout
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section--alt {
  background-color: var(--bg-alt);
}

.section-head {
  max-width: 40rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background-color: currentColor;
  opacity: 0.6;
}

.eyebrow--center::before {
  display: none;
}

.lead {
  margin-top: 20px;
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: 56ch;
}

.section-head--center .lead {
  margin-inline: auto;
}

/* Accesibilidad ---------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -120%);
  padding: 12px 20px;
  background-color: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: transform var(--t-fast);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Sprite de iconos (oculto) */
.icon-sprite {
  display: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--solid {
  fill: currentColor;
  stroke: none;
}

/* -------------------------------------------------------------------------
   Animación de entrada (muy sutil)
   ------------------------------------------------------------------------- */
/* Solo se ocultan si hay JS: sin JS el contenido se ve igual */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.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;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
