/* Ventanita · landing. Tokens de marca/tokens.json, tema Día y tema Noche (la página es para adultos).
   Sin recursos de terceros: Lexend (OFL, subconjunto latino) se sirve desde fonts/, del mismo origen; la pila del
   sistema cubre lo que Lexend no trae y el instante mientras carga (font-display: swap).
   Un solo script propio (js/landing.js): recuerda el tema elegido y reenvía enlaces viejos; la página se lee sin él.
   Pensado primero para el teléfono; todo es flujo normal, grid o flex. */

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lexend-400.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;
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lexend-500.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;
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/lexend-600.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;
}

:root {
  color-scheme: light;

  --fondo: #edf1ec;
  --superficie: #ffffff;
  --superficie-suave: #f7f8f5;
  --linea: #7d8a84;
  --linea-suave: #e1e6e0;
  --tinta: #1e2a2c;
  --tinta-suave: #4a5759;
  --postigo: #1f6670;
  --sobre-postigo: #ffffff;
  --postigo-suave: #d6e6e8;
  --sol: #e9b949;
  --sobre-sol: #1e2a2c;
  --sol-suave: #f1e7cf;
  --cielo: #dde9ee;
  --hoja: #367043;
  --hoja-suave: #dce8d8;
  --lavanda: #5b4f96;
  --lavanda-suave: #e3def2;
  --arcilla: #a2553c;
  --arcilla-suave: #f2e1da;
  --alerta: #8a3b22;
  --alerta-suave: #f5e4dc;
  --foco: #1d4ed8;

  --fuente: "Lexend", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --esp-1: 4px;
  --esp-2: 8px;
  --esp-3: 12px;
  --esp-4: 16px;
  --esp-5: 24px;
  --esp-6: 32px;
  --esp-7: 48px;
  --esp-8: 64px;

  --radio-sm: 10px;
  --radio-md: 16px;
  --radio-lg: 24px;
  --radio-xl: 28px;
  --radio-pill: 999px;

  --sombra-suave: 0 2px 10px rgba(30,42,44,0.08);

  --tactil-min: 44px;
  --tactil-nino: 64px;

  /* Qué logo y qué ícono del botón de tema se ven: en Día, el logo claro y la luna (pasar a Noche); en Noche, al revés. */
  --en-claro: block;
  --en-oscuro: none;

  --curva: cubic-bezier(0.4, 0, 0.2, 1);
  --margen: var(--esp-4);
}

/* Tema Noche: solo si la persona lo eligió con el botón (el atributo data-tema lo pone js/landing.js antes de pintar).
   El tema de omisión es Día, aunque el sistema esté en oscuro: la página no sigue al tema del sistema. */
:root[data-tema="oscuro"] {
  color-scheme: dark;
  --fondo: #121a1b;
  --superficie: #1a2426;
  --superficie-suave: #162022;
  --linea: #738385;
  --linea-suave: #243032;
  --tinta: #e6eeea;
  --tinta-suave: #a9b7b3;
  --postigo: #6fc2c3;
  --sobre-postigo: #0e2a2c;
  --postigo-suave: #173a3e;
  --sol-suave: #3a3220;
  --cielo: #1c3038;
  --hoja: #8cc79a;
  --hoja-suave: #1e3524;
  --lavanda: #b3a9e6;
  --lavanda-suave: #2a2645;
  --arcilla: #e8a88f;
  --arcilla-suave: #3e2620;
  --alerta: #f0a58a;
  --alerta-suave: #43251c;
  --foco: #7cc4ff;
  --sombra-suave: 0 2px 10px rgba(0,0,0,0.4);
  --en-claro: none;
  --en-oscuro: block;
}

:root[data-tema="claro"] {
  color-scheme: light;
}

@media (min-width: 30rem) {
  :root { --margen: var(--esp-5); }
}

@media (min-width: 56rem) {
  :root { --margen: var(--esp-7); }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 0.9375rem;
  line-height: 1.5334;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
}

