/* AI Content Factory · landing (marca Crónica: marca/README.md)
 * La portada es el taller en capas (arte/capas.py): fondo, artesanos y portátil, con parallax suave
 * y el vídeo real dentro de la pantalla. Todo lo que se mueve respeta prefers-reduced-motion.
 */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fuentes/inter-tight-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fuentes/instrument-serif-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fuentes/instrument-serif-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fuentes/jetbrains-mono-var.woff2') format('woff2');
}

:root {
  --tinta: #191a15;
  --tinta-honda: #11120e;
  --tinta-alta: #22231d;
  --crema: #f3ecdc;
  --crema-suave: #cfc7b4;
  --gris: #a39d8b;
  --papel: #efe6d1;
  --papel-honda: #e6dcc4;
  --papel-tinta: #191a15;
  --papel-gris: #6b6455;
  --acento: #8b5cf6;
  --acento-hover: #9d74f7;
  --acento-papel: #4e1ca0;
  --verde: #6fcf8e;
  --rojo: #c0392b;
  --linea: rgba(243, 236, 220, 0.14);
  --linea-fuerte: rgba(243, 236, 220, 0.28);
  --linea-papel: rgba(25, 26, 21, 0.16);
  --degradado: linear-gradient(92deg, #f9d4c6 0%, #eebad6 34%, #c9b5f6 70%, #efe7ff 100%);
  --degradado-boton: linear-gradient(120deg, #7c4ff0 0%, #8b5cf6 45%, #b48cf9 100%);
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --margen: clamp(16px, 4vw, 48px);
  --radio: 14px;
  --barra: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--tinta);
  color: var(--crema);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
p { margin: 0; }
[hidden] { display: none !important; }

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--crema); color: var(--tinta); padding: 10px 14px; border-radius: 8px;
}
.saltar:focus { top: 12px; }

.envoltura { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--margen); }
.envoltura.estrecha { width: min(820px, 100%); }

.etiqueta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 18px;
}
.etiqueta-clara { color: var(--crema-suave); }
.etiqueta-papel { color: var(--papel-gris); }

.cursiva {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--degradado);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}
.cursiva-papel { background: none; color: var(--acento-papel); }

/* ---------- Botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.botones-centro { justify-content: center; }
.boton {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35em;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.25s;
}
.boton small { font-weight: 500; font-size: 0.86em; opacity: 0.82; }
.boton:active { transform: translateY(1px); }
.boton-principal {
  background: var(--degradado-boton);
  color: #fff;
  box-shadow: 0 12px 32px -10px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
/* Brillo que cruza el botón al pasar por encima */
.boton-principal::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.boton-principal:hover { box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); transform: translateY(-1px); }
.boton-principal:hover::after { left: 120%; }
.boton-secundario { background: rgba(17, 18, 14, 0.45); color: var(--crema); border-color: var(--linea-fuerte); backdrop-filter: blur(6px); }
.boton-secundario:hover { border-color: var(--crema); }
.boton-ancho { width: 100%; margin-top: 22px; min-height: 60px; font-size: 1.1rem; }
:focus-visible { outline: 2px solid var(--acento-hover); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .boton-principal::after { display: none; } }

.enlace-flecha { color: var(--crema-suave); text-decoration: none; border-bottom: 1px solid var(--linea-fuerte); padding-bottom: 2px; }
.enlace-flecha:hover { color: var(--crema); border-color: var(--crema); }

