/* ==========================================================================
   Base: fuentes, tokens de diseño, reset y elementos comunes
   ========================================================================== */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Género: violeta (gafas violetas) */
  --violeta-900: #3b1459;
  --violeta-700: #562080;
  --violeta: #6d2f9c;
  --violeta-300: #b995d6;
  --violeta-100: #f1e8f8;
  --violeta-50: #f9f5fc;

  /* Cuidados: verde (corazón verde) */
  --verde-900: #1f4a17;
  --verde-700: #2c6620;
  --verde: #3b8128;
  --verde-300: #a3d18b;
  --verde-100: #e7f3df;
  --verde-50: #f4f9f0;

  /* Marca Prodiversa */
  --rojo: #c8282a;
  --rojo-700: #a81c1d;

  /* Ejemplo (siempre ámbar) */
  --ejemplo-fondo: #fdf4dc;
  --ejemplo-borde: #e9b949;
  --ejemplo-etiqueta: #f5c451;
  --ejemplo-tinta: #4a3000;

  /* Ejercicio (siempre azul tinta) */
  --ejercicio: #22507f;
  --ejercicio-fondo: #eaf1f9;
  --ejercicio-borde: #6f97c6;
  --ejercicio-campo: #c3d3e6;

  /* Neutros */
  --crema: #fbf7f0;
  --papel: #ffffff;
  --tinta: #26202e;
  --tinta-suave: #5a5263;
  --linea: #e7dfd3;
  --linea-suave: #f1ebe2;

  /* Acento de la pantalla actual (lo cambia data-acento) */
  --acento: var(--violeta);
  --acento-fuerte: var(--violeta-900);
  --acento-suave: var(--violeta-100);
  --acento-muy-suave: var(--violeta-50);

  --fuente: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radio: 18px;
  --radio-s: 10px;
  --sombra: 0 1px 2px rgb(38 32 46 / 0.05), 0 10px 30px rgb(38 32 46 / 0.08);
  --sombra-alta: 0 20px 60px rgb(38 32 46 / 0.25);
}

[data-acento="violeta"] {
  --acento: var(--violeta);
  --acento-fuerte: var(--violeta-900);
  --acento-suave: var(--violeta-100);
  --acento-muy-suave: var(--violeta-50);
}
[data-acento="rojo"] {
  --acento: var(--rojo);
  --acento-fuerte: #7a1516;
  --acento-suave: #f8dcdc;
  --acento-muy-suave: #fdf2f2;
}
[data-acento="verde"] {
  --acento: var(--verde);
  --acento-fuerte: var(--verde-900);
  --acento-suave: var(--verde-100);
  --acento-muy-suave: var(--verde-50);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--acento); text-underline-offset: 0.15em; }

:focus-visible {
  outline: 3px solid var(--violeta);
  outline-offset: 2px;
  border-radius: 6px;
}
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--violeta-900);
  color: #fff;
  font-weight: 800;
  border-radius: var(--radio-s);
  text-decoration: none;
}
.saltar:focus { top: 1rem; }

.icono {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t-genero { color: var(--violeta); }
.t-cuidados { color: var(--verde); }

/* --- Botones ------------------------------------------------------------ */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.55em 1.15em;
  border: 2px solid var(--linea);
  border-radius: 999px;
  background: var(--papel);
  color: var(--tinta);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.boton:hover:not(:disabled) { border-color: var(--acento); color: var(--acento-fuerte); }
.boton:active:not(:disabled) { transform: translateY(1px); }
.boton:disabled { opacity: 0.4; cursor: not-allowed; }

.boton--primario {
  background: var(--acento);
  border-color: var(--acento);
  color: #fff;
}
.boton--primario:hover:not(:disabled) {
  background: var(--acento-fuerte);
  border-color: var(--acento-fuerte);
  color: #fff;
}

.boton--peligro { color: var(--rojo-700); }
.boton--peligro:hover:not(:disabled) { border-color: var(--rojo); color: var(--rojo-700); background: #fdeeee; }

.boton--pequeno { min-height: 36px; padding: 0.35em 0.85em; font-size: 0.9rem; }

.boton-icono {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tinta-suave);
}
.boton-icono:hover { background: var(--linea-suave); color: var(--tinta); }

.sin-js {
  margin: 2rem;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--rojo);
  border-radius: var(--radio-s);
}

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