/* ============================================================ base y lienzo */
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #050406; color: var(--perla); }
body { font-family: var(--f-texto); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: var(--tinta); }
/* grano y viñeta del registro «barro» */
#stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 50; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .45  0 0 0 0 .4  0 0 0 .55 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"); }
body.negro #stage::after { content: ""; position: absolute; inset: 0; background: #000; z-index: 200; }

.slide { position: absolute; inset: 0; display: none; padding: 92px 120px 118px; overflow: hidden;
  background: var(--fx-fondo), var(--tinta); }
.slide.activa { display: block; animation: entrar .55s ease both; }
@keyframes entrar { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slide.activa { animation: none; } }

/* ============================================================ tipografía */
.kicker { font-family: var(--f-neo); font-weight: 700; font-size: 24px; letter-spacing: .18em; text-transform: uppercase; color: var(--oro); margin: 0 0 22px; display: flex; align-items: center; gap: 18px; }
.kicker::after { content: ""; width: 150px; height: 2px; background: linear-gradient(90deg, var(--oro) 0 62%, transparent 62% 72%, var(--oro) 72% 80%, transparent 80%); opacity: .8; }
.kicker.cian { color: var(--cian); } .kicker.cian::after { background: linear-gradient(90deg, var(--cian) 0 62%, transparent 62% 72%, var(--cian) 72% 80%, transparent 80%); }
.kicker.magenta { color: var(--magenta-claro); } .kicker.magenta::after { background: linear-gradient(90deg, var(--magenta) 0 62%, transparent 62% 72%, var(--magenta) 72% 80%, transparent 80%); }
.kicker.azogue { color: var(--azogue); } .kicker.azogue::after { background: linear-gradient(90deg, var(--azogue) 0 62%, transparent 62% 72%, var(--azogue) 72% 80%, transparent 80%); }
h1, h2 { font-family: var(--f-titulo); font-weight: 400; margin: 0; line-height: 1.02; letter-spacing: -.005em; color: var(--perla); text-wrap: balance; }
h1 { font-size: 132px; }
h2 { font-size: 80px; margin-bottom: 34px; }
h2 em, h1 em { font-style: italic; color: var(--oro); }
.neo h2, h2.neo { font-family: var(--f-titulo); font-weight: 400; letter-spacing: .08em; font-size: 76px; }
p { margin: 0; }
.cuerpo { font-size: 38px; line-height: 1.34; color: var(--perla); max-width: 1000px; }
.cuerpo + .cuerpo { margin-top: 24px; }
.cuerpo b { color: var(--oro); font-weight: 700; }
.cuerpo em, p .it, li .it { font-family: var(--f-barroco); font-style: italic; font-weight: 400; font-size: 1.04em; }
.secund { color: var(--nacar); }
.peq { font-size: 30px; line-height: 1.35; color: var(--nacar); }
.ref { font-family: var(--f-neo); font-weight: 600; font-size: 24px; letter-spacing: .03em; color: var(--azogue); margin-top: 14px; }
.voz-diaz { color: var(--azogue); font-style: italic; }
.cita { font-family: var(--f-barroco); font-style: italic; font-weight: 400; font-size: 66px; line-height: 1.12; color: var(--perla); text-wrap: balance; }
.cita::before { content: "«"; color: var(--oro); margin-right: .06em; }
.cita::after { content: "»"; color: var(--oro); margin-left: .06em; }
.cita.media { font-size: 52px; }
.cita.chica { font-size: 42px; }
.tachado { position: relative; display: inline-block; }
.tachado::after { content: ""; position: absolute; left: -.06em; right: -.06em; top: 54%; height: .085em; background: var(--bermellon-claro); transform: rotate(-7deg); }
.marca-oro { color: var(--oro); } .marca-cian { color: var(--cian); } .marca-magenta { color: var(--magenta-claro); } .marca-bermellon { color: var(--bermellon-claro); } .marca-azogue { color: var(--azogue); }
.credito { position: absolute; font-family: var(--f-neo); font-weight: 600; font-size: 19px; letter-spacing: .02em; color: rgba(var(--linea-rgb),.72); }
.credito.ia::before { content: "✦ "; color: var(--oro); }
.etiqueta-ia { font-family: var(--f-neo); font-weight: 600; font-size: 18px; color: rgba(var(--linea-rgb),.8); background: rgba(var(--fondo-rgb),.72); padding: 6px 12px; border-radius: 99px; position: absolute; }

