/* ==========================================================================
   THE AWAKENING — FEKOPAY ELEGANT MINIMALIST HORROR STYLES
   ========================================================================== */

:root {
  --bg-color: #040508;
  --accent-moon: #AFC8FF;
  --accent-glow: #88A8FF;
  --accent-cyan: #7CE0FF;
  --accent-red: #FF2A2A;
  --text-main: #F4F8FF;
  --text-muted: #8F9EB8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* Temperature Shift on :root when Act 3 Breach occurs */
:root.temperature-hell {
  --accent-moon: #FF2A2A;
  --accent-glow: #FF5555;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent scroll during boot screen, breach & modal open */
body.is-loading,
body.scroll-locked {
  overflow: hidden !important;
  touch-action: none !important;
}

/* ==========================================================================
   ANIMATED HORROR SPLASH SCREEN / PRELOADER
   ========================================================================== */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
  pointer-events: auto;
  overflow: hidden;
}

#preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(175, 200, 255, 0.6), rgba(124, 224, 255, 0.8), transparent);
  box-shadow: 0 0 15px rgba(175, 200, 255, 0.8);
  animation: scanline-sweep 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes scanline-sweep {
  0% { top: -5%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

.preloader-fog-drift {
  position: absolute;
  inset: -40%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 42, 42, 0.18) 0%, rgba(179, 17, 29, 0.1) 40%, transparent 75%);
  filter: blur(50px);
  animation: fog-pulse 8s infinite alternate ease-in-out;
  pointer-events: none;
}

#preloader-blood-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Flying Horror Phantom Apparitions */
.flying-phantom {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(18px);
  opacity: 0.6;
  background: radial-gradient(circle at center, rgba(255, 42, 42, 0.8) 0%, rgba(179, 17, 29, 0.5) 45%, transparent 75%);
  mix-blend-mode: screen;
}

.flying-phantom.p1 {
  width: 320px;
  height: 320px;
  top: 5%;
  left: -120px;
  animation: phantom-fly-1 7s infinite linear;
}

.flying-phantom.p2 {
  width: 260px;
  height: 260px;
  bottom: 10%;
  right: -100px;
  animation: phantom-fly-2 9s infinite linear;
}

.flying-phantom.p3 {
  width: 380px;
  height: 380px;
  top: 35%;
  left: 40%;
  animation: phantom-fly-3 11s infinite linear;
}

@keyframes phantom-fly-1 {
  0% { transform: translate3d(0, 0, 0) scale(0.8) rotate(0deg); opacity: 0.25; }
  50% { transform: translate3d(65vw, 35vh, 100px) scale(1.4) rotate(180deg); opacity: 0.85; }
  100% { transform: translate3d(115vw, 65vh, 0) scale(0.7) rotate(360deg); opacity: 0.15; }
}

@keyframes phantom-fly-2 {
  0% { transform: translate3d(0, 0, 0) scale(1.1) rotate(0deg); opacity: 0.3; }
  50% { transform: translate3d(-55vw, -45vh, 80px) scale(0.7) rotate(-180deg); opacity: 0.8; }
  100% { transform: translate3d(-110vw, -75vh, 0) scale(1.2) rotate(-360deg); opacity: 0.15; }
}

@keyframes phantom-fly-3 {
  0% { transform: translate3d(-45vw, 45vh, 0) scale(0.6); opacity: 0.15; }
  50% { transform: translate3d(15vw, -25vh, 120px) scale(1.5); opacity: 0.9; }
  100% { transform: translate3d(65vw, -55vh, 0) scale(0.5); opacity: 0.15; }
}

.preloader-splatter {
  position: absolute;
  width: 240px;
  height: 240px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(255, 42, 42, 0.85) 0%, rgba(90, 0, 0, 0.7) 50%, transparent 75%);
  filter: blur(10px);
}

.preloader-splatter.top-left {
  top: -50px;
  left: -50px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.preloader-splatter.bottom-right {
  bottom: -50px;
  right: -50px;
  border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%;
}

@keyframes fog-pulse {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.4; }
  100% { transform: scale(1.1) rotate(5deg); opacity: 0.85; }
}

