/* ============================================
   WOA Entry Experience — entry.css
   All GSAP-animated classes must be defined here
   ============================================ */

/* Entry sequence container */
#entry-sequence {
  height: 700dvh;
  position: relative;
  background: linear-gradient(135deg, transparent 40%, #02005e 75%);
}

/* Pinned stage */
#entry-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(135deg, transparent 40%, #02005e 75%);
}

/* Navy background fill */
#entry-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, #02005e 75%);
  z-index: 0;
}

/* Video layers */
#vid-filament,
#vid-explosion {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
#vid-filament { opacity: 0.6; }
#vid-explosion { opacity: 0; } /* GSAP crossfades at Ch4 */

/* Bottom fog — organic uneven mist, heavier right */
#bottom-fog {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65dvh;
  z-index: 10;
  pointer-events: none;
}
#bottom-fog::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Far right — tallest blob, buries Veo watermark */
    radial-gradient(ellipse 55% 88% at 95% 100%,
      rgba(2,0,94,1.0) 0%, rgba(2,0,94,0.75) 30%, rgba(2,0,94,0.3) 55%, transparent 72%),
    /* Right-centre blob — mid height */
    radial-gradient(ellipse 48% 62% at 74% 100%,
      rgba(2,0,94,0.88) 0%, rgba(2,0,94,0.45) 38%, transparent 65%),
    /* Centre blob — lower, wispy */
    radial-gradient(ellipse 55% 42% at 50% 100%,
      rgba(2,0,94,0.72) 0%, rgba(2,0,94,0.2) 45%, transparent 68%),
    /* Left blob — lightest, lowest */
    radial-gradient(ellipse 48% 30% at 22% 100%,
      rgba(2,0,94,0.55) 0%, rgba(2,0,94,0.1) 50%, transparent 70%),
    /* Floor seal — full width */
    linear-gradient(to top,
      rgba(2,0,94,0.97) 0%,
      rgba(2,0,94,0.22) 12%,
      transparent 26%);
}
/* Slow breathing — opacity only, no shape movement */
#bottom-fog::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  animation: fogBreathe 16s ease-in-out infinite;
  will-change: opacity;
}
@keyframes fogBreathe {
  0%   { opacity: 1.0; }
  40%  { opacity: 0.82; }
  70%  { opacity: 0.94; }
  100% { opacity: 1.0; }
}
@media (prefers-reduced-motion: reduce) {
  #bottom-fog::after { animation: none; }
}

/* Whisk texture layers */
.wh-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: 0.1;
  z-index: 2;
  pointer-events: none;
}
#wh1 { opacity: 0.1; }
#wh2, #wh3, #wh4, #wh5 { opacity: 0; } /* GSAP fades in per chapter */

/* Ghost wall preview */
.ghost-wall {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35dvh;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 -20px 60px rgba(201, 146, 42, 0.12);
}
.ghost-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 146, 42, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: Inter, sans-serif;
  font-size: 0.85rem;
  max-width: 220px;
  flex-shrink: 0;
}

/* Chapter text */
.ch-text {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: Inter, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 700px;
  width: 90%;
  opacity: 0; /* GSAP fades in */
  z-index: 5;
  line-height: 1.4;
  pointer-events: none;
}

/* Confession field */
.confession-wrap {
  position: fixed;
  left: 50%;
  top: 62%;
  transform: translateX(-50%);
  z-index: 6;
  text-align: center;
  width: 90%;
  max-width: 600px;
}
.confession-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(201, 146, 42, 0.4);
  color: rgba(255, 255, 255, 0.9);
  font-family: Inter, sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-style: italic;
  font-weight: 300;
  caret-color: #c9922a;
  outline: none;
  padding: 0.5rem 0;
  text-align: center;
}
.confession-input::placeholder {
  color: rgba(201, 146, 42, 0.5);
}
.confession-note {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: Inter, sans-serif;
}
[x-cloak] { display: none !important; }
.confession-enter { transition: opacity 0.4s ease; }
.confession-leave { transition: opacity 0.3s ease; }

/* Bloom overlay */
#bloom-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201, 146, 42, 0.8) 0%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 7;
}

/* Silence overlay */
#silence-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, #02005e 75%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

/* Signature sentence */
.signature-sentence {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: #c9922a;
  text-shadow: 0 0 40px rgba(201, 146, 42, 0.3);
  text-align: center;
  max-width: 800px;
  width: 90%;
  opacity: 0; /* GSAP fades in at Ch5 */
  z-index: 8;
  pointer-events: none;
}

/* Chromatic aberration clones */
.ca-clone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  mix-blend-mode: multiply;
  opacity: 0; /* GSAP activates at 3 moments */
}
.ca-red { color: rgba(255, 0, 0, 0.15); }
.ca-blue { color: rgba(0, 0, 255, 0.15); }

/* Ch6 CTA */
.ch6-cta {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 8;
  opacity: 0; /* GSAP fades in */
}
.ch6-text {
  font-family: Inter, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  color: #c9922a;
  margin-bottom: 1.5rem;
  animation: goldPulse 2s ease-in-out infinite;
}
.ch6-btn {
  display: inline-block;
  padding: 0.875rem 2.5rem;
  border: 1px solid rgba(201, 146, 42, 0.5);
  color: #c9922a;
  font-family: Inter, sans-serif;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}
.ch6-btn:hover {
  background: rgba(201, 146, 42, 0.1);
}

/* Skip button */
.entry-skip {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 12px;
  font-family: Inter, sans-serif;
  color: #c9922a;
  opacity: 0.7;
  text-decoration: none;
  z-index: 100;
  transition: opacity 0.2s;
}
.entry-skip:hover { opacity: 1; }

/* Sound toggle */
.sound-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 12px;
  font-family: Inter, sans-serif;
  color: #c9922a;
  opacity: 0;
  cursor: pointer;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(201, 146, 42, 0.3);
  border-radius: 4px;
  transition: opacity 0.3s, background 0.2s;
  user-select: none;
}
.sound-toggle:hover { background: rgba(201, 146, 42, 0.08); }
.sound-toggle.visible { opacity: 1; }
.sound-toggle.opted-in { opacity: 0.4; pointer-events: none; }

/* Animations */
@keyframes goldPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ca-clone { display: none !important; }
  .signature-sentence { transition: none; }
  #bloom-overlay { display: none; }
}

/* ============================================
   MOBILE (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
  #entry-sequence {
    height: 320dvh;
  }
  #entry-stage {
    position: relative;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  /* No parallax, no sticky pin on mobile */
  .ch-text {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    margin: 0 auto;
    padding: 3rem 1.5rem;
  }
  .signature-sentence {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    margin: 3rem auto;
    padding: 0 1.5rem;
  }
  .entry-skip {
    top: auto;
    bottom: 1.5rem;
    right: 50%;
    transform: translateX(50%);
  }

  /* Mobile wall carousel */
  #wall-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0 1.5rem;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #wall-carousel::-webkit-scrollbar { display: none; }
  .wall-card-mobile {
    min-width: 280px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Returning visitor CTA */
.returning-cta {
  font-family: Inter, sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}
.returning-cta-link {
  color: #c9922a;
  text-decoration: none;
  display: block;
  margin-top: 0.2rem;
}
.returning-cta-link:hover {
  text-decoration: underline;
}
