/* =====================================================================
   HERO · "The Room Goes Soft"
   A dance floor graded into Melli's palette, lit by your cursor, then
   folded into a single gummy on the first scroll.
   ===================================================================== */

.floor { position: relative; height: 240vh; --s: 0; }
.floor__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate;
  color: oklch(0.97 0.02 80);
  background: oklch(0.09 0.025 350);
}
html.on-floor .floor__stage, html.on-floor .floor__stage a { cursor: none; }

/* ---------- film ---------- */
.floor__film { position: absolute; inset: 0; z-index: 0; }
.floor__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.floor__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none;
}
/* No WebGL: show the film itself, roughly graded in CSS */
.no-gl .floor__gl { display: none; }
html.no-gl[data-mode="pm"] .floor__video[data-for="pm"],
html.no-gl[data-mode="am"] .floor__video[data-for="am"] { opacity: 1; transition: opacity 1s var(--ease-melt); }
html.no-gl[data-mode="pm"] .floor__video { filter: sepia(.35) saturate(1.5) hue-rotate(-18deg) contrast(1.08) brightness(.8); }
html.no-gl[data-mode="am"] .floor__video { filter: sepia(.45) saturate(1.3) hue-rotate(-10deg) brightness(1.02); }
html.no-gl .floor__film::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(20deg, oklch(0.1 0.04 350 / .85) 10%, oklch(0.1 0.04 350 / 0) 60%);
}

/* ---------- depth: three planes of gummies ---------- */
.floor__depth { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gum {
  position: absolute; display: block; height: auto;
  will-change: transform, opacity;
  transition: opacity .9s var(--ease-melt);
  opacity: 0;
}
.floor.is-live .gum { opacity: 1; }
.gum--near { width: clamp(170px, 19vw, 340px); right: 10%; bottom: 22%; filter: blur(1.4px) drop-shadow(0 30px 50px oklch(0.1 0.05 350 / .6)); animation: bob 7s ease-in-out infinite; }
.gum--mid  { width: clamp(96px, 10vw, 190px); right: 27%; top: 18%; filter: drop-shadow(0 20px 30px oklch(0.1 0.05 350 / .5)); animation: bob 9s ease-in-out -2s infinite; }
.gum--far  { width: clamp(60px, 5.5vw, 110px); right: 12%; top: 12%; filter: blur(2.6px) saturate(.9); animation: bob 11s ease-in-out -5s infinite; }
.floor.is-live .gum--far { opacity: .8; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -14px; rotate: 6deg; } }
.floor.is-live .gum--near { transition-delay: .2s; }
.floor.is-live .gum--mid { transition-delay: .35s; }
.floor.is-live .gum--far { transition-delay: .5s; }

/* ---------- copy ---------- */
.floor__copy {
  position: absolute; z-index: 3; left: 0; bottom: 0;
  padding: 0 var(--gutter) clamp(2rem, 6vh, 4rem);
  max-width: min(64rem, 100%);
  opacity: calc(1 - var(--s) * 3.2);
  transform: translateY(calc(var(--s) * -14vh));
}
.floor__kicker {
  margin: 0 0 1.1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: oklch(0.88 0.12 75);
}
[data-mode="am"] .floor__kicker { color: oklch(0.95 0.08 85); }
.floor__title {
  margin: 0 0 clamp(1.4rem, 1rem + 1.6vw, 2.6rem);
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(4rem, 1.4rem + 11.2vw, 14.5rem);
  line-height: .82; letter-spacing: -0.05em;
}
.floor__title .ln { display: block; overflow: hidden; padding: .06em .04em .26em 0; margin: -.06em 0 -.26em; }
.floor__title .ln > span { display: inline-block; }
.floor__title .drip { color: oklch(0.86 0.14 78); cursor: none; }
[data-mode="am"] .floor__title .drip { color: oklch(0.94 0.12 88); }
.floor__title .drip.is-dripping { filter: url(#melt-drip); }
.floor__sub { max-width: 34rem; margin: 0 0 2rem; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); line-height: 1.5; color: oklch(0.93 0.03 70 / .92); }
.floor__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; }
.floor__proof {
  list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem;
  margin: 1.8rem 0 0; padding: 0;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: oklch(0.9 0.03 70 / .72);
}
.floor__proof li + li::before { content: "✦"; color: var(--accent); margin-right: 1.1rem; font-size: .7em; vertical-align: .15em; }

