*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #E2C89A; }

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,300;1,400;1,500&family=Italiana&display=swap');

:root {
  --wood: #311B0E;
  --grain-opacity: 0.065; /* adjust live in devtools: html { --grain-opacity: 0.1 } */
}

/* ── LAYER 1: Corridor video ── */
#video-corridor {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #E2C89A;
}

/* ── LAYER 1a-ii: Corridor-only grain, 30% strength, fades with garments ── */
#corridor-grain-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1.5; pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
}

/* ── LAYER 1b: Kiosk static image ── */
#kiosk-layer {
  position: fixed; inset: 0; z-index: 2;
  opacity: 0; pointer-events: none;
  background: #E2C89A;
  /* Zoom converges on dead center per feedback (was screen-trapezoid coords,
     read as left-leaning) — simple, predictable, always centered regardless
     of where the glow itself sits. */
  transform-origin: 50% 50%;
  will-change: transform;
}
#kiosk-img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

/* ── LAYER 1b-ii: Drifting fog over kiosk floor ── */
/* ── LAYER 1b-iii: Kiosk screen glow (click-triggered zoom-in effect) ── */
#screen-glow {
  position: fixed;
  left: 29%; top: 46%;
  width: 31%; height: 16%;
  z-index: 3.5;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at center, rgba(255,246,230,0.95) 0%, rgba(234,206,170,0.85) 35%, rgba(234,206,170,0.3) 65%, transparent 100%);
  filter: blur(2px);
  border-radius: 6px;
  will-change: opacity, transform;
  transform-origin: center center;
}
#screen-glow::before,
#screen-glow::after {
  content: '';
  position: absolute;
  left: 50%; top: -60%;
  width: 2px; height: 160%;
  background: linear-gradient(to top, rgba(255,246,230,0.5), transparent);
  transform-origin: bottom center;
}
#screen-glow::before { transform: translateX(-80%) rotate(-14deg); }
#screen-glow::after  { transform: translateX(-20%) rotate(11deg); }

/* ── LAYER 1c: Blinding white flash ── */
#white-flash {
  position: fixed; inset: 0; z-index: 4;
  background: #FAF0E0;
  opacity: 0; pointer-events: none;
  will-change: opacity;
}

/* ── LAYER 2: Grain — opacity adjustable via --grain-opacity CSS var ── */
#grain-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 5; pointer-events: none;
  opacity: var(--grain-opacity);
}

/* ── LAYER 3: Garments (Three.js, transparent WebGL) ── */
#garment-3d-layer {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 6; pointer-events: none;
}

/* ── LAYER 4c: Full-screen champagne backing — reveal stage only ── */
#aisle-backing {
  position: fixed; inset: 0;
  z-index: 7;
  background: radial-gradient(ellipse at 50% 40%, #F2E2C4 0%, #EACEAA 55%, #DEBE93 100%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
#aisle-backing.visible { opacity: 0.95; }

/* ── LAYER 4: Word text ── */
#headline {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 8; pointer-events: none;
  text-align: center; width: 90%;
}
#word-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(52px, 6.25vw, 240px);
  font-weight: 300;
  font-style: italic;
  color: var(--wood);
  opacity: 0;
  line-height: 1.1;
  letter-spacing: 0.01em;
  will-change: opacity;
}
#word-display.visible { opacity: 0.9; }

#introducing-text {
  position: fixed;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  z-index: 8; pointer-events: none;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(32px, 6.8vw, 260px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  color: var(--wood);
  opacity: 0;
  display: none;
  text-align: center;
  transition: opacity 0.9s ease;
}
#introducing-text.visible { opacity: 0.9; }

/* ── LAYER 5: Aisle reveal ── */
#intro-wrap {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 8; pointer-events: none;
}
#aisle-reveal { text-align: center; opacity: 0; will-change: opacity, transform; position: relative; }
#aisle-name {
  font-family: 'Italiana', Georgia, serif;
  font-size: clamp(64px, 12vw, 460px);
  font-weight: 400;
  color: var(--wood);
  letter-spacing: -0.01em;
  line-height: 1;
  opacity: 0.9;
}
#aisle-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--wood);
  margin-top: 0;
  letter-spacing: 0;
  opacity: 0;
}
#aisle-sub.visible { opacity: 0.9; }

/* ── Scroll indicator ── */
#scroll-ind {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  margin-top: 32px; opacity: 0;
  will-change: opacity;
}
#scroll-ind.visible { opacity: 0.85; }
.si-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 11px; color: var(--wood);
  letter-spacing: 0.3em; text-transform: uppercase;
}
.si-track {
  width: 1px; height: 32px;
  background: rgba(49,27,14,0.25);
  position: relative; overflow: hidden;
}
.si-track::after {
  content: ''; position: absolute;
  top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--wood);
  animation: si-drip 1.8s ease-in-out infinite;
}
.si-arrow {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--wood);
  animation: si-bob 1.8s ease-in-out infinite;
}
@keyframes si-drip { 0% { top: -100%; } 100% { top: 120%; } }
@keyframes si-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ── Skip Intro / Replay button ── */
#skip-replay-btn {
  position: fixed; top: 20px; right: 20px; z-index: 10;
  background: rgba(49,27,14,0.5);
  border: 1px solid rgba(255,220,160,0.3);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px; color: #FAF0E0;
  cursor: pointer;
  transition: opacity 0.4s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}
