/* Base del tema: los tokens del UI Kit de Pegaso (Figma SKaq1iwheWkFXScyN41ahl, «Fundamentos» 8:26)
   y lo que vale para todas las pantallas. Lo de cada sección va en su propia hoja. */

/* ---------- Tokens ---------- */
:root {
  /* Azules (700 es el azul de marca) */
  --azul-50: #eaf1f9;
  --azul-100: #d8e5f3;
  --azul-200: #b9cfe9;
  --azul-300: #8fb0da;
  --azul-400: #6590c7;
  --azul-500: #4472ac;
  --azul-600: #335c8f;
  --azul-700: #284a73;
  --azul-800: #1e3a5d;
  --azul-900: #152b46;
  --azul-950: #0c1a2d;

  /* Superficies y acento */
  --fondo-pagina: #f3f7fc;
  --superficie: #ffffff;
  --oferta: #009c82;
  --celeste: #74c7ff;
  --celeste-suave: #ddf1ff;
  /* Aviso de advertencia (464:23058): fondo y texto */
  --aviso-fondo: #fff1cc;
  --aviso-texto: #7a5200;
  --exito: #1fa971;

  /* Texto y bordes */
  --texto: #0c1a2d;
  --texto-secundario: #5b6c84;
  --texto-terciario: #8c9aae;
  --texto-sobre-oscuro: #ffffff;
  --borde: #dfe7f1;
  --borde-fuerte: #c5d3e4;

  /* Tipografía */
  --fuente: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radios: 999 · 28 · 20 · 14 */
  --radio-pildora: 999px;
  --radio-l: 28px;
  --radio-m: 20px;
  --radio-s: 14px;

  /* Sombras: Soft · Float */
  --sombra-suave: 0 6px 20px rgba(12, 26, 45, 0.06);
  --sombra-flotante: 0 14px 36px rgba(12, 26, 45, 0.12);

  /* Medidas de página */
  --ancho-max: 1280px;
  --margen-lateral: clamp(16px, 4vw, 80px);
}

/* ---------- Tipografía ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fuentes/plus-jakarta-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Estilos de texto del kit. En Figma el espaciado entre letras está en %: -3 → -0.03em. Los títulos
   grandes se achican en pantallas angostas sin pasar del tamaño del kit. */
