/* ============================================
   BIRTHDAY WEEK — Animations & Keyframes
   ============================================ */

/* --- Glitch Effect --- */
@keyframes glitch-top {
  0%, 90%, 100% { clip-path: inset(0 0 65% 0); transform: translate(0); }
  92% { clip-path: inset(0 0 65% 0); transform: translate(-3px, -2px); }
  94% { clip-path: inset(0 0 62% 0); transform: translate(3px, 1px); }
  96% { clip-path: inset(0 0 65% 0); transform: translate(-1px, 2px); }
  98% { clip-path: inset(0 0 67% 0); transform: translate(2px, -1px); }
}

@keyframes glitch-bottom {
  0%, 88%, 100% { clip-path: inset(65% 0 0 0); transform: translate(0); }
  90% { clip-path: inset(63% 0 0 0); transform: translate(3px, 1px); }
  92% { clip-path: inset(65% 0 0 0); transform: translate(-2px, -1px); }
  94% { clip-path: inset(67% 0 0 0); transform: translate(1px, 2px); }
  96% { clip-path: inset(65% 0 0 0); transform: translate(-3px, -2px); }
}

/* --- Neon Flicker --- */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow:
      0 0 4px #fff,
      0 0 11px #fff,
      0 0 19px #fff,
      0 0 40px var(--neon-pink),
      0 0 80px var(--neon-pink),
      0 0 90px var(--neon-pink);
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.8;
  }
}

/* --- Blink --- */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --- Bounce Arrow --- */
@keyframes bounce-arrow {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-8px); }
  60% { transform: rotate(45deg) translateY(-4px); }
}

/* --- Pulse Glow --- */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 45, 149, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 45, 149, 0.5), 0 0 50px rgba(255, 45, 149, 0.2);
  }
}

/* --- Bounce --- */
@keyframes bounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Fade In Up --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scale In --- */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Typewriter Cursor --- */
.typewriter {
  border-right: 2px solid var(--neon-cyan);
  display: inline-block;
  animation: typewriter-cursor 0.8s step-end infinite;
  padding-right: 4px;
}

@keyframes typewriter-cursor {
  0%, 49% { border-color: var(--neon-cyan); }
  50%, 100% { border-color: transparent; }
}

/* --- VHS Tracking Lines --- */
@keyframes vhs-tracking {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* --- Float --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* --- Spin Slow --- */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Counter Roll Up --- */
@keyframes counter-roll {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Slide In From Left --- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Slide In From Right --- */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Card Entrance (staggered via JS) --- */
.card-enter {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Section Reveal --- */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Confetti Burst Overlay --- */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

/* --- Easter Egg: Retro GeoCities Mode --- */
.geocities-mode {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive !important;
  background: repeating-linear-gradient(
    45deg,
    #ff00ff,
    #ff00ff 10px,
    #00ffff 10px,
    #00ffff 20px
  ) !important;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ctext y='20' font-size='20'%3E🎂%3C/text%3E%3C/svg%3E"), auto;
}

.geocities-mode .section__title {
  color: yellow !important;
  text-shadow: 3px 3px red !important;
  -webkit-text-stroke: 1px black;
}

.geocities-mode .neon-text {
  animation: neon-flicker 0.5s infinite !important;
}

/* --- Easter Egg: Konami Reward --- */
.konami-active .hero__age {
  animation: spin-slow 0.5s ease-in-out, scaleIn 0.5s ease-in-out;
}

/* --- Stagger Delay Classes --- */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }
.stagger-9 { animation-delay: 0.9s; }
.stagger-10 { animation-delay: 1.0s; }

/* --- Entrance animation for sections (used by main.js) --- */
.section.is-visible {
  opacity: 1;
}