/* ============================================================ pasos */
[data-from] { transition: opacity .55s ease, transform .55s ease, filter .55s ease; }
[data-from]:not(.on) { opacity: 0; transform: translateY(14px); }
svg [data-from]:not(.on) { transform: none; }
[data-until].off { opacity: 0; }

/* ============================================================ pie */
.pie { position: absolute; left: 120px; right: 190px; bottom: 30px; height: 40px; display: flex; align-items: center; justify-content: space-between; z-index: 60; pointer-events: none; font-family: var(--f-neo); font-weight: 400; font-size: 15px; letter-spacing: .1em; color: rgba(var(--linea-rgb),.7); }
body.sin-pie .pie { opacity: 0; }
.pie .obra { text-transform: uppercase; letter-spacing: .16em; }
.pie .modulos { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; text-transform: uppercase; letter-spacing: .12em; }
.pie .modulos li { position: relative; transition: color .3s; }
.pie .modulos li.actual { color: var(--oro); }
.pie .modulos li.actual { font-weight: 700; }
.pie .modulos li.actual::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px; background: var(--oro); }
.pie .num { font-size: 16px; letter-spacing: .08em; color: var(--nacar); }
.pie .num b { color: var(--perla); font-weight: 700; }
#progreso { position: absolute; left: 0; bottom: 0; height: 4px; width: 1920px; z-index: 61; pointer-events: none; }
#progreso::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--oro-viejo), var(--oro)); transition: width .5s ease; }
body.sin-pie #progreso { opacity: .5; }
body.pie-claro .pie { color: #7a6a5c; } body.pie-claro .pie .num, body.pie-claro .pie .num b { color: var(--tinta-2); } body.pie-claro .pie .modulos li.actual { color: var(--oro-viejo); } body.pie-claro .pie .modulos li.actual::after { background: var(--oro-viejo); }

/* controles discretos (arriba a la derecha) */
.controles { position: absolute; right: 44px; bottom: 26px; z-index: 70; display: flex; gap: 10px; opacity: .5; transition: opacity .3s; }
#stage:hover .controles, .controles:focus-within { opacity: 1; }
.controles .btn-icono { --t: 44px; box-shadow: none; }
#vivo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* índice */
#indice { position: absolute; inset: 0; z-index: 150; background: var(--tinta); padding: 70px 120px; }
#indice[hidden] { display: none; }
#indice h2 { font-size: 56px; margin-bottom: 26px; }
#indice { color: var(--perla); }
#indice ol { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 50px; }
#indice li { break-inside: avoid; }
#indice ol button { display: block; width: 100%; text-align: left; font-family: var(--f-texto); font-size: 23px; color: var(--nacar); background: none; border: 0; padding: 7px 0; cursor: pointer; border-bottom: 1px solid rgba(var(--linea-rgb),.1); }
#indice ol button:hover, #indice ol button:focus-visible { color: var(--perla); outline: none; }
#indice ol button .n { font-family: var(--f-neo); font-weight: 700; color: var(--oro); margin-right: 14px; }
#indice .cerrar { position: absolute; right: 120px; top: 70px; }
#indice .ayuda-teclas { position: absolute; left: 120px; bottom: 56px; font-family: var(--f-neo); font-size: 20px; color: var(--azogue); letter-spacing: .04em; }
#btn-preparar { position: absolute; right: 120px; bottom: 50px; display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-neo); font-weight: 700; font-size: 22px; color: var(--tinta); background: var(--oro); border: 0; border-radius: 99px; padding: 14px 26px 14px 20px; cursor: pointer; }
#btn-preparar svg, .boton-angel svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#btn-preparar:hover { filter: brightness(1.08); }

/* ============================================================ plantillas */
/* retícula en dos columnas */
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; height: 100%; }
.texto-img { display: grid; grid-template-columns: 1fr 640px; gap: 84px; height: 100%; align-items: start; }
.texto-img.ancha { grid-template-columns: 1fr 820px; }
.col { min-width: 0; }
.marco-img { position: relative; height: 100%; max-height: 870px; border-radius: 3px; overflow: hidden; background: var(--barro); box-shadow: var(--sombra); }
.marco-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marco-img.contener img { object-fit: contain; background: var(--barro); }
.marco-img .credito { left: 16px; bottom: 12px; background: rgba(var(--fondo-rgb),.72); padding: 5px 10px; border-radius: 4px; }
/* filete de oro interrumpido en imágenes IA */

