/* ─── Base & Utilities ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ─── Animations ─── */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* ─── Scroll Reveal (progressive enhancement — content visible by default) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-up.is-visible,
    .reveal-left.is-visible,
    .reveal-right.is-visible {
        /* JS adds this class; default state is already visible */
    }
}

/* For browsers that don't support prefers-reduced-motion, 
   we let JS handle the animation class. Content is still visible. */

/* ─── Navbar ─── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 240, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(127, 38, 79, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #7f264f;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf0f9;
}

::-webkit-scrollbar-thumb {
    background: #d45d94;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b83d76;
}

/* ─── Selection ─── */
::selection {
    background: #e88ab5;
    color: #3d0f24;
}

/* ─── Focus States ─── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ffd660;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Mobile Menu Transitions ─── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Image Loading ─── */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float,
    .animate-float-delay {
        animation: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* ─── Print Styles ─── */
@media print {
    nav, .animate-float, .animate-float-delay, .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
