/* ============================================
   Munilla Eduardo MD — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #3d682e 30%, transparent);
    color: #111c0e;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 82, 38, 0.08);
}

.nav-scrolled .menu-line {
    background: #284220;
}

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

/* Scroll reveal — progressive enhancement via JS */
.reveal-section {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-section:not(.revealed) {
        opacity: 0;
        transform: translateY(28px);
    }
}

/* Section styles */
.section-eyebrow {
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    margin-bottom: 5rem;
}

/* Service card subtle line divider */
.service-card {
    position: relative;
}

.service-card:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: rgba(197, 223, 184, 0.5);
}

@media (min-width: 768px) {
    .service-card:not(:last-child):not(:nth-child(3))::after {
        display: none;
    }
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
}

/* Smooth anchor offset for fixed nav */
section[id], header[id] {
    scroll-margin-top: 80px;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #52853c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle pattern overlay on hero */
header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(227, 239, 220, 0.5) 0%, transparent 70%);
    pointer-events: none;
}

/* CTA section subtle pattern */
section.bg-forest-700::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(82, 133, 60, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

section.bg-forest-700 {
    position: relative;
}
