/* =========================================================================
   BIANCO BAR ESCAPE ROOM — sistema de diseño
   Oscuro narrativo (bar cerrado en 1980) · rojo sangre · luz cálida de puerta
   Tokens en HEX con equivalencia OKLCH documentada.
   ========================================================================= */

/* ---------- Fuentes autohospedadas (OFL) ---------- */
@font-face {
  font-family: 'InterVar';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PlexMono';
  src: url('../fonts/plex-mono-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'PlexMono';
  src: url('../fonts/plex-mono-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Fondos (oklch(0.146 0.004 285) etc.) */
  --bg: #0B0B0D;
  --bg-2: #101013;
  --surface: #17171B;
  --surface-2: #1D1D22;
  --line: #26262C;
  --line-soft: #1E1E24;

  /* Tinta tiza */
  --tiza: #F4F1EC;      /* oklch(0.955 0.006 84)  */
  --tiza-2: #C9C5BD;    /* oklch(0.812 0.008 84)  */
  --muted: #938F88;     /* oklch(0.63 0.008 84)   */

  /* Rojo marca (del logo) */
  --rojo: #D21F2B;      /* oklch(0.52 0.196 27)  */
  --rojo-vivo: #FF2E3B; /* oklch(0.62 0.235 25)  */
  --rojo-prof: #8E1519; /* oklch(0.37 0.145 27)  */

  /* Luz cálida de la puerta */
  --luz: #FFB36B;       /* oklch(0.82 0.115 63)  */
  --luz-2: #FFD9A8;     /* oklch(0.90 0.072 74)  */

  /* Tipografía */
  --font-body: 'InterVar', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'PlexMono', 'Courier New', monospace;

  /* Escala fluida */
  --fs-hero: clamp(2.35rem, 1.2rem + 5.2vw, 4.6rem);
  --fs-h1: clamp(2.1rem, 1.3rem + 3.4vw, 3.4rem);
  --fs-h2: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
  --fs-h3: clamp(1.15rem, 1.02rem + 0.7vw, 1.4rem);
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --fs-small: 0.875rem;

  /* Ritmo */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --radius: 12px;
  --radius-lg: 18px;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.34, 1.4, 0.44, 1);
}

/* ---------- Reset breve ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--tiza-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { color: var(--luz); text-decoration-color: color-mix(in oklab, var(--luz) 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--luz-2); }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--rojo); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--rojo-prof); }

h1, h2, h3, h4 {
  color: var(--tiza);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 900; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin-block: 0 var(--space-2); max-width: 70ch; }
strong { color: var(--tiza); font-weight: 700; }

.mono { font-family: var(--font-mono); letter-spacing: 0.01em; }

/* ---------- Utilidades ---------- */
.container { width: min(1180px, 100% - clamp(2rem, 6vw, 4rem)); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - clamp(2rem, 6vw, 4rem)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--rojo); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--luz-2); outline-offset: 3px; border-radius: 4px; }

/* Grano de película fijo (efecto cine, estático = barato) */
.grain {
  position: fixed; inset: -50px; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* Revelado al entrar en viewport (IntersectionObserver añade .in-view) */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.rv.in-view { opacity: 1; transform: none; }
.rv-late { transition-delay: 0.15s; }

/* Subrayado de tiza animado bajo H2 */
.chalk-underline { position: relative; display: inline-block; padding-bottom: 10px; }
.chalk-underline::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 7px; width: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q 50 1 100 4 T 198 3' fill='none' stroke='%23D21F2B' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s var(--ease-out) 0.2s;
}
.in-view .chalk-underline::after, .chalk-underline.in-view::after { clip-path: inset(0 0 0 0); }

/* Listas con marca */
.tick-list { list-style: none; padding-left: 0; display: grid; gap: 10px; margin-block: var(--space-2) var(--space-3); }
.tick-list li { padding-left: 1.7em; position: relative; }
.tick-list li::before {
  content: ''; position: absolute; left: 0; top: 0.42em; width: 0.95em; height: 0.95em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5 6.5 12.5 13.5 3.5' fill='none' stroke='%23FF2E3B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.8em 1.7em;
  border-radius: var(--radius); border: 0;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.015em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease-snap), filter 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn:active { transform: scale(0.97); }

/* CTA eléctrico: borde conic girando (eclipse solar) + halo */
/* inherits:true → los pseudo-elementos heredan el ángulo que fija el JS en el botón. */
@property --bb-ang { syntax: '<angle>'; initial-value: 0deg; inherits: true; }
.btn-electric {
  position: relative; isolation: isolate;
  background: linear-gradient(140deg, var(--rojo) 10%, var(--rojo-prof) 90%);
  color: #fff;
  box-shadow: 0 4px 22px -6px color-mix(in oklab, var(--rojo-vivo) 55%, transparent);
}
.btn-electric::before,
.btn-electric::after {
  content: ''; position: absolute; inset: -2.5px; z-index: -1;
  border-radius: calc(var(--radius) + 3px);
  background: conic-gradient(from var(--bb-ang),
    transparent 0turn 0.28turn,
    var(--rojo-vivo) 0.36turn,
    var(--luz-2) 0.5turn,
    var(--rojo-vivo) 0.64turn,
    transparent 0.72turn 1turn);
  animation: bb-rotate var(--electric-spd, 3.4s) linear infinite;
}
.btn-electric::before { filter: blur(9px); opacity: 0.85; }
.btn-electric::after {
  padding: 2.5px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  background-clip: border-box;
}
@keyframes bb-rotate { to { --bb-ang: 360deg; } }
/* Con JS activo, la rotación la gobierna rAF con velocidad variable suave. */
.js .btn-electric::before, .js .btn-electric::after { animation: none; }
.btn-electric:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.12); }

.btn-ghost {
  background: transparent; color: var(--tiza);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.btn-ghost:hover { border-color: var(--luz); color: var(--luz-2); background: var(--surface); }

.cta-group { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-block: var(--space-3); }
.cta-micro { font-size: var(--fs-small); color: var(--muted); margin-top: -0.6rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s ease;
}
/* El blur vive en un pseudo-elemento: si estuviera en el propio header, backdrop-filter
   lo convertiría en containing block del nav off-canvas (position: fixed) y lo atraparía. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner { position: relative; z-index: 1; }
.site-header.scrolled { box-shadow: 0 8px 30px -18px rgba(210, 31, 43, 0.35); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: var(--header-h);
}
.brand img { width: auto; height: 46px; transition: height 0.3s ease; }
.scrolled .brand img { height: 40px; }

.site-nav { display: flex; align-items: center; gap: var(--space-3); }
.menu, .menu-footer, .menu-legal { list-style: none; padding: 0; margin: 0; }
.menu { display: flex; gap: clamp(0.6rem, 1.6vw, 1.6rem); align-items: center; }
.menu a {
  display: inline-block; padding: 10px 4px;
  color: var(--tiza-2); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a { color: var(--tiza); border-bottom-color: var(--rojo); }

/* Submenú desplegable accesible */
.menu .menu-item-has-children { position: relative; }
.menu .menu-item-has-children > a::after {
  content: ''; display: inline-block; margin-left: 7px; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease;
}
.menu .sub-menu {
  list-style: none; position: absolute; top: 100%; left: -14px; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.menu .menu-item-has-children:hover > .sub-menu,
.menu .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.menu .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; border-bottom: 0; }
.menu .sub-menu a:hover { background: var(--surface-2); color: var(--luz-2); }

.nav-extra { display: none; }
.header-side { display: flex; align-items: center; gap: 14px; }
.btn-header { min-height: 42px; padding: 0.55em 1.3em; font-size: 0.95rem; }

.session-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--tiza-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; background: var(--surface);
  white-space: nowrap;
}
.session-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo-vivo); animation: bb-pulse 2.2s ease-in-out infinite; }
@keyframes bb-pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 46, 59, 0.18); } }

.nav-toggle { display: none; }