.preloader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.preloader-tag {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.3vw, 14px);
  font-weight: 700;
  letter-spacing: 0.38em;
  color: var(--accent-moon);
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(175, 200, 255, 0.5);
}

.preloader-glitch-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(18px, 2.8vw, 34px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFFFF;
  position: relative;
  text-shadow: 0 0 25px rgba(175, 200, 255, 0.6);
  animation: horror-flicker 5s infinite;
}

@keyframes horror-flicker {
  0%, 92%, 94%, 96%, 100% { opacity: 1; transform: translate(0); }
  93% { opacity: 0.4; transform: translate(-2px, 1px); color: var(--accent-red); }
  95% { opacity: 0.8; transform: translate(2px, -1px); color: var(--accent-cyan); }
}

.preloader-counter-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.preloader-counter {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(54px, 9vw, 108px);
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(255, 42, 42, 0.9), 0 0 80px rgba(179, 17, 29, 0.6);
}

.preloader-unit {
  font-family: var(--font-mono);
  font-size: clamp(20px, 3vw, 36px);
  color: var(--accent-red);
  font-weight: 700;
}

.preloader-bar-bg {
  width: min(320px, 80vw);
  height: 3px;
  background: rgba(255, 42, 42, 0.15);
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.preloader-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #4A0000, #B3111D, #FF2A2A);
  box-shadow: 0 0 16px #FF2A2A;
  transition: width 0.05s linear;
}
}

.preloader-status-sub {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   ATMOSPHERIC OVERLAYS
   ========================================================================== */

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(4, 5, 8, 0.94) 100%);
}

.micro-flicker-overlay {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: rgba(175, 200, 255, 0.04);
  opacity: 0;
  transition: opacity 0.05s ease;
}

.micro-flicker-overlay.active {
  opacity: 1;
}

/* ==========================================================================
   SCROLL REGIONS & CANVASES
   ========================================================================== */

[hidden],
#scroll-container[hidden],
#scroll-container-act3[hidden],
#scroll-container-act4[hidden] {
  display: none !important;
}

#scroll-container {
  display: block;
  position: relative;
  width: 100%;
  height: 400vh;
  min-height: 400vh;
}

#scroll-container-act3,
#scroll-container-act4 {
  display: none;
  position: relative;
  width: 100%;
  height: 450vh;
  min-height: 450vh;
}

#scroll-container-act3.is-active,
#scroll-container-act4.is-active {
  display: block !important;
}

#canvas-container,
#act3-canvas-container,
#act4-canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  touch-action: pan-y;
  background-color: var(--bg-color);
}

#hero-canvas,
#act3-canvas,
#act4-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.6s ease;
  pointer-events: none;
  touch-action: pan-y;
}

#embers-canvas,
#embers-canvas-act4 {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

#hero-canvas.act-two-darken,
#act3-canvas.act-two-darken {
  filter: brightness(0.55) contrast(1.2);
}

/* ==========================================================================
   ACT 1 CAPTIONS & STRUCTURED CARDS
   ========================================================================== */

#captions-container {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.caption-item {
  position: absolute;
  opacity: 0;
  filter: blur(14px);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 480px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.caption-tag {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--accent-moon);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.85;
  text-shadow: 0 0 14px rgba(175, 200, 255, 0.5);
}

.act1-card {
  background: rgba(8, 10, 16, 0.78);
  border: 1px solid rgba(175, 200, 255, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), inset 0 0 20px rgba(175, 200, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 8px;
  padding: 24px;
  max-width: 440px;
}

.act1-card-title {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 25px rgba(175, 200, 255, 0.5);
}

.act1-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.act1-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 6px 14px;
  background: rgba(175, 200, 255, 0.12);
  border: 1px solid rgba(175, 200, 255, 0.35);
  color: #FFFFFF;
  border-radius: 4px;
}

.act1-chip.highlight {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 18px rgba(255, 59, 92, 0.35);
}

.caption-item.pos-left-bottom {
  left: clamp(32px, 8vw, 140px);
  bottom: clamp(60px, 14vh, 160px);
  text-align: left;
  transform: translateY(24px);
}

