/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }

/* ── Navbar scroll state ── */
#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

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

/* ── Mobile menu ── */
.mobile-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}
.mobile-link:hover {
    padding-left: 8px;
}

/* ── Stat cards ── */
.stat-card {
    animation: float 6s ease-in-out infinite;
}
.stat-card:nth-child(2) {
    animation-delay: -2s;
}
.stat-card:nth-child(3) {
    animation-delay: -4s;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ── Scroll indicator ── */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scroll-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, #064E3B);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { top: -40%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Reveal on scroll (progressive enhancement) ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hidden state — only applied via JS for progressive enhancement */
.reveal[data-reveal="true"] {
    opacity: 0;
    transform: translateY(32px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal[data-reveal="true"] {
        opacity: 1;
        transform: none;
    }
    html { scroll-behavior: auto; }
    .stat-card { animation: none; }
    .scroll-line { animation: none; }
}

/* ── Menu item hover ── */
#menu .flex.items-baseline {
    transition: transform 0.2s ease;
}
#menu .flex.items-baseline:hover {
    transform: translateX(4px);
}

/* ── Gallery image overlay ── */
.rounded-2xl.overflow-hidden {
    position: relative;
}
.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 44, 34, 0.15), transparent 40%);
    pointer-events: none;
    border-radius: inherit;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #064E3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #022C22;
}

/* ── Selection color ── */
::selection {
    background: #D4A574;
    color: #022C22;
}
