/* Base & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcf8;
}
::-webkit-scrollbar-thumb {
    background: #8fbfa8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fa182;
}

/* Selection */
::selection {
    background: #1a4234;
    color: #fdfcf8;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3d8264;
    outline-offset: 2px;
}

/* Fade-in animation for scroll reveal */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .fade-in.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    .fade-in-delay-1 { transition-delay: 0.1s; }
    .fade-in-delay-2 { transition-delay: 0.2s; }
    .fade-in-delay-3 { transition-delay: 0.3s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle pulse for the lighthouse icon in hero */
@keyframes softPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
#hero svg[aria-hidden*="lighthouse"] {
    animation: softPulse 3s ease-in-out infinite;
}

/* Image loading placeholder */
img {
    background-color: #dceee6;
}
