:root {
  --negro: #000000;
  --humo: #0b0b0b;
  --filete: #2b2b2b;
  --gris: #8a8a8a;
  --blanco: #ffffff;
  --rojo-950: #140402;
  --rojo-600: #7e1c14;
  --rojo-500: #b22013;
  --rojo-200: #dc958d;
  --rojo-100: #f0c4bd;
  --serif: 'Cormorant Garamond', Cormorant, Garamond, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', 'Courier New', monospace;
  --margen: 8vmin;
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }

html { background: var(--negro); }

body {
  background: var(--negro);
  color: var(--blanco);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--blanco); outline-offset: 6px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 40%, rgba(0,0,0,.36) 82%, rgba(0,0,0,.8) 100%),
    linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 34%);
}


/* Capítulos: cada sección solo aporta altura de scroll; su capa va fija */
.chapter { position: relative; height: 200vh; }
.chapter--hero { height: 150vh; }
.chapter--title { height: 130vh; }
.chapter--title-long { height: 170vh; }
.chapter--text { height: 170vh; }
.chapter--formats { height: 200vh; }
.chapter--live { height: 300vh; }
.chapter--step { height: 340vh; }
.chapter--exit { height: 160vh; }
.chapter--music { height: 300vh; }
.chapter--end { height: 170vh; }

.layer {
  position: fixed; inset: 0; z-index: 2;
  opacity: 0; visibility: hidden; pointer-events: none;
  padding: var(--margen);
  display: flex; flex-direction: column;
}
.layer.is-live { pointer-events: auto; }

.eyebrow, .meta, .hint, .credit, .hud {
  font-size: 15px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow, .meta, .hint, .credit, .hud, .label, .node__num, .index a, .ritual__info .eyebrow { font-variant-numeric: lining-nums; }
.meta, .credit, .hint { color: var(--gris); }

.bajada { font-size: clamp(21px, 2.5vw, 33px); line-height: 1.25; }

/* Hero */
.layer--hero {
  align-items: center; justify-content: center; text-align: center; gap: 22px;
  background: radial-gradient(ellipse 62vmin 46vmin at 50% 50%, rgba(0,0,0,.86) 0%, rgba(0,0,0,.7) 55%, rgba(0,0,0,0) 100%);
}
.cartela { width: min(60vw, 940px); }
.cartela img { display: block; width: 100%; height: auto; }
.alma { width: clamp(96px, 9vw, 140px); height: auto; opacity: .72; }
.alma--credit { width: clamp(120px, 12vw, 180px); opacity: .85; margin-top: 3vh; }
.layer--hero .alma { position: absolute; left: 50%; bottom: calc(var(--margen) + 4px); transform: translateX(-50%); }
.gate__logo { position: absolute; left: 50%; bottom: var(--margen); transform: translateX(-50%); width: clamp(96px, 9vw, 140px); opacity: .6; }
.layer--hero .hint { position: absolute; left: 50%; bottom: calc(var(--margen) + 74px); transform: translateX(-50%); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }

.is-entering .cartela img { animation: arrive .9s cubic-bezier(.16,1,.3,1) both; }
@keyframes arrive {
  0% { opacity: 0; transform: scale(1.35); filter: blur(14px); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* Texto centrado: qué es, salida */
.layer--center { align-items: center; justify-content: center; text-align: center; gap: 22px; }
.layer--center .eyebrow { color: var(--gris); }
.logline { font-size: clamp(25px, 3.5vw, 52px); line-height: 1.25; max-width: 22em; text-wrap: balance; }
.lead { font-size: clamp(19px, 1.75vw, 25px); line-height: 1.5; max-width: 34em; }
.eyebrow { color: var(--gris); }

/* Títulos de transición */
.layer--title { align-items: center; justify-content: center; text-align: center; gap: 20px; }
.layer--veil { background: radial-gradient(ellipse 80vw 62vh at 50% 50%, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,0) 100%); }
.layer--title .lead { max-width: 30em; }
.credit-line { color: var(--gris); font-size: 15px; letter-spacing: .04em; margin-top: 6px; }

/* Formatos: texto arriba, los volúmenes llevan su etiqueta en 3D */
.layer--top { justify-content: flex-start; align-items: flex-start; gap: 14px; padding-top: calc(var(--margen) + 54px); }
.layer--formats { align-items: center; text-align: center; padding-top: calc(var(--margen) + 72px); }
.layer--formats .lead { font-size: clamp(21px, 2.1vw, 30px); max-width: 26em; }

/* Live y sinopsis: bloque abajo a la izquierda */
.layer--live { justify-content: flex-end; align-items: flex-start; gap: 12px; padding-bottom: calc(var(--margen) + 56px); }
.venue { font-weight: 400; font-size: clamp(32px, 4.2vw, 62px); line-height: 1.1; max-width: 14em; }
.story { font-size: clamp(23px, 2.7vw, 37px); line-height: 1.3; max-width: 22em; text-wrap: pretty; }
.layer--live::before, .layer--step::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70vw 52vh at 0% 100%, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 100%);
}