/* ---------- Navegación móvil ---------- */
@media (max-width: 1024px) {
  .session-chip { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
    background: none; border: 1px solid var(--line); border-radius: 10px;
    color: var(--tiza); padding: 9px 12px; cursor: pointer;
  }
  .nav-toggle-label { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
  .bars { display: grid; gap: 4px; }
  .bars i { display: block; width: 22px; height: 2px; background: var(--tiza); transition: transform 0.3s var(--ease-snap), opacity 0.2s; }
  [aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  [aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  [aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: color-mix(in oklab, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: var(--space-4) clamp(1.4rem, 6vw, 3rem);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
    overflow-y: auto;
  }
  .site-nav.open { transform: none; visibility: visible; transition: transform 0.45s var(--ease-out), visibility 0s; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu > li { border-bottom: 1px solid var(--line-soft); }
  .menu a { display: block; padding: 16px 4px; font-size: 1.15rem; border-bottom: 0; }
  .menu .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: 0; box-shadow: none; padding: 0 0 10px 16px; display: none;
  }
  .menu .menu-item-has-children.open-sub > .sub-menu { display: block; }
  .menu .sub-menu a { font-size: 1rem; color: var(--tiza-2); padding: 10px 8px; }
  .nav-extra { display: flex; align-items: center; gap: 16px; margin-top: var(--space-3); }
  .nav-tel { color: var(--tiza); font-size: 1.05rem; text-decoration: none; }
  body.nav-locked { overflow: hidden; }
}
@media (min-width: 1025px) { .btn-nav { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: clip;
  display: grid; align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding-block: var(--space-5);
}
.hero-inner { display: grid; gap: var(--space-4); align-items: center; grid-template-columns: 1.05fr 0.95fr; position: relative; z-index: 3; }
.hero-copy { max-width: 640px; }
.hero-kicker {
  display: inline-flex; gap: 10px; align-items: center;
  font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--luz);
  margin-bottom: var(--space-2);
}
.hero-kicker::before { content: ''; width: 34px; height: 1px; background: var(--luz); opacity: 0.7; }
.hero h1 { font-size: var(--fs-hero); margin-bottom: var(--space-2); }
.hero-hook { font-size: clamp(1.1rem, 1rem + 0.8vw, 1.35rem); color: var(--tiza); font-weight: 500; line-height: 1.5; max-width: 56ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: var(--space-3); color: var(--muted); font-size: 0.86rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta b { color: var(--tiza); font-weight: 700; }

.hero-door { position: relative; justify-self: center; width: min(430px, 82vw); }
.hero-door img { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7)); }
.hero-door::before {
  /* rendija de luz cálida que respira */
  content: ''; position: absolute; inset: 8% 30% 6% 30%; z-index: -1;
  background: radial-gradient(ellipse 55% 48% at 62% 52%, color-mix(in oklab, var(--luz) 34%, transparent), transparent 70%);
  animation: bb-breathe 6.5s ease-in-out infinite;
}
@keyframes bb-breathe { 50% { opacity: 0.55; transform: scale(1.06); } }

/* Niebla en capas (scroll-driven si el navegador puede) */
.fog { position: absolute; inset: -10% -20%; pointer-events: none; z-index: 1; opacity: 0.5; }
.fog i { position: absolute; inset: 0; background: radial-gradient(38% 26% at 24% 78%, rgba(220, 215, 205, 0.05), transparent 70%); animation: bb-fog 70s linear infinite alternate; }
.fog i:nth-child(2) { background: radial-gradient(30% 22% at 78% 66%, rgba(220, 215, 205, 0.045), transparent 70%); animation-duration: 95s; animation-delay: -30s; }
.fog i:nth-child(3) { background: radial-gradient(46% 30% at 55% 88%, rgba(210, 31, 43, 0.05), transparent 72%); animation-duration: 120s; animation-delay: -60s; }
@keyframes bb-fog { to { transform: translateX(6%) translateY(-2.5%) scale(1.05); } }
@supports (animation-timeline: scroll()) {
  .bb-home .fog i { animation: bb-fog-scroll linear both; animation-timeline: scroll(root); }
  @keyframes bb-fog-scroll { to { transform: translateX(8%) translateY(-5%) scale(1.08); } }
}

/* Tubo de neón que parpadea (guiño a la electrocución de 1980) */
.neon-line { position: relative; width: 130px; height: 3px; border-radius: 3px; background: var(--rojo-vivo); margin-block: var(--space-3) 0; box-shadow: 0 0 14px 1px var(--rojo-vivo); animation: bb-flicker 7s steps(1) infinite; }
@keyframes bb-flicker {
  0%, 100% { opacity: 1; }
  7% { opacity: 0.35; } 8% { opacity: 1; }
  23% { opacity: 0.6; } 24% { opacity: 1; }
  54% { opacity: 0.25; } 55% { opacity: 1; } 56% { opacity: 0.7; } 57% { opacity: 1; }
  81% { opacity: 0.5; } 82% { opacity: 1; }
}

.vignette::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.5) 100%); }

/* ---------- Secciones ---------- */
.section { padding-block: var(--space-6); position: relative; }
.section-tight { padding-block: var(--space-5); }
.section-kicker { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--rojo-vivo); margin-bottom: 12px; }
.section-head { max-width: 720px; margin-bottom: var(--space-4); }
.section-head p { color: var(--muted); }
.content-block { margin-bottom: var(--space-4); }
.content-block h2 { margin-bottom: var(--space-2); }
.content-block h3 { margin-block: var(--space-3) var(--space-1); }

.band { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

/* Tarjetas (audiencias, ventajas, posts) */
/* Reparto matemático: los huérfanos de la última fila quedan CENTRADOS (flex, no grid) */
.card-grid { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.card-grid > * { flex: 1 1 250px; min-width: min(250px, 100%); max-width: 420px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklab, var(--rojo) 55%, var(--line)); box-shadow: 0 22px 44px -24px rgba(210, 31, 43, 0.4); }
.card-kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rojo-vivo); }
.card h3 { font-size: 1.22rem; }
.card p { font-size: 0.95rem; color: var(--tiza-2); margin: 0; }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 0.92rem; color: var(--luz); text-decoration: none; }
.card-link::after { content: ' →'; transition: transform 0.2s; display: inline-block; }
.card:hover .card-link::after { transform: translateX(4px); }
.card > a.card-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* Pasos 1-2-3 */
.steps { counter-reset: paso; list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.steps > li { flex: 1 1 230px; min-width: min(230px, 100%); max-width: 420px; }
.steps li { counter-increment: paso; position: relative; padding: 26px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.steps li::before {
  content: counter(paso, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 700; font-size: 2rem; color: var(--rojo-vivo);
  display: block; margin-bottom: 10px; text-shadow: 0 0 18px rgba(255, 46, 59, 0.4);
}
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { font-size: 0.94rem; margin: 0; color: var(--tiza-2); }

/* Tabla de precios */
.price-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.price-table caption { caption-side: bottom; padding-top: 14px; font-size: 0.85rem; color: var(--muted); text-align: left; font-family: var(--font-body); }
.price-table th, .price-table td { padding: 15px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.price-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); font-weight: 400; }
.price-table tbody th { color: var(--tiza); font-weight: 400; }
.price-table td.precio { text-align: right; color: var(--rojo-vivo); font-weight: 700; font-size: 1.15rem; }
.price-table tbody tr { transition: background 0.2s ease; }
.price-table tbody tr:hover { background: var(--surface); }
.price-table .destacado { position: relative; }
.price-table .destacado::after {
  content: 'MEJOR €/PERSONA'; font-size: 0.6rem; letter-spacing: 0.14em; color: var(--luz);
  border: 1px solid color-mix(in oklab, var(--luz) 55%, transparent); border-radius: 999px; padding: 3px 8px; margin-left: 10px; vertical-align: 2px;
}
.pp-hint { font-size: 0.85rem; color: var(--muted); }

/* Sesiones */
.sessions-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); margin-block: var(--space-3); }
.session-slot {
  font-family: var(--font-mono); font-size: 1.15rem; text-align: center;
  padding: 16px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--tiza);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.session-slot.past { opacity: 0.32; text-decoration: line-through; text-decoration-color: var(--rojo-prof); }
.session-slot.next { border-color: var(--luz); box-shadow: 0 0 0 1px var(--luz), 0 0 26px -8px var(--luz); position: relative; }
.session-slot.next::after { content: 'PRÓXIMA'; display: block; font-size: 0.58rem; letter-spacing: 0.2em; color: var(--luz); margin-top: 4px; }
.sessions-note { color: var(--muted); font-size: 0.9rem; }

/* FAQ (details accesible) */
.faq { display: grid; gap: 0; margin-block: var(--space-3); }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 2px; color: var(--tiza); font-weight: 600; font-size: 1.02rem;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: 0 0 auto; width: 12px; height: 12px;
  background: linear-gradient(var(--rojo-vivo), var(--rojo-vivo)) center/12px 2px no-repeat,
              linear-gradient(var(--rojo-vivo), var(--rojo-vivo)) center/2px 12px no-repeat;
  transition: transform 0.3s var(--ease-snap);
}
.faq-item[open] summary { color: var(--luz-2); }
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-item p { padding: 0 2px 18px; margin: 0; color: var(--tiza-2); max-width: 65ch; }

/* Cita/dossier (mono, estilo expediente) */
.dossier {
  border: 1px solid var(--line); border-left: 3px solid var(--rojo); border-radius: 8px;
  background: var(--surface); padding: clamp(1.2rem, 3vw, 2rem);
  padding-top: 2.2rem; /* deja sitio a la etiqueta EXPEDIENTE en anchos estrechos */
  font-family: var(--font-mono); font-size: 0.92rem; line-height: 1.8; color: var(--tiza-2);
  position: relative; overflow: hidden;
}
.dossier::before { content: 'EXPEDIENTE · 1980'; position: absolute; top: 10px; right: 14px; font-size: 0.62rem; letter-spacing: 0.24em; color: var(--rojo-vivo); opacity: 0.85; }
.dossier p { max-width: none; }

/* Foto social / marco */
.social-band { display: grid; gap: var(--space-4); grid-template-columns: 0.9fr 1.1fr; align-items: center; }
.social-photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); transform: rotate(-1.2deg); transition: transform 0.4s var(--ease-out); }
.social-photo:hover { transform: rotate(0deg) scale(1.015); }

/* Zona spotlight (linterna que sigue al cursor) */
.dark-zone { position: relative; overflow: hidden; }
.dark-zone .spot {
  position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0;
  background: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), transparent 0 34%, rgba(4, 4, 6, 0.66) 72%);
  transition: opacity 0.5s ease;
}
@media (hover: hover) and (pointer: fine) { .dark-zone:hover .spot { opacity: 1; } }

/* CTA final de página (pico-final) */
.final-door {
  position: relative; text-align: center; padding-block: var(--space-6); overflow: clip;
}
.final-door::before {
  content: ''; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--luz) 18%, var(--luz-2) 50%, var(--luz) 82%, transparent);
  filter: blur(1px); opacity: 0.85;
  box-shadow: 0 0 34px 6px color-mix(in oklab, var(--luz) 45%, transparent);
  animation: bb-breathe 5.5s ease-in-out infinite;
}
.final-door > * { position: relative; z-index: 2; }
.final-door h2 { font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.7rem); margin-bottom: var(--space-2); }
.final-door .cta-group { justify-content: center; }

