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

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

body {
    margin: 0;
    background-color: #240b2c;
    color: #ebe0f0;
}

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

::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #f5f0f7;
}

/* ── Hero Background ─────────────────────────────────── */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, #7d4f8f 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 60%, #4a1a5c 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, #b8860b 0%, transparent 60%),
        linear-gradient(180deg, #3d1549 0%, #240b2c 100%);
    z-index: 0;
}

/* ── Hero Reveals ────────────────────────────────────── */
.hero-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-visible .hero-reveal:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.hero-visible .hero-reveal:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.hero-visible .hero-reveal:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.hero-visible .hero-reveal:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }

/* ── Scroll Reveals ──────────────────────────────────── */
.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-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navbar ──────────────────────────────────────────── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(36, 11, 44, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(125, 79, 143, 0.2);
}

/* ── Mobile Menu ─────────────────────────────────────── */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a017;
    transition: width 0.3s ease;
}

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

/* ── Menu List Items ─────────────────────────────────── */
#menu ul li:hover {
    background: rgba(125, 79, 143, 0.06);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: all 0.2s ease;
}

/* ── Image Hover ─────────────────────────────────────── */
.group img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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