/* Camp Sycamore Swim - Bold Design System */

html {
    scroll-behavior: smooth;
}

/* Animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-up-delayed {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.animate-fade-in-up-delayed-2 {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.animate-fade-in-up-delayed-3 {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Remove default details marker */
details summary::-webkit-details-marker {
    display: none;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth hover transitions */
.hover\:scale-105,
.group-hover\:scale-105 {
    will-change: transform;
}

/* Minimum tap targets for mobile - ensures 44x44px touch areas */
@media (pointer: coarse) {
    a, button, summary {
        min-height: 44px;
    }
    
    /* Inline links don't need large tap targets */
    p a, span a, .text-link {
        min-height: auto;
    }
    
    /* FAQ summary items need larger touch area */
    details summary {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }
}

/* Reduce motion for users who prefer it */
@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;
    }
}

/* Better touch feedback on mobile */
@media (hover: none) {
    .hover\:scale-105:active,
    .group:active .group-hover\:scale-105 {
        transform: scale(1.02);
    }
}

/* Prevent overflow */
body {
    overflow-x: hidden;
}

/* Navigation scroll state */
#nav.scrolled {
    background: rgba(254, 252, 248, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(26, 34, 52, 0.05);
}

/* Image loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    background-size: 200% 100%;
}

/* Selection color */
::selection {
    background: #0ea5e9;
    color: white;
}

/* Smooth transitions for interactive elements */
a, button {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* FAQ accordion content animation */
details[open] > p {
    animation: fadeInUp 0.3s ease-out;
}

/* Mobile landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .min-h-screen {
        min-height: auto;
        padding-top: 5rem;
        padding-bottom: 3rem;
    }
}

/* Ensure text doesn't get too small on very small devices */
@media (max-width: 359px) {
    html {
        font-size: 14px;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}