.caption-item.pos-right-top {
  right: clamp(32px, 8vw, 140px);
  top: clamp(100px, 18vh, 200px);
  text-align: right;
  transform: translateY(-24px);
}

.caption-item.pos-left-mid {
  left: clamp(32px, 8vw, 140px);
  top: clamp(160px, 30vh, 300px);
  text-align: left;
  transform: translateY(24px);
}

.caption-item.pos-right-mid {
  right: clamp(32px, 8vw, 140px);
  top: clamp(180px, 34vh, 340px);
  text-align: right;
  transform: translateY(24px);
}

.caption-item.pos-center-bottom {
  left: 50%;
  bottom: clamp(60px, 14vh, 160px);
  text-align: center;
  transform: translate(-50%, 24px);
}

.caption-item.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

.caption-item.pos-center-bottom.is-visible {
  transform: translate(-50%, 0);
}

.caption-item.is-exiting {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(-24px);
}



/* ==========================================================================
   ACT 2 — THE HOLD INTERACTION
   ========================================================================== */

#act-two {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#act-two.is-active {
  pointer-events: auto;
  opacity: 1;
}

.fog-layer {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(175, 200, 255, 0.14) 0%, rgba(124, 224, 255, 0.04) 50%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
  animation: fog-drift 8s infinite alternate ease-in-out;
}

.hold-circle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#act-two.is-active .hold-circle-wrapper {
  transform: scale(1);
  opacity: 1;
}

#hold-circle {
  position: relative;
  width: clamp(120px, 20vw, 155px);
  height: clamp(120px, 20vw, 155px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  outline: none;
}

.circle-halo {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(175, 200, 255, 0.35) 0%, rgba(124, 224, 255, 0.08) 60%, transparent 80%);
  filter: blur(16px);
  animation: halo-pulse 2.4s infinite ease-in-out;
}

.circle-ripple {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(175, 200, 255, 0.3);
  animation: ripple-expand 3s infinite cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes ripple-expand {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.circle-core {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF 0%, #D4E2FF 40%, #AFC8FF 75%, rgba(175, 200, 255, 0.55) 100%);
  box-shadow: 0 0 40px rgba(175, 200, 255, 0.75), 0 0 80px rgba(175, 200, 255, 0.4), inset 0 0 18px rgba(255, 255, 255, 0.95);
  animation: core-pulse 2.4s infinite ease-in-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#hold-circle.is-holding .circle-core {
  transform: scale(0.92);
  box-shadow: 0 0 75px rgba(255, 255, 255, 1), 0 0 130px rgba(175, 200, 255, 0.85), inset 0 0 30px #FFFFFF;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ring-track {
  stroke: rgba(175, 200, 255, 0.2);
  stroke-width: 3.5;
  fill: none;
}

.ring-fill {
  stroke: #FFFFFF;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  filter: drop-shadow(0 0 10px #AFC8FF);
}

#hold-label {
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 500;
  letter-spacing: 0.35em;
  color: #FFFFFF;
  text-shadow: 0 0 20px rgba(175, 200, 255, 0.8), 0 0 40px rgba(124, 224, 255, 0.5);
  user-select: none;
}

/* ==========================================================================
   THE BREACH — BLOOD FLASH TRANSITION OVERLAY
   ========================================================================== */

#breach-overlay {
  position: fixed;
  inset: 0;
  z-index: 1800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#breach-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

#breach-white-flash {
  position: fixed;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
}

#breach-subliminal-frame {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1950;
}

#breach-drips-canvas {
  position: fixed;
  inset: 0;
  z-index: 1900;
  pointer-events: none;
}

#breach-text-container {
  position: fixed;
  inset: 0;
  z-index: 1920;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#breach-text {
  font-family: var(--font-mono);
  font-size: clamp(24px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #FFFFFF;
  text-shadow: 0 0 35px #FF2A2A, 0 0 70px #FF5555;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#breach-text.breach-text-glitch {
  text-shadow: -3px 0 #FF2A2A, 3px 0 #00E5FF, 0 0 40px #FF2A2A;
  animation: breach-text-flicker 0.2s infinite alternate;
}

