/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle {
        animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        animation-delay: 0.2s;
        opacity: 0;
    }

    .hero-title-line {
        animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }

    .hero-title-line:nth-child(1),
    .hero-title-line:nth-of-type(1) {
        animation-delay: 0.3s;
        opacity: 0;
    }

    .hero-title-line:nth-child(2),
    .hero-title-line:nth-of-type(2) {
        animation-delay: 0.45s;
        opacity: 0;
    }

    .hero-title-line:nth-child(3),
    .hero-title-line:nth-of-type(3) {
        animation-delay: 0.6s;
        opacity: 0;
    }

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

    @keyframes slideUp {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    backdrop-filter: none;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(192, 108, 68, 0.1);
}

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

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

#mobile-menu.open #bar2 {
    opacity: 0;
}

#mobile-menu.open #bar3 {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Menu Item Hover ===== */
.menu-item {
    transition: background 0.3s ease;
}

.menu-item:hover {
    background: rgba(250, 243, 239, 0.5);
}

/* ===== Custom Selection ===== */
::selection {
    background: rgba(192, 108, 68, 0.2);
    color: #2C2420;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #C06C44;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #D4B46E;
    border-radius: 3px;
}

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