/* =========================================
   1. CORE TYPOGRAPHY & RESET
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    color: #f8fafc; /* Slate-50 default text */
    background-color: #0f172a; /* Slate-900 background base */
    margin: 0;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #ea580c; }

/* =========================================
   2. GLOBAL LAYOUT & UTILITIES
   ========================================= */

/* Grid Background Effect - Fixed Position */
.grid-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(#475569 1px, transparent 1px),
        linear-gradient(90deg, #475569 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.05; /* Unified opacity for consistency */
    z-index: -1;
    pointer-events: none;
}

/* Hover Utility */
.group:hover .group-hover\:rotate-12 { transform: rotate(12deg); }

/* =========================================
   3. SHARED COMPONENTS (CARDS & FORMS)
   ========================================= */

/* Quest Cards (Services/Home) */
.quest-card {
    transition: all 0.3s ease;
}
.quest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5), 0 0 20px rgba(234, 88, 12, 0.15);
}

/* Zone Cards (Service Areas) */
.zone-card {
    transition: all 0.3s ease;
}
.zone-card:hover {
    transform: translateX(10px);
    border-color: #ea580c;
    box-shadow: -5px 5px 20px rgba(0,0,0,0.5);
}

/* Global Form Elements (Estimator/Contact) */
select, input[type="number"], input[type="text"], input[type="tel"], textarea {
    background-color: #0f172a; /* Slate 900 */
    border-color: #334155; /* Slate 700 */
    color: white;
}
select:focus, input:focus, textarea:focus {
    border-color: #ea580c; /* Orange 600 */
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

/* =========================================
   4. PAGE SPECIFIC: FAQ
   ========================================= */

/* Accordion Reset */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Icon Rotation */
.icon-rotate { transition: transform 0.3s ease; }
details[open] .icon-rotate { transform: rotate(180deg); }

/* Accordion Animation */
details[open] summary ~ * { animation: slideDown 0.3s ease-in-out; }

/* Filter Buttons */
.filter-btn.active {
    background-color: #ea580c;
    color: white;
    border-color: #9a3412;
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.4);
}

/* =========================================
   5. PAGE SPECIFIC: ESTIMATOR
   ========================================= */
.bar-segment { transition: width 1s ease-in-out; }

.spinner {
    width: 40px; height: 40px;
    border: 4px solid #334155;
    border-top: 4px solid #ea580c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

#results, #contactArea { animation: slideUp 0.5s ease-out; }

/* =========================================
   6. PAGE SPECIFIC: ABOUT
   ========================================= */

/* Scanline Effect */
.scanline {
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
}

/* Skill Bars */
.skill-fill { animation: fillBar 1.5s ease-out forwards; }

/* =========================================
   7. ANIMATIONS KEYFRAMES
   ========================================= */

/* Slide Down (FAQ) */
@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Slide Up (Estimator Results) */
@keyframes slideUp { 
    from { transform: translateY(20px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* Spin (Loader) */
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* Pulse Green (Home Text) */
@keyframes pulse-green {
    0%, 100% { color: #4ade80; text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
    50% { color: #22c55e; text-shadow: 0 0 20px rgba(34, 197, 94, 0.8); }
}
.status-ready { animation: pulse-green 2s infinite; }

/* Pulse Dot (Service Areas) */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Fill Bar (About Skills) */
@keyframes fillBar { 
    from { width: 0; } 
    to { width: var(--target-width); } 
}

/* Updated Services Page */
.zone-tag {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    background-color: #1e293b; /* slate-800 */
    color: #94a3b8; /* slate-400 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}
.zone-tag:hover {
    color: #fb923c; /* orange-400 */
    border-color: #f97316; /* orange-500 */
    background-color: #0f172a; /* slate-900 */
    transform: translateY(-1px);
}

.zone-link {
    padding: 0.25rem 0.5rem;
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 4px;
    color: #fb923c; /* orange-400 default */
    transition: all 0.2s;
    text-align: center;
}
.zone-link:hover {
    border-color: #f97316; /* orange-500 */
    background-color: #0f172a; /* slate-900 */
    color: #fff;
    transform: translateY(-1px);
}