/* Custom styles for San Jon Fire Department website */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Base typography */
body {
    font-family: 'Crimson Pro', 'Lora', Georgia, serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background: rgba(123, 45, 142, 0.35);
    color: #f5f0f7;
}

::-moz-selection {
    background: rgba(123, 45, 142, 0.35);
    color: #f5f0f7;
}

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

::-webkit-scrollbar-track {
    background: #1a0a1f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7b2d8e, #4d1b55);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a3689e, #63226e);
}

/* Reveal animations - only when reduced motion is not preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Ensure content is visible by default for accessibility */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Hero background */
.hero-bg {
    background-image: url('https://images.pexels.com/photos/7257927/pexels-photo-7257927.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #d4940f 0%, #b8860b 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ecbe4e 0%, #d4940f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 148, 15, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    border: 2px solid rgba(212, 148, 15, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: rgba(212, 148, 15, 0.15);
    border-color: #d4940f;
    transform: translateY(-2px);
}

/* Service card hover effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 148, 15, 0.08);
}

/* Image hover zoom */
.img-placeholder {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu */
.mobile-menu {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu.closed {
    transform: translateX(100%);
}

/* Mobile links */
.mobile-link {
    display: block;
    transition: all 0.3s ease;
}

.mobile-link:hover {
    padding-left: 8px;
}

/* Form inputs */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 148, 15, 0.15);
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3689e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Nav scroll state */
.nav-scrolled {
    background: rgba(37, 12, 43, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Subtle grain texture overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Amber divider */
.amber-divider {
    background: linear-gradient(90deg, transparent, #d4940f, transparent);
    height: 1px;
}

/* Stat cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Pulse animation for status indicator */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
}

/* Print styles */
@media print {
    .hero-bg, .reveal, .mobile-menu, .grain-overlay {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