/* Etiquetas proyectadas desde la escena (créditos, formatos) */
.labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.label {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; will-change: transform, opacity;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gris);
}
.label--format { font-size: 15px; letter-spacing: .14em; color: var(--blanco); text-align: center; }
.label--format span { display: block; color: var(--gris); font-size: 13px; margin-top: 4px; }

/* Música: rueda de los ocho pasos */
.layer--music { background: rgba(0,0,0,.9); align-items: center; justify-content: center; }
.music { width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(90px, 10vw, 150px); }
.music__intro { display: flex; flex-direction: column; gap: 16px; max-width: 30em; }
.music__intro .lead { color: var(--gris); }
.ritual { --size: min(70vh, 620px, 46vw); position: relative; width: var(--size); height: var(--size); }
.ritual__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ritual__track { fill: none; stroke: var(--filete); stroke-width: .2; }
.ritual__progress { fill: none; stroke: var(--rojo-500); stroke-width: .4; stroke-dasharray: 289.03; stroke-dashoffset: 289.03; transition: stroke-dashoffset .25s linear; }
.ritual__wheel { position: absolute; inset: 0; transition: transform 1.4s cubic-bezier(.65, 0, .35, 1); }
.node {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
}
.node__btn {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); transition: transform 1.4s cubic-bezier(.65, 0, .35, 1);
  display: flex; flex-direction: column; align-items: center; gap: 6px; white-space: nowrap; padding: 8px;
}
.node__dot {
  position: relative; width: 34px; height: 34px; border: 1px solid var(--gris); border-radius: 50%; background: rgba(0,0,0,.8);
  display: grid; place-items: center; transition: background .3s linear, border-color .3s linear, transform .3s linear;
}
.node__icon { width: 0; height: 0; margin-left: 3px; border-left: 9px solid var(--blanco); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.node.is-playing .node__icon { width: 9px; height: 11px; margin: 0; border: 0; border-left: 3px solid var(--blanco); border-right: 3px solid var(--blanco); }
.node__btn:hover .node__dot { border-color: var(--blanco); transform: scale(1.12); }
.node__num { font-size: 13px; letter-spacing: .16em; color: var(--gris); }
.node__name { font-size: clamp(11px, calc(var(--size) / 32), 15px); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); transition: color .4s linear; }
.node__btn:hover .node__name, .node.is-selected .node__name { color: var(--blanco); }
.node.is-selected .node__dot { border-color: var(--blanco); transform: scale(1.12); }
.node.is-playing .node__dot { background: var(--rojo-500); border-color: var(--rojo-500); }
.node.is-selected:not(.is-playing) .node__dot { background: rgba(255,255,255,.12); }
.ritual__center { position: absolute; inset: 15%; display: grid; place-items: center; text-align: center; }
.ritual__ring { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; animation: spin 60s linear infinite; animation-play-state: paused; transition: opacity .6s linear; }
.ritual.is-playing .ritual__ring { animation-play-state: running; }
.ritual.is-swap .ritual__ring { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.ritual__info { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 18%; }
.ritual__info::before { content: ''; position: absolute; inset: -30% -6%; z-index: -1; background: radial-gradient(circle, rgba(0,0,0,.82) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,0) 72%); }
.ritual__name { font-family: var(--serif); text-transform: uppercase; letter-spacing: .1em; font-size: clamp(18px, 2.1vw, 30px); line-height: 1.05; }
.ritual__verb { color: var(--gris); font-size: 17px; }
.ritual__play { margin-top: 10px; font-size: 14px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; border: 1px solid var(--blanco); padding: 10px 22px; transition: background .3s linear, color .3s linear; }
.ritual__play:hover { background: var(--blanco); color: var(--negro); }
.ritual__link { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gris); border-bottom: 1px solid var(--filete); padding-bottom: 2px; }
.ritual__link:hover { color: var(--blanco); }