ul {
  padding-left: 1.25rem;
}

ol {
  list-style: none;
}

li + li {
  margin-top: var(--esp-2);
}

li::marker {
  color: var(--postigo);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--postigo);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.saltar {
  position: absolute;
  left: var(--esp-2);
  top: var(--esp-2);
  z-index: 1;
  padding: var(--esp-3) var(--esp-4);
  border-radius: var(--radio-md);
  background: var(--superficie);
  color: var(--tinta);
  font-weight: 500;
  transform: translateY(-200%);
}

.saltar:focus-visible {
  transform: none;
}

/* Texto solo para lectores de pantalla (el número de paso del círculo decorativo). */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Tipografía */

h1,
h2,
h3,
h4 {
  font-weight: 600;
}

h1 {
  font-size: clamp(2.125rem, 1.45rem + 3.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.125rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

h4 {
  font-size: 1rem;
  line-height: 1.4;
}

.nota {
  color: var(--tinta-suave);
  font-size: 0.84375rem;
  line-height: 1.4815;
}

.rotulo {
  display: flex;
  align-items: center;
  gap: var(--esp-2);
  color: var(--tinta-suave);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.385;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

span.rotulo {
  display: inline;
}

/* Estructura */

.contenedor {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-left: max(var(--margen), env(safe-area-inset-left));
  padding-right: max(var(--margen), env(safe-area-inset-right));
}

.seccion {
  padding-block: var(--esp-7);
  border-top: 1px solid var(--linea-suave);
}

@media (min-width: 48rem) {
  .seccion { padding-block: var(--esp-8); }
}

.flujo > * + * {
  margin-top: var(--esp-3);
}

.flujo > h2 {
  margin-top: var(--esp-2);
}

.flujo > h3 {
  margin-top: var(--esp-5);
}

.intro {
  display: grid;
  gap: var(--esp-5);
  align-items: center;
  margin-bottom: var(--esp-6);
}

.intro > * {
  min-width: 0;
}

.intro .flujo {
  max-width: 40rem;
}

@media (min-width: 52rem) {
  .intro {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--esp-7);
  }
}

.ilustracion img {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
  border-radius: var(--radio-lg);
}

.subtitulo {
  margin-bottom: var(--esp-4);
}

.separado {
  margin-top: var(--esp-6);
}

.columna {
  display: grid;
  gap: var(--esp-4);
  max-width: 44rem;
}

/* Cabecera: idioma y tema */

.cabecera {
  padding-block: var(--esp-3) 0;
}

.cabecera__fila {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--esp-3);
}

.idioma {
  display: flex;
  align-items: center;
  gap: var(--esp-1);
  color: var(--tinta-suave);
}

.idioma a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tactil-min);
  min-height: var(--tactil-min);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.6px;
}

.idioma a[aria-current="page"] {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
}

/* El botón de tema solo existe si hay JavaScript (js/landing.js pone la clase con-js antes de pintar). */
.tema {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tactil-min);
  height: var(--tactil-min);
  padding: 0;
  border: 1.5px solid var(--linea);
  border-radius: var(--radio-pill);
  background: var(--superficie);
  color: var(--tinta);
  font: inherit;
  cursor: pointer;
}

.con-js .tema {
  display: inline-flex;
}

.tema:hover {
  border-color: var(--tinta);
}

/* El ícono es el del tema al que se pasa: luna en Día, sol en Noche. */
.ico-luna {
  display: var(--en-claro);
}

.ico-sol {
  display: var(--en-oscuro);
}

/* Portada */

.portada {
  padding-block: var(--esp-6) var(--esp-7);
  text-align: center;
}

.logo {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin: 0 auto var(--esp-7);
}

.logo--pie {
  width: min(100%, 12rem);
  margin: 0;
}

/* Dos logos en el HTML, uno por tema: se ve el que corresponde al tema que está activo (sistema o elegido). */
.logo--claro {
  display: var(--en-claro);
}

