/* ==========================================================================
   ZIGGY · TOKENS DE MARCA
   Única fuente de verdad para colores, tipografías, radios y espaciado.
   Regla: ningún otro archivo usa hex sueltos; todo sale de estas variables.
   ========================================================================== */

/* ---------- Fuentes (servidas desde /fonts, origen: Fontsource) ---------- */

/* Titulares: Archivo variable con eje de ancho (wdth 62–125, wght 100–900) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
}

/* Cuerpo, menús y botones: Manrope 500 y 700 */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2");
}

/* Cifras, etiquetas y datos: Space Grotesk 500 y 700 */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}

:root {
  /* ---------- Colores de marca (los únicos tres) ---------- */
  --verde: #173A28; /* fondo oscuro, texto principal sobre crema */
  --lima:  #C8FF5E; /* acento: botones, resaltados, datos clave */
  --crema: #F6F3EA; /* fondo claro principal */

  /* Canales RGB para construir opacidades sin introducir colores nuevos */
  --verde-rgb: 23 58 40;
  --lima-rgb: 200 255 94;
  --crema-rgb: 246 243 234;

  /* ---------- Opacidades derivadas (grises y bordes) ---------- */
  --verde-08: rgb(var(--verde-rgb) / 0.08);
  --verde-12: rgb(var(--verde-rgb) / 0.12);
  --verde-18: rgb(var(--verde-rgb) / 0.18);
  --verde-40: rgb(var(--verde-rgb) / 0.40);
  --verde-72: rgb(var(--verde-rgb) / 0.72); /* texto secundario sobre crema: 5.0:1 (AA) */
  --crema-12: rgb(var(--crema-rgb) / 0.12);
  --crema-18: rgb(var(--crema-rgb) / 0.18);
  --crema-40: rgb(var(--crema-rgb) / 0.40);
  --crema-78: rgb(var(--crema-rgb) / 0.78); /* texto secundario sobre verde: AA */
  --lima-18:  rgb(var(--lima-rgb) / 0.18);

  /* ---------- Roles semánticos ---------- */
  --fondo: var(--crema);
  --fondo-oscuro: var(--verde);
  --texto: var(--verde);
  --texto-suave: var(--verde-72);
  --texto-invertido: var(--crema);
  --acento: var(--lima);
  --borde: var(--verde-18);
  --borde-fuerte: var(--verde);

  /* ---------- Tipografía ---------- */
  --fuente-titular: "Archivo", sans-serif;
  --fuente-cuerpo: "Manrope", sans-serif;
  --fuente-datos: "Space Grotesk", sans-serif;

  --titular-ancho: 62%;     /* font-stretch condensado */
  --titular-peso: 900;
  --titular-interlineado: 1.04;

  --peso-regular: 500;
  --peso-fuerte: 700;

  /* Escala fluida mobile first */
  --texto-xs: 0.8125rem;                                 /* 13px */
  --texto-sm: 0.9375rem;                                 /* 15px */
  --texto-base: 1.0625rem;                               /* 17px */
  --texto-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --titular-sm: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --titular-md: clamp(2.75rem, 2rem + 3.5vw, 4.5rem);
  --titular-xl: clamp(3.5rem, 2.25rem + 6.5vw, 8rem);

  --tracking-pildora: 0.08em;

  /* ---------- Forma ---------- */
  --radio-tarjeta: 14px;
  --radio-boton: 12px;
  --radio-recuadro: 14px; /* recuadro lima de la palabra clave del titular */
  --radio-pildora: 999px;
  --borde-ancho: 1.5px;

  /* ---------- Espaciado ---------- */
  --esp-1: 0.25rem;
  --esp-2: 0.5rem;
  --esp-3: 0.75rem;
  --esp-4: 1rem;
  --esp-5: 1.5rem;
  --esp-6: 2rem;
  --esp-7: 3rem;
  --esp-8: 4rem;
  --esp-9: 6rem;

  --ancho-max: 72rem;
  --gutter: 1rem;
  --tactil-min: 44px; /* área táctil mínima */

  /* ---------- Movimiento ---------- */
  --transicion: 160ms ease;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}