#breach-ignite-overlay {
  position: fixed;
  inset: 0;
  z-index: 1850;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(255, 42, 42, 0.9) 70%, #000000 100%);
  transition: opacity 0.8s ease;
}

#breach-ignite-overlay.igniting {
  opacity: 1;
}

/* ==========================================================================
   ACT 3 END — BLOOD BOTTLE GATE & SHATTER ANIMATION
   ========================================================================== */

#act-three-bottle-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#act-three-bottle-overlay.is-active {
  pointer-events: auto;
  opacity: 1;
}

.bottle-fog-layer {
  position: absolute;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 42, 42, 0.22) 0%, rgba(179, 17, 29, 0.06) 55%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  animation: fog-drift 8s infinite alternate ease-in-out;
}

#bottle-hold-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#bottle-circle {
  position: relative;
  width: 140px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  outline: none;
}

.bottle-halo {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 42, 42, 0.35) 0%, transparent 70%);
  filter: blur(18px);
  animation: halo-pulse 2.4s infinite ease-in-out;
}

.bottle-svg {
  width: 100px;
  height: 140px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 25px rgba(255, 42, 42, 0.8));
  transition: transform 0.2s ease, opacity 0.3s ease;
}

#bottle-circle.is-holding .bottle-svg {
  transform: scale(0.95);
  filter: drop-shadow(0 0 45px rgba(255, 42, 42, 1));
}

/* Glass Shards transform animation on shatter */
.glass-shards-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

#bottle-circle.shattering .glass-shards-container {
  opacity: 1;
}

#bottle-circle.shattering .bottle-svg {
  opacity: 0;
  transform: scale(1.3);
}

.glass-shard {
  position: absolute;
  width: 12px;
  height: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 42, 42, 0.6));
  clip-path: polygon(50% 0%, 100% 100%, 0% 80%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

#bottle-circle.shattering .glass-shard.s1 { transform: translate3d(-110px, -110px, 40px) rotateX(45deg) rotateY(30deg) scale(1.4); }
#bottle-circle.shattering .glass-shard.s2 { transform: translate3d(105px, -100px, -20px) rotateX(-60deg) rotateY(45deg) scale(1.2); }
#bottle-circle.shattering .glass-shard.s3 { transform: translate3d(-130px, 50px, 60px) rotateX(120deg) rotateY(-30deg) scale(1.5); }
#bottle-circle.shattering .glass-shard.s4 { transform: translate3d(120px, 70px, -40px) rotateX(-110deg) rotateY(15deg) scale(1.1); }
#bottle-circle.shattering .glass-shard.s5 { transform: translate3d(-40px, -150px, 30px) rotateX(15deg) rotateY(80deg) scale(1.4); }
#bottle-circle.shattering .glass-shard.s6 { transform: translate3d(50px, 140px, 50px) rotateX(-45deg) rotateY(-60deg) scale(1.2); }
#bottle-circle.shattering .glass-shard.s7 { transform: translate3d(-90px, 130px, -30px) rotateX(85deg) rotateY(40deg) scale(1.0); }
#bottle-circle.shattering .glass-shard.s8 { transform: translate3d(85px, -160px, 20px) rotateX(-75deg) rotateY(-45deg) scale(1.3); }
#bottle-circle.shattering .glass-shard.s9 { transform: translate3d(-140px, -30px, 70px) rotateX(160deg) rotateY(10deg) scale(1.5); }
#bottle-circle.shattering .glass-shard.s10 { transform: translate3d(130px, -20px, -50px) rotateX(-140deg) rotateY(-80deg) scale(1.2); }

#ghost-splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 42, 42, 0.4) 0%, rgba(4, 5, 8, 0.96) 80%);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#ghost-splash-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.blood-splash-droplets {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 42, 42, 0.8) 0%, rgba(179, 17, 29, 0.9) 40%, rgba(4, 5, 8, 0.98) 90%);
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

#ghost-splash-overlay.is-active .blood-splash-droplets {
  opacity: 1;
  transform: scale(1.1);
}

