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

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

body {
    margin: 0;
}

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Hero Animations === */
@media (prefers-reduced-motion: no-preference) {
    .hero-shape {
        animation: float 6s ease-in-out infinite;
    }
    .shape-circle-1 { animation-delay: 0s; }
    .shape-circle-2 { animation-delay: -2s; }
    .shape-triangle { animation-delay: -1s; animation-duration: 8s; }
    .shape-square { animation-delay: -3s; animation-duration: 7s; }
    .shape-dot { animation-delay: -0.5s; animation-duration: 5s; }
    .shape-ring { animation-delay: -4s; animation-duration: 12s; }
    .shape-ring2 { animation-delay: -2s; animation-duration: 10s; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

.shape-triangle {
    animation-name: floatTriangle;
}
@keyframes floatTriangle {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(18deg); }
}

.shape-square {
    animation-name: floatSquare;
}
@keyframes floatSquare {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(10px, -15px) rotate(55deg); }
}

.shape-ring {
    animation-name: pulseRing;
}
@keyframes pulseRing {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.8; }
}

.shape-ring2 {
    animation-name: pulseRing2;
}
@keyframes pulseRing2 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.6; }
}

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

#navbar.scrolled {
    background: rgba(45, 4, 21, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(147, 51, 234, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2d0415;
}
::-webkit-scrollbar-thumb {
    background: #831443;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9d174d;
}

/* === Selection === */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* === Focus === */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* === Link underlines on hover === */
a:not(.bg-amber-500):not(.bg-plum-950):not([class*="bg-"]):hover {
    text-decoration-thickness: 1px;
}

/* === Smooth image loading === */
img {
    display: block;
    max-width: 100%;
}

/* === Prevent layout shift === */
iframe {
    max-width: 100%;
}