/* Los ocho pasos */
.layer--step { justify-content: flex-end; align-items: flex-start; gap: 14px; padding-bottom: calc(var(--margen) + 56px); }
.layer--step .eyebrow { color: var(--gris); }
.layer--step .note { color: var(--gris); font-size: 18px; max-width: 26em; }
.cristal {
  font-family: var(--serif); font-weight: 300; text-transform: uppercase;
  letter-spacing: .12em; line-height: 1;
  font-size: clamp(40px, 7.4vw, 112px);
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.5) 46%, #fff 54%, rgba(255,255,255,.72) 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 22px rgba(240,196,189,.5));
}
.cristal--title { font-size: clamp(48px, 10vw, 156px); }
.cristal--panel { font-size: clamp(34px, 4.4vw, 64px); }

/* Cierre */
.layer--end { background: var(--negro); align-items: center; justify-content: center; text-align: center; gap: 22px; }
.layer--end .cartela { width: min(52vw, 760px); }
.layer--end .alma { position: absolute; left: 50%; bottom: var(--margen); transform: translateX(-50%); }
.filete { width: min(280px, 50vw); height: 1px; border: 0; background: var(--rojo-500); }
.book {
  margin-top: 3vh; font-size: clamp(34px, 5vw, 72px); line-height: 1; letter-spacing: .01em;
  border-bottom: 1px solid var(--rojo-500); padding-bottom: .12em; transition: color .4s linear, border-color .4s linear;
}
.book:hover { color: var(--rojo-100); border-color: var(--blanco); }
.layer--hero .meta, .layer--end .meta { text-transform: none; font-weight: 400; letter-spacing: .02em; color: rgba(255,255,255,.72); font-size: clamp(16px, 1.45vw, 21px); }
.layer--end .credit { position: absolute; bottom: var(--margen); left: 0; right: 0; }

/* HUD */
.hud { position: fixed; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--margen); pointer-events: none; opacity: 0; transition: opacity 1.2s linear; }
.is-open .hud, .is-open .index { opacity: 1; }
.is-open.at-panel .index, .is-open.at-end .index { opacity: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud--top { top: calc(var(--margen) * .55); }
.hud--bottom { bottom: calc(var(--margen) * .55); gap: 28px; }
.hud__logo img { display: block; height: 30px; width: auto; }
.hud__logo { transition: opacity .6s linear; }
.at-hero .hud__logo { opacity: 0; pointer-events: none; }
.hud__book { border-bottom: 1px solid var(--blanco); padding-bottom: 4px; }
.hud__sound, .hud__count { color: var(--gris); white-space: nowrap; }
.hud__sound { letter-spacing: .16em; text-transform: uppercase; font-size: 15px; font-weight: 500; }
.hud__sound[aria-pressed="true"] { color: var(--blanco); }
.progress { flex: 1; height: 1px; background: var(--filete); }
.progress span { display: block; height: 1px; width: 100%; background: var(--blanco); transform-origin: left center; transform: scaleX(0); }

.index { position: fixed; right: var(--margen); top: 50%; transform: translateY(-50%); z-index: 10; opacity: 0; transition: opacity 1.2s linear; }
.index ol { list-style: none; display: flex; flex-direction: column; gap: 10px; text-align: right; }
.index a { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gris); display: inline-flex; gap: 10px; align-items: center; transition: color .4s linear; }
.index a::after { content: ''; display: block; width: 14px; height: 1px; background: currentColor; transition: width .4s linear; }
.index a.is-active { color: var(--blanco); }
.index a.is-active::after { width: 38px; }
.index a.is-step:not(.is-active) .index__name { display: none; }
.index li.gap { height: 6px; }

