/* Halloween Fetish Ball — motion system.
   Everything here is scoped under html.hfb-motion, which is only set when the visitor
   has not asked for reduced motion. Entrance animations use the individual `translate` /
   `scale` properties so `transform` stays free for scroll-linked parallax. */

:root {
  --e1: cubic-bezier(.16,1,.3,1);
  --e2: cubic-bezier(.22,.61,.36,1);
}

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Sticky nav sits on top — keep anchor targets clear of it */
section[id] { scroll-margin-top: 72px; }

/* ---------- Generic reveal ---------- */
.hfb-motion .m-rv {
  opacity: 0;
  translate: var(--rx, 0) var(--ry, 30px);
  scale: var(--rs, 1);
  transition: opacity .9s var(--e1) var(--d, 0s), translate 1s var(--e1) var(--d, 0s), scale 1s var(--e1) var(--d, 0s);
}
.hfb-motion .m-rv.in { opacity: 1; translate: 0 0; scale: 1; }

/* ---------- Hero ---------- */
.hfb-motion #hero-bg-video { animation: hfbBgIn 1.6s var(--e2) both; }
@keyframes hfbBgIn { from { filter: brightness(0); } to { filter: brightness(1); } }

.hfb-motion #top > div:last-child > * {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .9s var(--e1), translate 1s var(--e1), clip-path 1.15s var(--e1);
}
.hfb-motion #top > div:last-child > h1,
.hfb-motion #top > div:last-child > :nth-child(3) {
  opacity: 1;
  clip-path: inset(100% -20% -20% -20%);
}
.hfb-motion #top.hero-in > div:last-child > * { opacity: 1; translate: 0 0; clip-path: inset(-20% -20% -20% -20%); }
.hfb-motion #top > div:last-child > :nth-child(2) { transition-delay: .1s; }
.hfb-motion #top > div:last-child > :nth-child(1) { transition-delay: .2s; }
.hfb-motion #top > div:last-child > :nth-child(3) { transition-delay: .3s; }
.hfb-motion #top > div:last-child > :nth-child(4) { transition-delay: .4s; }
.hfb-motion #top > div:last-child > :nth-child(5) { transition-delay: .5s; }
.hfb-motion #top > div:last-child > :nth-child(6) { transition-delay: .6s; }
.hfb-motion #top > div:last-child > :nth-child(7) { transition-delay: .7s; }

/* Countdown: mechanical roll */
.cd-value { position: relative; overflow: hidden; }
.cd-value .cd-cur { display: block; }
.cd-value .cd-in { animation: cdIn .3s var(--e1); }
.cd-value .cd-old { position: absolute; inset: 0; animation: cdOut .3s var(--e1) forwards; }
@keyframes cdIn { from { transform: translateY(35%); opacity: 0; filter: blur(1.5px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes cdOut { to { transform: translateY(-35%); opacity: 0; filter: blur(1.5px); } }

/* ---------- Headline word reveal ---------- */
.hfb-motion .hfb-words .w {
  display: inline-block;
  opacity: .15;
  translate: 0 20px;
  transition: opacity .8s var(--e1), translate .9s var(--e1);
  transition-delay: calc(var(--i) * 50ms);
}
.hfb-motion .hfb-words.in .w { opacity: 1; translate: 0 0; }

/* ---------- Masked slide (non-numeric stats) ---------- */
.hfb-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hfb-mask > span { display: inline-block; }
.hfb-motion .hfb-mask > span { translate: 0 105%; transition: translate .85s var(--e1) var(--d, 0s); }
.hfb-motion .in .hfb-mask > span { translate: 0 0; }

/* ---------- Editorial image parallax ---------- */
.hfb-motion .hfb-par { overflow: hidden; }
.hfb-motion .hfb-par img { will-change: transform; }

/* ---------- Reel focus ---------- */
.hfb-motion .hfb-reel { position: relative; z-index: 5; will-change: transform; }

/* ---------- Rooms: sticky horizontal sequence (desktop) ---------- */
#rooms.is-h { padding-top: 0 !important; padding-bottom: 0 !important; max-width: none !important; }
#rooms.is-h .rooms-track { height: 320vh; position: relative; }
#rooms.is-h .rooms-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 72px; box-sizing: border-box;
}
#rooms.is-h .rooms-head { margin-bottom: 30px !important; padding: 0 28px; }
#rooms.is-h .rooms-rail { display: flex; gap: 4vw; padding: 0 9vw; width: max-content; will-change: transform; }
#rooms.is-h .room-row {
  width: 82vw; height: min(62vh, 620px); margin: 0 !important;
  grid-template-columns: 1.25fr 1fr; background: rgba(14,12,10,.72); border-radius: 20px;
}
#rooms.is-h .room-photo { overflow: hidden; }
#rooms.is-h .room-photo img { min-height: 0 !important; will-change: transform; }
#rooms.is-h .room-row h3 { font-size: clamp(30px, 3.4vw, 52px) !important; }
#rooms.is-h .room-row p { font-size: 15px !important; }
#rooms.is-h .room-row > div:last-child { padding: clamp(28px, 4vw, 56px) !important; }
#rooms .rooms-progress { display: none; }
#rooms.is-h .rooms-progress {
  display: block; position: relative; height: 2px; border-radius: 2px; background: rgba(236,229,211,.08);
  width: min(420px, 50vw); margin: 34px auto 0;
}
#rooms.is-h .rooms-progress i { position: absolute; inset: 0; background: #d4af5a; transform-origin: left; transform: scaleX(0); }

