/* ========== 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(212, 160, 23, 0.3);
    color: #faf0fb;
}

img {
    display: block;
    max-width: 100%;
}

/* ========== HERO GRADIENT ========== */
.hero-gradient {
    background: radial-gradient(ellipse at 30% 20%, #621d47 0%, transparent 55%),
                radial-gradient(ellipse at 70% 80%, #4A1942 0%, transparent 55%),
                radial-gradient(ellipse at 50% 50%, #2D0E28 0%, #1a0718 100%);
}

/* ========== HERO ORBS ========== */
.hero-orb-1 {
    animation: orbFloat1 8s ease-in-out infinite;
}

.hero-orb-2 {
    animation: orbFloat2 10s ease-in-out infinite;
}

.hero-orb-3 {
    animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.05); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.08); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 15px) scale(1.03); }
}

/* ========== GRAIN TEXTURE ========== */
.hero-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

/* ========== BOUNCE SLOW ========== */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* ========== NAVBAR ========== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(45, 14, 40, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(212, 160, 23, 0.08);
}

#navbar.scrolled .menu-line {
    background: #ffd98a;
}

/* ========== MOBILE MENU ========== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ========== MENU TABS ========== */
.menu-tab {
    background: transparent;
    color: #db8dc4;
    border: 1px solid transparent;
}

.menu-tab:hover {
    color: #ffd98a;
    border-color: rgba(212, 160, 23, 0.3);
}

.menu-tab.active {
    background: rgba(212, 160, 23, 0.12);
    color: #ffd98a;
    border-color: rgba(212, 160, 23, 0.4);
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.fade-up {
    opacity: 0;
    transform: translateY(32px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.fade-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ffd98a;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========== MOBILE MENU BUTTON ========== */
.menu-line {
    transition: width 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menuBtn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 24px;
    transform: translateY(-5px) rotate(-45deg);
}