/* Puerta: registro mono, minúscula, centrado */
.gate {
  position: fixed; inset: 0; z-index: 20; background: var(--negro);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  font-family: var(--mono); font-size: 15px; letter-spacing: .02em; line-height: 1.7; text-transform: lowercase;
  transition: opacity 1.4s linear, visibility 0s linear 1.4s;
}
.gate.is-gone { opacity: 0; visibility: hidden; transition: opacity .5s linear, visibility 0s linear .5s; }
.gate.is-diving { opacity: 0; visibility: hidden; transition: opacity .32s cubic-bezier(.7,0,.84,0), visibility 0s linear .32s; }
.gate.is-diving > * { transform: scale(2.4); filter: blur(8px); transition: transform .32s cubic-bezier(.7,0,.84,0), filter .32s linear; }
.is-flying .layer { visibility: hidden !important; }
.gate__load { color: var(--gris); }
.gate__actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.gate__actions[hidden] { display: none; }
.gate__actions button { text-transform: lowercase; letter-spacing: .02em; padding: 6px 10px; }
.gate__actions button + button { color: var(--gris); }
.gate__actions button:hover { color: var(--blanco); background: var(--humo); }
.cursor { display: inline-block; width: .6em; height: 1.05em; margin-left: 2px; background: var(--blanco); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.sc { position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; opacity: 0; border: 0; pointer-events: none; }

@media (max-width: 760px) {
  body { font-size: 19px; }
  .layer--music { padding-top: calc(var(--margen) + 44px); padding-bottom: calc(var(--margen) + 44px); }
  .music { grid-template-columns: 1fr; gap: 26px; justify-items: center; }
  .music__intro { text-align: center; align-items: center; }
  .music__intro .lead { display: none; }
  .ritual { --size: min(78vw, 54vh); }
  .node__name { font-size: 11px; letter-spacing: .06em; white-space: normal; width: max-content; max-width: 7.5em; text-align: center; line-height: 1.1; }
  .ritual__info { gap: 4px; }
  .ritual__play { margin-top: 6px; padding: 7px 16px; font-size: 12px; }
  .node__num { display: none; }
  .node__dot { width: 26px; height: 26px; }
  .node__icon { border-left-width: 7px; border-top-width: 5px; border-bottom-width: 5px; }
  .ritual__name { font-size: 19px; }
  .ritual__verb { font-size: 15px; }
  .layer--end .cartela { width: 84vw; }
  .layer--top { padding-top: calc(var(--margen) + 40px); }
  .index { display: none; }
  .hud__logo img { height: 20px; }
  .eyebrow, .meta, .hint, .credit, .hud, .hud__sound { font-size: 13px; }
  .hud--bottom { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .layer--hero .hint { animation: none; }
  .is-entering .cartela img { animation: none; }
}

/* Book the show: formulario en vidrio */
html.is-booking, html.is-booking body { overflow: hidden; }
.booking {
  margin: auto; color: var(--blanco); border-radius: 28px;
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(155deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.05) 38%, rgba(255,255,255,.03) 62%, rgba(255,255,255,.09) 100%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.06), 0 30px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.booking::backdrop { background: rgba(0,0,0,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.booking[open] { animation: bookingIn .6s cubic-bezier(.16,1,.3,1) both; }
@keyframes bookingIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.booking__form { display: flex; flex-direction: column; gap: 18px; position: relative; }
.booking .eyebrow { color: rgba(255,255,255,.62); font-size: 14px; }
.booking .cristal--panel { margin: -4px 0 6px; font-size: clamp(30px, 4vw, 44px); white-space: nowrap; }
.booking__close {
  position: absolute; top: -10px; right: -10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1; color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  transition: background .3s ease, color .3s ease;
}
.booking__close:hover { background: rgba(255,255,255,.16); color: var(--blanco); }
.booking__close:focus-visible { outline-offset: 2px; }
.booking__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; min-width: 0; }
.field > span, .field legend { font-size: 16px; letter-spacing: .04em; color: rgba(255,255,255,.72); }
.field input:not([type=radio]), .field textarea {
  font: inherit; font-size: 19px; color: var(--blanco); outline: none; resize: vertical;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 13px 16px; transition: border-color .3s ease, background .3s ease;
}
.field textarea { min-height: 104px; }
.field ::placeholder { color: rgba(255,255,255,.36); }
.field input:focus, .field textarea:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.1); }
.field.is-bad input { border-color: var(--rojo-400, #c14033); }
.field--formats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.field--formats legend { margin-bottom: 10px; }
.field--formats label { cursor: pointer; }
.field--formats input { position: absolute; opacity: 0; pointer-events: none; }
.field--formats span {
  display: inline-block; font-size: 17px; padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72);
  transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.field--formats label:hover span { color: var(--blanco); border-color: rgba(255,255,255,.3); }
.field--formats input:checked + span { color: var(--negro); background: var(--blanco); border-color: var(--blanco); }
.field--formats input:focus-visible + span { outline: 1px solid var(--blanco); outline-offset: 3px; }
.booking__send {
  margin-top: 8px; padding: 16px; border-radius: 999px; background: var(--rojo-500); color: var(--blanco);
  font-size: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25); transition: background .3s ease;
}
.booking__send:hover { background: #c42617; }
.booking__send:disabled { opacity: .5; cursor: wait; }
.booking__note { min-height: 1.5em; font-size: 17px; color: rgba(255,255,255,.72); text-align: center; }
@media (max-width: 560px) {
  .booking { border-radius: 22px; }
  .booking__row { grid-template-columns: 1fr; }
  .booking .cristal--panel { font-size: 7.2vw; letter-spacing: .06em; }
  .booking__close { top: -14px; right: -14px; }
}
@media (prefers-reduced-motion: reduce) { .booking[open] { animation: none; } }