/* ---------- Contador ---------- */
.contador {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  padding: 9px 16px 9px 14px;
  border: 1px solid var(--linea-fuerte);
  border-radius: 999px;
  background: rgba(17, 18, 14, 0.6);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.contador strong { font-weight: 700; color: #fff; }
.punto {
  flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 0 rgba(111, 207, 142, 0.6);
  animation: latido 2.4s ease-out infinite;
}
@keyframes latido {
  0% { box-shadow: 0 0 0 0 rgba(111, 207, 142, 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(111, 207, 142, 0); }
}
@media (prefers-reduced-motion: reduce) { .punto { animation: none; } }

/* ---------- Barra fija ---------- */
.barra {
  position: fixed; z-index: 30; left: 0; right: 0; top: 0;
  background: rgba(17, 18, 14, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
  transform: translateY(-100%);
  visibility: hidden;   /* escondida no pinta nada: si no, el brillo del botón asoma por el borde */
  transition: transform 0.35s ease, visibility 0s linear 0.35s;
}
.barra.visible { transform: none; visibility: visible; transition: transform 0.35s ease, visibility 0s; }
.barra-dentro {
  width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--margen);
  height: var(--barra);
  display: flex; align-items: center; gap: 18px;
}
.barra-marca { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.035em; margin-right: auto; }
.barra .contador { margin: 0; padding: 6px 12px; font-size: 0.74rem; background: none; }
.boton-barra { min-height: 42px; padding: 0 20px; font-size: 0.95rem; }

/* ---------- Portada (el taller en capas) ---------- */
.portada {
  position: relative;
  min-height: min(100svh, 1000px);
  display: flex; flex-direction: column; justify-content: flex-end;
  isolation: isolate;
  overflow: hidden;
  background: var(--tinta-honda);
}
.escena { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.capa { position: absolute; will-change: transform; }
.capa-fondo {
  inset: -4% 0 0 0; width: 100%; height: 104%;
  object-fit: cover; object-position: 62% 40%;
}
.capa-medio {
  right: -3%; bottom: 17%;
  width: min(66%, 1080px); height: auto;
  filter: brightness(0.62) contrast(1.06);
}
.velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 18, 14, 0.97) 0%, rgba(17, 18, 14, 0.88) 30%, rgba(17, 18, 14, 0.35) 56%, rgba(17, 18, 14, 0.05) 100%),
    linear-gradient(0deg, var(--tinta) 0%, rgba(25, 26, 21, 0.55) 16%, rgba(25, 26, 21, 0) 40%),
    linear-gradient(180deg, rgba(17, 18, 14, 0.55) 0%, rgba(17, 18, 14, 0) 22%);
}

.portada-rejilla {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.22fr);
  align-items: end;
  gap: clamp(16px, 3vw, 40px);
  padding-top: clamp(72px, 9vh, 120px);
}
.portada-texto { align-self: center; padding-bottom: clamp(24px, 6vh, 72px); }
.portada h1 {
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  max-width: 11ch;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.portada h1 .cursiva { font-size: 1.1em; display: inline-block; line-height: 0.9; }
.entradilla {
  margin-top: 22px;
  max-width: 30rem;
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
  line-height: 1.5;
  color: var(--crema-suave);
}

/* El portátil: la imagen tiene la pantalla vacía y el vídeo va detrás, con la perspectiva medida */
/* Llega hasta el borde derecho de la ventana, para que el banco no se corte (con tope en pantallas muy anchas) */
/* La mesa se sale siempre ~40 px por la derecha: el ratón la mueve ±15 px y su corte recto no debe verse.
 * El tope (−780 px) solo frena en pantallas de más de ~2.600 px; ahí, el borde se funde (máscara de abajo). */
.portatil { margin: 0 max(-780px, calc((min(1240px, 100vw) - 100vw) / 2 - var(--margen) - 40px)) -70px 0; position: relative; }
.portatil-marco { position: relative; }
.portatil-imagen {
  position: relative; z-index: 2; width: 100%; height: auto; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 97.5%, transparent);
  mask-image: linear-gradient(90deg, #000 97.5%, transparent);
}
.pantalla {
  position: absolute; z-index: 1;
  /* Sin JS: la caja que envuelve la pantalla (portatil.json); con JS, matrix3d exacto */
  left: 10.9%; top: 3.9%; width: 45.6%; height: 47.8%;
  object-fit: contain; background: #000;   /* la pantalla es 16:10 y el vídeo 16:9: barras negras, sin recortar */
  transform-origin: 0 0;
}
.pantalla.medida { left: 0; top: 0; }
/* El brillo de la pantalla sobre el banco, en color: lo único moderno del grabado */
.portatil-marco::before {
  content: '';
  position: absolute; z-index: 0;
  left: 4%; top: 30%; width: 62%; height: 60%;
  background: radial-gradient(closest-side, rgba(255, 170, 120, 0.28), rgba(201, 181, 246, 0.12) 55%, rgba(0, 0, 0, 0) 100%);
  filter: blur(20px);
  pointer-events: none;
}
.nota-mano {
  position: absolute; z-index: 3;
  left: 8%; top: -3.2em;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  color: var(--crema);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}
.nota-mano em { color: #eebad6; }
.nota-mano .flecha { font-family: var(--sans); font-style: normal; color: var(--gris); margin: 0 4px; }

.sellos {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: 0; margin-bottom: 0;
  padding-top: 18px; padding-bottom: 22px;
  border-top: 1px solid var(--linea);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris);
  position: relative; z-index: 3;
}
/* El banco del portátil se mete por debajo de la franja de sellos, que lo tapa con la tinta */
.sellos::before {
  content: ''; position: absolute; z-index: -1; left: -50vw; right: -50vw; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(25, 26, 21, 0.88), var(--tinta));
  backdrop-filter: blur(4px);
}
.sellos strong { color: var(--crema); font-weight: 600; font-size: 1.15em; margin-right: 4px; }

/* ---------- Secciones ---------- */
section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
section h2 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); max-width: 17ch; }
section h2 .cursiva { font-size: 1.08em; }
.sub, .clase-sub { margin-top: 18px; max-width: 40rem; color: var(--crema-suave); font-size: 1.12rem; }
.cabecera { margin-bottom: clamp(36px, 5vw, 56px); }
.papel { background: var(--papel); color: var(--papel-tinta); }
.papel .sub { color: var(--papel-gris); }
.llamada { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* Aparecer al hacer scroll (solo con JS y sin movimiento reducido) */
.js .revelar { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .revelar.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .revelar { opacity: 1; transform: none; transition: none; } }

/* ---------- La clase y la pregunta ---------- */
.clase { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(110px, 14vw, 170px); }
.reproductor {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--linea-fuerte);
  background: var(--tinta-honda);
  aspect-ratio: 16 / 9;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 6px rgba(243, 236, 220, 0.03);
}
.reproductor-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.86) saturate(1.05);
  transform: scale(1.01);
  transform-origin: 50% 41%;   /* el centro de la pantalla en blanco del póster */
  transition: filter 0.6s ease, transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reproductor[data-fase='pregunta'] .reproductor-poster { filter: blur(8px) brightness(0.22); transform: scale(1.08); }
.reproductor:has(.play:hover) .reproductor-poster { transform: scale(1.045); filter: brightness(0.95) saturate(1.1); }