/* ---------- Lineup ---------- */
.hfb-motion .lu-img { clip-path: inset(0 0 100% 0); scale: 1.08; transition: clip-path 1s var(--e1) var(--d, 0s), scale 1.1s var(--e1) var(--d, 0s); }
.hfb-motion .in .lu-img { clip-path: inset(0); scale: 1; }
.lu-tile { transition: background .15s, transform .35s var(--e1); transform-style: preserve-3d; }
.lu-tile img { transition: clip-path 1s var(--e1) var(--d, 0s), scale 1.1s var(--e1) var(--d, 0s), transform .35s var(--e1); }

/* ---------- Tickets ---------- */
.hfb-motion .price-pop { display: inline-block; }
.hfb-motion .in .price-pop { animation: pricePop .9s var(--e1) var(--d, 0s) both; }
@keyframes pricePop { 0% { scale: .7; opacity: 0; } 60% { scale: 1.03; opacity: 1; } 100% { scale: 1; opacity: 1; } }

/* ---------- Floating Buy Tickets CTA ---------- */
.hfb-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; text-decoration: none; text-transform: uppercase; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em;
  background: #c42238; color: #fff4e0; border-radius: 6px; font-weight: 600; box-shadow: 0 14px 34px -10px rgba(0,0,0,.8);
  opacity: 0; translate: 0 20px; pointer-events: none;
  transition: opacity .4s var(--e1), translate .4s var(--e1), box-shadow .15s, transform .15s;
}
.hfb-float.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.hfb-float:hover { background: #d6283f; }
@media (max-width: 860px) {
  .hfb-float { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); }
  .hfb-float:hover { transform: translateX(-50%); }
}

