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

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

body {
    overflow-x: hidden;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-reveal-delay="100ms"] { transition-delay: 100ms; }
.reveal[data-reveal-delay="200ms"] { transition-delay: 200ms; }
.reveal[data-reveal-delay="300ms"] { transition-delay: 300ms; }

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

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-orb {
        animation: float 8s ease-in-out infinite;
    }
    
    .orb-1 { animation-delay: 0s; }
    .orb-2 { animation-delay: -2.5s; }
    .orb-3 { animation-delay: -5s; }
    
    .hero-dot {
        animation: drift 6s ease-in-out infinite;
    }
    
    .dot-1 { animation-delay: 0s; }
    .dot-2 { animation-delay: -1.5s; }
    .dot-3 { animation-delay: -3s; }
    .dot-4 { animation-delay: -4.5s; }
    
    .scroll-line {
        animation: scrollPulse 2s ease-in-out infinite;
    }
}

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

@keyframes drift {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(15px, -20px); opacity: 0.8; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ===== Navbar ===== */
.nav-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: rgb(88, 58, 101); /* plum-800 */
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 79, 138, 0.08);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 1;
}

/* ===== Selection ===== */
::selection {
    background: rgb(232, 160, 219); /* plum-300 */
    color: rgb(61, 37, 66); /* plum-900 */
}

/* ===== Focus Styles ===== */
:focus-visible {
    outline: 2px solid rgb(168, 85, 168); /* plum-500 */
    outline-offset: 2px;
}

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgb(249, 240, 251) inset !important;
    -webkit-text-fill-color: rgb(61, 37, 66) !important;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(249, 240, 251); /* plum-50 */
}

::-webkit-scrollbar-thumb {
    background: rgb(215, 160, 219); /* plum-300 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(168, 85, 168); /* plum-500 */
}