/* 1. El play, grande y en el centro */
.play {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 2.4vw, 26px);
  border: 0;
  padding: 0 0 5%;   /* sube el play al centro de la pantalla en blanco (≈41 % del alto) */
  background: radial-gradient(ellipse 70% 75% at 50% 41%, rgba(17, 18, 14, 0) 0%, rgba(17, 18, 14, 0.1) 55%, rgba(17, 18, 14, 0.6) 100%);
  color: var(--crema);
  cursor: pointer;
}
.play-circulo {
  position: relative;
  width: clamp(78px, 11vw, 132px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--degradado-boton);
  box-shadow: 0 0 0 clamp(8px, 1.1vw, 14px) rgba(139, 92, 246, 0.2), 0 24px 70px -12px rgba(139, 92, 246, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s;
}
.play-circulo svg { width: 42%; height: 42%; margin-left: 9%; fill: #fff; filter: drop-shadow(0 2px 6px rgba(40, 10, 90, 0.45)); }
.play-circulo::before,
.play-circulo::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(201, 181, 246, 0.7);
  animation: latido 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
  pointer-events: none;
}
.play-circulo::after { animation-delay: 1.3s; }
@keyframes latido { from { transform: scale(1); opacity: 0.85; } to { transform: scale(1.75); opacity: 0; } }
.play:hover .play-circulo { transform: scale(1.07); box-shadow: 0 0 0 clamp(10px, 1.4vw, 18px) rgba(139, 92, 246, 0.26), 0 28px 80px -10px rgba(157, 116, 247, 0.95), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.play:active .play-circulo { transform: scale(0.97); }
.play:focus-visible { outline: none; }
.play:focus-visible .play-circulo { outline: 3px solid var(--crema); outline-offset: 8px; }
.play-texto {
  font-family: var(--mono);
  font-size: clamp(0.66rem, 1vw, 0.8rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--linea-fuerte);
  background: rgba(17, 18, 14, 0.66);
  backdrop-filter: blur(6px);
}

/* 2. La pregunta */
.pregunta {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: clamp(20px, 4vw, 52px);
}
.pregunta h3 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); margin-bottom: clamp(18px, 2.6vw, 30px); }
.pregunta .etiqueta { margin-bottom: 10px; }
.opciones {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1020px;
}
.opcion { grid-column: span 2; }
.opcion:nth-child(4) { grid-column: 2 / span 2; }   /* las dos de abajo, centradas */
.opcion:nth-child(5) { grid-column: 4 / span 2; }
.opcion {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px;
  text-align: left;
  padding: 14px 16px;
  min-height: 82px;
  border-radius: 16px;
  border: 1px solid rgba(243, 236, 220, 0.2);
  background: linear-gradient(155deg, rgba(40, 41, 34, 0.94) 0%, rgba(17, 18, 14, 0.94) 100%);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(243, 236, 220, 0.07);
  color: var(--crema);
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s, background 0.25s;
}
.opcion-icono {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(157, 116, 247, 0.45);
  background: rgba(139, 92, 246, 0.16);
  color: #cdb8fb;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.opcion-icono svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.opcion-texto { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.opcion-texto strong { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.opcion-texto span { font-size: 0.86rem; color: var(--gris); line-height: 1.3; }
.opcion-flecha { font-size: 1.15rem; color: var(--gris); transition: transform 0.25s, color 0.25s; }
.opcion:hover,
.opcion:focus-visible {
  outline: none;
  border-color: var(--acento-hover);
  transform: translateY(-3px);
  background: linear-gradient(155deg, rgba(64, 44, 112, 0.95) 0%, rgba(24, 20, 34, 0.95) 100%);
  box-shadow: 0 26px 50px -24px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(243, 236, 220, 0.12);
}
.opcion:hover .opcion-icono,
.opcion:focus-visible .opcion-icono { background: var(--degradado-boton); border-color: transparent; color: #fff; transform: rotate(-6deg) scale(1.06); }
.opcion:hover .opcion-flecha,
.opcion:focus-visible .opcion-flecha { transform: translateX(4px); color: var(--crema); }
.opcion[aria-pressed='true'] { border-color: transparent; background: var(--degradado-boton); }
.opcion[aria-pressed='true'] .opcion-texto span { color: rgba(255, 255, 255, 0.85); }
.pregunta-nota { margin-top: 18px; font-size: 0.86rem; color: var(--gris); }
/* Al salir, las tarjetas entran una detrás de otra */
.reproductor[data-fase='pregunta'] .pregunta > * { animation: subir 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.reproductor[data-fase='pregunta'] .opcion { animation: subir 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.reproductor[data-fase='pregunta'] .pregunta h3 { animation-delay: 0.05s; }
.reproductor[data-fase='pregunta'] .opciones { animation: none; }
.reproductor[data-fase='pregunta'] .opcion:nth-child(1) { animation-delay: 0.12s; }
.reproductor[data-fase='pregunta'] .opcion:nth-child(2) { animation-delay: 0.18s; }
.reproductor[data-fase='pregunta'] .opcion:nth-child(3) { animation-delay: 0.24s; }
.reproductor[data-fase='pregunta'] .opcion:nth-child(4) { animation-delay: 0.3s; }
.reproductor[data-fase='pregunta'] .opcion:nth-child(5) { animation-delay: 0.36s; }
.reproductor[data-fase='pregunta'] .pregunta-nota { animation-delay: 0.42s; }
.reproductor[data-fase='video'] .video { animation: aparecer 0.5s ease backwards; }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .play-circulo::before, .play-circulo::after { animation: none; opacity: 0; }
  .reproductor[data-fase] .pregunta > *, .reproductor[data-fase] .opcion, .reproductor[data-fase] .video { animation: none; }
  .reproductor-poster { transition: none; }
}

.video { position: absolute; inset: 0; background: #000; }
.video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-pronto {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
  padding: clamp(20px, 5vw, 64px);
  background: linear-gradient(90deg, rgba(17, 18, 14, 0.94) 0%, rgba(17, 18, 14, 0.6) 100%), url('/img/fabrica.webp') center / cover;
}
.video-pronto p:not(.etiqueta) { font-size: clamp(1.1rem, 2.4vw, 1.5rem); max-width: 26ch; }
.respuesta-frase {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--crema-suave);
}

/* ---------- La cinta: cruza la costura entre dos secciones ---------- */
.cinta {
  position: relative; z-index: 3;
  margin: -8.3vw 0;           /* la mitad de su alto: se apoya en la costura */
  overflow: hidden;
  pointer-events: none;
}
.cinta img {
  width: 124%; max-width: none; height: auto;
  margin-left: -12%;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.55));
  will-change: transform;
}

/* ---------- Galería ---------- */
.resultados { background: var(--tinta-honda); padding-top: clamp(110px, 14vw, 170px); }
/* El ejemplo grande va pasando por los cinco; las miniaturas de debajo lo eligen (C-153) */
.destacado {
  margin: 0 0 22px;
  display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 32px; align-items: center;
}
.destacado-marco {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--linea);
  background: #000;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
}
.destacado-marco video,
.destacado-marco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.22s ease; }
.destacado-marco.cambiando video,
.destacado-marco.cambiando img { opacity: 0; }
.destacado figcaption { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.35; color: var(--crema-suave); }
.destacado figcaption strong { display: block; color: var(--crema); font-weight: 650; font-size: 1.3em; letter-spacing: -0.02em; margin-bottom: 6px; }
.destacado-numero { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--gris); }
.miniaturas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.miniatura {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; padding: 0; border: 0; background: none;
  color: inherit; font-family: var(--sans); text-align: left;
  cursor: pointer;
}
.miniatura-imagen {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border-radius: 11px; overflow: hidden;
  border: 1px solid var(--linea);
  background: #000;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.miniatura-imagen img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; transition: opacity 0.25s; }
.miniatura-progreso { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(243, 236, 220, 0.16); opacity: 0; }
.miniatura-progreso span { display: block; height: 100%; background: var(--degradado-boton); transform-origin: 0 50%; transform: scaleX(var(--avance, 0)); }
.miniatura-texto { font-size: 0.9rem; line-height: 1.35; color: var(--gris); transition: color 0.2s; }
.miniatura-texto strong { font-weight: 650; }
.miniatura-texto span { display: none; }   /* el texto entero sale arriba, con el ejemplo grande */
.miniatura:hover .miniatura-imagen { transform: translateY(-2px); }
.miniatura:hover .miniatura-imagen img { opacity: 0.85; }
.miniatura:hover .miniatura-texto { color: var(--crema-suave); }
.miniatura:focus-visible { outline: none; }
.miniatura:focus-visible .miniatura-imagen { outline: 2px solid var(--crema); outline-offset: 3px; }
.miniatura[aria-pressed='true'] .miniatura-imagen { border-color: var(--acento-hover); box-shadow: 0 0 0 1px var(--acento-hover), 0 16px 34px -18px rgba(139, 92, 246, 0.85); }
.miniatura[aria-pressed='true'] .miniatura-imagen img { opacity: 1; }
.miniatura[aria-pressed='true'] .miniatura-progreso { opacity: 1; }
.miniatura[aria-pressed='true'] .miniatura-texto { color: var(--crema); }
@media (prefers-reduced-motion: reduce) {
  .destacado-marco video, .destacado-marco img, .miniatura-imagen { transition: none; }
  .miniatura:hover .miniatura-imagen { transform: none; }
}

/* ---------- Cómo funciona ---------- */
.como { overflow: hidden; }
.pasos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  counter-reset: paso;
}
.pasos li { position: relative; display: flex; flex-direction: column; }
.pasos li:nth-child(2) { transition-delay: 0.12s; }
.pasos li:nth-child(3) { transition-delay: 0.24s; }
.pasos img {
  width: auto; height: clamp(200px, 22vw, 290px); max-width: 100%;
  object-fit: contain; object-position: left bottom;
  margin-bottom: 18px;
  filter: drop-shadow(0 18px 18px rgba(25, 26, 21, 0.22));
}
.paso-num { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acento-papel); }
.pasos h3 { margin: 10px 0 10px; font-size: clamp(1.5rem, 2.2vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.05; }
.pasos p { color: #3f3b31; font-size: 1.02rem; line-height: 1.5; max-width: 30ch; }
/* Flecha entre pasos */
.pasos li:not(:last-child)::after {
  content: '';
  position: absolute; top: clamp(90px, 10vw, 130px); right: calc(-1 * clamp(20px, 3vw, 40px) + 2px);
  width: clamp(18px, 2.4vw, 36px); height: 1px; background: var(--papel-gris);
}

.cifras {
  margin: clamp(56px, 7vw, 88px) 0 0; padding: 32px 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  border-top: 1px solid var(--linea-papel);
}
.cifras div { margin: 0; }
.cifras dt {
  font-weight: 800; letter-spacing: -0.05em; line-height: 0.9;
  font-size: clamp(3rem, 6.4vw, 5.6rem);
  color: var(--acento-papel);
}
.cifras dt small { font-size: 0.32em; letter-spacing: 0; font-weight: 600; margin-left: 4px; }
.cifras dd { margin: 10px 0 0; color: var(--papel-gris); font-size: 0.98rem; line-height: 1.4; max-width: 18ch; }

/* ---------- Qué incluye ---------- */
.incluye { background: var(--tinta); }
.bloques {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-auto-rows: auto;
  gap: 16px;
}
.bloque {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: 18px;
  border: 1px solid var(--linea);
  background: linear-gradient(180deg, rgba(243, 236, 220, 0.045), rgba(243, 236, 220, 0.015));
  transition: border-color 0.25s, transform 0.25s;
}
.bloque:hover { border-color: rgba(201, 181, 246, 0.45); transform: translateY(-2px); }
.bloque h3 { font-size: 1.42rem; letter-spacing: -0.025em; line-height: 1.1; margin: 12px 0 10px; }
.bloque p { color: var(--crema-suave); font-size: 1rem; line-height: 1.5; }
.bloque-etiqueta { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #c9b5f6; }
.bloque-ruta { grid-row: span 2; background: radial-gradient(120% 80% at 0% 0%, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0) 60%), linear-gradient(180deg, rgba(243, 236, 220, 0.05), rgba(243, 236, 220, 0.015)); }
.bloque-cifra {
  display: block;
  font-weight: 800; letter-spacing: -0.06em; line-height: 0.85;
  font-size: clamp(5rem, 9vw, 8rem);
  background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bloque-ruta h3 { font-size: 1.8rem; }
.ver-modulos {
  width: 100%; margin-top: 22px; padding: 16px 0 4px;
  display: flex; justify-content: space-between; align-items: center;
  background: none; border: 0; border-top: 1px solid var(--linea);
  font: inherit; font-weight: 650; color: var(--crema); text-align: left; cursor: pointer;
}
.ver-modulos span {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--linea-fuerte);
  font-family: var(--mono); font-weight: 400; font-size: 1.15rem; line-height: 1; color: var(--crema-suave);
  transition: transform 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.ver-modulos:hover span, .ver-modulos:focus-visible span { background: var(--degradado-boton); border-color: transparent; color: #fff; transform: rotate(90deg); }

/* ---------- La ruta, módulo a módulo: la ventana que abre «Ver los 16 módulos» ---------- */
/* El <dialog> ocupa la pantalla y es transparente: lo de fuera de la caja es el fondo (clic = cerrar). La cabecera se
 * queda fija y lo de dentro baja. Cuatro etapas en columnas, cada una con su línea de ruta y un nodo por módulo. */
.con-ventana { overflow: hidden; }
.ruta-ventana {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(12px, 3vw, 40px);
  border: 0; background: transparent; color: var(--crema);
}
.ruta-ventana[open] { display: grid; place-items: center; }
.ruta-ventana::backdrop { background: rgba(9, 9, 7, 0.74); backdrop-filter: blur(6px); }
.ruta-caja {
  display: flex; flex-direction: column;
  width: min(1260px, 100%); max-height: 100%; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--linea-fuerte);
  background:
    radial-gradient(80% 55% at 0% 0%, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0) 62%),
    radial-gradient(60% 45% at 100% 100%, rgba(249, 212, 198, 0.07), rgba(249, 212, 198, 0) 60%),
    var(--tinta);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
}
.ruta-cabecera {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: clamp(22px, 3vw, 40px) clamp(20px, 3.4vw, 48px) 18px;
  border-bottom: 1px solid var(--linea);
}
.ruta-cabecera .etiqueta { margin-bottom: 10px; color: #c9b5f6; }
.ruta-cabecera h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); letter-spacing: -0.035em; line-height: 1.02; }
.ruta-cerrar {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--linea-fuerte); background: rgba(243, 236, 220, 0.04);
  color: var(--crema); font: 400 1.6rem/1 var(--sans); cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.ruta-cerrar:hover { background: rgba(243, 236, 220, 0.1); border-color: var(--crema); transform: rotate(90deg); }
.ruta-cuerpo { overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(20px, 3.4vw, 48px) clamp(24px, 3vw, 40px); }
.ruta-entradilla { max-width: 62ch; color: var(--crema-suave); font-size: 1.02rem; line-height: 1.5; margin-bottom: 28px; }
.ruta-etapas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 26px); }
.ruta-etapa h3 { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.ruta-etapa-num { font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gris); }
.ruta-etapa-nombre {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.9rem; letter-spacing: -0.01em; line-height: 1.05;
  background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em;
}
.ruta-lista { list-style: none; margin: 0; padding: 0; }
.ruta-modulo { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding-bottom: 12px; }
/* La línea de la ruta, por detrás de los nodos: de cada nodo al siguiente (el último no la lleva) */
.ruta-modulo:not(:last-child)::before {
  content: ''; position: absolute; left: 17px; top: 18px; width: 2px; height: 100%;
  background: linear-gradient(180deg, rgba(201, 181, 246, 0.7), rgba(139, 92, 246, 0.3));
}
.ruta-num {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-family: var(--mono); font-size: 0.78rem; color: var(--crema);
  background: var(--tinta-alta); border: 1px solid rgba(201, 181, 246, 0.55);
}
.ruta-modulo-inicio .ruta-num, .ruta-modulo-meta .ruta-num { background: var(--degradado-boton); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -6px rgba(139, 92, 246, 0.9); }
.ruta-ficha {
  padding: 12px 14px 13px; border-radius: 14px;
  border: 1px solid var(--linea); background: rgba(243, 236, 220, 0.035);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.ruta-modulo:hover .ruta-ficha { border-color: rgba(201, 181, 246, 0.45); background: rgba(139, 92, 246, 0.08); transform: translateX(2px); }
.ruta-ficha strong { display: block; font-size: 1.02rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.ruta-ficha em { display: block; margin-top: 3px; font-style: normal; color: var(--gris); font-size: 0.88rem; line-height: 1.35; }
.ruta-ficha p { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--linea); color: var(--crema-suave); font-size: 0.86rem; line-height: 1.42; }
.ruta-ficha p b { display: block; margin-bottom: 3px; font-family: var(--mono); font-weight: 500; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: #c9b5f6; }
.ruta-opcional {
  display: block; width: fit-content; margin: 6px 0 2px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--linea-fuerte); font-family: var(--mono); font-weight: 400; font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gris);
}
.ruta-pie {
  display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--linea);
}
.ruta-pie p { max-width: 54ch; color: var(--crema-suave); line-height: 1.5; }
.ruta-pie strong { color: var(--crema); font-weight: 650; }
/* Al abrir: la caja sube y las etapas entran una tras otra */
@media (prefers-reduced-motion: no-preference) {
  .ruta-ventana[open] .ruta-caja { animation: ruta-entra 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .ruta-ventana[open]::backdrop { animation: ruta-fondo 0.3s ease both; }
  .ruta-ventana[open] .ruta-etapa { animation: ruta-etapa 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .ruta-ventana[open] .ruta-etapa:nth-child(2) { animation-delay: 0.06s; }
  .ruta-ventana[open] .ruta-etapa:nth-child(3) { animation-delay: 0.12s; }
  .ruta-ventana[open] .ruta-etapa:nth-child(4) { animation-delay: 0.18s; }
}
@keyframes ruta-entra { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes ruta-fondo { from { opacity: 0; } }
@keyframes ruta-etapa { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 1180px) { .ruta-etapas { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; } }
@media (max-width: 640px) {
  .ruta-ventana { padding: 0; }
  .ruta-caja { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .ruta-cabecera { padding: 18px 16px 14px; }
  .ruta-cabecera h2 { font-size: 1.7rem; }
  .ruta-cuerpo { padding: 18px 16px 28px; }
  .ruta-entradilla { font-size: 0.96rem; margin-bottom: 22px; }
  .ruta-etapas { grid-template-columns: 1fr; row-gap: 26px; }
  .ruta-pie .boton { width: 100%; }
}

/* ---------- La Plaza: la comunidad, dentro de un videojuego (C-156) ---------- */
/* La sala del club (capa de Codex) con la pantalla en la pared: el vídeo va encima, en el rectángulo que mide
 * capas.py (plaza.json). Delante, los vecinos de espaldas en su banco, que se mueven a otra velocidad. */
.plaza { background: var(--tinta-honda); overflow: hidden; padding-bottom: clamp(70px, 9vw, 120px); }
.plaza .cabecera { margin-bottom: clamp(10px, 2vw, 24px); }
.sala { width: min(1500px, 100%); margin: 0 auto; }
.sala-escena { position: relative; padding-bottom: 7%; }
.sala-fondo { position: relative; }
.sala-fondo > img { display: block; width: 100%; height: auto; }
/* Los bordes de la sala se funden con la tinta de la sección */
.sala-fondo::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--tinta-honda), rgba(17, 18, 14, 0) 9%, rgba(17, 18, 14, 0) 91%, var(--tinta-honda)),
    linear-gradient(180deg, var(--tinta-honda), rgba(17, 18, 14, 0) 10%, rgba(17, 18, 14, 0) 82%, var(--tinta-honda));
}
.sala-pantalla {
  position: absolute; z-index: 2;
  left: 22.608%; top: 11.583%; width: 54.725%; height: 53.242%;
  background: #0c0c0a;
}
/* El brillo de la pantalla sobre la pared de ladrillo: lo único en color del grabado */
.sala-pantalla::before {
  content: ''; position: absolute; z-index: -1; inset: -14% -10%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(238, 186, 214, 0.2), rgba(201, 181, 246, 0.1) 55%, rgba(0, 0, 0, 0) 100%);
  filter: blur(26px);
}
.sala-pantalla video {
  display: block; width: 100%; height: 100%;
  object-fit: contain; background: #0c0c0a;   /* la pantalla es un pelín más ancha que 16:9: barras finas, sin recortar burbujas */
  /* sin image-rendering: pixelated: el pixel art ya va a 4× en el vídeo y aquí casi siempre se encoge; «pixelated»
     dejaría dentado el texto de los nombres y los bocadillos */
}
.sala-play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--degradado-boton); color: #fff;
  box-shadow: 0 10px 30px rgba(124, 79, 240, 0.45);
  transition: transform 0.2s;
}
.sala-play:hover { transform: scale(1.06); }
.sala-play svg { width: 28px; height: 28px; fill: currentColor; margin-left: 3px; }
.sala-gente {
  position: absolute; z-index: 3; left: 10%; bottom: 0; width: 80%; height: auto;   /* las cabezas, ~30 px por debajo de la pantalla */
  pointer-events: none;
}
.salas {
  list-style: none;
  width: min(1240px, 100%); margin: clamp(18px, 3vw, 34px) auto 0; padding: 0 var(--margen);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 24px;
}
.salas li { padding-top: 14px; border-top: 1px solid var(--linea); }
.salas strong { display: block; font-weight: 650; letter-spacing: -0.015em; font-size: 1.06rem; }
.salas span { display: block; margin-top: 4px; color: var(--crema-suave); font-size: 0.95rem; line-height: 1.45; }
@media (max-width: 960px) { .salas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Móvil: el vídeo en grande (vertical si lo hay) y los vecinos debajo, mirándolo; la sala no cabe */
@media (max-width: 720px) {
  .sala-escena { padding-bottom: 0; }
  .sala-fondo > img, .sala-fondo::after { display: none; }
  .sala-pantalla {
    position: relative; left: auto; top: auto; height: auto;
    width: calc(100% - 2 * var(--margen)); margin: 0 auto;
    aspect-ratio: 16 / 9; border-radius: var(--radio);
    border: 1px solid var(--linea-fuerte);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
  .sala-pantalla video { border-radius: inherit; }
  .sala[data-vertical] .sala-pantalla { aspect-ratio: 9 / 16; width: min(calc(100% - 2 * var(--margen)), calc(76svh * 9 / 16)); }
  .sala-pantalla::before { inset: -8%; }
  .sala-gente { position: relative; left: auto; width: 100%; margin-top: 8px; }
  .sala-play { width: 58px; height: 58px; }
}

/* ---------- Tu criterio, entrenado ---------- */
.criterio-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.criterio h2 { max-width: 12ch; }
.criterio .grande { margin-top: 26px; font-size: clamp(1.18rem, 2vw, 1.36rem); line-height: 1.45; }
.criterio p + p { margin-top: 16px; }
.lista-papel { margin: 16px 0 22px; padding-left: 1.2em; font-size: 1.08rem; }
.lista-papel li { margin: 8px 0; }
.lista-papel li::marker { color: var(--acento-papel); }
.hoja { position: relative; margin: 0; transform: rotate(1.2deg); transition-delay: 0.1s; }
.hoja img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 30px 60px -24px rgba(25, 26, 21, 0.55), 0 0 0 1px rgba(25, 26, 21, 0.12); }
.sello {
  position: absolute;
  font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: clamp(0.8rem, 1.3vw, 1.05rem);
  padding: 8px 14px;
  border: 3px solid currentColor; border-radius: 8px;
  background: rgba(239, 230, 209, 0.82);
  mix-blend-mode: multiply;
}
.sello-rojo { color: var(--rojo); left: -4%; top: 8%; transform: rotate(-9deg); opacity: 0.85; }
.sello-verde { color: #1e7a45; right: -3%; bottom: -6%; transform: rotate(-4deg); }

/* ---------- Calculadora de ahorro ---------- */
.calculadora { background: var(--tinta); }
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(18px, 3vw, 32px); align-items: stretch; }
.calc-datos {
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--linea); border-radius: 20px;
  background: linear-gradient(180deg, rgba(243, 236, 220, 0.045), rgba(243, 236, 220, 0.015));
}
.calc-campo { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; }
.calc-nombre { font-weight: 650; font-size: 1.06rem; letter-spacing: -0.01em; }
.calc-valor { font-family: var(--mono); font-size: 1.35rem; font-weight: 600; color: #fff; }
.calc-ayuda { grid-column: 1 / -1; font-size: 0.88rem; color: var(--gris); }
.calc input[type='range'] {
  grid-column: 1 / -1;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; margin: 4px 0 0;
  background: transparent; cursor: pointer;
}
.calc input[type='range']::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, #8b5cf6 0 var(--lleno, 50%), rgba(243, 236, 220, 0.16) var(--lleno, 50%) 100%);
}
.calc input[type='range']::-moz-range-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, #8b5cf6 0 var(--lleno, 50%), rgba(243, 236, 220, 0.16) var(--lleno, 50%) 100%);
}
.calc input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%; background: #fff; border: 5px solid #8b5cf6;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.6);
}
.calc input[type='range']::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 5px solid #8b5cf6;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.6);
}
.calc-resultado {
  display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  padding: clamp(24px, 3vw, 38px);
  border-radius: 20px;
  border: 1px solid rgba(201, 181, 246, 0.4);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0) 70%),
    linear-gradient(180deg, var(--tinta-alta), var(--tinta-honda));
  box-shadow: 0 40px 80px -40px rgba(139, 92, 246, 0.5);
  text-align: center;
}
.calc-etiqueta { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--crema-suave); }
.calc-cifra {
  margin-top: 8px;
  font-weight: 800; letter-spacing: -0.05em; line-height: 0.95;
  font-size: clamp(3.4rem, 7vw, 6rem);
  background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.calc-cifra.en-contra { background: none; color: var(--crema-suave); }
.calc-anual { margin-top: 10px; font-family: var(--mono); font-size: 0.95rem; color: var(--verde); }
.calc-anual.en-contra { color: var(--gris); }
.calc-desglose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 0; }
.calc-desglose div { padding: 12px 10px; border-radius: 12px; background: rgba(243, 236, 220, 0.05); }
.calc-desglose dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); }
.calc-desglose dd { margin: 4px 0 0; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.calc-nota { margin-top: 16px; color: var(--crema-suave); font-size: 0.98rem; line-height: 1.45; }
.ventajas {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.ventajas li {
  padding: 18px 18px 20px;
  border-radius: 16px; border: 1px solid var(--linea);
  color: var(--crema-suave); font-size: 0.95rem; line-height: 1.45;
}
.ventajas li::before { content: '✓'; display: block; color: var(--verde); font-weight: 700; margin-bottom: 8px; }
.ventajas strong { color: var(--crema); font-weight: 650; display: block; font-size: 1.05rem; margin-bottom: 2px; }
@media (max-width: 1040px) { .ventajas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Precio ---------- */
.precio {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0) 70%),
    var(--tinta-honda);
}
.precio .cabecera { text-align: center; }
.precio h2, .precio .sub { margin-left: auto; margin-right: auto; }
.caja-precio {
  padding: clamp(18px, 3vw, 30px);
  border-radius: 22px;
  border: 1px solid rgba(201, 181, 246, 0.35);
  background: linear-gradient(180deg, rgba(34, 35, 29, 0.9), rgba(17, 18, 14, 0.9));
  box-shadow: 0 40px 80px -40px rgba(139, 92, 246, 0.45);
  text-align: center;
}
.tramos { list-style: none; margin: 0; padding: 0; text-align: left; }
.tramos li {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'nombre precio' 'plazas precio';
  align-items: center;
  padding: 16px 16px;
  border-bottom: 1px solid var(--linea);
  color: var(--gris);
}
.tramos li:last-child { border-bottom: 0; }
.tramo-nombre { grid-area: nombre; font-weight: 650; font-size: 1.12rem; letter-spacing: -0.015em; }
.tramo-plazas { grid-area: plazas; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; }
.tramo-precio { grid-area: precio; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.03em; }
.tramo-precio small { font-size: 0.5em; font-weight: 500; letter-spacing: 0; margin-left: 2px; }
.tramos li.actual {
  color: var(--crema);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid var(--acento);
  border-radius: 14px;
  position: relative;
  margin: 4px 0;
}
.tramos li.actual .tramo-precio { font-size: 2.3rem; color: #fff; }
.tramos li.actual .tramo-nombre::after {
  content: 'Abierto ahora';
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--acento);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 3px;
}
.tramos li.agotado { text-decoration: line-through; text-decoration-color: rgba(163, 157, 139, 0.6); opacity: 0.6; }
.contador-precio { margin-top: 22px; }
.garantias {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font-size: 0.92rem; color: var(--crema-suave);
}
.garantias li::before { content: '✓'; color: var(--verde); font-weight: 700; margin-right: 7px; }
.necesitas { margin-top: 26px; color: var(--crema-suave); text-align: center; font-size: 0.98rem; }
.necesitas strong { color: var(--crema); }

/* ---------- Preguntas ---------- */
.faq .cabecera { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-of-type { border-top: 1px solid var(--linea); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px;
  font-weight: 650; font-size: 1.12rem; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); font-weight: 400; font-size: 1.3rem; color: var(--gris); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2px 22px; color: var(--crema-suave); }

/* ---------- Cierre: la puerta ---------- */
.final {
  min-height: min(92svh, 860px);
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
  padding-bottom: clamp(56px, 8vw, 96px);
  text-align: center;
}
.final-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
.final::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--tinta) 0%, rgba(25, 26, 21, 0) 26%),
    linear-gradient(0deg, rgba(17, 18, 14, 0.94) 0%, rgba(17, 18, 14, 0.55) 34%, rgba(17, 18, 14, 0) 60%);
}
.final-texto h2 { margin: 0 auto; max-width: 14ch; font-size: clamp(2.6rem, 7vw, 5.6rem); }

