/* ── Base & Typography ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: #1a0a2e;
    color: #ebe0ef;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient Background Orbs ── */
.bg-ambience {
    background: radial-gradient(ellipse at 20% 20%, rgba(139, 77, 147, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(26, 10, 46, 1) 0%, #1a0a2e 100%);
}

.ambience-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(139, 77, 147, 0.15);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.08);
    bottom: 10%;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(139, 77, 147, 0.1);
    top: 50%;
    right: 20%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Card Glow Effect ── */
.card-glow {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.card-glow:hover {
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.08),
                0 4px 30px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Navbar ── */
#navbar {
    background: rgba(26, 10, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 77, 147, 0.15);
    transition: background 0.4s ease, border-color 0.4s ease;
}

#navbar.scrolled {
    background: rgba(26, 10, 46, 0.92);
    border-bottom-color: rgba(245, 158, 11, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #fbbf24;
}

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

.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #f59e0b;
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::after {
    width: 80%;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Staggered delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
    .ambience-orb { animation: none; }
    .card-glow { transition: none; }
    .nav-link::after { transition: none; }
}

/* ── Gold shimmer on hero CTA ── */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ── Selection ── */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #f5f0f7;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0a2e;
}
::-webkit-scrollbar-thumb {
    background: #4a224c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #753878;
}

/* ── Focus Styles ── */
a:focus-visible, button:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}
