/* ── Base & Reset ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #b8614a;
    color: #FAF8F5;
}

img {
    display: block;
    max-width: 100%;
}

/* ── Navigation ───────────────────────────────────────── */
#header {
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(219, 190, 135, 0.2);
}

#header.scrolled {
    box-shadow: 0 1px 20px rgba(60, 36, 21, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #b8614a !important;
}

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

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(12px);
}

#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 fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

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

/* ── Hero Animations ──────────────────────────────────── */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

/* ── Scroll Reveal ────────────────────────────────────── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-on-scroll.revealed:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll.revealed:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll.revealed:nth-child(4) { transition-delay: 0.3s; }
.reveal-on-scroll.revealed:nth-child(5) { transition-delay: 0.4s; }
.reveal-on-scroll.revealed:nth-child(6) { transition-delay: 0.5s; }

/* ── Image Hover Effects ──────────────────────────────── */
.group img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Custom Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b8614a;
}

/* ── Focus Styles ─────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #b8614a;
    outline-offset: 2px;
}

/* ── Responsive Tweaks ────────────────────────────────── */
@media (max-width: 767px) {
    .hero-reveal {
        animation-duration: 0.6s;
    }

    #header {
        background: rgba(250, 248, 245, 0.98);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .reveal-on-scroll {
        transition-delay: 0.05s;
    }
}