/* "Pour": the primary CTA fills with liquid light on hover */
.pour {
  --pour: oklch(0.97 0.04 85);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .9rem;
  padding: 1.15rem 1.9rem 1.15rem 2rem;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: clamp(1.02rem, .95rem + .3vw, 1.2rem);
  text-decoration: none;
  box-shadow: 0 14px 50px -12px oklch(from var(--accent) l c h / .85);
  transform: translate(var(--bx, 0), var(--by, 0));
  transition: transform .6s var(--ease-melt), box-shadow .6s var(--ease-melt);
}
.pour__fill {
  position: absolute; z-index: -1; left: 50%; top: 130%;
  width: 180%; aspect-ratio: 1; margin-left: -90%;
  border-radius: 42%;
  background: var(--pour);
  transition: top .9s var(--ease-melt);
  animation: slosh 5s linear infinite;
}
@keyframes slosh { to { rotate: 360deg; } }
.pour:hover .pour__fill, .pour:focus-visible .pour__fill { top: -55%; }
.pour:hover { box-shadow: 0 0 0 7px oklch(from var(--accent) l c h / .2), 0 22px 70px -10px oklch(from var(--accent) l c h / 1); }
.pour__price { padding-left: .9rem; border-left: 1px solid oklch(from var(--accent-ink) l c h / .3); font-weight: 500; }
.pour:active { transform: translate(var(--bx, 0), var(--by, 0)) scale(.97); }

/* Secondary: a beam of light sweeps the underline */
.beam-link {
  position: relative; padding: .4rem 0; text-decoration: none; font-weight: 600;
  font-size: clamp(1rem, .95rem + .25vw, 1.15rem);
  background:
    linear-gradient(90deg, transparent, oklch(0.95 0.12 80) 45%, oklch(1 0 0) 50%, oklch(0.95 0.12 80) 55%, transparent) no-repeat -120% 100% / 60% 2px,
    linear-gradient(oklch(0.97 0.02 80 / .4), oklch(0.97 0.02 80 / .4)) no-repeat 0 100% / 100% 1px;
  transition: background-position 1s var(--ease-melt);
}
.beam-link:hover, .beam-link:focus-visible { background-position: 220% 100%, 0 100%; }

/* ---------- slate (film index) ---------- */
.floor__slate {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(2rem, 6vh, 4rem);
  display: grid; justify-items: end; gap: .3rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  color: oklch(0.92 0.03 70 / .78);
  opacity: calc(1 - var(--s) * 4);
}
.floor__bpm { display: inline-flex; align-items: center; gap: .6rem; }
.floor__scene { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: -.02em; line-height: 1; text-transform: none; font-weight: 400; font-variant-numeric: tabular-nums; }
.floor__scene b { font-weight: 400; color: oklch(0.88 0.13 78); }
.floor__scene span { opacity: .45; margin-left: .15em; font-size: .55em; }
.floor__scene-name { transition: opacity .3s; }
.floor__scene-name.is-swap { opacity: 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); animation: pulse .5s var(--ease-melt) infinite; }
[data-mode="am"] .pulse { animation-duration: 2s; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(from var(--hot) l c h / .85); } 100% { box-shadow: 0 0 0 12px oklch(from var(--hot) l c h / 0); } }