.t-display-xl { font-size: clamp(40px, 7vw, 68px); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; }
.t-display-l  { font-size: clamp(34px, 5.5vw, 52px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.t-display-m  { font-size: clamp(28px, 4.5vw, 38px); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
.t-h1         { font-size: clamp(30px, 4.5vw, 40px); font-weight: 600; line-height: 1.1;  letter-spacing: -0.02em; }
.t-h2         { font-size: clamp(24px, 3.5vw, 28px); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.t-h3         { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.t-cuerpo-l   { font-size: 17px; font-weight: 400; line-height: 1.55; }
.t-cuerpo-m   { font-size: 15px; font-weight: 400; line-height: 1.5; }
.t-cuerpo-s   { font-size: 13px; font-weight: 400; line-height: 1.45; }
.t-etiqueta-l { font-size: 15px; font-weight: 600; line-height: 1.2; }
.t-etiqueta-m { font-size: 13px; font-weight: 600; line-height: 1.2; }
.t-etiqueta-s { font-size: 12px; font-weight: 500; line-height: 1.2; }
.t-precio-l   { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.t-leyenda    { font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo-pagina);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(30px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.5vw, 28px); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
/* «Negrita» es 700 del kit: el navegador le da un grado más que el texto que la rodea («bolder»), y adentro de
   un texto en 600 o 700 salía en 900, un peso que el kit no usa. Con :where() no suma prioridad: cada
   componente pone el suyo. */
:where(b, strong) { font-weight: 700; }
/* Con :where() los enlaces no suman prioridad: el color de cada componente del kit (logo blanco,
   botones, tarjetas) le gana a este, también al pasar el mouse. */
:where(a) { color: var(--azul-700); }
:where(a):hover { color: var(--azul-800); }
button, input, select, textarea { font: inherit; color: inherit; }

/* El foco se ve solo con teclado. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--azul-500); outline-offset: 3px; border-radius: 4px; }
/* El foco del campo del kit (Campo de texto, Estado=Foco 433:12099): un solo borde, azul 700 de 1,5 px, y
   un anillo celeste suave de 4 px por fuera; nada adentro del campo. Se ve siempre mientras se escribe,
   también con el dedo o el mouse. El borde de 1 px más medio de sombra da el 1,5 sin mover el texto. */
:root { --foco-campo: 0 0 0 0.5px var(--azul-700), 0 0 0 4.5px var(--celeste-suave); }
/* Un campo sin borde propio, adentro de una caja (la calculadora, el precio de los filtros, la cantidad),
   no se marca: el foco lo lleva la caja, en su hoja. Una barra deslizable tampoco: su foco va en la perilla. */
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="search"]):not([type="range"]):not(:is(.calculadora__campo, .filtros__precio, .cantidad, .cantidad-chica) *):focus,
select:not(:is(.calculadora__campo, .filtros__precio, .cantidad, .cantidad-chica) *):focus,
textarea:focus {
  /* Transparente y no «none»: en alto contraste (forced-colors) el navegador lo pinta y el foco se ve. */
  outline: 2px solid transparent;
  border-color: var(--azul-700);
  box-shadow: var(--foco-campo);
}
:is(.calculadora__campo, .filtros__precio, .cantidad, .cantidad-chica) :is(input, select):focus { outline: 2px solid transparent; }
/* Buscadores: en las píldoras del kit el foco rodea la píldora con el borde y el anillo del campo, sin
   línea adentro; un buscador fuera de esa lista lleva el foco en el propio campo. */
input[type="search"]:focus { outline: 2px solid transparent; border-color: var(--azul-700); box-shadow: var(--foco-campo); }
:is(.buscador, .preguntas__buscador, .no-encontrada__buscador, .tutoriales__buscar, .campo-busqueda) input[type="search"]:focus { outline: 2px solid transparent; box-shadow: none; }
:is(.buscador, .preguntas__buscador, .no-encontrada__buscador, .tutoriales__buscar, .campo-busqueda):has(input[type="search"]:focus) { outline: 2px solid transparent; box-shadow: 0 0 0 1.5px var(--azul-700), 0 0 0 5.5px var(--celeste-suave); }
/* El autocompletado del navegador no pinta el campo de otro color: queda el fondo y el texto del kit. */
:is(input, textarea, select):is(:-webkit-autofill, :autofill) {
  -webkit-text-fill-color: var(--texto);
  caret-color: var(--texto);
  transition: background-color 600000s 0s, color 600000s 0s;
}
/* Casillas, opciones y botones llevan el contorno de :focus-visible, con teclado. */

/* ---------- Estructura ---------- */
.contenedor {
  width: 100%;
  max-width: calc(var(--ancho-max) + 2 * var(--margen-lateral));
  margin-inline: auto;
  padding-inline: var(--margen-lateral);
}
.sitio-contenido { display: block; min-height: 60vh; }
.pagina { padding-block: 32px 64px; }

.saltar-al-contenido {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 20px;
  border-radius: var(--radio-pildora);
  background: var(--azul-950);
  color: var(--texto-sobre-oscuro);
  font-weight: 600;
  text-decoration: none;
}
.saltar-al-contenido:focus-visible { top: 16px; color: var(--texto-sobre-oscuro); }

.solo-lectores {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Texto solo para lectores de pantalla (la clase de WordPress), también donde no cargan las hojas de WooCommerce. */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--superficie, #fff);
  clip-path: none;
  color: var(--texto, #111);
  display: block;
  height: auto;
  left: 8px;
  padding: 12px 16px;
  top: 8px;
  width: auto;
  z-index: 100000;
}
