/* =========================================================
   Farmacia El Ángel · base.css
   Tokens (colores, tipografía, espacios, radios, sombras), fuentes, reset,
   tipografía y utilidades. Para cambiar la marca edita SOLO :root.
   ========================================================= */
/* Fuentes locales (sin Google Fonts: menos conexiones, carga más rápida) */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/figtree-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/nunito-900.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Color · marca */
  --c-navy-900: #163647;   /* fondos oscuros (footer, secciones marinas) */
  --c-navy-700: #224c63;   /* color de marca: títulos, botón primario */
  --c-navy-500: #3a6a84;
  --c-aqua-600: #1f6f84;   /* aqua oscuro: texto/acento sobre claro (AA 5.5:1) */
  --c-aqua-400: #7ccede;   /* aqua de marca: decoración y texto sobre marino */
  --c-aqua-300: #a6e0ec;
  --c-aqua-200: #c9ecf4;   /* fondo de color de marca (heros, secciones destacadas) */
  --c-aqua-100: #e3f5f9;   /* tinte "aureola" para superficies */
  --c-aqua-50:  #f1fafc;
  --c-halo:     #e2a93b;   /* oro: avisos y notas */
  --c-halo-100: #fff6e3;
  --c-halo-ink: #8a5a00;

  /* Color · neutros */
  --c-paper:    #fbfaf7;   /* fondo general cálido */
  --c-white:    #ffffff;
  --c-ink:      #1b2b34;   /* texto principal */
  --c-ink-soft: #4a5d68;   /* texto secundario (AA 6.5:1 sobre papel) */
  --c-line:     #dde7eb;
  --c-on-dark:  #cfe6ee;   /* texto secundario sobre marino */

  /* Color · estados */
  --c-wa:       #1d7a46;   /* WhatsApp (blanco encima = 5.3:1) */
  --c-wa-hover: #17653a;
  --c-open:     #1d7a46;
  --c-closed:   #b4462e;

  /* Tipografía: Nunito (títulos, sans redondeada como el logo) + Figtree (texto, alta legibilidad) */
  --f-display: "Nunito", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs:  0.875rem;                                   /* 14px */
  --fs-sm:  0.9375rem;                                  /* 15px */
  --fs-base: 1.0625rem;                                 /* 17px: legible para adultos mayores */
  --fs-lg:  clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --fs-h4:  clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h3:  clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-h2:  clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem);
  --fs-h1:  clamp(2.2rem, 1.6rem + 2.8vw, 3.75rem);
  --lh-tight: 1.12;
  --lh-body: 1.6;

  /* Espaciado (escala 4px) */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-7: 3rem;    --sp-8: 4rem;
  --sp-section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --container: 72rem;
  --measure: 66ch;

  /* Forma */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;
  --r-arch: 999px 999px var(--r-lg) var(--r-lg);  /* marco en arco (motivo de marca) */

  /* Sombras teñidas de marino */
  --sh-1: 0 1px 2px rgb(22 54 71 / .06), 0 2px 8px rgb(22 54 71 / .05);
  --sh-2: 0 4px 12px rgb(22 54 71 / .08), 0 12px 32px rgb(22 54 71 / .08);
  --sh-3: 0 10px 24px rgb(22 54 71 / .12), 0 24px 60px rgb(22 54 71 / .14);

  /* Movimiento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* "expo out": entradas suaves */
  --t-fast: 160ms;
  --t-med: 320ms;

  --header-h: 72px;
  --mobile-bar-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-paper);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
address { font-style: normal; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--c-aqua-600);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :where(a, button):focus-visible { outline-color: var(--c-aqua-400); }
::selection { background: var(--c-aqua-400); color: var(--c-navy-900); }

/* ---------- Tipografía ---------- */
h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--c-navy-700);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-family: var(--f-display); font-size: var(--fs-h4); font-weight: 800; line-height: 1.25; color: var(--c-navy-700); }
p { text-wrap: pretty; }
strong { font-weight: 700; }
.lead { font-size: var(--fs-lg); color: var(--c-ink-soft); max-width: 60ch; }
.muted { color: var(--c-ink-soft); }
.small { font-size: var(--fs-sm); }

/* Eyebrow: rótulo pequeño con la aureola de la marca */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; justify-self: start; align-self: flex-start;
  padding: .35rem .85rem .35rem .7rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-aqua-600); background: var(--c-white); box-shadow: inset 0 0 0 1px var(--c-aqua-300);
}
.eyebrow::before {
  content: ""; width: 1.4em; height: .6em; flex: none;
  border: 2px solid currentColor; border-radius: 50%;
}
.on-dark .eyebrow { color: var(--c-aqua-400); background: rgb(124 206 222 / .12); box-shadow: inset 0 0 0 1px rgb(124 206 222 / .35); }
.on-dark .lead, .on-dark .muted { color: var(--c-on-dark); }

/* ---------- Utilidades ---------- */
.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;
}
.text-center { text-align: center; }

