/* ========== 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 {
    display: block;
    max-width: 100%;
}

/* ========== NAVBAR ========== */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 248, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08), 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7B2D3B, #c4274a);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

/* ========== MOBILE MENU ========== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeSlideIn 0.4s ease forwards;
    opacity: 0;
}

#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; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Menu icon animation */
#menuBtn.active #menuIcon span:first-child {
    transform: rotate(45deg);
    top: 14px;
}

#menuBtn.active #menuIcon span:nth-child(2) {
    transform: rotate(-45deg);
    top: 14px;
}

/* ========== HERO REVEAL ========== */
.reveal-hero {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-hero:nth-child(1) { animation-delay: 0.1s; }
.reveal-hero:nth-child(2) { animation-delay: 0.25s; }
.reveal-hero:nth-child(3) { animation-delay: 0.4s; }
.reveal-hero:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== SCROLL REVEAL ========== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* ========== SELECTION ========== */
::selection {
    background: rgba(123, 45, 59, 0.2);
    color: #3a0f17;
}

/* ========== FOCUS ========== */
:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ========== TRANSITION HELPERS ========== */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.15);
}