/* imagen a sangre con velo */
.sangre { position: absolute; inset: 0; background-size: cover; background-position: center; }
.velo-izq { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--fondo-rgb),.96) 0%, rgba(var(--fondo-rgb),.9) 34%, rgba(var(--fondo-rgb),.35) 62%, rgba(var(--fondo-rgb),0) 80%); }
.velo-abajo { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(var(--fondo-rgb),.95) 0%, rgba(var(--fondo-rgb),.6) 30%, rgba(var(--fondo-rgb),0) 58%); }
.sobre { position: relative; z-index: 2; }

/* portada */
.portada { padding: 0; }
.portada .banda { position: absolute; left: 0; right: 0; top: 204px; height: 814px; background-size: cover; background-position: center; }
.portada .banda::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--fondo-rgb),0) 45%, rgba(var(--fondo-rgb),.55) 70%, rgba(var(--fondo-rgb),.88) 100%), linear-gradient(0deg, rgba(var(--fondo-rgb),.9) 0%, rgba(var(--fondo-rgb),0) 26%), linear-gradient(180deg, rgba(var(--fondo-rgb),.85) 0%, rgba(var(--fondo-rgb),0) 18%); }
.portada .titulo-portada { position: absolute; right: 120px; top: 300px; width: 900px; text-align: right; z-index: 3; }
.portada h1 { font-size: 150px; line-height: .92; }
.portada h1 .y { display: block; font-style: italic; font-size: 92px; color: var(--oro); margin: 14px 0 10px; }
.portada .autor { font-family: var(--f-neo); font-weight: 600; font-size: 30px; letter-spacing: .18em; text-transform: uppercase; color: var(--nacar); position: absolute; left: 120px; top: 92px; }
.portada .autor b { color: var(--perla); font-weight: 700; }
.portada .sub { font-family: var(--f-barroco); font-style: italic; font-weight: 400; font-size: 46px; color: var(--nacar); margin-top: 30px; }
.portada .apost { position: absolute; left: 120px; bottom: 34px; font-family: var(--f-neo); font-size: 22px; letter-spacing: .1em; color: var(--azogue); text-transform: uppercase; z-index: 3; }
.portada .credito { right: 120px; bottom: 40px; z-index: 3; }

/* cita a pantalla */
.pantalla-cita { display: flex; flex-direction: column; justify-content: center; height: 100%; max-width: 1400px; }

/* figura / esquema SVG grande */
.figura { position: relative; width: 100%; }
.figura.alta { height: 640px; }
.figura.media { height: 520px; }
.figura > svg, .figura svg.fig { width: 100%; height: 100%; }
.leyenda { display: flex; gap: 36px; font-family: var(--f-neo); font-weight: 600; font-size: 22px; color: var(--nacar); letter-spacing: .04em; margin-top: 18px; }
.leyenda span::before { content: ""; display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin-right: 10px; vertical-align: -2px; }
.leyenda .l-sdo::before { background: var(--oro); }
.leyenda .l-snte::before { background: var(--nacar); }
.leyenda .l-aus::before { background: transparent; border: 3px dashed var(--bermellon-claro); width: 12px; height: 12px; }
.leyenda .l-tray::before { background: var(--cian); }

/* 3D incrustado */
.con3d { padding: 70px 90px 110px; }
.con3d .cabecera3d { position: absolute; left: 96px; top: 30px; z-index: 5; max-width: 900px; pointer-events: none; }
.con3d .cabecera3d h2 { font-size: 40px; line-height: 1.1; margin-bottom: 0; }
.con3d::after { content: ""; position: absolute; left: 96px; right: 96px; top: 96px; height: 1px; background: linear-gradient(90deg, rgba(212,166,42,.5), rgba(212,166,42,0) 70%); z-index: 4; }
.embed3d { position: absolute; left: 0; right: 0; top: 97px; bottom: 0; background: var(--tinta) center/cover no-repeat; }
.embed3d iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
.embed3d.vivo { background-image: none !important; }

/* díptico */
.diptico { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.diptico > div { position: relative; overflow: hidden; }
.diptico > div + div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--azogue), #5d6568 50%, var(--azogue)); z-index: 3; }
.diptico .img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.diptico .txt { position: absolute; left: 90px; right: 90px; bottom: 150px; z-index: 2; }
.diptico .txt .quien { font-family: var(--f-neo); font-weight: 700; font-size: 30px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }

/* galería de síntomas / tarjetas */
.tarjetas { display: grid; gap: 28px; }
.tarjetas.t3 { grid-template-columns: repeat(3, 1fr); }
.tarjetas.t2 { grid-template-columns: repeat(2, 1fr); }
.tarjeta { background: linear-gradient(160deg, rgba(var(--panel2-rgb),.95), rgba(var(--panel-rgb),.9)); border: 1px solid rgba(var(--linea-rgb),.16); border-radius: 6px; padding: 28px 30px; position: relative; box-shadow: 0 6px 18px rgba(60,40,20,.06); }
.tarjeta h3 { font-family: var(--f-titulo); font-weight: 400; font-size: 44px; margin: 0 0 10px; color: var(--perla); line-height: 1.05; }
.tarjeta p { font-size: 29px; line-height: 1.32; color: var(--nacar); }
.tarjeta .letra { position: absolute; right: 22px; top: 16px; font-family: var(--f-neo); font-weight: 700; font-size: 40px; color: rgba(212,166,42,.55); }
.tarjeta.s { border-top: 4px solid var(--bermellon); } .tarjeta.p { border-top: 4px solid var(--cian); } .tarjeta.c { border-top: 4px solid var(--nacar); }

/* taller (tema claro «Cubo blanco») */
.claro { background: radial-gradient(70% 60% at 15% 5%, #FFFFFF 0%, rgba(255,255,255,0) 65%), #FBF7EF !important; color: var(--tinta-2); }
.claro h2, .claro h1 { color: var(--tinta-2); }
.claro .kicker { color: var(--oro-viejo); }
.claro .kicker::after { background: linear-gradient(90deg, var(--oro-viejo) 0 62%, transparent 62% 72%, var(--oro-viejo) 72% 80%, transparent 80%); }
.claro .cuerpo { color: var(--tinta-2); }
.claro .cuerpo b { color: var(--cian-prof); }
.claro .peq, .claro .secund { color: #4a3d33; }
.claro .ref { color: #55606a; }
.claro .tarjeta { background: #fbf8f2; border: 1px solid #d9d0c2; box-shadow: 0 10px 30px rgba(60,40,20,.08); }
.claro .tarjeta h3 { color: var(--tinta-2); }
.claro .tarjeta p { color: #3a2f27; }
.claro .tarjeta .letra { color: var(--oro-viejo); }
.claro .pasos-taller li::marker { color: var(--oro-viejo); }
.pasos-taller { font-size: 36px; line-height: 1.34; padding-left: 1.2em; margin: 0; }
.pasos-taller li { margin-bottom: 16px; padding-left: 8px; }
.pasos-taller li::marker { font-family: var(--f-neo); font-weight: 700; color: var(--oro); }
body.sin-pie .pie { opacity: 0; }
.slide.claro ~ .pie { color: #6b5d50; }

/* temporizador */
.temporizador { position: absolute; right: 120px; top: 84px; z-index: 5; cursor: pointer; text-align: right; user-select: none; }
.temporizador .tiempo { font-family: var(--f-neo); font-weight: 700; font-size: 104px; line-height: 1; color: var(--oro-viejo); font-variant-numeric: tabular-nums; }
.temporizador .rotulo-viejo { font-family: var(--f-neo); font-weight: 600; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; color: #6b5d50; margin-top: 6px; }
.temporizador.corriendo .tiempo { color: var(--cian-prof); }
.temporizador.fin .tiempo { color: var(--bermellon); animation: latido 1s ease-in-out 3; }
@keyframes latido { 50% { opacity: .35; } }
.slide:not(.claro) .temporizador .tiempo { color: var(--oro); }
.slide:not(.claro) .temporizador .rotulo-viejo { color: var(--nacar); }

/* tabla de mecanismos / reflejos */
.tabla { width: 100%; border-collapse: collapse; font-size: 32px; }
.tabla th { font-family: var(--f-neo); font-weight: 700; font-size: 26px; letter-spacing: .1em; text-transform: uppercase; text-align: left; color: var(--oro); padding: 0 24px 16px 0; border-bottom: 2px solid rgba(212,166,42,.4); }
.tabla td { padding: 22px 24px 22px 0; border-bottom: 1px solid rgba(var(--linea-rgb),.14); vertical-align: top; line-height: 1.3; }
.tabla td:first-child { font-family: var(--f-titulo); font-weight: 400; font-size: 44px; color: var(--perla); width: 360px; }

/* comparación Lope / Góngora */
.versos { font-family: var(--f-titulo); font-weight: 400; font-size: 58px; line-height: 1.18; color: var(--perla); }
.versos .dif { color: var(--magenta-claro); font-style: italic; }
.versos .igual { color: var(--nacar); }
.autor-verso { font-family: var(--f-neo); font-weight: 700; font-size: 28px; letter-spacing: .14em; text-transform: uppercase; color: var(--oro); margin-bottom: 20px; }

/* contador de ángeles */
.angeles { position: relative; }
.angeles .campo { position: absolute; inset: 0; pointer-events: none; }
.angel { position: absolute; color: var(--oro); text-shadow: 0 0 18px rgba(212,166,42,.6); animation: aparecer .4s ease both; }
@keyframes aparecer { from { opacity: 0; transform: scale(.2); } }
.boton-angel { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-neo); font-weight: 700; font-size: 30px; color: var(--tinta); background: var(--oro); border: 0; border-radius: 99px; padding: 14px 30px 14px 22px; cursor: pointer; transition: transform .15s; }
.boton-angel:active { transform: scale(.96); }
.contador { font-family: var(--f-neo); font-weight: 600; font-size: 26px; color: var(--nacar); margin-left: 24px; }
.contador .cuenta { color: var(--bermellon-claro); font-weight: 700; font-size: 34px; }

/* genealogía, créditos */
.creditos-lista { columns: 2; column-gap: 70px; font-size: 21px; line-height: 1.42; color: var(--nacar); }
.creditos-lista p { break-inside: avoid; margin-bottom: 8px; }
.creditos-lista b { color: var(--perla); font-weight: 700; }

/* utilidades de posición */
.abs { position: absolute; }
.centro-v { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.mt-s { margin-top: 18px; } .mt-m { margin-top: 36px; } .mt-l { margin-top: 60px; }
.ancho-900 { max-width: 900px; } .ancho-1100 { max-width: 1100px; } .ancho-760 { max-width: 760px; }
.chip { display: inline-block; font-family: var(--f-neo); font-weight: 600; font-size: 22px; letter-spacing: .06em; padding: 6px 14px; border-radius: 99px; border: 1px solid currentColor; }
.pregunta { font-family: var(--f-neo); font-weight: 700; font-size: 44px; line-height: 1.15; color: var(--cian); letter-spacing: -.01em; }
.claro .pregunta { color: var(--cian-prof); }
.revela { border-left: 4px solid var(--oro); padding-left: 26px; }

.rotulo-img { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 30px 24px; color: var(--perla) !important; background: linear-gradient(0deg, rgba(var(--fondo-rgb),.92), rgba(var(--fondo-rgb),0)); }
.tabla.compacta td { padding: 12px 20px 12px 0; }
.tabla.compacta td:first-child { font-size: 34px !important; width: 280px; }

.tarjetas.grandes .tarjeta { padding: 44px 44px 48px; min-height: 380px; }
.tarjetas.grandes .tarjeta h3 { font-size: 60px; margin-bottom: 18px; }
.tarjetas.grandes .tarjeta p { font-size: 36px; }
.tarjetas.grandes .tarjeta .ref { font-size: 26px; margin-top: 22px; }
.tarjetas.grandes .tarjeta .letra { font-size: 56px; }

/* tema claro: ajustes */
.diptico > div > .img::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34%; background: linear-gradient(180deg, rgba(var(--fondo-rgb),.88) 0%, rgba(var(--fondo-rgb),0) 100%); }
.creditos-lista { font-size: 25px; line-height: 1.45; }
.contador { font-size: 28px; }

#indice .ayuda-teclas { max-width: 1180px; line-height: 2.1; font-size: 20px; }
kbd { display: inline-block; min-width: 1.7em; padding: 2px 8px; margin: 0 4px 0 14px; border: 1px solid rgba(var(--linea-rgb), .4); border-bottom-width: 3px; border-radius: 6px; font-family: var(--f-neo); font-weight: 700; font-size: .95em; line-height: 1.3; text-align: center; color: var(--perla); background: rgba(var(--panel-rgb), .9); }
kbd:first-child { margin-left: 0; }

/* diapositivas 3D: botón de pantalla completa a la altura del título compacto */
.con3d .btn-icono.abrir3d { top: 20px; right: 96px; --t: 54px; }