/* ---------- Medidor de miedo honesto ---------- */
.fear-meter { display: grid; gap: 12px; max-width: 560px; margin-block: var(--space-3); }
.fear-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fear-scale i { height: 14px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.fear-scale i.on { background: linear-gradient(90deg, var(--rojo-prof), var(--rojo)); border-color: var(--rojo); box-shadow: 0 0 16px -4px var(--rojo-vivo); }
.fear-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.fear-verdict { font-size: 0.95rem; color: var(--tiza); }

/* ---------- Timeline expediente ---------- */
.timeline { list-style: none; padding: 0; margin-block: var(--space-3); display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: -2px; width: 2px; background: linear-gradient(180deg, var(--rojo), var(--line)); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--rojo-vivo); box-shadow: 0 0 12px -2px var(--rojo-vivo); }
.timeline .year { font-family: var(--font-mono); font-weight: 700; color: var(--rojo-vivo); font-size: 1.05rem; display: block; margin-bottom: 4px; }
.timeline p { margin: 0; font-size: 0.97rem; }

/* ---------- Canales de contacto ---------- */
.channels { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); margin-block: var(--space-3); }
.channel {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}
.channel:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--luz) 60%, var(--line)); box-shadow: 0 20px 40px -24px rgba(255, 179, 107, 0.45); }
.channel .ch-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rojo-vivo); }
.channel .ch-main { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 800; color: var(--tiza); font-family: var(--font-mono); }
.channel p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.channel .ch-main.is-email { font-size: clamp(0.95rem, 2.6vw, 1.2rem); word-break: break-word; overflow-wrap: anywhere; }

/* Aviso de dato pendiente (visible solo como nota discreta) */
.pending-note { border: 1px dashed color-mix(in oklab, var(--luz) 45%, var(--line)); border-radius: var(--radius); padding: 14px 18px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Distancias Costa Brava ---------- */
.distance-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); max-width: 560px; }
.distance-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.distance-table td:last-child { text-align: right; color: var(--luz); }
.distance-table td:first-child { color: var(--tiza); }

/* Mini precio ancla */
.price-anchor { display: inline-flex; align-items: baseline; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 26px; margin-block: var(--space-2); }
.price-anchor .desde { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.price-anchor .num { font-family: var(--font-mono); font-weight: 700; font-size: 2.2rem; color: var(--rojo-vivo); }
.price-anchor .per { color: var(--tiza-2); font-size: 0.9rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-top: calc(var(--space-3)); font-size: 0.75rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--luz); }
.breadcrumbs [aria-current] { color: var(--tiza-2); }

/* ---------- Página estándar ---------- */
.page-hero { padding-block: var(--space-4) var(--space-3); }
.page-hero h1 { max-width: 20ch; }
.page-hero .hook { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem); color: var(--tiza); max-width: 58ch; margin-top: var(--space-2); }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; gap: 8px; }
.post-card time { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.post-card h2, .post-card h3 { font-size: 1.3rem; }
.post-card h2 a, .post-card h3 a { color: var(--tiza); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--luz-2); }

.prose { max-width: 70ch; }
.prose h2 { margin-block: var(--space-4) var(--space-2); }
.prose h3 { margin-block: var(--space-3) var(--space-1); color: var(--tiza); }
.prose ul, .prose ol { margin-block: var(--space-2) var(--space-3); display: grid; gap: 8px; }
.prose a { color: var(--luz); }
.prose blockquote { border-left: 3px solid var(--rojo); padding-left: 18px; color: var(--tiza); font-style: italic; margin-block: var(--space-3); }
.post-cta { text-align: center; margin-block: var(--space-3) var(--space-4); }
.post-cta .cta-group { justify-content: center; }

/* Barra de progreso de lectura */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 140; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--rojo), var(--rojo-vivo), var(--luz)); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--space-6); background: #08080A; border-top: 1px solid var(--line-soft); }
.footer-grid { display: grid; gap: var(--space-4); grid-template-columns: 1.2fr 0.9fr 1fr; padding-block: var(--space-5); }
.footer-logo { width: 210px; }
.footer-claim { margin-top: var(--space-2); color: var(--muted); font-size: 0.95rem; }
.footer-ig { display: inline-flex; align-items: center; gap: 9px; margin-top: var(--space-2); color: var(--tiza-2); text-decoration: none; font-size: 0.92rem; }
.footer-ig:hover { color: var(--luz-2); }
.footer-title { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--rojo-vivo); margin-bottom: 14px; }
.menu-footer { display: grid; gap: 8px; }
.menu-footer a { color: var(--tiza-2); text-decoration: none; font-size: 0.95rem; }
.menu-footer a:hover { color: var(--luz-2); }
.footer-sessions { color: var(--tiza); font-size: 0.9rem; margin-bottom: 8px; }
.footer-info p { font-size: 0.92rem; color: var(--muted); }
.footer-contact a { color: var(--tiza); text-decoration: none; font-size: 1.05rem; }
.footer-legal { border-top: 1px solid var(--line-soft); padding-block: 18px; }
.footer-legal-inner { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.menu-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.menu-legal a { color: var(--muted); text-decoration: none; }
.menu-legal a:hover { color: var(--tiza-2); }
.footer-legal p { margin: 0; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding-block: var(--space-6); }
.error-404 .mono-huge { font-family: var(--font-mono); font-size: clamp(3.4rem, 12vw, 7rem); color: var(--rojo-vivo); font-weight: 700; text-shadow: 0 0 40px rgba(255, 46, 59, 0.35); }
.error-404 h1 { margin-block: var(--space-2); }
.error-404 .cta-group { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-door { order: -1; width: min(300px, 68vw); margin-inline: auto; }
  .hero { min-height: 0; padding-block: var(--space-4) var(--space-5); }
  .social-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .scrolled .brand img { height: 34px; }
  .btn-header { display: none; }
  .price-table th, .price-table td { padding: 12px 8px; }
  .price-table .destacado::after { display: inline-block; margin: 6px 0 0; }
}

/* ---------- Utilidades (sustituyen estilos inline: CSP style-src 'self') ---------- */
.u-mt3 { margin-top: var(--space-3); }
.u-mt4 { margin-top: var(--space-4); }
.u-mt10 { margin-top: 10px; }
.u-mb3 { margin-block: var(--space-3); }
.u-mb4 { margin-block: var(--space-4); }
.u-mx0 { margin-inline: 0; }
.u-mxauto { margin-inline: auto; }
.u-center { text-align: center; }
.u-mt0 { margin-top: 0; }
.u-right { text-align: right; }
.u-muted { color: var(--muted); }
.u-max52 { max-width: 52ch; }
.u-pb0 { padding-bottom: 0; }
.u-meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Brasas (canvas) en el hero ---------- */
.embers { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.85; mix-blend-mode: screen; }

/* ---------- H1 cinético (palabras que emergen de la oscuridad) ---------- */
.kinetic .w { display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(6px); animation: bb-word 0.9s var(--ease-out) forwards; }
.kinetic .w:nth-child(1) { animation-delay: 0.12s; } .kinetic .w:nth-child(2) { animation-delay: 0.21s; } .kinetic .w:nth-child(3) { animation-delay: 0.30s; }
.kinetic .w:nth-child(4) { animation-delay: 0.39s; } .kinetic .w:nth-child(5) { animation-delay: 0.48s; } .kinetic .w:nth-child(6) { animation-delay: 0.57s; }
.kinetic .w:nth-child(7) { animation-delay: 0.66s; } .kinetic .w:nth-child(8) { animation-delay: 0.75s; } .kinetic .w:nth-child(n+9) { animation-delay: 0.84s; }
@keyframes bb-word { to { opacity: 1; transform: none; filter: blur(0); } }
.u-mbot3 { margin-bottom: var(--space-3); }

/* ---------- Tilt 3D + brillo especular en tarjetas ---------- */
.card, .channel { transform-style: preserve-3d; --tx: 0deg; --ty: 0deg; --gx: 50%; --gy: 50%; }
@media (hover: hover) and (pointer: fine) {
  .card:hover, .channel:hover { transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)) translateY(-5px); }
  .card::after, .channel::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(360px circle at var(--gx) var(--gy), rgba(255, 217, 168, 0.13), transparent 60%);
    transition: opacity 0.35s ease;
  }
  .card:hover::after, .channel:hover::after { opacity: 1; }
}

/* ---------- Configurador "Monta tu partida" ---------- */
.config { position: relative; margin-block: var(--space-4); padding: clamp(1.4rem, 3.4vw, 2.6rem); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); overflow: hidden; }
.config::before { content: ''; position: absolute; inset: -40% -20% auto -20%; height: 70%; background: radial-gradient(50% 60% at 50% 100%, color-mix(in oklab, var(--rojo) 16%, transparent), transparent 70%); pointer-events: none; }
.config > * { position: relative; }
.config-lead { color: var(--tiza-2); max-width: 62ch; }
.config-progress { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-3); display: flex; gap: 8px; counter-reset: cp; }
.config-progress li { counter-increment: cp; flex: 1; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-top: 10px; border-top: 2px solid var(--line); transition: border-color 0.4s ease, color 0.4s ease; }
.config-progress li::before { content: counter(cp, decimal-leading-zero) ' · '; color: var(--rojo-vivo); }
.config-progress li.current { color: var(--tiza); border-top-color: var(--luz); }
.config-progress li.done { color: var(--tiza-2); border-top-color: var(--rojo); }
.config-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
.config-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.config-step legend { color: var(--tiza); font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  min-width: 46px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--tiza-2);
  font-family: var(--font-mono); font-size: 0.95rem; cursor: pointer;
  transition: transform 0.2s var(--ease-snap), border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.chip:hover:not(:disabled) { border-color: color-mix(in oklab, var(--luz) 60%, var(--line)); color: var(--tiza); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo-vivo); color: #fff; box-shadow: 0 0 0 3px color-mix(in oklab, var(--rojo-vivo) 30%, transparent), 0 8px 22px -10px var(--rojo-vivo); }
