/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* ── Nav link underline animation ── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #16a34a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile nav links ── */
.mobile-nav-link {
    position: relative;
}

/* ── Hero parallax-like feel ── */
.hero-bg {
    will-change: transform;
}
.hero-overlay {
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(22, 163, 74, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 58, 95, 0.15) 0%, transparent 50%);
}

/* ── Reveal animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* When JS is disabled or prefers-reduced-motion, content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Hamburger animation ── */
#menu-btn[aria-expanded="true"] .hamburger-line:first-child {
    top: 16px;
    transform: rotate(45deg);
}
#menu-btn[aria-expanded="true"] .hamburger-line:last-child {
    top: 16px;
    transform: rotate(-45deg);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fefdf8; }
::-webkit-scrollbar-thumb { background: #d5e0eb; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8bdd4; }

/* ── Selection ── */
::selection { background: #bbf7d0; color: #1e3a5f; }

/* ── Focus visible ── */
:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Smooth image loading ── */
img {
    image-rendering: auto;
}

/* ── Navbar scroll state ── */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.08);
}
.nav-scrolled .nav-link-text {
    color: #1e3a5f !important;
}
.nav-scrolled .nav-link {
    color: #1e3a5f !important;
}
.nav-scrolled #menu-btn {
    border-color: #a8bdd4 !important;
}
.nav-scrolled #menu-btn .hamburger-line {
    background: #1e3a5f !important;
}

/* ── Card hover lift ── */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}
