*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
}

::selection {
    background-color: rgba(52, 211, 153, 0.2);
    color: #022c22;
}

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

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(28px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    
    .reveal[data-reveal-state="visible"] {
        opacity: 1;
        transform: none;
    }
}

/* ─── Floating Cards ─── */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: no-preference) {
    .animate-float-1 { animation: float-1 5s ease-in-out infinite; }
    .animate-float-2 { animation: float-2 6s ease-in-out infinite 1s; }
    .animate-float-3 { animation: float-3 4.5s ease-in-out infinite 0.5s; }
}

/* ─── Hero Eyebrow ─── */
.hero-eyebrow {
    opacity: 1;
    animation: fadeInDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── Nav Link Underline ─── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #065f46;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Header Transition ─── */
#site-header.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(2, 44, 34, 0.06);
    box-shadow: 0 1px 20px rgba(2, 44, 34, 0.04);
}

#site-header.scrolled .nav-link {
    color: #022c22;
}

#site-header.scrolled .nav-link::after {
    background-color: #022c22;
}

/* ─── Service Card Stagger ─── */
.service-card {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .service-card[data-reveal-state="visible"] {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* ─── Input Focus States ─── */
input:focus, textarea:focus {
    outline: none;
}

/* ─── Smooth Scroll Offset ─── */
section[id] {
    scroll-margin-top: 80px;
}

/* ─── Mobile Menu ─── */
.mobile-link {
    border-bottom: 1px solid rgba(2, 44, 34, 0.06);
    padding-bottom: 0.75rem;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ─── Print Styles ─── */
@media print {
    #site-header, #contact-form, #form-success {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-emerald-950 {
        background: white !important;
        color: black !important;
    }
}