.chip:disabled, .chip.past { opacity: 0.32; cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--rojo-prof); }
.config-price { min-height: 1.6em; color: var(--muted); font-size: 0.95rem; transition: color 0.3s ease; }
.config-price.is-set { color: var(--tiza-2); }
.config-price strong { color: var(--luz-2); font-family: var(--font-mono); font-size: 1.25rem; }
.config-price em { color: var(--tiza); font-style: normal; }
.config-hint { font-size: 0.85rem; color: var(--muted); }
.config-result { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: var(--space-3); animation: bb-pop 0.5s var(--ease-out); }
@keyframes bb-pop { from { opacity: 0; transform: translateY(10px); } }
.config-summary { color: var(--tiza); font-size: 1.05rem; }
.config-msg textarea { width: 100%; resize: none; border-radius: var(--radius); border: 1px dashed color-mix(in oklab, var(--luz) 45%, var(--line)); background: var(--bg); color: var(--tiza-2); padding: 12px 14px; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.5; }
.config .cta-group { margin-block: var(--space-2) var(--space-1); }
.btn.is-done { background: linear-gradient(140deg, #2f8f5b, #1f6d44); }
@media (max-width: 760px) { .config-grid { grid-template-columns: 1fr; } .config-progress li { font-size: 0.64rem; letter-spacing: 0.1em; } }

/* ---------- Prueba social: badges y reseñas ---------- */
.proof-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-block: var(--space-3); }
.proof-badge { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 18px; color: var(--tiza-2); transition: border-color 0.3s ease, transform 0.3s var(--ease-out); }
.proof-badge:hover { border-color: color-mix(in oklab, var(--luz) 60%, var(--line)); transform: translateY(-2px); }
.proof-badge .proof-num { grid-row: 1 / span 2; font-family: var(--font-mono); font-weight: 700; font-size: 2rem; color: var(--luz-2); line-height: 1; }
.proof-badge .proof-stars { color: var(--luz); letter-spacing: 2px; font-size: 0.95rem; }
.proof-badge .proof-label { font-size: 0.78rem; color: var(--muted); }
.proof-badge.is-own .proof-num { color: var(--rojo-vivo); }
.review-card .card-kicker { color: var(--luz); letter-spacing: 2px; font-size: 0.95rem; }
.review-card p { font-size: 0.95rem; }
.review-meta { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); margin-top: auto; }

/* Formulario de reseña */
.review-form .field { display: grid; gap: 6px; margin-bottom: 14px; color: var(--tiza-2); font-size: 0.9rem; }
.review-form input[type="text"], .review-form textarea, .review-form select { width: 100%; background: var(--bg); color: var(--tiza); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; font-family: var(--font-body); font-size: 1rem; }
.review-form input:focus, .review-form textarea:focus, .review-form select:focus { outline: 2px solid var(--luz-2); outline-offset: 2px; border-color: var(--luz); }
.review-form .stars-input .chip { display: inline-flex; align-items: center; gap: 6px; }
.review-form .stars-input input { accent-color: var(--rojo); }
.review-form .hp { position: absolute; left: -9999px; }

/* Barra de acciones móvil (Reservar · Instagram/WhatsApp · Llamar) */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mb-item { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--bg-2); color: var(--tiza); font-weight: 700; font-size: 0.95rem; text-decoration: none; }
  .mb-primary { background: linear-gradient(140deg, var(--rojo), var(--rojo-prof)); color: #fff; }
  body { padding-bottom: 60px; }
  .site-nav { bottom: 60px; }
}

/* ---------- View Transitions entre páginas (progressive) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: bb-vt-out 0.22s ease both; }
::view-transition-new(root) { animation: bb-vt-in 0.3s ease both; }
@keyframes bb-vt-out { to { opacity: 0; } }
@keyframes bb-vt-in { from { opacity: 0; } }

/* ---------- Reduced motion: versión estática elegante ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1; transform: none; }
  .chalk-underline::after { clip-path: inset(0); }
  .kinetic .w { opacity: 1; transform: none; filter: none; animation: none; }
  .embers { display: none; }
  .card:hover, .channel:hover { transform: translateY(-5px); }
  .btn-electric::before { opacity: 0.55; }
  .session-chip .dot { animation: none; }
  .neon-line { animation: none; }
  .dark-zone .spot { display: none; }
  .read-progress { display: none; }
  .venue-map::before { animation: none; }
}

/* =========================================================================
   HERO CON ESCENA — la monja protagonista por landing (Magnific).
   Scrim iz→der: opaco al 0%, legible hasta ~58%, imagen limpia al 75%,
   brillo máximo en el borde derecho. Texto siempre sobre la zona oscura.
   ========================================================================= */
.page-hero.has-scene {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 84px) clamp(20px, 4vw, 56px);
  min-height: clamp(440px, 58vh, 660px);
  display: flex; flex-direction: column; justify-content: center;
}
.hero-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-scene picture, .hero-scene img { display: block; width: 100%; height: 100%; }
.hero-scene img { object-fit: cover; object-position: 76% 40%; }
.hero-scene::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      var(--bg) 0%,
      rgb(11 11 13 / 0.97) 16%,
      rgb(11 11 13 / 0.84) 36%,
      rgb(11 11 13 / 0.48) 56%,
      rgb(11 11 13 / 0.12) 75%,
      rgb(11 11 13 / 0) 100%),
    linear-gradient(0deg, rgb(11 11 13 / 0.5) 0%, transparent 20%);
}
.page-hero.has-scene > *:not(.hero-scene) { position: relative; z-index: 1; max-width: min(60ch, 56%); }
.page-hero.has-scene .hook { color: var(--tiza-2); }
@media (max-width: 900px) {
  /* Móvil: la escena es una franja superior a plena potencia que funde al fondo;
     el texto viene después sobre fondo sólido. Impacto + legibilidad garantizados. */
  .page-hero.has-scene { display: block; min-height: 0; padding-top: calc(min(52vh, 470px) - 18px); }
  .hero-scene { height: min(52vh, 470px); }
  .hero-scene img { object-position: 60% 28%; }
  .hero-scene::after {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgb(11 11 13 / 0.6) 22%, rgb(11 11 13 / 0.14) 52%, transparent 78%),
      linear-gradient(90deg, rgb(11 11 13 / 0.45) 0%, transparent 42%);
  }
  .page-hero.has-scene > *:not(.hero-scene) { max-width: 100%; }
}

/* =========================================================================
   EL PRIMER PANTALLAZO VIVO — la puerta roja en vídeo (cinemagraph Magnific),
   fondo completo del hero. Espejada por CSS (la X es simétrica): la puerta
   cae al lado derecho y el titular manda sobre la zona negra. La foto
   estática original hace de póster/fallback y se desvanece al arrancar.
   ========================================================================= */
.hero { position: relative; }
/* El film cubre exactamente el primer pantallazo (100svh) y funde abajo al fondo */
.hero-film { position: absolute; top: 0; left: 0; right: 0; height: 100svh; z-index: 0; overflow: hidden; opacity: 0; transition: opacity 1.4s ease; }
.hero.film-on .hero-film { opacity: 1; }
.hero-film video {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 30% 46%;
  transform: scaleX(-1);
  filter: brightness(0.94) contrast(1.06) saturate(1.02);
}
/* Scrim editorial: opaco bajo el titular, la puerta libre a la derecha, fundido al fondo abajo */
.hero-film::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgb(11 11 13 / 0.9) 24%, rgb(11 11 13 / 0.45) 50%, rgb(11 11 13 / 0.06) 76%, transparent 100%),
    linear-gradient(0deg, var(--bg) 0%, rgb(11 11 13 / 0.35) 12%, transparent 26%);
}
/* Con el film en marcha, la foto de la columna cede el plano (crossfade de cine) */
.hero.film-on .hero-door { opacity: 0; transform: scale(1.015); transition: opacity 1.4s ease 0.2s, transform 2.2s ease; pointer-events: none; }
@media (max-width: 900px) {
  .hero-film video { object-position: 26% 42%; }
  .hero-film::after {
    background:
      linear-gradient(90deg, rgb(11 11 13 / 0.82) 0%, rgb(11 11 13 / 0.5) 46%, rgb(11 11 13 / 0.14) 100%),
      linear-gradient(0deg, var(--bg) 0%, rgb(11 11 13 / 0.5) 16%, transparent 34%);
  }
}
@media (prefers-reduced-motion: reduce) {
  /* Sin autoplay: el póster cinemascope queda como plano fijo, igual de bello */
  .hero.film-on .hero-film { opacity: 1; }
}

/* ---------- Bloque «Dónde estamos»: dirección + tarjeta-mapa (0 carga externa) ---------- */
.venue {
  display: grid; gap: 20px; align-items: stretch; margin-block: var(--space-3);
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) { .venue { grid-template-columns: 1fr; } }
.venue-addr {
  font-style: normal; align-self: center;
  font-size: 1.05rem; line-height: 1.7; color: var(--tiza-2);
}
.venue-addr strong { color: var(--tiza); font-size: 1.15rem; }
.venue-addr .mono { color: var(--luz); text-decoration: none; }
.venue-addr .mono:hover { color: var(--luz-2); }
.venue-note { color: var(--muted); font-size: 0.92rem; }
.venue-map {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; gap: 14px; min-height: 168px;
  padding: 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--tiza); text-decoration: none;
  transition: transform 0.28s var(--ease-snap), border-color 0.28s ease, box-shadow 0.28s ease;
}
/* «Calles» dibujadas en CSS que evocan un plano, sin pedir nada a Google */
.venue-map::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background:
    linear-gradient(115deg, transparent 46%, color-mix(in oklab, var(--luz) 22%, transparent) 47% 49%, transparent 50%),
    linear-gradient(200deg, transparent 62%, color-mix(in oklab, var(--rojo-vivo) 20%, transparent) 63% 64.5%, transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 26px, color-mix(in oklab, var(--line) 70%, transparent) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 26px, color-mix(in oklab, var(--line) 70%, transparent) 26px 27px),
    radial-gradient(120% 120% at 78% 18%, color-mix(in oklab, var(--rojo-prof) 30%, transparent), transparent 60%),
    var(--bg-2);
  transition: transform 0.6s var(--ease-out);
}
.venue-map:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--luz) 55%, var(--line)); box-shadow: 0 22px 46px -26px rgba(255,179,107,0.5); }
.venue-map:hover::before { transform: scale(1.06); }
.venue-pin { flex: 0 0 auto; color: var(--rojo-vivo); filter: drop-shadow(0 3px 8px rgba(255,46,59,0.5)); }
.venue-map-txt { display: flex; flex-direction: column; gap: 2px; }
.venue-map-txt .vm-1 { font-family: var(--font-mono); font-size: 0.9rem; color: var(--tiza); }
.venue-map-txt .vm-2 { font-weight: 800; color: var(--luz-2); letter-spacing: 0.01em; }

