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

body {
    overflow-x: hidden;
}

/* ── Scroll Reveal ── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal.delay-100 {
    transition-delay: 0.1s;
}

.scroll-reveal.delay-200 {
    transition-delay: 0.2s;
}

/* ── Hero Reveal ── */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    animation: revealUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-up.delay-100 {
    animation-delay: 0.15s;
}

.reveal-up.delay-200 {
    animation-delay: 0.3s;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header Scroll State ── */
#site-header.scrolled {
    background: rgba(250, 252, 249, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(10, 37, 64, 0.06);
}

/* ── Nav Link Hover Effect ── */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #A8E6CF;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link {
    position: relative;
}

.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile Menu Transitions ── */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ── Image Hover ── */
.gallery-img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Custom Selection ── */
::selection {
    background: #A8E6CF;
    color: #0A2540;
}

/* ── Form Focus Styles ── */
input:focus,
textarea:focus {
    outline: none;
}

/* ── Smooth Scroll Offset ── */
section[id] {
    scroll-margin-top: 80px;
}

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

/* ── Mobile Adjustments ── */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}
