/* style.css */

/* Blinking cursor for typewriter effect */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.animate-blink {
    animation: blink 1s step-end infinite;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}
.delay-300 {
    animation-delay: 300ms;
}

/* Candle Flicker */
@keyframes flicker {
    0%, 100% { transform: scale(1) translateX(-50%); opacity: 0.9; }
    50% { transform: scale(1.1) translateX(-50%); opacity: 1; filter: drop-shadow(0 0 5px orange); }
    25%, 75% { transform: scale(0.95) translateX(-50%); opacity: 0.8; }
}
.animate-flicker {
    animation: flicker 0.6s infinite alternate;
}

/* Slow Breathing / Pulsing */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.8; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 10px rgba(214, 107, 120, 0.3); }
}
.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Float Up Magic (Used by JS for click effect) */
@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-80px) scale(1.5) rotate(20deg); opacity: 0; }
}
.animate-float-up {
    animation: floatUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Background Floating Sparkles */
@keyframes drift {
    0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.45; }
    90% { opacity: 0.45; }
    100% { transform: translateY(-10vh) translateX(20px) rotate(180deg); opacity: 0; }
}
.bg-sparkle {
    position: fixed;
    border-radius: 50%;
    background-color: #fdb2ba; /* text-accent but lighter */
    pointer-events: none;
    z-index: 0;
    animation: drift 15s linear infinite;
    opacity: 0;
}

/* Hero petal layer — softer, larger, slower drift for atmosphere behind headline */
@keyframes petalDrift {
    0% { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
    12% { opacity: 0.35; }
    88% { opacity: 0.3; }
    100% { transform: translateY(80vh) translateX(-30px) rotate(200deg); opacity: 0; }
}
.hero-petal {
    position: absolute;
    border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    background: linear-gradient(135deg, #fdb2ba, #ffd9dd);
    pointer-events: none;
    z-index: 0;
    animation: petalDrift 12s ease-in linear infinite;
    opacity: 0;
}

/* Ambient warm gradient wash behind hero, very subtle, static */
.hero-glow {
    background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(253, 178, 186, 0.25), transparent 70%);
    pointer-events: none;
}

/* Timeline scroll reveal styles */
.timeline-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.timeline-card.active {
    opacity: 1;
    transform: translateY(0);
}
.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(214, 107, 120, 0.25);
}
.timeline-card.active:hover {
    transform: translateY(-2px);
}

/* Timeline connector dot: keep clear of the card edge on narrow screens */
@media (max-width: 767px) {
    .right-timeline .order-1.bg-card-bg,
    .left-timeline .order-1.bg-card-bg {
        margin-left: 3.25rem;
        width: calc(100% - 4.25rem);
    }
}

/* Countdown → main content unlock transition */
#countdown-screen.unlocking {
    transform: scale(1.05) !important;
    opacity: 0 !important;
    transition: opacity 0.8s ease, transform 0.8s ease !important;
}
#main-content.revealing {
    transform: translateY(0);
}
#main-content {
    transform: translateY(16px);
    transition: opacity 1.4s ease, transform 1.4s ease;
}

/* Micro-interactions: gentle, warm, consistent with the romantic aesthetic */
button, #birthday-cake, #audio-toggle-btn {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.25s ease;
}
button:hover, #audio-toggle-btn:hover {
    transform: translateY(-1px);
}
button:active, #audio-toggle-btn:active {
    transform: scale(0.95);
}
#birthday-cake:active {
    transform: scale(0.97);
}

/* Utility: Animation Delays */
.animation-delay-\[0s\] { animation-delay: 0s; }
.animation-delay-\[2s\] { animation-delay: 2s; }
.animation-delay-\[4s\] { animation-delay: 4s; }
.animation-delay-\[7s\] { animation-delay: 7s; }

/* Hide scrollbar for cleaner look */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FFF5F5;
}
::-webkit-scrollbar-thumb {
    background: #FFEDED;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D66B78;
}

body {
    -webkit-tap-highlight-color: transparent;
}