/* ---------- Calendario del configurador ---------- */
.cal { max-width: 360px; margin-block: 2px 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-title { text-transform: capitalize; color: var(--tiza); font-size: 0.95rem; letter-spacing: 0.02em; }
.cal-nav {
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--tiza);
  font-size: 1rem; line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-snap);
}
.cal-nav:hover:not(:disabled) { border-color: var(--luz); color: var(--luz-2); transform: translateY(-1px); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); padding: 4px 0; letter-spacing: 0.1em; }
.cal-empty { aspect-ratio: 1; }
.cal-day {
  aspect-ratio: 1; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: var(--surface); color: var(--tiza-2);
  font-family: var(--font-mono); font-size: 0.85rem;
  transition: transform 0.15s var(--ease-snap), border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.cal-day:hover:not(:disabled) { border-color: var(--luz); color: var(--luz-2); transform: translateY(-1px); }
.cal-day:disabled { opacity: 0.25; cursor: default; background: transparent; }
.cal-day.is-today { border-color: color-mix(in oklab, var(--luz) 55%, var(--line)); }
.cal-day.is-selected {
  background: linear-gradient(140deg, var(--rojo) 10%, var(--rojo-prof) 90%);
  color: #fff; border-color: var(--rojo-vivo);
  box-shadow: 0 4px 18px -8px var(--rojo-vivo);
}

/* ---------- Widget TuriTop (cuando esté activo) ---------- */
.load-turitop { min-height: 420px; border-radius: var(--radius-lg); overflow: hidden; }

/* ---------- NAP en el footer ---------- */
.footer-contact { font-style: normal; display: grid; gap: 6px; margin-top: 6px; }
.footer-addr { color: var(--tiza-2) !important; text-decoration: none; line-height: 1.5; font-size: 0.95rem; display: inline-block; }
.footer-addr:hover { color: var(--luz-2) !important; }
.footer-phones { display: block; font-size: 0.95rem; color: var(--muted); }
.footer-phones a { color: var(--tiza); }
.footer-phones .sep { color: var(--line); margin-inline: 4px; }

/* =========================================================================
   LA MONJA — presencia, nunca explicación.
   1) .nun-lurk: en las dark-zone, solo existe dentro del haz de la linterna
      (mask radial en las MISMAS coords --mx/--my que el spot). En táctil,
      aparición subliminal lentísima al entrar la sección en pantalla.
   2) .nun-peek: una única vez por sesión, el busto asoma del borde y se retira.
   3) .nun-still: cierre del expediente en La leyenda (silueta + halo de vela).
   4) .nun-404: tras el 404, apenas un trazo.
   ========================================================================= */
.dark-zone > .container { position: relative; z-index: 3; }
/* La monja acecha SIEMPRE: al scrollear la sección (--nun-p 0→1 desde JS) emerge,
   crece y se acerca. Con hover, la linterna local la revela entera. */
.nun-lurk {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: calc(var(--nun-p, 0) * 0.88);
  transition: opacity 0.3s ease;
}
/* Haz cósmico blanco nuclear a su espalda: la silueta a contraluz es lo que asusta. */
.nun-lurk::before {
  content: ""; position: absolute; right: -4%; bottom: -8%;
  width: min(58%, 640px); height: 112%;
  background: radial-gradient(ellipse 46% 40% at 52% 56%,
    rgb(255 255 255 / 0.62),
    rgb(198 220 255 / 0.34) 36%,
    rgb(150 180 255 / 0.12) 55%,
    transparent 70%);
  filter: blur(8px);
  opacity: var(--nun-p, 0);
  animation: nun-halo-pulse 3.8s ease-in-out infinite;
}
.nun-lurk img {
  position: absolute; right: 6%; bottom: 0;
  height: min(96%, 860px); width: auto;
  filter: brightness(0.66) saturate(0.8) contrast(1.05);
  transform: translateY(calc((1 - var(--nun-p, 0)) * 12%)) scale(calc(0.88 + var(--nun-p, 0) * 0.18));
  transform-origin: 50% 100%;
  animation: nun-candle 7.5s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes nun-halo-pulse {
  0%, 100% { filter: blur(8px) brightness(1); }
  50% { filter: blur(11px) brightness(1.35); }
}
@media (hover: hover) and (pointer: fine) {
  .dark-zone:hover .nun-lurk {
    opacity: 1;
    -webkit-mask-image: radial-gradient(circle 230px at var(--mx, 50%) var(--my, 50%), rgb(0 0 0 / 0.95) 0 30%, rgb(0 0 0 / 0.5) 52%, transparent 74%);
    mask-image: radial-gradient(circle 230px at var(--mx, 50%) var(--my, 50%), rgb(0 0 0 / 0.95) 0 30%, rgb(0 0 0 / 0.5) 52%, transparent 74%);
  }
}
.nun-lurk.nun-flinch img { animation: nun-flinch 0.5s var(--ease-snap) 1, nun-candle 7.5s ease-in-out infinite; }
@keyframes nun-flinch {
  0% { margin-bottom: 0; margin-right: 0; }
  32% { margin-bottom: 18px; margin-right: 26px; filter: brightness(0.95) saturate(0.95); }
  60% { margin-bottom: 6px; margin-right: 8px; }
  100% { margin-bottom: 0; margin-right: 0; }
}
@keyframes nun-candle {
  0%, 100% { filter: brightness(0.7) saturate(0.85); }
  46% { filter: brightness(0.78) saturate(0.9); }
  52% { filter: brightness(0.62) saturate(0.8); }
  61% { filter: brightness(0.76) saturate(0.88); }
}

.nun-peek {
  position: fixed; right: 0; bottom: 9vh; z-index: 40; pointer-events: none;
  transform: translateX(108%); will-change: transform;
  transition: transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(-6px 10px 26px rgb(0 0 0 / 0.55));
}
.nun-peek img { height: min(36vh, 330px); width: auto; display: block; }
.nun-peek.show { transform: translateX(26%) rotate(-2deg); }

.nun-still { margin: var(--space-5) auto 0; text-align: center; }
.nun-still img {
  height: 280px; width: auto;
  filter: drop-shadow(0 0 38px rgb(255 179 107 / 0.16));
  opacity: 0.85;
}
.nun-still figcaption {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-top: 14px;
}

.error-404 { position: relative; }
.nun-404 { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none; }
.nun-404 img { height: 340px; width: auto; opacity: 0.1; filter: blur(1px); }

@media (prefers-reduced-motion: reduce) {
  .nun-lurk img { animation: none; }
  .nun-peek { display: none; }
  .dark-zone.in-sight .nun-lurk { transition-duration: 0.01ms; }
}

/* =========================================================================
   MODO LINTERNA — el interruptor apaga el bar entero y el cursor se vuelve luz.
   Velo z-300 (cubre hasta el header, clicks pasan), interruptor z-310.
   Bajo el haz aparecen la monja y los mensajes de tiza. Escape = encender.
   ========================================================================= */
#torch-veil {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0;
  background:
    radial-gradient(circle 150px at var(--tx, 50vw) var(--ty, 42vh), rgb(255 179 107 / 0.10), transparent 72%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 32%, rgb(2 2 4 / 0.955) 70%);
  transition: opacity 0.55s ease;
}
html.torch-on #torch-veil { opacity: 1; }
#torch-veil.is-igniting { animation: torch-ignite 0.75s steps(1, end) both; }
#torch-veil.is-flicker { animation: torch-flick 0.38s linear; }
@keyframes torch-ignite {
  0% { opacity: 0; } 18% { opacity: 0.9; } 26% { opacity: 0.15; }
  38% { opacity: 1; } 47% { opacity: 0.5; } 60%, 100% { opacity: 1; }
}
@keyframes torch-flick {
  0%, 100% { opacity: 1; } 30% { opacity: 0.7; } 55% { opacity: 0.94; } 70% { opacity: 0.8; }
}

#torch-switch {
  position: fixed; right: 0; top: 42%; z-index: 310;
  display: flex; align-items: center; gap: 9px;
  padding: 12px 9px 12px 13px;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  border: 1px solid var(--line); border-right: 0;
  border-radius: 14px 0 0 14px; cursor: pointer;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: transform 0.25s var(--ease-snap), border-color 0.25s ease, box-shadow 0.25s ease;
}
#torch-switch:hover { transform: translateX(-3px); border-color: color-mix(in oklab, var(--luz) 60%, var(--line)); }
#torch-switch[aria-pressed="true"] {
  border-color: color-mix(in oklab, var(--luz) 55%, var(--line));
  box-shadow: 0 0 22px -4px rgb(255 179 107 / 0.45);
}
.tsw-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
#torch-switch[aria-pressed="true"] .tsw-label { color: var(--luz); }
.tsw-plate {
  width: 22px; height: 42px; border-radius: 6px; position: relative;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.55);
}
.tsw-lever {
  position: absolute; left: 3px; right: 3px; top: 3px; height: 16px; border-radius: 4px;
  background: linear-gradient(180deg, var(--tiza-2), var(--muted));
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.45);
  transition: top 0.16s var(--ease-snap), background 0.16s ease, box-shadow 0.16s ease;
}
#torch-switch[aria-pressed="true"] .tsw-lever {
  top: 21px;
  background: linear-gradient(180deg, var(--luz), var(--rojo-vivo));
  box-shadow: 0 0 14px rgb(255 179 107 / 0.55);
}

