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

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
}

/* ── Navbar Scroll State ── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.0);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.nav-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(22, 36, 64, 0.08);
}

/* ── Mobile Menu ── */
.mobile-menu {
    z-index: 50;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu:not(.open) {
    transform: translateX(100%);
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
}

/* ── Floating Card Animations ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-14px); }
}

.floating-card-1 { animation: float-slow 5s ease-in-out infinite; }
.floating-card-2 { animation: float-medium 4s ease-in-out infinite 0.5s; }
.floating-card-3 { animation: float-fast 3.5s ease-in-out infinite 1s; }

/* ── Scroll Indicator ── */
@keyframes scroll-down {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Fallback: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f0f3f9; }
::-webkit-scrollbar-thumb { background: #d4900f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b0720a; }

/* ── Selection ── */
::selection { background: rgba(212, 144, 15, 0.2); color: #162440; }

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

/* ── Smooth image loading ── */
img {
    display: block;
}

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