/* ---------- cursor hint ---------- */
.floor__hint {
  position: absolute; z-index: 3; left: 50%; top: 47%; margin: 0;
  font-size: .78rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: oklch(0.95 0.05 80 / .85);
  pointer-events: none;
  opacity: 0; transition: opacity .8s var(--ease-melt);
}
.floor.is-live .floor__hint { opacity: 1; transition-delay: 1.2s; }
.floor.hint-done .floor__hint { opacity: 0 !important; transition-delay: 0s; }
@media (pointer: coarse) { .floor__hint { display: none; } }

/* ---------- first-scroll fold ---------- */
.floor__fold {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  display: grid; align-items: center; justify-items: end;
  padding: 0 var(--gutter);
}
.floor__fold-line {
  margin: 0; max-width: 30rem; text-align: left;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 1.2rem + 3vw, 4.4rem); line-height: 1; letter-spacing: -.03em;
  color: var(--ink);
  opacity: clamp(0, calc((var(--s) - .55) * 4), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--s) - .55) * 4), 1)) * 30px));
}
.floor__fold-line em { font-style: normal; color: var(--accent); }

/* ---------- entrance choreography ---------- */
.floor__title .ln > span { transform: translateY(135%); transition: transform 1.3s var(--ease-melt); }
.floor .ln + .ln > span { transition-delay: .1s; }
.floor [data-in] { opacity: 0; transform: translateY(20px); filter: blur(10px); transition: opacity 1.1s var(--ease-melt), transform 1.1s var(--ease-melt), filter 1.1s var(--ease-melt); }
.floor.is-live .floor__title .ln > span { transform: none; }
.floor.is-live [data-in] { opacity: 1; transform: none; filter: none; }
.floor.is-live .floor__sub { transition-delay: .25s; }
.floor.is-live .floor__ctas { transition-delay: .4s; }
.floor.is-live .floor__proof { transition-delay: .55s; }
.floor__slate { transition: opacity .8s; }
.floor:not(.is-live) .floor__slate { opacity: 0; }

/* ---------- custom cursor (hero only) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; opacity: 0; transition: opacity .3s; }
html.on-floor .cursor { opacity: 1; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: oklch(0.9 0.13 80); box-shadow: 0 0 12px oklch(0.9 0.13 80); }
.cursor__ring {
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border: 1px solid oklch(0.97 0.03 80 / .5);
  display: grid; place-items: center;
  transition: width .5s var(--ease-melt), height .5s var(--ease-melt), margin .5s var(--ease-melt), background-color .4s, border-color .4s;
}
.cursor.is-label .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: oklch(0.97 0.03 80 / .14); border-color: oklch(0.97 0.03 80 / .8); backdrop-filter: blur(4px); }
.cursor__label { font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: oklch(0.98 0.02 80); opacity: 0; transition: opacity .3s; }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-down .cursor__ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
html.on-floor .glow-cursor { opacity: 0; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .floor { height: 200vh; }
  .floor__title { font-size: clamp(3.6rem, 18vw, 6rem); }
  .floor__slate { top: 5.4rem; bottom: auto; }
  .floor__scene { font-size: 1.8rem; }
  .floor__scene-name { display: none; }
  .gum--near { width: 34vw; right: -4%; bottom: auto; top: 22%; }
  .gum--mid { width: 18vw; right: 30%; top: 14%; }
  .gum--far { display: none; }
  .floor__fold { align-items: end; justify-items: center; padding-bottom: 12vh; }
  .floor__fold-line { text-align: center; font-size: 2.1rem; }
  .floor__proof { gap: .3rem .8rem; font-size: .68rem; }
  .floor__proof li + li::before { margin-right: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .floor { height: auto; }
  .floor__stage { position: relative; }
  .floor__copy, .floor__slate { opacity: 1; transform: none; }
  .floor__fold, .floor__hint { display: none; }
  .floor__title .ln > span, .floor [data-in] { transform: none; opacity: 1; filter: none; }
  .gum { animation: none; opacity: 1; }
}