/* Mensajes de tiza: invisibles hasta que se va la luz; solo se leen bajo el haz. */
.chalk-secret {
  position: absolute; z-index: 1; pointer-events: none; opacity: 0;
  font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgb(244 241 236 / 0.52); white-space: nowrap;
  text-shadow: 0 0 6px rgb(244 241 236 / 0.14);
  transition: opacity 0.4s ease;
}
.cs-1 { left: 7%; bottom: 11%; transform: rotate(-3deg); }
.cs-2 { right: 6%; top: 13%; transform: rotate(2deg); }
.cs-3 { left: 9%; top: 16%; transform: rotate(-2deg); }
html.torch-on .chalk-secret { opacity: 1; }

/* Con la luz cortada, la monja y las zonas oscuras se rinden al haz global. */
html.torch-on .nun-lurk { opacity: 1; -webkit-mask-image: none; mask-image: none; }
html.torch-on .dark-zone .spot { opacity: 0 !important; }

@media (max-width: 720px) { #torch-switch { top: auto; bottom: 128px; padding: 10px 7px 10px 11px; } }

/* Apariciones junto al cursor en modo linterna: cada 11 s, un patrón de cine
   distinto (dolly-in, pasada fugaz o flicker-reveal), ancladas al punto de luz. */
.nun-scare {
  position: fixed; left: var(--ax, 50vw); top: var(--ay, 70vh);
  transform: translate(-50%, -100%);
  z-index: 305; pointer-events: none; display: none; transform-origin: 50% 96%;
}
/* Estallido blanco nuclear a su espalda en cada irrupción. */
.nun-scare::before {
  content: ""; position: absolute; inset: -24% -36%;
  background: radial-gradient(ellipse 52% 46% at 50% 52%,
    rgb(255 255 255 / 0.85),
    rgb(198 220 255 / 0.45) 34%,
    transparent 66%);
  filter: blur(12px); z-index: -1; opacity: 0;
}
@keyframes nun-burst {
  0% { opacity: 0; transform: scale(0.4); }
  8% { opacity: 1; transform: scale(1.25); }
  30% { opacity: 0.75; transform: scale(1); }
  82% { opacity: 0.75; }
  100% { opacity: 0; transform: scale(1.05); }
}
.nun-scare img {
  height: clamp(300px, 56vh, 600px); width: auto; display: block;
  filter: brightness(1.05) contrast(1.08) drop-shadow(0 0 40px rgb(210 31 43 / 0.45));
}
html.torch-on .nun-scare.show { display: block; }
/* 1) Dolly-in: emerge del fondo del haz y se acerca a cámara. */
html.torch-on .nun-scare.fx-dolly { animation: nun-dolly 1.15s cubic-bezier(0.22, 1, 0.36, 1) both; }
html.torch-on .nun-scare.fx-dolly::before { animation: nun-burst 1.15s ease-out both; }
@keyframes nun-dolly {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(0.4); filter: blur(9px) brightness(0.3); }
  10% { opacity: 1; }
  56% { transform: translate(-50%, -100%) scale(0.98); filter: blur(0.6px) brightness(0.92); }
  70% { transform: translate(-50.7%, -100%) scale(1.05); filter: blur(0) brightness(1); }
  75% { transform: translate(-49.4%, -100%) scale(1.07); }
  80% { transform: translate(-50%, -100%) scale(1.06); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -101.5%) scale(1.04); }
}
/* 2) Pasada fugaz: cruza el haz con estela. */
html.torch-on .nun-scare.fx-dash { animation: nun-cdash 0.52s cubic-bezier(0.65, 0, 0.9, 1) both; }
@keyframes nun-cdash {
  0% { opacity: 0; transform: translate(calc(-50% - 44vw), -100%) skewX(-3deg); filter: blur(2px) brightness(0.8); }
  12% { opacity: 0.95; }
  55% { filter: blur(6px) brightness(0.85); }
  100% { opacity: 0; transform: translate(calc(-50% + 50vw), -100%) skewX(-10deg); filter: blur(10px) brightness(0.7); }
}
/* 3) Flicker-reveal: la luz parpadea y al volver YA ESTÁ ahí; parpadea y no está. */
html.torch-on .nun-scare.fx-flicker { animation: nun-hold 1.25s steps(1, end) both; }
@keyframes nun-hold {
  0% { opacity: 0; }
  10% { opacity: 1; transform: translate(-50%, -100%) rotate(0.5deg); }
  48% { transform: translate(-50.5%, -100%) rotate(-0.5deg); }
  78% { transform: translate(-50%, -100%) rotate(0.3deg); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}
/* Apagón instantáneo del haz para el flicker-reveal */
#torch-veil.is-blackout { background: #020204; }
/* Triple flash del susto: blanco frío (máxima luminancia escotópica) → rojo
   sangre (alarma) → blanco. 3 pulsos en 1.1s = 2.7 flashes/s, bajo el umbral
   fotosensible (WCAG 2.3.1). El haz también tiembla. */
#torch-veil.is-scare { animation: scare-strobe 1.1s steps(1, end) both; }
@keyframes scare-strobe {
  0% { background:
    radial-gradient(circle 320px at var(--tx, 50vw) var(--ty, 42vh), rgb(220 235 255 / 0.55), transparent 74%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 30%, rgb(6 8 14 / 0.9) 70%); }
  12% { background:
    radial-gradient(circle 150px at var(--tx, 50vw) var(--ty, 42vh), rgb(255 179 107 / 0.1), transparent 72%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 26%, rgb(24 2 4 / 0.96) 70%); }
  38% { background:
    radial-gradient(circle 300px at var(--tx, 50vw) var(--ty, 42vh), rgb(255 46 59 / 0.4), transparent 74%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 28%, rgb(30 2 4 / 0.94) 70%); }
  52% { background:
    radial-gradient(circle 150px at var(--tx, 50vw) var(--ty, 42vh), rgb(255 179 107 / 0.1), transparent 72%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 26%, rgb(24 2 4 / 0.96) 70%); }
  78% { background:
    radial-gradient(circle 340px at var(--tx, 50vw) var(--ty, 42vh), rgb(220 235 255 / 0.5), transparent 76%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 30%, rgb(6 8 14 / 0.9) 70%); }
  90%, 100% { background:
    radial-gradient(circle 150px at var(--tx, 50vw) var(--ty, 42vh), rgb(255 179 107 / 0.1), transparent 72%),
    radial-gradient(circle 235px at var(--tx, 50vw) var(--ty, 42vh), transparent 0 32%, rgb(2 2 4 / 0.955) 70%); }
}

@media (prefers-reduced-motion: reduce) {
  #torch-veil { transition: opacity 0.2s ease; }
  #torch-veil.is-igniting, #torch-veil.is-flicker, #torch-veil.is-scare { animation: none; }
  .nun-lurk img { animation: none; transform: none; }
  .nun-lurk { opacity: calc(var(--nun-p, 0) * 0.5); }
  .nun-lurk.nun-flinch img { animation: none; }
  /* Con animaciones reducidas los efectos NO desaparecen: se convierten en
     fundidos suaves. !important vence al aplastador global de 0.01ms — sin
     esto, en equipos con animaciones reducidas no se veía NADA (bug real). */
  html.torch-on .nun-scare.fx-dolly,
  html.torch-on .nun-scare.fx-dash,
  html.torch-on .nun-scare.fx-flicker { animation: nun-scare-soft 1.6s ease both !important; }
  html.torch-on .nun-scare.fx-dolly::before { animation: nun-scare-soft 1.6s ease both !important; }
  #torch-veil.is-scare { animation: none !important; }
  /* La Aparición en modo reducido: MISMA secuencia, tempo sereno, sin parpadeos */
  #nun-dash.ph-mat .nd-figure { animation: nd-materialize 1.7s ease both !important; }
  #nun-dash.ph-exit .nd-figure { animation: nd-devour 1.3s ease both !important; }
  #nun-dash.ph-live .nd-figure img { animation: none !important; }
  #nun-dash.ph-live .nd-candleflash { animation: nd-candleflash-soft 2.4s ease both !important; }
  .nd-fog1, .nd-fog2, .nd-fog3 { animation: none !important; }
  #nun-dash.ph-beam .nd-beam { animation: none !important; }
  .nd-beam::after { animation: none !important; }
  .nd-aura { animation: none !important; }
  #nun-dash.on .nd-grain { animation: none !important; opacity: 0.07; }
  .nd-vortex { animation: none !important; opacity: 0.3; }
  .nd-veil, .nd-spot { transition-duration: 0.5s !important; }
}
@keyframes nd-candleflash-soft { 0% { opacity: 0; } 35% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes nun-scare-soft { 0% { opacity: 0; } 18%, 78% { opacity: 1; } 100% { opacity: 0; } }

/* =========================================================================
   LA APARICIÓN — primer scroll en la home. Terror premium 2026 (quiet dread):
   (1) apagón con polvo  (2) la monja se MATERIALIZA de la niebla, su vela
   prende  (3) quietud viva: respira, la niebla se desliza  (4) el haz cónico
   de SU vela señala el camino  (5) la cámara viaja a la historia y el foco
   la ilumina  (6) una tiza escribe «EMPIEZA AQUÍ» y la niebla se la traga.
   Equivalente suave (no amputada) con prefers-reduced-motion.
   ========================================================================= */
#nun-dash { position: fixed; inset: 0; z-index: 350; pointer-events: none; display: none; overflow: hidden; }
#nun-dash.on { display: block; }
/* Modo escena WebGL: el dash CSS solo presta la tiza final */
#nun-dash.chalk-solo { display: block; }
/* El lienzo de la escena GPU (motor propio, un solo shader) */
#bb-scene {
  position: fixed; inset: 0; z-index: 350; pointer-events: none;
  opacity: 0; transition: opacity 0.25s ease;
}
#bb-scene.on { opacity: 1; }
.nd-veil {
  position: absolute; inset: 0; opacity: 0;
  /* Grading de cine: noche azulada arriba, negro denso, rescoldo rojo abajo + viñeta anamórfica */
  background:
    radial-gradient(140% 95% at 50% 40%, transparent 0%, rgb(1 1 3 / 0.5) 55%, rgb(0 0 2 / 0.92) 100%),
    linear-gradient(180deg, rgb(5 7 14 / 0.93) 0%, rgb(2 2 5 / 0.95) 55%, rgb(10 3 4 / 0.94) 100%);
  transition: opacity 0.4s ease;
}
#nun-dash.on .nd-veil { opacity: 1; }
#nun-dash.ph-exit .nd-veil { opacity: 0; transition: opacity 0.55s ease; }
/* Foco sobre el arranque de la historia: solo ese texto queda iluminado */
.nd-spot {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease;
  background: radial-gradient(ellipse 340px 200px at var(--sx, 50vw) var(--sy, 70vh),
    transparent 0 38%, rgb(2 2 4 / 0.97) 78%);
}
#nun-dash.ph-spot .nd-spot { opacity: 1; }
#nun-dash.ph-exit .nd-spot { opacity: 0; }
/* Con el foco encendido, la atención va al texto: la figura cede protagonismo */
#nun-dash.ph-spot .nd-figure { opacity: 0.45; transition: opacity 0.6s ease; }
#nun-dash.ph-spot .nd-vortex { opacity: 0.2; transition: opacity 0.6s ease; }
/* La figura: se materializa de la niebla en --fx/--fy (px reales medidos por JS) */
.nd-figure {
  position: absolute; left: 0; top: 0; opacity: 0;
  transform: translate(var(--fx, 38vw), var(--fy, 86vh));
  transform-origin: 50% 100%;
  will-change: transform, opacity, filter;
}
#nun-dash.ph-mat .nd-figure { animation: nd-materialize 1.15s cubic-bezier(0.3, 0, 0.3, 1) both; }
#nun-dash.ph-live .nd-figure, #nun-dash.ph-beam .nd-figure { opacity: 1; }
#nun-dash.ph-exit .nd-figure { animation: nd-devour 0.9s ease both; }
@keyframes nd-materialize {
  0% { opacity: 0; filter: blur(22px) brightness(0.15) saturate(0.4); transform: translate(var(--fx), var(--fy)) scale(1.07); }
  35% { opacity: 0.75; }
  70% { filter: blur(3px) brightness(0.75) saturate(0.9); }
  100% { opacity: 1; filter: blur(0) brightness(1) saturate(1); transform: translate(var(--fx), var(--fy)) scale(1); }
}
@keyframes nd-devour {
  0% { opacity: 1; filter: blur(0) brightness(1); }
  100% { opacity: 0; filter: blur(26px) brightness(0.1); }
}
.nd-figure img {
  position: relative; z-index: 2;
  height: min(72vh, 660px); width: auto; display: block;
  transform: translate(-50%, -100%);
  /* Sin halo lechoso: solo un rim frío de 2px que separa la silueta del negro */
  filter: brightness(0.9) contrast(1.14) saturate(0.94) drop-shadow(0 0 2px rgb(185 208 255 / 0.4));
}
/* Aura: LUZ aditiva (plus-lighter), no pintura blanca — fría, contenida, respirando */
.nd-aura {
  position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: min(52vh, 480px); height: min(80vh, 740px);
  transform: translate(-50%, -96%);
  mix-blend-mode: plus-lighter;
  background: radial-gradient(ellipse 42% 46% at 50% 42%,
    rgb(96 128 196 / 0.34), rgb(70 100 170 / 0.14) 52%, transparent 74%);
  filter: blur(20px);
  animation: nd-aura-breathe 4.2s ease-in-out infinite;
}
@keyframes nd-aura-breathe {
  0%, 100% { opacity: 0.85; } 50% { opacity: 1; }
}
/* Sombra de contacto: asienta a la figura en el suelo */
.nd-ground {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: min(30vh, 280px); height: 30px;
  transform: translate(-50%, -14px);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.4) 55%, transparent 75%);
  filter: blur(7px);
}
/* Quietud viva: respiración imperceptible (vigilancia del sistema nervioso) */
#nun-dash.ph-live .nd-figure img { animation: nd-breathe 3.4s ease-in-out infinite; }
@keyframes nd-breathe {
  0%, 100% { transform: translate(-50%, -100%) scale(1); }
  50% { transform: translate(-50%, -100%) scale(1.013); }
}
/* El latido de la vela al prender */
#nun-dash.ph-live .nd-candleflash {
  position: absolute; left: 0; top: 0; width: 300px; height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(255 179 107 / 0.55), rgb(255 120 60 / 0.18) 40%, transparent 70%);
  filter: blur(10px);
  animation: nd-candleflash 2.6s ease-out both;
}
.nd-candleflash { position: absolute; opacity: 0; pointer-events: none; }
@keyframes nd-candleflash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  8% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  18% { opacity: 0.5; }
  30% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
