/* ========== CSS CUSTOM PROPERTIES ========== */
:root {
    --burgundy-800: #7B2D3B;
    --burgundy-950: #3a1219;
    --cream-50: #fefcf9;
    --blush-200: #f9d0d9;
}

/* ========== RESET & BASE ========== */
*, *::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;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ========== SCROLL REVEAL ========== */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

.reveal-on-scroll[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

.reveal-on-scroll[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

.reveal-on-scroll[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

.reveal-on-scroll[data-reveal-delay="5"] {
    transition-delay: 0.5s;
}

.reveal-on-scroll[data-reveal-delay="6"] {
    transition-delay: 0.6s;
}

/* 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;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ========== NAVBAR ========== */
#navbar.scrolled {
    background: rgba(254, 252, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08), 0 4px 20px rgba(123, 45, 59, 0.06);
}

/* Mobile menu open state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* Menu toggle animation */
#menuToggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuToggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5rem;
}

/* ========== BACK TO TOP ========== */
.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top {
    transform: translateY(10px);
}

/* ========== PRODUCT CARD HOVER ========== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ========== FOCUS STYLES ========== */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--burgundy-800);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========== SELECTION ========== */
::selection {
    background: rgba(123, 45, 59, 0.15);
    color: var(--burgundy-950);
}

/* ========== IMAGE PLACEHOLDER ========== */
img {
    background: linear-gradient(135deg, var(--blush-200) 0%, var(--burgundy-200) 100%);
}

/* ========== UTILITY ========== */
@media (max-width: 767px) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
