/* === Base === */
*, *::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: rgba(168, 46, 61, 0.15);
    color: #5a181e;
}

/* === Eyebrow === */
.eyebrow {
    display: inline-block;
}

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

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

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

/* === Navbar scroll === */
.navbar-scrolled #navbar {
    background: rgba(250, 247, 244, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(42, 36, 33, 0.06);
}

.navbar-scrolled .nav-link {
    color: #2a2421;
}

/* === Hero animations === */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-sub {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

.hero-scroll {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.6s;
    opacity: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Reveal on scroll === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* === Service cards === */
.service-card {
    transition: transform 0.4s ease, background-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* === Mobile menu === */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* === Hamburger animation === */
#hamburger.active #bar1 {
    transform: translateY(6px) rotate(45deg);
}

#hamburger.active #bar2 {
    opacity: 0;
}

#hamburger.active #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* === Form === */
input:focus,
textarea:focus {
    border-color: #e8a08a !important;
    box-shadow: 0 0 0 3px rgba(224, 133, 82, 0.1);
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 3.5rem !important;
    }

    .hero-headline span {
        font-size: 3.5rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hero-headline span {
        font-size: 5rem !important;
    }
}

/* === Reduce motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