/* Niebla volumétrica: tres capas que derivan lentamente */
.nd-fog {
  position: absolute; border-radius: 50%; pointer-events: none; opacity: 0;
  /* Humo con estructura: ruido fractal (feTurbulence) fundido sobre el radial — volutas, no nube lisa */
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.011 0.017' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23f)' opacity='0.9'/></svg>"),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgb(150 175 225 / 0.2), rgb(120 150 210 / 0.08) 55%, transparent 75%);
  background-blend-mode: multiply;
  mix-blend-mode: plus-lighter;
  -webkit-mask-image: radial-gradient(ellipse 46% 42% at 50% 50%, black 22%, transparent 68%);
  mask-image: radial-gradient(ellipse 46% 42% at 50% 50%, black 22%, transparent 68%);
  filter: blur(18px);
  transform: translate(-50%, -55%);
  transition: opacity 0.8s ease;
}
#nun-dash.on .nd-fog { opacity: 1; }
#nun-dash.ph-exit .nd-fog { opacity: 0; transition: opacity 1s ease; }
.nd-fog1 { width: 60vw; height: 46vh; animation: nd-fog-a 11s ease-in-out infinite alternate; }
.nd-fog2 { width: 44vw; height: 36vh; animation: nd-fog-b 14s ease-in-out infinite alternate; }
.nd-fog3 { width: 70vw; height: 30vh; animation: nd-fog-a 17s ease-in-out infinite alternate-reverse; }
@keyframes nd-fog-a { from { transform: translate(-56%, -60%) scale(1); } to { transform: translate(-44%, -52%) scale(1.18); } }
@keyframes nd-fog-b { from { transform: translate(-48%, -55%) scale(1.1); } to { transform: translate(-58%, -48%) scale(0.95); } }
/* El haz cónico de la vela: luz diegética que señala el camino hacia la historia */
.nd-beam {
  position: absolute; left: 0; top: 0; width: 50vh; height: 80vh;
  transform-origin: 50% 0%;
  transform: translate(-50%, 0) rotate(var(--beam-r, -24deg));
  clip-path: polygon(47% 0%, 53% 0%, 100% 100%, 0% 100%);
  /* Luz ADITIVA con caída exponencial (como un haz real en aire con polvo) */
  mix-blend-mode: plus-lighter;
  background: linear-gradient(180deg,
    rgb(255 205 150 / 0.55) 0%,
    rgb(255 185 125 / 0.34) 18%,
    rgb(255 170 105 / 0.18) 42%,
    rgb(250 160 95 / 0.08) 68%,
    rgb(245 150 90 / 0.03) 86%, transparent 100%);
  /* Pluma en los bordes: máscara doble (lateral + longitudinal), nada de cortes duros */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, black 26%, black 74%, transparent 100%),
    linear-gradient(180deg, black 0%, black 78%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, black 26%, black 74%, transparent 100%),
    linear-gradient(180deg, black 0%, black 78%, transparent 98%);
  mask-composite: intersect;
  filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease, transform 0.9s cubic-bezier(0.35, 0, 0.25, 1);
}
/* Origen del haz: núcleo brillante en la vela */
.nd-beam::before {
  content: ""; position: absolute; left: 50%; top: -14px;
  width: 78px; height: 78px; transform: translateX(-50%);
  background: radial-gradient(circle, rgb(255 226 180 / 0.9), rgb(255 190 130 / 0.4) 40%, transparent 70%);
  filter: blur(4px);
}
/* Polvo en suspensión dentro del cono: dos capas de motas cayendo a ritmos distintos */
.nd-beam::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 1.6px at 30% 20%, rgb(255 225 185 / 0.85) 0 1.2px, transparent 2.4px),
    radial-gradient(circle 1.1px at 64% 46%, rgb(255 210 165 / 0.7) 0 0.9px, transparent 2px),
    radial-gradient(circle 1.9px at 48% 72%, rgb(255 230 195 / 0.8) 0 1.4px, transparent 2.6px),
    radial-gradient(circle 1.2px at 76% 84%, rgb(255 205 160 / 0.6) 0 1px, transparent 2px),
    radial-gradient(circle 1.4px at 16% 58%, rgb(255 220 180 / 0.7) 0 1.1px, transparent 2.2px);
  background-size: 130px 210px, 170px 260px, 210px 320px, 150px 240px, 190px 300px;
  animation: nd-dust 7s linear infinite;
  opacity: 0.9;
}
@keyframes nd-dust {
  from { background-position: 0 -210px, 40px -260px, -30px -320px, 60px -240px, -50px -300px; }
  to { background-position: 0 210px, 40px 260px, -30px 320px, 60px 240px, -50px 300px; }
}
#nun-dash.ph-beam .nd-beam { opacity: 1; animation: nd-beam-flicker 2.4s ease-in-out infinite; }
#nun-dash.ph-exit .nd-beam { opacity: 0; }
@keyframes nd-beam-flicker {
  0%, 100% { opacity: 1; }
  23% { opacity: 0.86; }
  41% { opacity: 1; }
  67% { opacity: 0.92; }
}
/* La tiza del expediente: se escribe sola junto al texto iluminado */
.nd-chalk {
  position: absolute; left: var(--cx, 50vw); top: var(--cy, 70vh);
  transform: rotate(-2.5deg); transform-origin: 0 50%;
  font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgb(244 241 236 / 0.92); white-space: nowrap;
  text-shadow: 0 0 10px rgb(244 241 236 / 0.35);
  clip-path: inset(0 100% 0 0); opacity: 0;
}
#nun-dash.ph-chalk .nd-chalk { opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path 0.9s steps(14, end), opacity 0.15s ease; }
#nun-dash.ph-exit .nd-chalk { opacity: 0; transition: opacity 1.4s ease 0.4s; }
/* Grano de cine: ruido fractal vivo que funde todas las capas en una sola fotografía */
.nd-grain {
  position: absolute; inset: -60px; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' seed='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  mix-blend-mode: overlay; opacity: 0;
}
#nun-dash.on .nd-grain { opacity: 0.09; animation: nd-grain-jitter 0.42s steps(5) infinite; }
#nun-dash.ph-exit .nd-grain { opacity: 0; transition: opacity 0.8s ease; }
@keyframes nd-grain-jitter {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-14px, 9px); }
  40% { transform: translate(11px, -16px); }
  60% { transform: translate(-9px, -7px); }
  80% { transform: translate(16px, 12px); }
  100% { transform: translate(0, 0); }
}
/* Vórtice cósmico girando a su espalda */
.nd-vortex {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: min(64vh, 580px); height: min(64vh, 580px);
  transform: translate(-50%, -82%);
  border-radius: 50%;
  mix-blend-mode: plus-lighter;
  background: conic-gradient(from 0deg,
    rgb(140 170 235 / 0.4), rgb(90 120 190 / 0.05) 22%,
    rgb(120 155 225 / 0.28) 38%, rgb(90 120 190 / 0.04) 58%,
    rgb(140 170 235 / 0.34) 76%, rgb(90 120 190 / 0.05) 92%,
    rgb(140 170 235 / 0.4));
  filter: blur(22px);
  -webkit-mask-image: radial-gradient(circle, black 24%, transparent 64%);
  mask-image: radial-gradient(circle, black 24%, transparent 64%);
  animation: nd-spin 2.2s linear infinite;
  opacity: 0.55;
}
@keyframes nd-spin { to { transform: translate(-50%, -82%) rotate(360deg); } }

