/* ============ NOCTURNA · Propuesta 2 · Galería horizontal ============ */
:root {
  --paper: #efe9df;
  --paper-2: #e5ddcf;
  --ink: #161412;
  --muted: #6f675d;
  --red: #c8371f;
  --line: #cfc5b5;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
i { font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--red); }
::selection { background: var(--red); color: var(--paper); }

/* cabecera */
/* Alturas reservadas: el contenido nunca queda debajo del menú ni de la barra de flechas */
:root { --top-h: 72px; --ui-h: 88px; }
.top { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--top-h); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 var(--gutter);
  background: rgb(239 233 223 / .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { font: 600 1.5rem var(--serif); text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand sup { font: 500 .6rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.menu { display: flex; gap: clamp(12px, 1.8vw, 28px); }
.menu a { position: relative; text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); padding: 6px 0; transition: color .2s; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .3s; }
.menu a:hover, .menu a.is-on { color: var(--ink); }
.menu a.is-on::after { transform: scaleX(1); }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); transition: transform .3s, top .3s; }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
@media (max-width: 1080px) {
  .burger { display: block; }
  .menu { position: fixed; inset: var(--top-h) 0 auto; flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px; background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -20px rgb(0 0 0 / .2); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .3s; }
  .menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .menu a { font: 400 1.6rem var(--serif); color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu a::after { display: none; }
  .menu a.is-on { color: var(--red); }
}
@media (max-width: 480px) { .top-right .pill { display: none; } }

.pill { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font: 500 .95rem var(--sans); border: 0; cursor: pointer; transition: background .25s, transform .25s; }
.pill:hover { background: var(--red); transform: translateY(-2px); }
.pill.big { padding: 18px 32px; font-size: 1.05rem; }
.kicker { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }

/* ===== Scroll horizontal: el scroll vertical mueve la pista ===== */
/* Cada sala ocupa exactamente una pantalla y al soltar se ajusta a la más cercana:
   nunca se ven dos salas a medias. */
.h-scroll { position: relative; height: var(--h, 600vh); }
.h-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.h-track { display: flex; height: 100%; width: max-content; will-change: transform; }
.panel { --avail: calc(100svh - var(--top-h) - var(--ui-h) - 48px); width: 100vw; height: 100%; flex: none; overflow: hidden;
  padding: calc(var(--top-h) + 24px) var(--gutter) calc(var(--ui-h) + 24px); display: flex; flex-direction: column; justify-content: center; position: relative; }
.panel .kicker { margin-bottom: clamp(12px, 2.4vh, 24px); }

/* Barra inferior: contador de salas + progreso + flechas */
.h-ui { position: fixed; left: 0; right: 0; bottom: 0; height: var(--ui-h); padding: 0 var(--gutter); z-index: 30; display: flex; align-items: center; gap: 20px;
  background: rgb(239 233 223 / .92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); transition: opacity .3s, translate .3s; }
.h-ui.is-off { opacity: 0; translate: 0 100%; pointer-events: none; }
.h-count { margin: 0; font: 500 1rem var(--serif); white-space: nowrap; }
.h-count #hCur { color: var(--red); font-size: 1.4rem; }
.h-count small { font: 400 .75rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.h-progress { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.h-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .15s linear; }
.h-btns { display: flex; gap: 8px; }
.h-btns button { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.3rem; cursor: pointer; transition: background .2s, color .2s, transform .25s; }
.h-btns button:hover { background: var(--ink); color: var(--paper); }
.h-btns button:disabled { opacity: .3; cursor: default; }
.h-btns .next { background: var(--red); border-color: var(--red); color: #fff; animation: ping 2.2s ease-out infinite; }
.h-btns .next:hover { transform: translateX(4px); background: var(--ink); border-color: var(--ink); }
.h-btns .next:disabled { animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(200 55 31 / .55); } 70%, 100% { box-shadow: 0 0 0 16px rgb(200 55 31 / 0); } }

/* Indicador en la portada */
.swipe-cue { margin-top: clamp(14px, 3.5vh, 36px); display: inline-flex; align-items: center; gap: 16px; padding: 12px 22px 12px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-align: left; font: inherit; transition: background .25s, color .25s; }
.swipe-cue:hover { background: var(--ink); color: var(--paper); }
.cue-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--red); display: grid; place-items: center; flex: none; }
.cue-mouse { width: 18px; height: 28px; border: 2px solid #fff; border-radius: 10px; position: relative; }
.cue-mouse::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: wheel 1.4s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(9px); } }
.cue-hand { display: none; font-size: 1.4rem; animation: swipe 1.6s ease-in-out infinite; }
@keyframes swipe { 0%, 100% { transform: translateX(8px) rotate(-10deg); } 50% { transform: translateX(-10px) rotate(-10deg); } }
.cue-text { display: grid; line-height: 1.25; }
.cue-text b { font: 600 1.05rem var(--serif); }
.cue-text small { color: var(--muted); font-size: .82rem; }
.swipe-cue:hover small { color: #cfc5b5; }
.cue-mob { display: none; }
.cue-arrows { font-size: 1.1rem; letter-spacing: -.1em; color: var(--red); animation: arrows 1.4s linear infinite; }
@keyframes arrows { 0% { opacity: .3; transform: translateX(-6px); } 50% { opacity: 1; } 100% { opacity: .3; transform: translateX(6px); } }

/* 1 · Hero */
.panel-hero { flex-direction: row; align-items: stretch; gap: var(--gutter); }
.hero-text { flex: 1.1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.panel-hero h1 { font: 300 clamp(2.6rem, min(7.4vw, 12vh), 8rem)/.95 var(--serif); letter-spacing: -.04em; margin: 0 0 clamp(10px, 2.4vh, 24px); }
.sub { max-width: 38ch; color: var(--muted); font-size: 1.1rem; margin: 0; }
.hero-img { flex: 1; min-height: 0; border-radius: 999px 999px 24px 24px; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
body.loaded .hero-img img { transform: scale(1); }
.stamp { position: absolute; right: calc(var(--gutter) - 20px); top: calc(var(--top-h) + 10px); width: 120px; height: 120px; display: grid; place-items: center; background: var(--paper); border-radius: 50%; }
.stamp svg { position: absolute; inset: 0; animation: spin 18s linear infinite; font: 600 9.5px var(--sans); letter-spacing: .14em; fill: var(--ink); }
.stamp span { font-size: 1.8rem; color: var(--red); }
@keyframes spin { to { rotate: 360deg; } }

/* 2 · Manifiesto */
.panel-manifest { background: var(--ink); color: var(--paper); align-items: center; }
.panel-manifest > * { width: min(100%, 1040px); }
.panel-manifest .kicker { color: #9b9286; }
.manifest { font: 300 clamp(1.5rem, min(3.4vw, 5.4vh), 3.2rem)/1.18 var(--serif); letter-spacing: -.02em; margin: 0 0 clamp(20px, 5vh, 48px); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid #3a3530; padding-top: clamp(14px, 3vh, 24px); }
.facts b { display: block; font: 500 clamp(1.4rem, min(2.6vw, 4.4vh), 2.4rem) var(--serif); }
.facts span { font-size: .8rem; color: #9b9286; }

/* 3 · Obras: muro de galería en una sola pantalla (4 × 2) */
.wall { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: clamp(12px, 2vw, 28px); height: calc(var(--avail) - 40px); }
.art { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 8px; cursor: zoom-in; }
.art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 6px; box-shadow: 0 24px 40px -26px rgb(22 20 18 / .6); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.art:hover img { transform: translateY(-6px); }
.art figcaption { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.art figcaption b { display: block; font: 500 .95rem var(--serif); color: var(--ink); }

/* 4 · Artistas */
.panel-artists { background: var(--paper-2); }
.artist-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px); }
.artist-card img { width: 100%; height: calc(var(--avail) - 130px); min-height: 160px; object-fit: cover; border-radius: 200px 200px 12px 12px; filter: sepia(.25) contrast(1.05); transition: border-radius .6s, filter .6s; }
.artist-card:hover img { border-radius: 12px; filter: none; }
.artist-card h3 { font: 400 clamp(1.3rem, 3.4vh, 1.8rem) var(--serif); margin: 12px 0 2px; }
.artist-card p { margin: 0; color: var(--muted); }

/* 5 · Proceso */
.panel-process { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 24px var(--gutter); }
.panel-process .kicker { width: 100%; margin: 0; }
.ritual { flex: 1.3; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vh, 40px) 32px; align-content: center; }
.ritual span { font: 300 clamp(2rem, 5vh, 3rem) var(--serif); color: var(--red); }
.ritual h3 { margin: 4px 0; font-size: 1.3rem; }
.ritual p { margin: 0; color: var(--muted); }
.ritual-img { flex: 1; height: calc(var(--avail) - 50px); object-fit: cover; border-radius: 16px; min-width: 260px; }

/* 6 · Salida */
.panel-exit { align-items: flex-start; }
.panel-exit h2 { font: 300 clamp(2.6rem, min(7.4vw, 12vh), 7.5rem)/.95 var(--serif); letter-spacing: -.04em; margin: 0 0 clamp(20px, 4vh, 40px); }

/* Celular: carrusel nativo con swipe y snap, una sala completa por pantalla */
@media (max-width: 760px) {
  :root { --ui-h: 74px; }
  .h-scroll { height: auto; padding-top: var(--top-h); }
  .h-sticky { position: relative; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .h-sticky::-webkit-scrollbar { display: none; }
  .h-track { transform: none !important; height: calc(100svh - var(--top-h) - var(--ui-h)); }
  .panel { --avail: auto; scroll-snap-align: start; scroll-snap-stop: always; padding: 20px var(--gutter); overflow-y: auto; justify-content: flex-start; }
  .panel-hero { flex-direction: column; justify-content: center; gap: 16px; }
  .panel-hero h1 { font-size: clamp(2.3rem, 10.5vw, 3.4rem); margin-bottom: 10px; }
  .hero-img { flex: 1 1 auto; min-height: 120px; width: 100%; border-radius: 200px 200px 16px 16px; }
  .swipe-cue { margin-top: 12px; }
  .cue-mouse, .cue-desk { display: none; }
  .cue-hand, .cue-mob { display: block; }
  .stamp { display: none; }
  .panel-manifest { justify-content: center; }
  .facts { grid-template-columns: 1fr 1fr; }
  .wall { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 42vw; height: auto; }
  .artist-row { grid-template-columns: 1fr 1fr; }
  .artist-card img { height: 46vw; }
  .artist-card:nth-child(3) { display: none; }
  .ritual { grid-template-columns: 1fr 1fr; gap: 20px; }
  .ritual-img { display: none; }
  .panel-exit { justify-content: center; }
  .h-ui { position: relative; height: var(--ui-h); }
  .h-ui.is-off { opacity: 1; translate: none; pointer-events: auto; }
  .h-btns button { width: 46px; height: 46px; }
  .h-count small { display: none; }
}

/* ===== Reserva ===== */
.booking { padding: clamp(80px, 12vw, 150px) var(--gutter); position: relative; z-index: 1; background: var(--paper); }
.booking-head h2, .faq h2 { font: 300 clamp(2.6rem, 7vw, 6rem)/1 var(--serif); letter-spacing: -.03em; margin: 0 0 12px; }
.booking-head p { color: var(--muted); max-width: 52ch; }
.booking-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: var(--gutter); margin-top: 48px; align-items: start; }

.bodymap { position: sticky; top: 90px; text-align: center; background: var(--paper-2); border-radius: 24px; padding: 28px; }
.bodymap svg { width: 100%; max-height: 62vh; }
.zone { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; cursor: pointer; transition: fill .25s; }
.zone:hover { fill: #f3c9bf; }
.zone.is-on { fill: var(--red); }
.zone:focus-visible { outline: none; stroke: var(--red); stroke-width: 3; }
.zone-label { margin: 12px 0 0; color: var(--muted); }
.zone-label b { color: var(--ink); }

.ticket { display: grid; gap: 22px; background: #fff8ee; border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 40px);
  -webkit-mask: radial-gradient(circle 14px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; }
.ticket fieldset { border: 0; padding: 0; margin: 0; }
.ticket legend, .ticket label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ticket label { display: grid; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); cursor: pointer; transition: .2s; }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.range output { float: right; font: 500 1rem var(--serif); color: var(--ink); text-transform: none; letter-spacing: 0; }
input[type=range] { width: 100%; accent-color: var(--red); }
.ticket input:not([type=range]):not([type=checkbox]):not([type=radio]), .ticket textarea {
  font: 400 1rem var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; text-transform: none; letter-spacing: 0; }
.ticket input:focus, .ticket textarea:focus { outline: none; border-color: var(--red); }
.check { display: flex !important; align-items: center; gap: 10px; text-transform: none !important; letter-spacing: 0 !important; font-size: .95rem !important; }
.check input { accent-color: var(--red); width: 18px; height: 18px; }
.estimate { border-block: 1px dashed var(--line); padding: 20px 0; display: grid; gap: 4px; }
.estimate span { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.estimate b { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); color: var(--red); }
.estimate small { color: var(--muted); }
@media (max-width: 760px) { .booking-grid { grid-template-columns: 1fr; } .bodymap { position: relative; top: 0; } .bodymap svg { max-height: 44vh; } }

/* FAQ */
.faq { padding: 0 var(--gutter) clamp(80px, 10vw, 140px); }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 32px; }
.faq details { background: var(--paper-2); border-radius: 18px; padding: 22px 24px; }
.faq summary { cursor: pointer; font: 500 1.2rem var(--serif); list-style: none; }
.faq summary::before { content: "↘ "; color: var(--red); }
.faq p { color: var(--muted); margin-bottom: 0; }

/* footer */
.foot { background: var(--ink); color: var(--paper); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 48px var(--gutter); }
.foot .brand { font-size: 3rem; margin: 0; }
.foot p { color: #a59d92; }
.small { width: 100%; font-size: .8rem; margin: 0; }

.wa { position: fixed; right: 18px; bottom: calc(var(--ui-h) + 16px); z-index: 50; padding: 14px 20px 14px 44px; border-radius: 999px; background: #25d366; color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 12px 30px rgb(37 211 102 / .35); }
.wa::before { content: ""; position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; border-radius: 50%; border: 2px solid #fff; }
.wa:hover { transform: translateY(-2px); }

/* lightbox */
dialog.lb { border: 0; padding: 0; background: transparent; }
dialog.lb::backdrop { background: rgb(239 233 223 / .94); backdrop-filter: blur(6px); }
dialog.lb img { max-width: 90vw; max-height: 86vh; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .5); }

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

/* Los anclajes no quedan escondidos bajo el menú fijo */
#reserva, #faq, #contacto { scroll-margin-top: var(--top-h); }
@media (max-width: 760px) { .wa { bottom: 18px; } }
