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

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

::selection {
    background: #8fb88f;
    color: #162b1e;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

/* ── Floating Cards ── */
.floating-card-1 {
    animation: float1 5s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 6s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 4.5s ease-in-out infinite;
}

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

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ── Service Cards ── */
.service-card {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

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

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

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

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

#mobileMenu.close {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Hero Card ── */
.card-hero-main {
    animation: heroCardIn 1s ease-out forwards;
}

@keyframes heroCardIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── Staggered hero text ── */
h1 > span,
h1 > br + span,
section > div > div > div:first-child > div,
section > div > div > div:first-child > h1,
section > div > div > div:first-child > p,
section > div > div > div:first-child > div:last-child {
    opacity: 0;
    animation: fadeUp 0.7s ease forwards;
}

section > div > div > div:first-child > div:nth-child(1) { animation-delay: 0.2s; }
section > div > div > div:first-child > h1 { animation-delay: 0.35s; }
section > div > div > div:first-child > p { animation-delay: 0.5s; }
section > div > div > div:first-child > div:last-child { animation-delay: 0.65s; }

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

/* ── Smooth focus outlines ── */
:focus-visible {
    outline: 2px solid #5e9b6f;
    outline-offset: 2px;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}