/* ---------- Tables: sticky editorial split ---------- */
.bottle-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.bottle-left { position: sticky; top: 15vh; }
.bottle-right { display: flex; flex-direction: column; gap: 24px; }
.bottle-fig { margin: 0; border-radius: 16px; overflow: hidden; background: rgba(20,18,15,.6); }
.bottle-fig img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; filter: grayscale(.15) contrast(1.05); }
.bottle-fig figcaption { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: #5a5548; padding: 12px 16px; }
@media (max-width: 860px) {
  .bottle-split { grid-template-columns: 1fr; gap: 36px; }
  .bottle-left { position: static; text-align: center; }
  .bottle-left .bottle-ctas { justify-content: center !important; }
}

/* ---------- Dress code rails ---------- */
.dress-rails { display: none; }
.hfb-motion .dress-rails {
  display: flex; flex-direction: column; gap: 6px;
  width: 100vw; margin: 0 0 44px calc(50% - 50vw); overflow: hidden;
}
.hfb-motion .gallery-fallback { display: none !important; }
.dress-rail { display: flex; gap: 6px; width: max-content; will-change: transform; }
.dress-rail img { border-radius: 10px; height: clamp(140px, 19vw, 270px); width: auto; display: block; flex-shrink: 0; filter: grayscale(.15) contrast(1.05); }
.dress-skew { will-change: transform; }

.hfb-motion .tag-enc { opacity: 0; translate: 0 15px; transition: opacity .6s var(--e1) var(--d), translate .7s var(--e1) var(--d); }
.hfb-motion .in .tag-enc { opacity: 1; translate: 0 0; }
.tag-forb { position: relative; }
.tag-enc, .tag-forb { white-space: nowrap; }
@media (max-width: 860px) { #dress [data-reveal]:last-child { grid-template-columns: 1fr !important; } }
.hfb-motion .tag-forb::after {
  content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 1.5px; background: #b81f34;
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--e1) var(--d);
}
.hfb-motion .in .tag-forb::after { transform: scaleX(1); }

/* ---------- FAQ ---------- */
.faq-item { transition: border-color .4s var(--e1); }
.faq-item.open { border-bottom-color: rgba(212,175,90,.35) !important; }
.faq-item .faq-row span:first-child { transition: color .35s var(--e1); }
.faq-item.open .faq-row span:first-child { color: #d4af5a !important; }
.faq-icon { display: inline-block; transition: transform .4s var(--e1); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-body { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--e1); padding: 0 !important; }
.faq-item.open .faq-body { grid-template-rows: 1fr; }
.faq-body > .faq-inner { overflow: hidden; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--e1), transform .45s var(--e1); }
.faq-body > .faq-inner > div { padding: 0 4px 22px; }
.faq-item.open .faq-inner { opacity: 1; transform: none; }

/* ---------- Venue destination ---------- */
#venue { position: relative; }
.venue-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 0; overflow: hidden; }
.venue-bg img { width: min(1100px, 92vw); opacity: .07; will-change: transform; }
#venue > :not(.venue-bg) { position: relative; z-index: 1; }

/* ---------- Ambient fog ---------- */
.hfb-fog {
  position: fixed; inset: -20%; z-index: 199; pointer-events: none; mix-blend-mode: screen; opacity: .05;
  background:
    radial-gradient(40% 30% at 30% 40%, rgba(236,229,211,.9), transparent 70%),
    radial-gradient(35% 28% at 72% 65%, rgba(212,175,90,.7), transparent 70%);
  animation: fogDrift 48s ease-in-out infinite alternate;
}
@keyframes fogDrift { from { transform: translate3d(-4%, -2%, 0) scale(1); } to { transform: translate3d(5%, 3%, 0) scale(1.1); } }

/* ---------- Background parallax depth ----------
   The backdrop video is oversized and drifts with scroll + pointer; two glow layers float
   in front of it at faster rates so the page reads as layered space, not a flat loop. */
.hfb-motion #hero-bg-video { top: -12vh !important; height: 124vh !important; will-change: transform; }
.hfb-glow { position: fixed; inset: -25%; pointer-events: none; will-change: transform; mix-blend-mode: screen; }
.hfb-glow.g1 { z-index: -1; opacity: .55;
  background: radial-gradient(28% 22% at 22% 30%, rgba(122,52,214,.55), transparent 70%),
              radial-gradient(24% 20% at 80% 72%, rgba(196,34,56,.45), transparent 70%); }
.hfb-glow.g2 { z-index: -1; opacity: .4;
  background: radial-gradient(18% 14% at 70% 20%, rgba(212,175,90,.35), transparent 70%),
              radial-gradient(22% 18% at 30% 85%, rgba(122,52,214,.4), transparent 70%); }

/* VIP sold out badge (Tables section) */
.vip-sold { display: inline-flex; align-items: center; padding: 14px 26px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #0b0a08; background: #d4af5a; }
