/* ============================================
   Luxury Beauty Store — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: #f5f0e8;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% {
        top: -16px;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: calc(100% + 16px);
        opacity: 0;
    }
}

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

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

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Navigation
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(7, 14, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu.open #line2 {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu.open #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-nav-link {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

/* ============================================
   Collection Cards
   ============================================ */

.collection-card {
    position: relative;
    border: 1px solid rgba(245, 240, 232, 0.05);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.collection-card:hover {
    border-color: rgba(201, 168, 76, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Gold Accent Line Animation
   ============================================ */

.gold-line {
    position: relative;
    overflow: hidden;
}

.gold-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.4), transparent);
    animation: goldShimmer 3s ease-in-out infinite;
}

@keyframes goldShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ============================================
   Button Hover Glow
   ============================================ */

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.3), 0 0 80px rgba(201, 168, 76, 0.1);
}

/* ============================================
   Image Placeholder Fallback
   ============================================ */

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

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ============================================
   Subtle Page Load
   ============================================ */

body {
    animation: pageLoad 0.6s ease forwards;
}

@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Focus Styles for Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   Smooth Image Loading
   ============================================ */

img {
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
