/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal base - content always visible */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(126, 34, 207, 0.08);
}

.nav-scrolled .nav-link {
    color: rgb(129, 56, 159) !important;
}

.nav-scrolled .font-serif {
    color: rgb(90, 20, 100) !important;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: #fdf4ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d946ef, #f59e0b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #c026d3, #d97706);
}

/* Selection color */
::selection {
    background: rgba(217, 70, 239, 0.2);
    color: #581c87;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Ensure all text has proper contrast */
.text-plum-900 { color: rgb(74, 4, 78); }
.text-plum-800 { color: rgb(129, 25, 143); }
.text-plum-700 { color: rgb(162, 28, 175); }
.text-plum-600 { color: rgb(192, 38, 211); }

/* Subtle pattern overlay for sections */
.section-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(126, 34, 207, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}
