/* ============================================
   PRACTICAL PLUMBING - CRITICAL CSS
   Above-the-fold styles for fast initial render
   ============================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --primary: #1a1a1a;
    --primary-dark: #000000;
    --primary-light: #333333;
    --secondary: #4169E1;
    --secondary-light: #6B8DE8;
    --secondary-dark: #3355B8;
    --accent: #4169E1;
    
    /* Neutral Colors */
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --muted: #e2e8f0;
    --border: #cbd5e1;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Typography */
    --font-display: 'Oswald', 'Arial Black', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: var(--space-sm) 0;
    position: relative;
    z-index: 100;
}
.announcement-banner.hidden { display: none; }
.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    text-align: center;
}
.announcement-close {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: white;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}
.announcement-close:hover { opacity: 1; }

/* Top Bar */
.top-bar {
    background: var(--primary);
    color: white;
    padding: var(--space-sm) 0;
    font-size: 0.8125rem;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.license-info { opacity: 0.8; }
.top-contact {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.top-phone {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--secondary);
    font-weight: 600;
    transition: color var(--transition-fast);
}
.top-phone:hover { color: var(--secondary-light); }
.hours-badge {
    background: rgba(255,255,255,0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* Header */
.main-header {
    background: var(--bg);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}
.logo-image {
    height: 50px;
    width: auto;
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}
.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--text);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}
.nav-link:hover { color: var(--secondary); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width var(--transition-base);
}
.nav-link:hover::after { width: 100%; }

/* Nav CTA */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--secondary);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-fast);
}
.nav-cta:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
}
.hamburger, .hamburger::before, .hamburger::after {
    width: 24px;
    height: 2px;
    background: var(--text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all var(--transition-fast);
}
.hamburger { top: 50%; transform: translate(-50%, -50%); }
.hamburger::before { content: ''; top: -8px; }
.hamburger::after { content: ''; top: 8px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-lg { padding: var(--space-md) var(--space-xl); font-size: 1.0625rem; }
.btn-primary {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}
.btn-primary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.3);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Hero Section */
.hero {
    position: relative;
    padding: var(--space-4xl) 0 calc(var(--space-4xl) + 120px);
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(0,184,230,0.15) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255,255,255,0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero-badge svg { color: var(--secondary); }

/* FIXED: Hero title more visible */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: #e0e7ef; /* Brighter color for visibility */
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-title .highlight { color: var(--secondary); }

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9); /* Increased opacity */
    margin-bottom: var(--space-xl);
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
}
.hero-feature svg { color: var(--secondary); }
.hero-ctas { 
    display: flex; 
    flex-wrap: wrap; 
    gap: var(--space-md);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* Wave Transition */
.wave-divider {
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}
.wave-divider.top {
    top: 0;
    transform: rotate(180deg);
}
.wave-divider.bottom {
    bottom: 0;
}
.wave-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Sections with waves need relative positioning */
.trust-bar,
.services-section,
.about-section,
.why-section,
.testimonials-section,
.service-areas-section,
.quality-parts-section,
.faqs-section,
.contact-section {
    position: relative;
}

/* Brand Logos Grid - Critical styles (sizing in main.css) */
.quality-parts-section {
    padding: var(--space-4xl) 0;
    padding-bottom: calc(var(--space-4xl) + 120px);
    background: var(--bg);
}
.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl) var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
}
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    line-height: 0;
}
.hero-wave svg { width: 100%; height: 100%; }

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes drip {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* Plumbing Theme Animations */
@keyframes waterFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bubbleRise {
    0% { 
        transform: translateY(100%) scale(0.5);
        opacity: 0;
    }
    50% { opacity: 0.8; }
    100% { 
        transform: translateY(-100%) scale(1);
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Animation Utility Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.delay-100 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; animation-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; animation-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; animation-delay: 0.5s; }

/* Mobile Responsive - Critical */
@media (max-width: 1023px) {
    .nav-menu, .nav-cta { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--bg);
        padding: var(--space-4xl) var(--space-xl);
        box-shadow: var(--shadow-xl);
        z-index: 1001;
    }
}
@media (max-width: 639px) {
    .top-bar-content { justify-content: center; }
    .license-info { display: none; }
    .hero-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
}
