/* ── Base & Reset ── */
*, *::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: color-mix(in srgb, #5B9A8B 30%, transparent);
    color: #1f2937;
}

/* ── Navbar ── */
.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(91, 154, 139, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
}

.navbar-scrolled .nav-text {
    color: #1f3b34 !important;
}

.navbar-transparent .nav-text {
    color: #1f3b34;
}

.navbar-transparent .nav-link {
    color: rgba(31, 41, 55, 0.7);
}

/* Hero navbar (white text) */
.navbar-hero .nav-text {
    color: #f0f7f5 !important;
}

.navbar-hero .nav-link {
    color: rgba(240, 247, 245, 0.75);
}

.navbar-hero .nav-link:hover {
    color: #f0f7f5;
}

.navbar-hero .mobile-link {
    color: rgba(240, 247, 245, 0.75) !important;
}

.navbar-hero .mobile-link:hover {
    color: #f0f7f5 !important;
}

/* ── Mobile Menu ── */
#bar1 {
    transform-origin: center;
}

#bar2 {
    transform-origin: center;
}

#bar3 {
    transform-origin: center;
}

.menu-open #bar1 {
    transform: translateY(4px) rotate(45deg);
}

.menu-open #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

.menu-open #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

#mobileMenu {
    max-height: 0;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    position: relative;
}

/* ── Hero Animations ── */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

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

/* ── Marquee ── */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Product Cards ── */
.product-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    box-shadow: 0 20px 60px rgba(91, 154, 139, 0.15);
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Contact Form ── */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(91, 154, 139, 0.1);
}

/* ── Smooth Section Transitions ── */
section {
    position: relative;
}

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

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

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

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

/* ── Focus Visible ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #5B9A8B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Responsive Adjustments ── */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    #hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

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

    html {
        scroll-behavior: auto;
    }

    .product-card, .reveal {
        opacity: 1;
        transform: none;
    }

    .marquee-track {
        animation: none;
    }
}
