/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 164, 90, 0.3);
    color: #1a2744;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .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:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* ── Hero Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-badge {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

#hero h1 {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

#hero p {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

#hero > div:last-child > div {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

#hero > div:last-child > div:last-child {
    animation: fadeIn 0.8s ease 1.4s both;
}

/* ── Hero Parallax ── */
#hero .absolute.inset-0 img {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ── Navbar Transition ── */
#navbar.scrolled {
    background: rgba(26, 39, 68, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-menu-link {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-menu-link:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu.open .mobile-menu-link:nth-child(6) { animation-delay: 0.35s; }

/* ── Custom Select Arrow ── */
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='%236b7280' stroke-width='2.5' 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 Visible ── */
:focus-visible {
    outline: 2px solid #c8a45a;
    outline-offset: 2px;
}

/* ── Smooth Scroll Offset for Fixed Nav ── */
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;
    }
}
