/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
    background: #b91d46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #97153a;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 242, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1e2d3d;
}

#navbar.scrolled .nav-link {
    color: rgba(30, 45, 61, 0.7);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 5rem;
}

/* Mobile nav links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Hero badge animation */
.hero-badge {
    animation: badge-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.3s;
}

@keyframes badge-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero text animation */
#hero h1 {
    animation: hero-text 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
}

@keyframes hero-text {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero p {
    animation: hero-text 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.7s;
}

#hero .flex-wrap {
    animation: hero-text 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.85s;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-up {
        transform: translateY(30px);
    }

    .reveal-left {
        transform: translateX(-30px);
    }

    .reveal-right {
        transform: translateX(30px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }

    /* Staggered children */
    .stagger-children > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .stagger-children.revealed > *:nth-child(1) { transition-delay: 0s; }
    .stagger-children.revealed > *:nth-child(2) { transition-delay: 0.08s; }
    .stagger-children.revealed > *:nth-child(3) { transition-delay: 0.16s; }
    .stagger-children.revealed > *:nth-child(4) { transition-delay: 0.24s; }
    .stagger-children.revealed > *:nth-child(5) { transition-delay: 0.32s; }
    .stagger-children.revealed > *:nth-child(6) { transition-delay: 0.4s; }

    .stagger-children.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default visible state (no-JS fallback) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

/* Image hover effects */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* Button focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #b91d46;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Selection color */
::selection {
    background: #fce7eb;
    color: #7e1334;
}

/* Mobile menu link stagger delays */
#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Subtle card hover lift */
.bg-burgundy-50.rounded-2xl,
.bg-navy-900.rounded-2xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-burgundy-50.rounded-2xl:hover,
.bg-navy-900.rounded-2xl:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(126, 19, 52, 0.1);
}
