*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background: #E8A838;
    color: #2a1232;
}

/* Mobile menu animation */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Scroll reveal base - content always visible by default */
.reveal {
    /* Default state: fully visible */
    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);
}

/* Only apply hidden state on prefers-reduced-motion: no-preference for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header scroll state */
.header-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(74, 35, 90, 0.08);
}

.header-scrolled .font-serif {
    color: #4A235A !important;
}

.header-scrolled .text-plum-600 {
    color: #8b328b !important;
}

/* Mobile menu active state */
.mobile-menu-active #mobileMenu {
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu-active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-active #bar2 {
    opacity: 0;
}

.mobile-menu-active #bar3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Floating stat cards - desktop only */
@media (min-width: 1024px) {
    .stat-card {
        animation: float 6s ease-in-out infinite;
    }
    
    .stat-card:nth-child(2) {
        animation-delay: -2s;
    }
    
    .stat-card:nth-child(3) {
        animation-delay: -4s;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

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

::-webkit-scrollbar-thumb {
    background: #d999dd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a844a8;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%234A235A' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle line animations */
.line-accent {
    position: relative;
    display: inline-block;
}

.line-accent::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #E8A838, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.line-accent:hover::after {
    transform: scaleX(1);
}

/* Image hover effects */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-zoom:hover img {
    transform: scale(1.05);
}

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

/* Print styles */
@media print {
    header, footer, .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .fixed {
        position: static !important;
    }
}
