/* ═══════════════════════════════════════════════════════
   ZoZoPeak.com — intro.css
   Breach Animation: White curtain splits, dolphin leaps
   ═══════════════════════════════════════════════════════ */

/* ─── Overlay (sits above everything) ─── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
  overflow: hidden;
  background: #0B0F2C; /* Background behind the curtain */
}

/* ─── Skip Intro instantly if sessionStorage is set ─── */
html.skip-intro #intro-overlay {
  display: none !important;
}

/* ─── Curtain halves ─── */
.intro-top,
.intro-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: #FFFFFF;
  z-index: 10005; /* Above the dolphin */
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.intro-top    { top: 0;   transform: translateY(0); }
.intro-bottom { bottom: 0; transform: translateY(0); }

/* When breaching: curtains split open */
#intro-overlay.breach .intro-top    { transform: translateY(-100%); }
#intro-overlay.breach .intro-bottom { transform: translateY(100%); }

/* ─── Dolphin container ─── */
.intro-dolphin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#intro-overlay.active .intro-dolphin {
  opacity: 1;
}

/* Rotating Splash Dolphins */
.splash-dolphins {
  width: clamp(120px, 25vw, 250px);
  height: auto;
  object-fit: contain;
  /* Convert black to bright gold (#D4AF37) */
  filter: invert(72%) sepia(82%) saturate(415%) hue-rotate(352deg) brightness(91%) contrast(85%) drop-shadow(0 0 35px rgba(212,175,55,1));
  animation: rotateLogo 10s linear infinite;
  mix-blend-mode: screen;
}

@keyframes rotateLogo {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Brand text that appears under dolphin */
.intro-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  animation: introBrandIn 0.35s ease 0.25s forwards;
}

@keyframes introBrandIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Glowing Splash Text Logo */
.splash-text-logo {
  width: clamp(180px, 35vw, 380px);
  height: auto;
  object-fit: contain;
  margin-top: -20px; /* Bring it closer to dolphins */
  filter: drop-shadow(0 0 15px rgba(212,175,55,0.6));
  animation: sparkleGlow 4s ease-in-out infinite;
}

@keyframes sparkleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(212,175,55,0.6)) brightness(1);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(212,175,55,1)) brightness(1.3);
    transform: scale(1.03);
  }
}

/* Water ripple effect at split line */
.intro-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(200px, 50vw, 600px);
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212,175,55,0.3) 20%,
    rgba(212,175,55,0.8) 50%,
    rgba(212,175,55,0.3) 80%,
    transparent 100%
  );
  z-index: 9998;
  opacity: 0;
  animation: rippleIn 0.18s ease 0.12s forwards;
}

@keyframes rippleIn {
  to { opacity: 1; }
}

/* ─── Fade-out when ending ─── */
#intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* ─── Progress bar (bottom) ─── */
.intro-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #D4AF37, #FFD700);
  width: 0%;
  z-index: 10001;
  transition: width 1.6s linear;
  box-shadow: 0 0 8px rgba(212,175,55,0.8);
}

#intro-overlay.active .intro-progress {
  width: 100%;
}

/* ─── Skip button ─── */
.intro-skip {
  position: absolute;
  top: var(--space-lg, 1.5rem);
  right: var(--space-xl, 2rem);
  background: linear-gradient(135deg, #f5c518, #d4af37);
  border: 1px solid rgba(245, 197, 24, 0.55);
  color: #0b0f2c;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
  min-height: unset;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.28);
  animation: fadeIn 0.2s ease 0.15s forwards;
}

.intro-skip:hover {
  background: linear-gradient(135deg, #ffd54a, #e2ba3f);
  color: #050914;
  transform: translateY(-1px);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ─── Hidden state (after completion) ─── */
#intro-overlay.done {
  display: none;
}

/* ─── Responsive adjustments ─── */
@media (max-width: 480px) {
  .intro-skip {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 0.9rem;
  }
  .intro-brand-name { font-size: 1.8rem; }
  .intro-brand-sub  { font-size: 0.65rem; }
}
