/* ============================================================
   launch-animation.css — The Fame ASCO Mumbai
   Cinematic launch sequence overlay
   ============================================================ */

/* ── Overlay container ────────────────────────────────────── */
#fame-launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #05080F;
  overflow: hidden;
  cursor: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Hidden from start if session already played */
#fame-launch-overlay.fame-skip {
  display: none !important;
}

/* ── Canvas: particles / light streaks ───────────────────── */
#fame-launch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#fame-launch-canvas.visible { opacity: 1; }

/* ── Campus image ─────────────────────────────────────────── */
#fame-campus-bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/amity-campus-banner.jpg');
  background-size: cover;
  background-position: center 40%;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 2s ease, transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
#fame-campus-bg.visible {
  opacity: 1;
  transform: scale(1.0);
}

/* Golden overlay on campus image */
#fame-campus-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 15, 0.55) 0%,
    rgba(180, 120, 20, 0.18) 40%,
    rgba(5, 8, 15, 0.85) 100%
  );
}

/* ── Vignette ─────────────────────────────────────────────── */
#fame-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 40%,
    rgba(5, 8, 15, 0.7) 100%
  );
  pointer-events: none;
}

/* ── Content wrapper ──────────────────────────────────────── */
#fame-launch-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 40px;
}

/* ── Gold horizontal rule ─────────────────────────────────── */
.fame-rule {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C8983A, #E8C96A, #C8983A, transparent);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 18px 0;
  opacity: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.fame-rule.visible { width: 320px; opacity: 1; }

/* ── Institution label ────────────────────────────────────── */
#fame-institution {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(212, 175, 106, 0.9);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1s ease, transform 1s ease;
  text-align: center;
  margin-bottom: 4px;
}
#fame-institution.visible { opacity: 1; transform: translateY(0); }

/* ── Main logo area ───────────────────────────────────────── */
#fame-logo-wrap {
  position: relative;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}
#fame-logo-wrap.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Glow ring behind logo */
#fame-logo-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(212, 175, 106, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
}
#fame-logo-wrap.visible::before { opacity: 1; }

/* Logo image (if exists) */
#fame-logo-img {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 24px rgba(212, 175, 106, 0.6));
  display: block;
  margin: 0 auto 16px;
}

/* Text logo fallback */
#fame-logo-text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 0.95;
  color: #fff;
  text-shadow:
    0 0 40px rgba(212, 175, 106, 0.5),
    0 0 80px rgba(212, 175, 106, 0.2);
}
#fame-logo-text .fame-part { color: #fff; }
#fame-logo-text .asco-part { color: #D4AF6A; }

/* ── Tagline ──────────────────────────────────────────────── */
#fame-tagline {
  font-family: 'Georgia', serif;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  letter-spacing: 3px;
  color: rgba(240, 230, 210, 0.8);
  font-style: italic;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  text-align: center;
  margin-top: 6px;
}
#fame-tagline.visible { opacity: 1; transform: translateY(0); }

/* ── URL browser frame ────────────────────────────────────── */
#fame-url-frame {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 28px;
  padding: 9px 20px 9px 14px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 1s ease, transform 1s ease;
  margin-top: 8px;
}
#fame-url-frame.visible { opacity: 1; transform: translateY(0) scale(1); }

#fame-url-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  flex-shrink: 0;
}
#fame-url-lock {
  color: rgba(212, 175, 106, 0.8);
  font-size: 0.7rem;
}
#fame-url-text {
  font-family: 'Courier New', monospace;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1.5px;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  transition: width 1.8s steps(22, end);
}
#fame-url-text.visible { width: 200px; }

/* ── Launched title ───────────────────────────────────────── */
#fame-launched-wrap {
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.4s ease, transform 1.4s ease;
  margin-top: 8px;
}
#fame-launched-wrap.visible { opacity: 1; transform: translateY(0); }

#fame-launched-title {
  font-family: 'Georgia', serif;
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  letter-spacing: 8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  display: block;
}
#fame-launched-sub {
  font-family: 'Georgia', serif;
  font-size: clamp(0.65rem, 1.4vw, 0.8rem);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #D4AF6A;
  display: block;
  margin-top: 6px;
  font-style: italic;
}

/* ── Progress bar ─────────────────────────────────────────── */
#fame-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #8B6914, #D4AF6A, #F0D090, #D4AF6A);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(212, 175, 106, 0.5);
}

/* ── Skip button ──────────────────────────────────────────── */
#fame-skip-btn {
  position: absolute;
  bottom: 32px;
  right: 32px;
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  padding: 7px 16px;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s;
  opacity: 0;
  animation: fadeInSkip 0.5s 3s ease forwards;
}
#fame-skip-btn:hover {
  color: rgba(212, 175, 106, 0.8);
  border-color: rgba(212, 175, 106, 0.3);
}
@keyframes fadeInSkip {
  to { opacity: 1; }
}

/* ── Final fade out ───────────────────────────────────────── */
#fame-launch-overlay.fade-out {
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ── Corner watermark ─────────────────────────────────────── */
#fame-corner {
  position: absolute;
  top: 28px;
  left: 32px;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: rgba(212, 175, 106, 0.3);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInSkip 0.5s 2s ease forwards;
}

