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

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

::selection {
    background-color: #7B2D3B;
    color: #FDF8F3;
}

/* === Hero Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-line {
    display: block;
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-line:nth-child(1) { animation-delay: 0.15s; }
.hero-line:nth-child(2) { animation-delay: 0.3s; }
.hero-line:nth-child(3) { animation-delay: 0.45s; }

.hero-eyebrow {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
    animation-delay: 0.1s;
}

/* === Navbar === */
.nav-text {
    color: #7B2D3B;
}

nav.scrolled .nav-text {
    color: #7B2D3B;
}

nav.scrolled .nav-link {
    color: #7B2D3B;
}

nav:not(.scrolled) .nav-link {
    color: #7B2D3B;
}

/* === 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);
}

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-line,
    .hero-eyebrow {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Mobile Menu === */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* === Image Hover === */
img {
    display: block;
    max-width: 100%;
}

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

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

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

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

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

/* === Mobile menu active state === */
body.menu-open {
    overflow: hidden;
}

#mobile-menu.menu-open {
    opacity: 1;
    pointer-events: all;
}

/* === Menu lines animation === */
.menu-line {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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