/* =========================================================================
   EL FINAL — al llegar al fondo de cualquier página, una vez por sesión:
   apagón tipo señal corrupta → flashazo cósmico → la monja cruza corriendo
   → se planta en el centro a contraluz nuclear → «¿Te atreves a venir a verme?»
   Escenario 3D con parallax al cursor. z-400: por encima de todo.
   ========================================================================= */
.nun-finale {
  position: fixed; inset: 0; z-index: 400;
  background: #000; opacity: 0; pointer-events: none;
  display: grid; place-items: center; overflow: hidden;
  perspective: 1100px;
  transition: opacity 0.5s ease;
}
.nun-finale.on { opacity: 1; pointer-events: auto; }
/* Señal corrupta: scanlines + dos bandas de "tearing" que recorren la pantalla */
.nf-scan { position: absolute; inset: 0; opacity: 0.16; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(255 255 255 / 0.05) 3px 4px);
}
.nf-scan::before, .nf-scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 9px;
  background: rgb(255 255 255 / 0.09);
}
.nun-finale.on .nf-scan::before { animation: nf-tear 2.3s linear infinite; }
.nun-finale.on .nf-scan::after { animation: nf-tear 3.1s linear 0.9s infinite reverse; }
@keyframes nf-tear { 0% { top: -6%; } 100% { top: 106%; } }
/* Flashazo cósmico */
.nf-flash { position: absolute; inset: -25%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, #fff, rgb(198 220 255 / 0.9) 24%, rgb(150 180 255 / 0.35) 46%, transparent 64%);
}
.nun-finale.ph-flash .nf-flash { animation: nf-flash 0.6s ease-out both; }
@keyframes nf-flash {
  0% { opacity: 0; transform: scale(0.22); }
  14% { opacity: 1; transform: scale(1.05); }
  46% { opacity: 0.85; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(2.5); }
}
/* Escenario 3D */
.nf-stage { position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(calc(var(--nfx, 0) * 6deg)) rotateX(calc(var(--nfy, 0) * -4deg)); }
/* La carrera: cruza la pantalla con estela */
.nf-runner { position: absolute; bottom: -2%; left: 0; transform: translateX(-120%); will-change: transform; }
.nf-runner img { height: min(78vh, 700px); width: auto; filter: brightness(0.85) blur(1px); }
.nun-finale.ph-run .nf-runner { animation: nf-run 0.72s cubic-bezier(0.7, 0, 0.95, 1) both; }
.nun-finale.ph-run2 .nf-runner { animation: nf-run2 0.55s cubic-bezier(0.7, 0, 0.95, 1) both; }
@keyframes nf-run {
  0% { transform: translateX(-25vw) skewX(0deg); filter: blur(0); }
  35% { filter: blur(0.5px); }
  100% { transform: translateX(120vw) skewX(-9deg); filter: blur(7px); }
}
@keyframes nf-run2 {
  0% { transform: translateX(120vw) scaleX(-1) skewX(0deg); filter: blur(0); }
  100% { transform: translateX(-30vw) scaleX(-1) skewX(9deg); filter: blur(8px); }
}
/* Plantada en el centro, a contraluz nuclear */
.nf-stand { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) translateZ(40px);
  opacity: 0; transform-style: preserve-3d; }
.nf-stand img { height: min(80vh, 720px); width: auto;
  filter: brightness(0.5) contrast(1.15); }
.nf-halo { position: absolute; inset: -18% -55%; z-index: -1;
  background: radial-gradient(ellipse 46% 42% at 50% 50%,
    rgb(255 255 255 / 0.95),
    rgb(198 220 255 / 0.5) 32%,
    rgb(150 180 255 / 0.16) 52%, transparent 68%);
  filter: blur(10px); }
.nun-finale.ph-stand .nf-stand { animation: nf-stand-in 0.55s cubic-bezier(0.2, 1.3, 0.35, 1) both; }
.nun-finale.ph-stand .nf-halo { animation: nf-halo-breathe 2.6s ease-in-out 0.5s infinite; }
@keyframes nf-stand-in {
  0% { opacity: 0; transform: translateX(-50%) translateZ(40px) scale(1.35); }
  12% { opacity: 1; }
  100% { opacity: 1; transform: translateX(-50%) translateZ(40px) scale(1); }
}
@keyframes nf-halo-breathe {
  0%, 100% { filter: blur(10px) brightness(1); }
  50% { filter: blur(14px) brightness(1.4); }
}
/* El desafío */
.nf-text {
  position: relative; z-index: 2; margin: 0; padding: 0 20px;
  transform: translateZ(80px) translateY(-4vh);
  font-size: clamp(1.7rem, 2.2rem + 2.6vw, 4.2rem);
  font-weight: 900; letter-spacing: 0.01em; text-align: center; color: #fff;
  text-shadow: 0 0 18px rgb(255 255 255 / 0.65), 0 0 60px rgb(198 220 255 / 0.5), 0 2px 0 rgb(210 31 43 / 0.8);
  opacity: 0;
}
.nun-finale.ph-text .nf-text { animation: nf-text-in 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes nf-text-in {
  0% { opacity: 0; transform: translateZ(80px) translateY(2vh) scale(0.92); clip-path: inset(0 50% 0 50%); }
  40% { opacity: 1; clip-path: inset(0 0 0 0); }
  62% { transform: translateZ(80px) translateY(-3.6vh) scale(1.02) skewX(-3deg); }
  70% { transform: translateZ(80px) translateY(-4vh) scale(1) skewX(0); }
  100% { opacity: 1; transform: translateZ(80px) translateY(-4vh); }
}
.nf-actions { position: relative; z-index: 2; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  transform: translateZ(60px); opacity: 0; margin-top: 2vh; }
.nun-finale.ph-text .nf-actions { animation: nf-actions-in 0.5s ease-out 0.55s both; }
@keyframes nf-actions-in { from { opacity: 0; transform: translateZ(60px) translateY(14px); } to { opacity: 1; transform: translateZ(60px) translateY(0); } }
.nf-center { position: relative; z-index: 2; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) {
  .nun-finale { transition: opacity 0.3s ease; }
  .nun-finale.on .nf-scan::before, .nun-finale.on .nf-scan::after { animation: none; }
  .nun-finale.ph-flash .nf-flash { animation: nf-flash-soft 0.8s ease-out both; }
  .nun-finale.ph-run .nf-runner, .nun-finale.ph-run2 .nf-runner { animation: none; transform: translateX(-120%); }
  .nun-finale.ph-stand .nf-stand { animation: nf-soft-in 0.6s ease both; }
  .nun-finale.ph-stand .nf-halo { animation: none; }
  .nun-finale.ph-text .nf-text { animation: nf-soft-in 0.6s ease both; }
  .nun-finale.ph-text .nf-actions { animation: nf-soft-in 0.5s ease 0.4s both; }
  .nf-stage { transform: none; }
}
@keyframes nf-flash-soft { 0% { opacity: 0; } 40% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes nf-soft-in { from { opacity: 0; } to { opacity: 1; } }