.logo--oscuro {
  display: var(--en-oscuro);
}

.promesa {
  max-width: 32rem;
  margin: var(--esp-4) auto 0;
  font-size: 1.1875rem;
  line-height: 1.4737;
}

.portada__accion {
  margin-top: var(--esp-6);
}

.portada__nota {
  max-width: 30rem;
  margin: var(--esp-4) auto 0;
}

.ancla-nav {
  margin-top: var(--esp-7);
}

.ancla-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
  justify-content: center;
  padding: 0;
  list-style: none;
}

.ancla-nav li + li {
  margin-top: 0;
}

.ancla-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tactil-min);
  padding: 0 var(--esp-4);
  border: 1.5px dashed var(--linea);
  border-radius: var(--radio-pill);
  color: var(--tinta-suave);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.ancla-nav a:hover {
  border-style: solid;
  color: var(--tinta);
}

/* Botón (componente Button, tamaño adulto) */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--esp-2);
  min-height: 48px;
  padding: 0 var(--esp-5);
  border: 1.5px solid transparent;
  border-radius: var(--radio-md);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.boton--primario {
  width: 100%;
  background: var(--postigo);
  border-color: var(--postigo);
  color: var(--sobre-postigo);
}

.boton--primario:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

@media (min-width: 30rem) {
  .boton--primario {
    width: auto;
    min-width: 12rem;
  }
}

/* Tarjetas: se separan por color, no por sombra */

.rejilla {
  display: grid;
  gap: var(--esp-4);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 46rem) {
  .rejilla--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 56rem) {
  .rejilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tarjeta {
  min-width: 0;
  padding: var(--esp-5);
  border: 1px solid var(--linea-suave);
  border-radius: var(--radio-lg);
  background: var(--superficie);
  color: var(--tinta);
}

.tarjeta > * + * {
  margin-top: var(--esp-3);
}

.tarjeta--aviso {
  border-color: transparent;
  background: var(--sol-suave);
}

.tarjeta--ancha {
  grid-column: 1 / -1;
}

.pasos h4 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.tarjeta__cabeza {
  display: flex;
  align-items: center;
  gap: var(--esp-3);
}

.tarjeta__titulo {
  display: flex;
  align-items: center;
  gap: var(--esp-3);
}

.icono-caja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tactil-min);
  height: var(--tactil-min);
  border-radius: var(--radio-pill);
  background: var(--postigo-suave);
  color: var(--tinta);
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radio-pill);
  background: var(--postigo-suave);
  color: var(--tinta);
  font-weight: 600;
}

/* Íconos de la marca: trazo de 2px en caja de 24, con currentColor */