#bottle-label {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #FFFFFF;
  text-shadow: 0 0 20px rgba(255, 42, 42, 0.9);
  user-select: none;
}

/* ==========================================================================
   ACT 4 — THE DOSSIER PANELS SYSTEM
   ========================================================================== */

#dossier-container {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.dossier-panel {
  position: absolute;
  opacity: 0;
  filter: blur(14px);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  padding: 0;
}

.dossier-panel.dossier-upper-left {
  top: clamp(80px, 15vh, 180px);
  left: clamp(32px, 8vw, 140px);
  text-align: left;
  max-width: 540px;
  transform: translateY(24px);
}

.dossier-panel.dossier-lower-center {
  bottom: clamp(60px, 14vh, 160px);
  left: 50%;
  transform: translate(-50%, 24px);
  text-align: center;
  max-width: 540px;
}

.dossier-panel.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

.dossier-panel.dossier-lower-center.is-visible {
  transform: translate(-50%, 0);
}

.dossier-panel.is-exiting {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(-24px);
}

.dossier-panel.dossier-lower-center.is-exiting {
  transform: translate(-50%, -24px);
}

/* SHARED GLASS CARD SYSTEM */
.dossier-card {
  background: rgba(4, 5, 8, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 42, 42, 0.4);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), inset 0 0 20px rgba(255, 42, 42, 0.08);
}

.dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 42, 42, 0.2);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.dossier-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent-red);
}

.dossier-star {
  color: var(--accent-red);
  font-size: 14px;
}

.dossier-title {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 700;
  color: #F2E9E4;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.dossier-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dossier-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dossier-row.highlight {
  background: rgba(255, 42, 42, 0.15);
  padding: 8px 10px;
  border-radius: 4px;
  border-bottom: 1px solid rgba(255, 42, 42, 0.4);
}

.dossier-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.dossier-grid-2col .dossier-row {
  grid-template-columns: 1fr;
}

.dossier-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-red);
  font-variant-numeric: tabular-nums;
}

.dossier-val {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: #F2E9E4;
}

/* FINAL CTA BUTTON ON GRAVEYARD SKY */
.dossier-final-cta {
  pointer-events: auto;
}

.dossier-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dossier-cta-button {
  display: inline-block;
  padding: 18px 40px;
  background: #FF2A2A;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  letter-spacing: 0.25em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(255, 42, 42, 0.7);
  animation: breathing-glow 3s infinite ease-in-out;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

@keyframes breathing-glow {
  0%, 100% { box-shadow: 0 0 35px rgba(255, 42, 42, 0.7); transform: scale(1); }
  50% { box-shadow: 0 0 55px rgba(255, 42, 42, 1); transform: scale(1.02); }
}

.dossier-cta-button:hover,
.dossier-cta-button:focus-visible {
  background: #FFFFFF;
  color: #FF2A2A;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.95);
  transform: scale(1.04);
  outline: none;
}

.dossier-cta-sub {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   THE PROJECT BRIEF FORM MODAL
   ========================================================================== */

#brief-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#brief-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.brief-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brief-card-wrapper {
  position: relative;
  z-index: 2;
  width: min(680px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}

.brief-glass-card {
  background: rgba(8, 10, 16, 0.92);
  border: 1px solid rgba(255, 42, 42, 0.4);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), inset 0 0 30px rgba(255, 42, 42, 0.1);
}

.brief-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 42, 42, 0.25);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.brief-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent-red);
}

.brief-title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.brief-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 42, 42, 0.3);
  color: #FFFFFF;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brief-close-btn:hover {
  background: #FF2A2A;
  border-color: #FF2A2A;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

