/* ─── Base & Typography ─── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: #064E3B;
    color: #FDFBF7;
}

/* ─── Navigation ─── */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(253, 251, 247, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav-fixed.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.menu-line {
    display: block;
}

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

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

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

/* ─── Hero Animations ─── */
.hero-title-line {
    display: inline-block;
    transform: translateY(105%);
    animation: revealLine 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) { animation-delay: 0.2s; }
.hero-title-line:nth-child(3) { animation-delay: 0.3s; }
.hero-title-line:nth-child(4) { animation-delay: 0.4s; }
.hero-title-line:nth-child(5) { animation-delay: 0.5s; }

.hero-eyebrow {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

@keyframes revealLine {
    to { transform: translateY(0); }
}

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

/* ─── Scroll Indicator ─── */
.scroll-line {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #064E3B, transparent);
    animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { height: 0%; opacity: 1; }
    50% { height: 100%; opacity: 1; }
    100% { height: 100%; opacity: 0; }
}

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-title-line {
        animation: none;
        transform: translateY(0);
    }
    .hero-eyebrow {
        animation: none;
        opacity: 1;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
    .scroll-line {
        animation: none;
        height: 100%;
        opacity: 0.5;
    }
}

/* ─── Form Focus Styles ─── */
input:focus, textarea:focus {
    outline: none;
}

/* ─── Smooth Image Loading ─── */
img {
    display: block;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F5F0E6;
}
::-webkit-scrollbar-thumb {
    background: #064E3B;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #022C22;
}