.ico {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rotulo .ico {
  color: var(--tinta);
}

.pie .ico {
  vertical-align: middle;
  margin-right: var(--esp-2);
}

/* Bloques de una tarjeta de evidencia */

.dato > * + * {
  margin-top: var(--esp-1);
}

.dato > p + p {
  margin-top: var(--esp-3);
}

.dato > .rotulo + p {
  margin-top: var(--esp-1);
}

.tarjeta > .dato {
  margin-top: var(--esp-4);
}

.dato--aparte {
  padding-top: var(--esp-5);
  border-top: 1px solid var(--linea-suave);
}

.tarjeta > .dato--aparte {
  margin-top: var(--esp-5);
}

.dato--aparte > h4 + p {
  margin-top: var(--esp-2);
}

.dato--aparte > .rotulo {
  margin-top: var(--esp-4);
}

.firme {
  margin-top: var(--esp-3);
}

/* La evidencia completa va plegada en cada tarjeta (<details>, sin JavaScript): a un toque, para quien la quiere leer. */

.tarjeta > .mas {
  margin-top: var(--esp-4);
  border-top: 1px solid var(--linea-suave);
}

.mas > summary {
  display: flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: var(--tactil-min);
  color: var(--postigo);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.mas > summary::-webkit-details-marker {
  display: none;
}

.mas > summary::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-inline: var(--esp-1);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.mas[open] > summary::before {
  transform: rotate(45deg);
}

.mas > summary:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.mas > * + * {
  margin-top: var(--esp-3);
}

/* Etiquetas de firmeza: siempre con palabra, el color solo acompaña */

.firmeza {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: 28px;
  padding: 0 var(--esp-3);
  border: 1.5px solid transparent;
  border-radius: var(--radio-pill);
  background: var(--superficie);
  color: var(--tinta);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.firmeza::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: var(--radio-pill);
  background: var(--punto, var(--linea));
}

.firmeza--fuerte { --punto: var(--hoja); background: var(--hoja-suave); }
.firmeza--moderada { --punto: var(--postigo); background: var(--postigo-suave); }
.firmeza--limitada { --punto: var(--sol); background: var(--sol-suave); }
.firmeza--disputa { --punto: var(--lavanda); background: var(--lavanda-suave); }
.firmeza--precaucion { --punto: var(--arcilla); background: var(--arcilla-suave); }
.firmeza--convencion { --punto: var(--tinta-suave); border-color: var(--linea); }
.firmeza--sin-datos { border-color: var(--linea); border-style: dashed; }

.firmeza--sin-datos::before {
  background: transparent;
  border: 2px solid var(--linea);
}

.tarjeta--aviso .firmeza--convencion,
.tarjeta--aviso .firmeza--sin-datos {
  background: var(--superficie);
}

.leyenda {
  margin-bottom: 0;
}

.leyenda dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--esp-1) var(--esp-4);
  margin-top: var(--esp-4);
}

.leyenda dt {
  margin-top: var(--esp-3);
}

.leyenda dt:first-child {
  margin-top: 0;
}

@media (min-width: 40rem) {
  .leyenda dl {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--esp-3) var(--esp-5);
    align-items: center;
  }

  .leyenda dt,
  .leyenda dt:first-child {
    margin-top: 0;
  }
}

.leyenda dd::first-letter {
  text-transform: uppercase;
}

/* Veredicto (componente Verdict) y aparte con ícono */

.veredicto,
.aparte {
  display: flex;
  align-items: flex-start;
  gap: var(--esp-3);
  padding: var(--esp-3) var(--esp-4);
  border-radius: var(--radio-md);
  color: var(--tinta);
}

.veredicto {
  background: var(--alerta-suave);
  font-weight: 500;
}

.veredicto .ico {
  color: var(--alerta);
}

.aparte {
  padding: var(--esp-4) 0 0;
  border-top: 1px solid var(--linea-suave);
  border-radius: 0;
}

.aparte .ico {
  color: var(--tinta);
}

/* Pie */

.pie {
  padding-block: var(--esp-7);
  border-top: 1px solid var(--linea-suave);
  background: var(--superficie);
}

.pie .contenedor > * + * {
  margin-top: var(--esp-4);
}

.pie__frase {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.pie__enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2) var(--esp-5);
  padding: 0;
  list-style: none;
}

.pie__enlaces li + li {
  margin-top: 0;
}

.pie__enlaces a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tactil-min);
  font-weight: 500;
}

.pie .nota {
  max-width: 44rem;
}

/* Movimiento: lento y con la curva de la marca; nada se mueve solo.
   La transición de color vive solo en :hover y :focus-visible. En la regla base haría que, al cambiar de tema (las
   variables cambian de golpe), el texto y el borde fueran un paso atrás del fondo. El botón de tema no transiciona:
   siempre está bajo el puntero o con el foco cuando se cambia el tema. */

@media (prefers-reduced-motion: no-preference) {
  .boton:hover,
  .boton:focus-visible,
  .ancla-nav a:hover,
  .ancla-nav a:focus-visible {
    transition: color 200ms var(--curva), border-color 200ms var(--curva);
  }
}

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

@media (forced-colors: active) {
  .boton,
  .firmeza,
  .tarjeta,
  .tema {
    border: 1.5px solid CanvasText;
  }
}
