/* Scroll reveal base — content visible by default, JS adds animation */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reduced motion: no animations at all */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .scroll-reveal.animated {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* When JS is enabled and motion is preferred, add the hidden initial state */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-animate="true"] {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.animated[data-animate="true"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu animations */
#mobile-menu.open {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Hamburger animation */
#menu-toggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle.active #bar2 {
    opacity: 0;
}
#menu-toggle.active #bar3 {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Smooth focus for accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid #9a2525;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #f9d8cc;
    color: #3d2b1f;
}