@media (max-width: 640px) {
  .brief-grid {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group.full-width {
  grid-column: 1 / -1;
}

.field-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.field-group label .req { color: var(--accent-red); }
.field-group label .opt { opacity: 0.6; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.field-group input,
.field-group select,
.field-group textarea {
  background: rgba(16, 20, 30, 0.85);
  border: 1px solid rgba(255, 42, 42, 0.3);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #FFFFFF;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: #FF2A2A;
  box-shadow: 0 0 15px rgba(255, 42, 42, 0.4);
}

.field-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #FF2A2A;
  min-height: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.field-error.has-error {
  opacity: 1;
  animation: soft-pulse 1.2s infinite ease-in-out;
}

@keyframes soft-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.brief-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.brief-submit-btn {
  width: 100%;
  padding: 16px 28px;
  background: #FF2A2A;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 42, 42, 0.6);
  transition: all 0.25s ease;
}

.brief-submit-btn:hover {
  background: #FFFFFF;
  color: #FF2A2A;
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.9);
}

/* CONFIRMATION STATE VIEW */
.confirm-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 10px;
  gap: 16px;
}

.confirm-icon {
  font-size: 42px;
  color: #FF2A2A;
  text-shadow: 0 0 25px #FF2A2A;
}

.confirm-heading {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.08em;
}

.confirm-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
}

.confirm-btn {
  display: inline-block;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.confirm-btn.primary {
  background: #FF2A2A;
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.5);
}

.confirm-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 42, 42, 0.4);
  color: #FFFFFF;
}

.confirm-btn.secondary:hover {
  background: rgba(255, 42, 42, 0.15);
}

/* ==========================================================================
   ACT 3 — HUD DATA PANELS & CARDS
   ========================================================================== */

#hud-container {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hud-panel {
  position: absolute;
  opacity: 0;
  filter: blur(14px);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  padding: 0;
}

.hud-panel.hud-upper-left {
  top: clamp(80px, 15vh, 180px);
  left: clamp(32px, 8vw, 140px);
  text-align: left;
  max-width: 520px;
  transform: translateY(24px);
}

.hud-panel.hud-right-top {
  top: clamp(80px, 15vh, 180px);
  right: clamp(32px, 8vw, 140px);
  text-align: right;
  max-width: 520px;
  transform: translateY(-24px);
}

.hud-panel.hud-left-mid {
  top: clamp(160px, 30vh, 300px);
  left: clamp(32px, 8vw, 140px);
  text-align: left;
  max-width: 520px;
  transform: translateY(24px);
}

.hud-panel.hud-right-mid {
  top: clamp(180px, 34vh, 340px);
  right: clamp(32px, 8vw, 140px);
  text-align: right;
  max-width: 520px;
  transform: translateY(24px);
}

.hud-panel.hud-lower-center {
  bottom: clamp(60px, 14vh, 160px);
  left: 50%;
  transform: translate(-50%, 24px);
  text-align: center;
  max-width: 540px;
}

.hud-panel.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

.hud-panel.hud-lower-center.is-visible {
  transform: translate(-50%, 0);
}

.hud-panel.is-exiting {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(-24px);
}

.hud-panel.hud-lower-center.is-exiting {
  transform: translate(-50%, -24px);
}

/* FROSTED GLASS HUD CARDS */
.hud-card {
  background: rgba(8, 10, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 42, 42, 0.45);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(255, 42, 42, 0.12);
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 42, 42, 0.25);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent-red);
}

.hud-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #FFFFFF;
  opacity: 0.85;
}

.hud-title {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  line-height: 1.35;
  margin-bottom: 12px;
}

.hud-stepper {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  background: rgba(255, 42, 42, 0.1);
  border: 1px solid rgba(255, 42, 42, 0.3);
  border-radius: 4px;
}

.stepper-step.active {
  background: rgba(255, 42, 42, 0.25);
  border-color: #FF2A2A;
  box-shadow: 0 0 15px rgba(255, 42, 42, 0.4);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #FF2A2A;
}

.step-lbl {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #FFFFFF;
}

.hud-grid-9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hud-grid-item {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  background: rgba(255, 42, 42, 0.12);
  border: 1px solid rgba(255, 42, 42, 0.3);
  color: #FFFFFF;
  border-radius: 4px;
  text-align: center;
}

.hud-quote {
  font-family: var(--font-sans);
  font-size: 14px;
  font-style: italic;
  color: #F2E9E4;
  line-height: 1.5;
}

