/* === BASE === */
*, *::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, 168, 83, 0.3);
    color: #f5f0f7;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0610;
}
::-webkit-scrollbar-thumb {
    background: #4f2b57;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4A853;
}

/* === REVEAL ANIMATIONS (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

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

/* === HEADER SCROLLED STATE === */
#site-header.scrolled {
    background: rgba(13, 6, 16, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 25, 66, 0.3);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

#site-header.scrolled .line1 {
    transform: translateY(5px) rotate(45deg);
}
#site-header.scrolled .line2 {
    opacity: 0;
}
#site-header.scrolled .line3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 20px;
    margin-left: 0;
    margin-right: 0;
}

/* === MOBILE MENU === */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* === GOLDEN DIVIDER === */
.golden-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.4), transparent);
}

/* === CARD GLOW === */
.card-glow:hover {
    box-shadow: 0 0 60px rgba(212, 168, 83, 0.08), inset 0 0 60px rgba(212, 168, 83, 0.02);
}

/* === BUTTON RIPPLE === */
.btn-gold {
    position: relative;
    overflow: hidden;
}
.btn-gold::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn-gold:active::after {
    width: 300px;
    height: 300px;
}

/* === SELECTION HIGHLIGHT === */
mark {
    background: rgba(212, 168, 83, 0.2);
    color: inherit;
    padding: 0 4px;
    border-radius: 2px;
}

/* === FOCUS VISIBLE === */
:focus-visible {
    outline: 2px solid rgba(212, 168, 83, 0.6);
    outline-offset: 2px;
}

/* === SUBTLE NOISE OVERLAY === */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    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-repeat: repeat;
    background-size: 256px 256px;
}
