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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(224, 167, 80, 0.3);
    color: #102a43;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    #hero-eyebrow {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    }
    #hero-headline {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
    }
    #hero-sub {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
    }
    #hero-ctas {
        animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar Transition ===== */
.navbar-scrolled {
    background-color: rgba(16, 42, 67, 0.95) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

/* ===== 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='%23627d98' 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 #e0a750;
    outline-offset: 2px;
}

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

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Selection highlight for form inputs ===== */
input::placeholder,
textarea::placeholder {
    color: #bcccdc;
}

/* ===== Subtle image hover zoom ===== */
img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 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;
    }
}
