/* Custom styles for Lifestar Ambulance */

:root {
    --terra-500: #e05c28;
    --terra-600: #c94516;
    --cream: #FAF7F2;
    --darkbrown: #2C2420;
    --warmgray: #6B6560;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Selection color */
::selection {
    background-color: rgba(224, 92, 40, 0.2);
    color: var(--darkbrown);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: #c4b5a8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--warmgray);
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--terra-500);
    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;
        scroll-behavior: auto !important;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Scroll reveal animations — progressive enhancement, JS-driven */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal.delay-100 { transition-delay: 0.1s; }
    .scroll-reveal.delay-200 { transition-delay: 0.2s; }
    .scroll-reveal.delay-300 { transition-delay: 0.3s; }
    .scroll-reveal.delay-400 { transition-delay: 0.4s; }
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(250, 247, 242, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06);
}

/* Hero text rendering */
.font-serif {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Button hover states */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Form focus states */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(224, 92, 40, 0.12);
}

/* Print styles */
@media print {
    .no-print { display: none; }
    body { color: #000; background: #fff; }
    a { color: #000; }
}
