/* Base styles and custom overrides */
html {
    scroll-behavior: smooth;
}

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

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 245, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 74, 140, 0.08);
}

.nav-text {
    color: #4a2a52;
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #4a2a52;
}

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

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(123, 74, 140, 0.08);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B4A8C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle gradient text for accent elements */
.gradient-accent {
    background: linear-gradient(135deg, #7B4A8C, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Selection color */
::selection {
    background: rgba(123, 74, 140, 0.2);
    color: #4a2a52;
}

/* Smooth focus outlines */
:focus-visible {
    outline: 2px solid #7B4A8C;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #ece4f0 0%, #fef3c7 100%);
}

/* Prevent layout shift on images */
img[width][height] {
    content-visibility: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
