/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Skip link visible on focus */
.skip-link:focus {
    z-index: 9999;
}

/* Mobile menu animations */
.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 5rem;
}

/* Scroll reveal — progressive enhancement, only when JS is enabled */
.js-enabled .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Navbar background on scroll */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Custom selection color */
::selection {
    background: #FFD6CC;
    color: #374151;
}

/* Smooth focus outlines */
:focus-visible {
    outline: 2px solid #FF6B57;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 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;
    }
}
