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

body {
    overflow-x: hidden;
}

::selection {
    background: #D4A84B;
    color: #1B4332;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
    }
    .hero-title-line {
        animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
    }
    .hero-divider {
        animation: expandWidth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    }
    .hero-body {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
    }
    .hero-cta {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s both;
    }
    .hero-badge {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.3s both;
    }
}

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

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 5rem;
    }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .nav-link {
    color: #1B4332;
}

#navbar.scrolled .font-serif {
    color: #1B4332;
}

#navbar.scrolled .menu-line {
    background: #1B4332;
}

#navbar.scrolled .logo-icon {
    color: #D4A84B;
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Link ===== */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #D4A84B;
    transition: width 0.3s ease;
}

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

/* ===== Menu Lines Animation ===== */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Buttons ===== */
button[type="submit"]:active {
    transform: scale(0.98);
}

/* ===== Image Hover ===== */
img {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb896;
}

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

/* ===== Utility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
