html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 4rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero fade-in animation on page load */
.hero-fade {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1s ease-out 0.3s forwards;
}

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

/* Smooth accordion animation */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .hero-fade {
        transition: none;
        animation: none;
        opacity: 1;
        transform: none;
    }
    .accordion-content {
        transition: none;
    }
}

/* iOS Safari doesn't support background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
    .bg-fixed {
        background-attachment: scroll !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .bg-fixed {
        background-attachment: scroll !important;
    }
}
