/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: #F5C518;
    color: #4A1942;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf2f8;
}
::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f472b6;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

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

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

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .menu-reveal,
    .about-reveal,
    .gallery-reveal,
    .testimonial-reveal,
    .visit-reveal,
    .cta-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);
    }

    .menu-reveal.visible,
    .about-reveal.visible,
    .gallery-reveal.visible,
    .testimonial-reveal.visible,
    .visit-reveal.visible,
    .cta-reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays */
    .menu-reveal:nth-child(2) { transition-delay: 0.1s; }
    .menu-reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Fallback: ensure content is visible without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .menu-reveal,
    .about-reveal,
    .gallery-reveal,
    .testimonial-reveal,
    .visit-reveal,
    .cta-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== NAVBAR ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 242, 248, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(74, 25, 66, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F5C518;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateY(0);
}

/* ===== BUTTON HOVER EFFECTS ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F5C518;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== IMAGE LAZY LOAD FALLBACK ===== */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
img[loading="lazy"] {
    opacity: 0;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
