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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(249, 117, 131, 0.2);
    color: #1f2733;
}

/* ── Scroll Reveal (progressive enhancement) ───────────────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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);
    }
}

/* ── Navbar ────────────────────────────────────────────────── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(246, 246, 247, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(55, 65, 81, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1f2733;
}

/* ── Hero Image ────────────────────────────────────────────── */
.hero-image {
    transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
}

#hero:hover .hero-image {
    transform: scale(1.03);
}

/* ── Buttons ───────────────────────────────────────────────── */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ── Mobile Menu ───────────────────────────────────────────── */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Custom Select ─────────────────────────────────────────── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

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

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }

    section[id] {
        scroll-margin-top: 70px;
    }
}