/* ---------- Pie ---------- */
.pie { padding: 56px 0 120px; border-top: 1px solid var(--linea); background: var(--tinta-honda); }
.pie .envoltura { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.pie-marca { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.035em; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.94rem; color: var(--gris); }
.pie nav a { text-decoration: none; }
.pie nav a:hover, .enlace:hover { color: var(--crema); }
.enlace { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }

/* ---------- Cookies ---------- */
.cookies {
  position: fixed; z-index: 40;
  left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(620px, calc(100% - 24px));
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--linea-fuerte);
  background: rgba(25, 26, 21, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  font-size: 0.95rem;
  line-height: 1.5;
}
.cookies-titulo { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.cookies p:not(.cookies-titulo) { color: var(--crema-suave); }
.cookies-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.boton-cookies { min-height: 46px; background: var(--crema); color: var(--tinta); }
.boton-cookies:hover { background: #fff; }

/* ---------- Tableta ---------- */
@media (max-width: 1040px) {
  .bloques { grid-template-columns: 1fr 1fr; }
  .bloque-ruta { grid-row: auto; grid-column: 1 / -1; }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
}
@media (max-width: 960px) {
  /* La pregunta no cabe en 16:9: la caja crece con ella; el play y el vídeo siguen en 16:9 */
  .reproductor[data-fase='pregunta'] { aspect-ratio: auto; }
  .opciones { grid-template-columns: 1fr 1fr; }
  .opcion, .opcion:nth-child(4) { grid-column: auto; }
  .opcion:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .play { padding-bottom: 4%; }
  .play-circulo { width: 62px; box-shadow: 0 0 0 7px rgba(139, 92, 246, 0.22), 0 14px 40px -8px rgba(139, 92, 246, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.25); }
  .play-texto { display: none; }   /* la etiqueta «Clase gratuita · 4 min» ya está justo encima */
  .opciones { grid-template-columns: 1fr; gap: 9px; }
  .opcion:nth-child(5) { grid-column: auto; }
  .opcion { min-height: 0; padding: 11px 14px; column-gap: 12px; border-radius: 14px; }
  .opcion-icono { width: 40px; height: 40px; border-radius: 11px; }
  .opcion-icono svg { width: 21px; height: 21px; }
  .opcion-texto strong { font-size: 0.97rem; }
  .opcion-texto span { font-size: 0.82rem; }
  .pregunta { padding: 24px 14px 20px; }
  .pregunta-nota { font-size: 0.8rem; }
}

/* ---------- Móvil: la escena arriba y el texto debajo, todo en una pantalla ---------- */
@media (max-width: 860px) {
  .portada { min-height: 0; justify-content: flex-start; }
  .escena { bottom: auto; height: calc(56vw + 70px); }
  .capa-fondo { object-position: 70% 40%; }
  .capa-medio { width: 118%; right: -9%; bottom: 25%; }
  .velo {
    background:
      linear-gradient(0deg, var(--tinta-honda) 0%, rgba(17, 18, 14, 0.4) 32%, rgba(17, 18, 14, 0) 58%),
      linear-gradient(180deg, rgba(17, 18, 14, 0.5) 0%, rgba(17, 18, 14, 0) 30%);
  }
  .portada-rejilla { grid-template-columns: 1fr; gap: 0; padding-top: 34px; }
  .portatil { order: -1; width: 116%; margin: 0 -18% 0 2%; }   /* el banco se sale por la derecha */
  .nota-mano { top: auto; bottom: 3%; left: 4%; right: auto; font-size: 0.98rem; }
  .portada-texto { padding-top: 6px; padding-bottom: 26px; }
  .portada h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); max-width: 12ch; }
  .entradilla { margin-top: 14px; font-size: 1.04rem; }
  .botones { margin-top: 20px; gap: 10px; }
  .portada .contador { margin-top: 16px; }
  .sellos { display: grid; grid-template-columns: 1fr 1fr; font-size: 0.66rem; letter-spacing: 0.08em; gap: 10px 14px; }

  .destacado { grid-template-columns: 1fr; gap: 0; margin-bottom: 14px; }
  .destacado-marco { border-radius: 13px; }
  .destacado figcaption { margin-top: 14px; font-size: 1.05rem; min-height: 5.6em; }   /* que no salte al cambiar de ejemplo */
  .destacado-numero { margin-bottom: 8px; }
  .miniaturas { gap: 8px; }
  .miniatura-imagen { border-radius: 8px; }
  /* En el móvil, solo las imágenes; el nombre sigue ahí para los lectores de pantalla */
  .miniatura-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pasos { grid-template-columns: 1fr; gap: 44px; }
  .pasos li { display: grid; grid-template-columns: 38% 1fr; column-gap: 18px; align-items: center; }
  .pasos img { grid-row: span 3; height: auto; width: 100%; max-height: 220px; margin: 0; object-position: center; }
  .pasos li::after { display: none; }
  .criterio-rejilla { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .largo { display: none; }
  .hoja { margin: 10px 8px 24px; }
  .barra { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid var(--linea); transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .barra.visible { transform: none; }
  .barra-marca { display: none; }
  .barra-dentro { gap: 10px; justify-content: space-between; }
  .barra .contador { border: 0; padding: 0; font-size: 0.7rem; letter-spacing: 0.02em; }
}
@media (max-width: 720px) {
  .botones .boton { flex: 1 1 100%; }
  .bloques { grid-template-columns: 1fr; }
  .tramo-precio { font-size: 1.45rem; }
  .tramos li.actual .tramo-precio { font-size: 1.9rem; }
  .tramos li.actual .tramo-nombre::after { display: block; width: max-content; margin: 6px 0 0; }
  .llamada .boton { flex: 1 1 100%; }
  .llamada { justify-content: center; text-align: center; }
}

/* ---------- Página legal ---------- */
.legal-texto { padding-top: 64px; padding-bottom: 96px; }
.legal-texto h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; }
.legal-texto h2 { font-size: 1.4rem; letter-spacing: -0.02em; margin: 44px 0 12px; max-width: none; }
.legal-texto p, .legal-texto li { color: var(--crema-suave); }
.legal-texto p + p { margin-top: 12px; }
.legal-texto ul { padding-left: 1.2em; }
.legal-texto li { margin: 6px 0; }
.legal-texto a { color: var(--crema); }
.legal-texto .etiqueta a { text-decoration: none; color: var(--gris); }
.legal-texto code { font-family: var(--mono); font-size: 0.88em; color: var(--crema); }
.tabla { overflow-x: auto; margin-top: 12px; }
.tabla table { border-collapse: collapse; min-width: 640px; font-size: 0.92rem; }
.tabla th, .tabla td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); }
@media (max-width: 420px) {
  .etiqueta { letter-spacing: 0.16em; font-size: 0.72rem; }
  .contador { font-size: 0.76rem; letter-spacing: 0.03em; }
}