/* ── Scan line effect ─────────────────────────────────────── */
#fame-launch-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  #fame-url-text.visible { width: 160px; }
  .fame-rule.visible { width: 200px; }
  #fame-logo-img { height: 56px; }
  #fame-launch-content { padding: 24px 20px; gap: 0; }
  #fame-skip-btn { bottom: 20px; right: 20px; }
}

/* ── SVG Lock icon sizing ─────────────────────────────────── */
#fame-url-lock {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#fame-url-lock svg { display: block; }

/* ── Sparkle elements ─────────────────────────────────────── */
#fame-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fame-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
}

/* Star shape via clip-path */
.fame-sparkle::before,
.fame-sparkle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  border-radius: 1px;
}
.fame-sparkle::before {
  width: 100%;
  height: 20%;
}
.fame-sparkle::after {
  width: 20%;
  height: 100%;
}

/* Four-pointed star variant */
.fame-sparkle.star4 {
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
  background: currentColor;
}
.fame-sparkle.star4::before,
.fame-sparkle.star4::after { display: none; }

/* Sparkle animation keyframes */
@keyframes sparkleRise {
  0%   { opacity: 0;   transform: translate(0,0) scale(0) rotate(0deg); }
  20%  { opacity: 1;   transform: translate(var(--sx), calc(var(--sy) * 0.3)) scale(1) rotate(45deg); }
  80%  { opacity: 0.6; transform: translate(var(--sx), calc(var(--sy) * 0.85)) scale(0.8) rotate(120deg); }
  100% { opacity: 0;   transform: translate(var(--sx), var(--sy)) scale(0.2) rotate(180deg); }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  30%       { opacity: 1; transform: scale(1.2) rotate(45deg); }
  60%       { opacity: 0.7; transform: scale(0.9) rotate(90deg); }
}

/* ── Audio button ─────────────────────────────────────────── */
#fame-audio-btn {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,106,0.25);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  animation: fadeInSkip 0.5s 2.5s ease forwards;
  transition: border-color 0.2s, background 0.2s;
  z-index: 10;
  backdrop-filter: blur(6px);
}
#fame-audio-btn:hover {
  border-color: rgba(212,175,106,0.5);
  background: rgba(212,175,106,0.08);
}
#fame-audio-btn svg { display: block; }

/* ── Glow pulse on logo when audio plays ─────────────────── */
@keyframes logoPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(212,175,106,0.5), 0 0 80px rgba(212,175,106,0.2); }
  50%       { text-shadow: 0 0 60px rgba(212,175,106,0.8), 0 0 120px rgba(212,175,106,0.35), 0 0 200px rgba(212,175,106,0.1); }
}
#fame-logo-text.pulse-glow {
  animation: logoPulse 3s ease-in-out infinite;
}

/* ════════════════════════════════════════════
   DISCIPLINE SEQUENCE — Phase 1 of animation
════════════════════════════════════════════ */
#fame-discipline-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.fame-disc-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 10px;
  text-transform: uppercase;
  color: #D4AF6A;
  text-shadow:
    0 0 30px rgba(212, 175, 106, 0.7),
    0 0 70px rgba(212, 175, 106, 0.3),
    0 0 120px rgba(212, 175, 106, 0.1);
  opacity: 0;
  white-space: nowrap;
  transition: none;
  will-change: opacity, transform;
}

/* Animated states */
.fame-disc-word.disc-enter {
  animation: discWordIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.fame-disc-word.disc-hold {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.fame-disc-word.disc-exit {
  animation: discWordOut 0.45s cubic-bezier(0.4, 0, 0.8, 0.2) forwards;
}

@keyframes discWordIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
}

@keyframes discWordOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08);
    filter: blur(4px);
  }
}

/* Streak between words */
.disc-streak {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%) scaleX(0);
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212,175,106,0.1) 20%,
    rgba(212,175,106,0.5) 50%,
    rgba(212,175,106,0.1) 80%,
    transparent 100%);
  transform-origin: center;
}
.disc-streak.flash {
  animation: streakFlash 0.3s ease-out forwards;
}
@keyframes streakFlash {
  0%   { transform: translateY(-50%) scaleX(0); opacity:1; }
  50%  { transform: translateY(-50%) scaleX(1); opacity:1; }
  100% { transform: translateY(-50%) scaleX(1); opacity:0; }
}

/* ── Intro tagline "One Platform. Infinite Stories." ── */
#fame-intro-tagline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Georgia', serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  opacity: 0;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
#fame-intro-tagline.visible {
  animation: introTaglineIn 0.8s ease forwards;
}
#fame-intro-tagline.hide {
  animation: introTaglineOut 0.7s ease forwards;
}
@keyframes introTaglineIn {
  from { opacity:0; letter-spacing:8px; }
  to   { opacity:1; letter-spacing:4px; }
}
@keyframes introTaglineOut {
  from { opacity:1; }
  to   { opacity:0; }
}

/* Discipline counter dots */
#fame-disc-dots {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 11;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#fame-disc-dots.visible { opacity: 1; }

.disc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(212,175,106,0.2);
  border: 1px solid rgba(212,175,106,0.3);
  transition: background 0.3s ease, transform 0.3s ease;
}
.disc-dot.active {
  background: rgba(212,175,106,0.9);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(212,175,106,0.5);
}

/* Phase 1 content hidden during discipline sequence */
#fame-launch-content.disc-phase { opacity: 0; }
#fame-launch-content.revealing {
  animation: contentReveal 1.4s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes contentReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}