/* ============================================
   Mt. Pleasant Fire Dept — Custom Styles
   ============================================ */

/* Base reset & smooth scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(185, 43, 43, 0.06) 0%, transparent 70%);
    top: 10%;
    right: -100px;
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.08) 0%, transparent 70%);
    bottom: 20%;
    left: -80px;
    border-radius: 50%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(185, 43, 43, 0.04);
    border: 2px solid rgba(185, 43, 43, 0.08);
    top: 40%;
    left: 5%;
    border-radius: 24px;
    transform: rotate(45deg);
    animation: float-slow 18s ease-in-out infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(255, 107, 107, 0.05);
    top: 60%;
    right: 8%;
    animation: float-slow 22s ease-in-out infinite reverse;
}

.geo-dots-1 {
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(185, 43, 43, 0.15) 1px, transparent 1px);
    background-size: 10px 10px;
    top: 25%;
    left: 3%;
    border-radius: 50%;
    animation: float-slow 12s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* ============================================
   Floating Stat Cards
   ============================================ */
.floating-card {
    position: absolute;
    z-index: 20;
}

.card-stats-1 {
    top: -20px;
    left: -40px;
    animation: float-card-1 6s ease-in-out infinite;
}

.card-stats-2 {
    top: 60px;
    left: -30px;
    animation: float-card-2 7s ease-in-out infinite;
}

.card-stats-3 {
    animation: float-card-3 5s ease-in-out infinite;
}

@keyframes float-card-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-card-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes float-card-3 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.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);
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .floating-card {
        animation: none;
    }
    
    .geo-shape {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Navbar
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #b92b2b;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Navbar scroll state */
.navbar.scrolled {
    background: rgba(255, 251, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(185, 43, 43, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
}

#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   Button Focus States
   ============================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(185, 43, 43, 0.5);
    outline-offset: 2px;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(185, 43, 43, 0.2);
    color: #7f1c1c;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .card-stats-1,
    .card-stats-2,
    .card-stats-3 {
        display: none;
    }
    
    .geo-shape {
        display: none;
    }
    
    .geo-circle-1,
    .geo-circle-2 {
        display: block;
        opacity: 0.5;
    }
}

/* ============================================
   Form Validation Styles
   ============================================ */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #16a34a;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .floating-card,
    .geo-shape,
    .scroll-reveal {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    nav, footer {
        display: none;
    }
}