.hud-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hud-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: rgba(255, 42, 42, 0.12);
  border: 1px solid rgba(255, 42, 42, 0.35);
  border-radius: 4px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #FF2A2A;
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #FFFFFF;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.hud-list-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-list-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.list-head {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FF2A2A;
  width: 110px;
  flex-shrink: 0;
}

.list-body {
  color: #FFFFFF;
}

.hud-sub-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

/* ==========================================================================
   HORROR AUDIO TOGGLE BUTTON
   ========================================================================== */

#snd-toggle {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 3000;
  background: rgba(8, 10, 16, 0.82);
  border: 1px solid rgba(255, 42, 42, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #FF2A2A;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.25);
  transition: all 0.25s ease;
  user-select: none;
}

#snd-toggle:hover, #snd-toggle:focus-visible {
  border-color: #FF2A2A;
  background: rgba(255, 42, 42, 0.2);
  box-shadow: 0 0 30px rgba(255, 42, 42, 0.5);
  color: #FFFFFF;
  outline: none;
}

#snd-toggle.muted {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

/* PRELOADER SOUND GATE BUTTONS */
.preloader-gate-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.gate-btn {
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.gate-btn.primary {
  background: rgba(255, 42, 42, 0.9);
  border: 1px solid #FF2A2A;
  color: #FFFFFF;
  box-shadow: 0 0 25px rgba(255, 42, 42, 0.6);
}

.gate-btn.primary:hover, .gate-btn.primary:focus-visible {
  background: #FF2A2A;
  box-shadow: 0 0 40px rgba(255, 42, 42, 0.9);
  transform: scale(1.04);
}

.gate-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.gate-btn.secondary:hover, .gate-btn.secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.8);
  color: #FFFFFF;
}

/* FLOATING UNLOCK PILL */
#audio-unlock-pill {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: rgba(8, 10, 16, 0.9);
  border: 1px solid #FF2A2A;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #FFFFFF;
  border-radius: 30px;
  box-shadow: 0 0 25px rgba(255, 42, 42, 0.5);
  cursor: pointer;
  animation: pill-pulse 1.8s infinite alternate ease-in-out;
}

@keyframes pill-pulse {
  0% { transform: translateX(-50%) scale(0.96); box-shadow: 0 0 15px rgba(255, 42, 42, 0.4); }
  100% { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 35px rgba(255, 42, 42, 0.8); }
}

/* DEBUG HUD PANEL */
#debug-hud {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  background: rgba(4, 5, 8, 0.92);
  border: 1px solid rgba(255, 42, 42, 0.5);
  border-radius: 6px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #00E5FF;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  min-width: 260px;
}

.hud-title-bar {
  font-weight: 700;
  color: #FF2A2A;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 42, 42, 0.3);
  padding-bottom: 4px;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hud-key {
  color: rgba(255, 255, 255, 0.7);
}

.hud-val {
  font-weight: 700;
  color: #FFFFFF;
}

.hud-rms-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.hud-rms-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00E5FF, #FF2A2A);
  transition: width 0.08s linear;
}

/* ==========================================================================
   ACT 1 — HERO BRAND TITLE (FEKOPAY)
   ========================================================================== */

#hero-brand-title {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.12s linear, filter 0.12s linear, transform 0.12s linear;
  user-select: none;
  width: 90vw;
  max-width: 1200px;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.35em;
  color: #FF2A2A;
  text-shadow: 0 0 15px rgba(255, 42, 42, 0.7);
  margin-bottom: 8px;
}

.brand-heading {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(52px, 11vw, 140px);
  line-height: 0.95;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0;
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #E0E6F0 60%, #A0AAB8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 45px rgba(255, 42, 42, 0.5));
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 14px;
}

.brand-scroll-indicator {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #FF2A2A;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: scroll-pulse 2s infinite ease-in-out;
}

.scroll-arrow {
  font-size: 14px;
}

@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS & TOUCH OPTIMIZATION (iPhone & Android)
   ========================================================================== */

