/* ========================================
   WATERWELLNC PREMIUM TRUST DESIGN SYSTEM
   Civil Engineering Aesthetic
   ======================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap');

/* ========================================
   CSS VARIABLES - COLOR PALETTE
   ======================================== */
:root {
    /* Primary Colors */
    --navy: #183153;
    --navy-dark: #12233d;
    --navy-light: #234a7a;
    
    /* Secondary Colors */
    --forest: #355E3B;
    --forest-dark: #2E4F34;
    --forest-light: #4a7a52;
    
    /* Accent Colors */
    --copper: #B97A3D;
    --copper-dark: #9a6532;
    
    /* Background Colors */
    --stone: #F7F5F2;
    --white: #FFFFFF;
    
    /* Text Colors */
    --text-body: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    
    /* Border Colors */
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    /* Status Colors */
    --error: #DC2626;
    --success: #059669;
    --warning: #D97706;
    
    /* Typography */
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing Scale */
    --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: 5rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-base: 300ms ease;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    letter-spacing: 0.01em;
}

h1 {
    font-size: 2.75rem;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 2rem;
    letter-spacing: 0.015em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--forest);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-white {
    background: var(--white);
}

.section-stone {
    background: var(--stone);
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: -0.25rem;
}

.logo span {
    color: var(--forest);
}

nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

nav a {
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

nav a:hover {
    color: var(--forest);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--navy);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--forest);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--forest-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.1rem;
}

.btn-white {
    background: var(--white);
    color: var(--forest);
}

.btn-white:hover {
    background: var(--stone);
    color: var(--forest-dark);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    padding: var(--space-4xl) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/images/hero-bg-v2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(24, 49, 83, 0.72);
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.25rem;
    color: var(--white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

.hero .hero-subheadline {
    font-size: 1.35rem;
    margin-bottom: var(--space-xl);
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

.hero .hero-trust-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 500;
}

.hero-trust-icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

.hero .hero-cta-group {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-secondary {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.8);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

@media (max-width: 768px) {
    .hero {
        min-height: 85vh;
        padding: var(--space-3xl) var(--space-md);
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero .hero-subheadline {
        font-size: 1.1rem;
    }
    
    .hero .hero-trust-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
        text-align: left;
    }
    
    .hero-trust-item {
        font-size: 0.85rem;
    }
    
    .hero .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .hero .btn-secondary {
        margin-left: 0;
    }
}

/* ========================================
   TRUST BAR
   ======================================== */
.trust-bar {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--space-lg) 0;
    position: relative;
    z-index: 2;
}

.trust-bar .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.9;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features {
    background: var(--stone);
}

.features-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 720px;
    margin: -2rem auto 3rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.feature {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--stone);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--forest);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature h3 {
    margin-bottom: var(--space-xs);
    color: var(--navy);
    font-size: 1.15rem;
}

.feature-free-label {
    color: var(--forest);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.feature p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
    flex-grow: 1;
}

.features-trust-note {
    text-align: center;
    margin-top: 3rem;
}

.features-trust-note span {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--white);
}

.features-trust-note span strong {
    color: var(--forest);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works {
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: var(--space-3xl);
    color: var(--navy);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-2xl);
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--navy);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto var(--space-lg);
    font-family: var(--font-heading);
}

.step h3 {
    margin-bottom: var(--space-sm);
    color: var(--navy);
    font-size: 1.25rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========================================
   AUTHORITY BAND
   ======================================== */
.authority-band {
    background: var(--navy);
    color: var(--white);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.authority-band h2 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
}

.authority-band .tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: var(--space-2xl);
}

.authority-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.authority-item {
    padding: var(--space-lg);
}

.authority-item-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.authority-item-icon svg {
    width: 24px;
    height: 24px;
    color: var(--copper);
}

.authority-item h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    font-family: var(--font-body);
    font-weight: 600;
}

.authority-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background: var(--forest);
    color: var(--white);
    padding: var(--space-4xl) 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.25rem;
    margin-bottom: var(--space-md);
}

.cta-section p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

footer a {
    color: var(--copper);
    text-decoration: none;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--white);
}

.footer-links {
    margin-top: var(--space-md);
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

/* ========================================
   FORMS
   ======================================== */
.form-section {
    padding: var(--space-3xl) 0;
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-lg);
}

label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-body);
    font-size: 0.95rem;
}

label .required {
    color: var(--error);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.1);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--forest);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* ========================================
   REPORT CARD COMPONENT
   ======================================== */
.report-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.report-card-header {
    background: var(--navy);
    color: var(--white);
    padding: var(--space-xl) var(--space-2xl);
}

.report-card-header h2 {
    color: var(--white);
    margin-bottom: var(--space-xs);
    font-size: 1.5rem;
}

.report-card-header p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.report-card-body {
    padding: var(--space-2xl);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-navy { color: var(--navy); }
.text-forest { color: var(--forest); }
.text-copper { color: var(--copper); }
.text-muted { color: var(--text-muted); }

.bg-white { background: var(--white); }
.bg-stone { background: var(--stone); }
.bg-navy { background: var(--navy); }
.bg-forest { background: var(--forest); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn var(--transition-base) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-base) forwards;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .trust-bar .container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .authority-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .hero {
        min-height: 500px;
        padding: var(--space-3xl) 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero .btn-secondary {
        margin-left: 0;
        margin-top: var(--space-md);
        display: block;
        width: 100%;
    }
    
    .section {
        padding: var(--space-3xl) 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .step {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .trust-bar .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .trust-item {
        justify-content: center;
    }
    
    .authority-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--forest);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}