/* Design tokens, reset and typography */

/* Metric-matched local fallback for Poppins to minimise layout shift while the web font loads */
@font-face {
  font-family: "Poppins Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  ascent-override: 92.83%;
  descent-override: 30.94%;
  line-gap-override: 8.84%;
  size-adjust: 113.11%;
}

:root {
  /* Brand palette (azul rey calibrated from the official blue logo: #0F3877) */
  --azul-rey: #0f3877;
  --azul-rey-oscuro: #0a2754;
  --azul-medio: #1e56b8;
  --azul-cielo: #4fc3e0;
  --cielo-claro: #e8f7fc;
  --blanco: #ffffff;
  --texto: #1a2238;
  --texto-suave: #4a5470;
  --borde: #d6e4f0;
  --whatsapp: #25d366;
  --whatsapp-oscuro: #0e7a41;
  --error: #b42318;

  /* Typography */
  --font-titulos: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-texto: "Poppins", "Poppins Fallback", "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 3.2vw, 4rem);

  /* Spacing, radius, shadows */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgb(15 56 119 / 0.08);
  --shadow: 0 10px 30px rgb(15 56 119 / 0.12);
  --shadow-lg: 0 20px 50px rgb(15 56 119 / 0.18);

  --header-h: 72px;
  --container: 1160px;
  --gutter: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  min-height: 100vh;
  font-family: var(--font-texto);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--texto);
  background-color: var(--blanco);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  height: auto;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-titulos);
  font-weight: 600;
  line-height: 1.15;
  color: var(--azul-rey);
  text-wrap: balance;
  letter-spacing: 0.01em;
}

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

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

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

p {
  text-wrap: pretty;
}

a {
  color: var(--azul-medio);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--azul-rey);
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--azul-cielo);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--azul-cielo);
  color: var(--azul-rey-oscuro);
}

.visually-hidden {
  position: absolute !important;
  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: var(--space-2);
  left: var(--space-2);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--azul-rey);
  color: var(--blanco);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--blanco);
}

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