#skip-replay-btn:hover { background: rgba(49,27,14,0.68); }
#skip-replay-btn.hidden { opacity: 0; pointer-events: none; }

/* ── A note from the designer button — top-left, same row as Skip/Replay ──
   Hidden until the sequence settles (same moment Skip Intro becomes Replay). */
#designer-note-btn {
  position: fixed; top: 20px; left: 20px; z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  background: #DEBE93;
  border: 1px solid rgba(49,27,14,0.25);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px; color: var(--wood);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}
#designer-note-btn.show { opacity: 1; pointer-events: all; }
#designer-note-btn:hover { background: #E8CBA3; }
.dn-btn-icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* ── A note from the designer — modal ── */
#designer-note-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#designer-note-overlay.show { opacity: 1; pointer-events: all; }

#designer-note-modal {
  position: relative;
  width: 50%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: rgba(49,27,14,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 40px 36px 32px;
  color: #FFF8EC;
  transform: translateY(10px);
  transition: transform 0.35s ease;
}
#designer-note-overlay.show #designer-note-modal { transform: translateY(0); }

#designer-note-close {
  position: absolute; top: 14px; right: 16px; z-index: 1;
  background: none; border: none;
  font-size: 26px; line-height: 1;
  color: #FFF8EC; opacity: 0.75;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.2s ease;
}
#designer-note-close:hover { opacity: 1; }

.dn-title {
  flex: 0 0 auto;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 24px;
  margin-bottom: 16px;
  color: #FFF8EC;
}
.dn-body {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #FFF8EC;
  opacity: 0.92;
}
.dn-section { display: flex; flex-direction: column; gap: 10px; }
.dn-section p { margin: 0; }
.dn-heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #EACEAA;
  opacity: 1;
}

/* ── View Prototype button — 200px from bottom ── */
#view-proto-btn {
  position: fixed;
  left: 50%; bottom: 200px;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(49,27,14,0.5);
  border: 1px solid rgba(255,220,160,0.35);
  border-radius: 999px;
  padding: 14px 36px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px; font-style: italic; color: #FAF0E0;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}
#view-proto-btn:hover { background: rgba(49,27,14,0.68); }
#view-proto-btn.show { opacity: 1; pointer-events: all; }

/* ── Particle canvas ── */
#particle-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 9; pointer-events: none; opacity: 0;
}

/* ── Kiosk hover zones + overlays ── */
#kiosk-hover-zones {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 75%; /* top 3/4 only — bottom 1/4 excluded (CTA + fog) */
  z-index: 6;
}
.hover-zone {
  position: absolute;
  top: 0; height: 100%;
  pointer-events: auto;
}

.hover-overlay {
  position: fixed;
  z-index: 11;
  background: rgba(49,27,14,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 18px 20px;
  color: #FFF8EC;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hover-overlay.show { opacity: 1; transform: translateY(0); }
.hover-overlay .ho-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 19px;
  margin-bottom: 6px;
  color: #FFF8EC;
}
.hover-overlay .ho-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #FFF8EC;
  opacity: 0.92;
}

#hover-overlay-mirror { left: 4%;    top: 50%;   width: 20%; }
#hover-overlay-kiosk  { left: 57%;   top: 39%;   width: 18%; }
#hover-overlay-trial  { left: 77%;   top: 44%;   width: 17%; }

@media (max-width: 900px) {
  #kiosk-hover-zones { display: none; } /* hover isn't meaningful on touch */
}
#rotate-gate {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: #E2C89A;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px;
}
#rotate-gate .rg-icon { font-size: 40px; margin-bottom: 18px; display: block; }
#rotate-gate .rg-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 22px;
  color: var(--wood); letter-spacing: 0;
}
@media (orientation: portrait) and (pointer: coarse) {
  #rotate-gate { display: flex; }
  #video-corridor, #kiosk-layer, #white-flash, #grain-canvas, #garment-layer,
  #headline, #introducing-text, #intro-wrap, #skip-replay-btn,
  #view-proto-btn, #particle-canvas, #designer-note-btn, #designer-note-overlay {
    display: none !important;
  }
}

/* ── 1920 / 4K scale-up ──
   clamp() ceilings above are already raised (word 120px, Introducing 130px,
   Aisle 220px) so they keep growing with vw on large displays rather than
   plateauing at a size sized for 1080p. Verified ceiling math below. */
