/* ===== CSS Custom Properties ===== */
:root {
    --color-midnight-900: #060e18;
    --color-midnight-800: #0a1628;
    --color-midnight-700: #0d1f35;
    --color-midnight-600: #112a45;
    --color-mint-400: #4fd4b5;
    --color-mint-500: #2ec4a0;
    --color-gold-400: #d4b86a;
    --color-gold-500: #c9a84c;
    --color-gold-600: #b8943f;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    background-color: var(--color-midnight-900);
    color: #e5e7eb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
    background: rgba(6, 14, 24, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Floating Cards Animation ===== */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(0.5deg); }
}
@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-0.5deg); }
}
@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(0.3deg); }
}

.floating-card-1 { animation: float-1 5s ease-in-out infinite; }
.floating-card-2 { animation: float-2 6s ease-in-out infinite; }
.floating-card-3 { animation: float-3 4.5s ease-in-out infinite; }

/* ===== Mobile Menu ===== */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(17, 42, 69, 0.5);
}
.mobile-link:last-child { border-bottom: none; }

/* ===== Scroll Reveal (progressive enhancement) ===== */
/* Default: all elements visible (no JS required) */
/* When JS runs and prefers-reduced-motion is off, .animate-scroll-reveal is added to <html> */
/* Then .reveal elements start hidden and JS adds .visible to animate them in */

/* ===== Smooth scroll offset for anchored links ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f3f4f6;
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image lazy-load fade ===== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-midnight-900); }
::-webkit-scrollbar-thumb { background: var(--color-midnight-600); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold-600); }

/* ===== 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; }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display { line-height: 1.2; }
}