@media (max-width: 1024px) {
  #hero-brand-title {
    width: 94vw;
  }
  
  .brand-heading {
    font-size: clamp(38px, 11vw, 84px);
    letter-spacing: 0.18em;
  }

  .hud-panel {
    width: calc(100vw - 40px) !important;
    max-width: 440px;
  }
  
  .dossier-card {
    width: calc(100vw - 40px) !important;
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  html, body {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  #scroll-container,
  #scroll-container-act3,
  #scroll-container-act4 {
    touch-action: pan-y;
  }

  #hero-brand-title {
    top: 42%;
    width: 96vw;
  }

  .brand-tag {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .brand-heading {
    font-size: clamp(32px, 12vw, 64px);
    letter-spacing: 0.12em;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .brand-scroll-indicator {
    font-size: 10px;
    letter-spacing: 0.18em;
    margin-top: 18px;
  }

  /* Act 1 Captions Mobile Sizing */
  .act1-card {
    padding: 16px 20px;
    max-width: 90vw;
  }

  .act1-card-title {
    font-size: 14px;
    letter-spacing: 0.12em;
  }

  .act1-chip {
    font-size: 10px;
    padding: 4px 8px;
  }

  /* Hold Circle Mobile Touch Scale */
  .hold-circle-wrapper {
    transform: translate(-50%, -50%) scale(0.85);
  }

  .hold-circle {
    width: 140px;
    height: 140px;
    touch-action: none;
  }

  .bottle-overlay-wrap {
    transform: translate(-50%, -50%) scale(0.85);
  }

  /* Act 3 HUD & Act 4 Dossier Mobile Layout */
  .hud-panel, .dossier-card {
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    padding: 18px !important;
  }

  .hud-title, .dossier-title {
    font-size: 15px !important;
  }

  /* Top Right Sound Toggle Mobile Sizing */
  #snd-toggle {
    top: 14px;
    right: 14px;
    padding: 8px 14px;
    font-size: 10px;
    letter-spacing: 0.15em;
  }
}

/* ==========================================================================
   DYNAMIC MICRO-ANIMATIONS & HIGH-IMPACT VISUAL EFFECTS
   ========================================================================== */

/* Animated Sound Toggle Button Shimmer */
#snd-toggle {
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(255, 42, 42, 0.45);
  box-shadow: 0 0 16px rgba(255, 42, 42, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#snd-toggle:hover {
  transform: scale(1.06);
  border-color: rgba(255, 42, 42, 0.85);
  box-shadow: 0 0 28px rgba(255, 42, 42, 0.6);
  background: rgba(255, 42, 42, 0.15);
}

/* Hero Brand Title Floating Animation */
@keyframes hero-subtle-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-6px); }
}

/* HUD Live Status Dot Pulsing */
.hud-status.live::before,
.hud-status.winner::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF2A2A;
  margin-right: 6px;
  box-shadow: 0 0 8px #FF2A2A;
  animation: live-dot-pulse 1.8s infinite ease-in-out;
}

@keyframes live-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

/* Interactive Card Hover Lift */
.hud-card, .act1-card, .act4-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.hud-card:hover, .act1-card:hover, .act4-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 42, 42, 0.65);
  box-shadow: 0 16px 40px rgba(255, 42, 42, 0.3), inset 0 0 20px rgba(255, 42, 42, 0.15);
}

/* Animated Primary CTA Button */
.act4-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(90deg, #B3111D, #FF2A2A, #B3111D);
  background-size: 200% auto;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(255, 42, 42, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: cta-gradient-slide 4s infinite linear;
}

@keyframes cta-gradient-slide {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.act4-btn-primary:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 36px rgba(255, 42, 42, 0.85);
  color: #FFFFFF;
}

/* Ultra-Compact Mobile Screens (iPhone SE / 320px - 480px) */
@media (max-width: 480px) {
  .brand-heading {
    font-size: clamp(26px, 10vw, 42px);
    letter-spacing: 0.08em;
  }

  .act1-card, .hud-card, .act4-card {
    padding: 14px 16px !important;
    max-width: 94vw !important;
  }

  .act1-card-title, .hud-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .act1-chip {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }

  .hold-circle-wrapper, .bottle-overlay-wrap {
    transform: translate(-50%, -50%) scale(0.72) !important;
  }
}
