/**
 * Visa Help (App) Landing Page Styles
 * 
 * Material Design 3 (Material You) compliant styling with responsive design.
 * Colors and branding extracted from lib/themes/app_theme.dart
 * 
 * M3 Design Principles Applied:
 * - Typography: Roboto font with M3 type scale
 * - Spacing: 4dp baseline grid (4, 8, 12, 16, 24, 32, 48)
 * - Border Radii: XS(4), S(8), M(12), L(16), XL(28), Full(100)
 * - Touch targets: Minimum 48dp for interactive elements
 * - Color: Using M3 tonal palette system
 * 
 * @see https://m3.material.io/develop/flutter
 * @see https://github.com/material-components
 */

/* ============================================================================
 * CSS RESET AND BASE STYLES
 * ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* M3 CSS Custom Properties (Design Tokens) */
:root {
    /* Primary colors from AppTheme - Deep Navy Brand */
    --md-sys-color-primary: #0A2540;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #D6E3F7;
    --md-sys-color-on-primary-container: #0A2540;
    
    /* Secondary colors - Accent Blue */
    --md-sys-color-secondary: #2563EB;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #DBE4FF;
    --md-sys-color-on-secondary-container: #001A41;
    
    /* Tertiary colors - Sky Blue */
    --md-sys-color-tertiary: #3B82F6;
    --md-sys-color-on-tertiary: #FFFFFF;
    
    /* Surface colors - M3 surface container hierarchy */
    --md-sys-color-surface: #FAFBFC;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F8F9FA;
    --md-sys-color-surface-container: #F3F4F6;
    --md-sys-color-surface-container-high: #EEEFF1;
    --md-sys-color-surface-container-highest: #E8E9EB;
    --md-sys-color-on-surface: #0A2540;
    --md-sys-color-on-surface-variant: #64748B;
    
    /* Outline colors */
    --md-sys-color-outline: #74777F;
    --md-sys-color-outline-variant: #C4C6D0;
    
    /* Error colors */
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    
    /* Success color (custom semantic) */
    --md-sys-color-success: #10B981;
    
    /* Legacy aliases for backward compatibility */
    --primary-navy: var(--md-sys-color-primary);
    --light-navy: #1E3A5F;
    --accent-blue: var(--md-sys-color-secondary);
    --sky-blue: var(--md-sys-color-tertiary);
    --background: var(--md-sys-color-surface);
    --card-background: var(--md-sys-color-surface-container-low);
    --surface-light: var(--md-sys-color-surface-container);
    --text-primary: var(--md-sys-color-on-surface);
    --text-secondary: var(--md-sys-color-on-surface-variant);
    --text-hint: #94A3B8;
    --text-on-primary: var(--md-sys-color-on-primary);
    --success: var(--md-sys-color-success);
    --warning: #F59E0B;
    --error: var(--md-sys-color-error);
    
    /* Liquid Glass effect colors (brand-specific) */
    --liquid-glass-bg: rgba(10, 37, 64, 0.04);
    --liquid-glass-border: rgba(10, 37, 64, 0.1);
    --liquid-glass-shadow: rgba(0, 0, 0, 0.06);
    
    /* M3 Shape constants - Border radii */
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 100px;
    
    /* M3 Spacing scale (4dp baseline grid) */
    --md-sys-spacing-4: 4px;
    --md-sys-spacing-8: 8px;
    --md-sys-spacing-12: 12px;
    --md-sys-spacing-16: 16px;
    --md-sys-spacing-20: 20px;
    --md-sys-spacing-24: 24px;
    --md-sys-spacing-32: 32px;
    --md-sys-spacing-48: 48px;
    --md-sys-spacing-64: 64px;
    
    /* M3 Typography - Font family */
    --md-sys-typescale-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* M3 Elevation (tonal and shadow) */
    --md-sys-elevation-level0: none;
    --md-sys-elevation-level1: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1);
    --md-sys-elevation-level2: 0 2px 4px rgba(0,0,0,0.05), 0 3px 8px rgba(0,0,0,0.1);
    --md-sys-elevation-level3: 0 4px 8px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.1);
}

/* ============================================================================
 * BASE TYPOGRAPHY - M3 Type Scale
 * ============================================================================ */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--md-sys-typescale-font-family);
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* M3 Type Scale Classes */
.display-large {
    font-size: 3.5625rem; /* 57px */
    font-weight: 400;
    letter-spacing: -0.25px;
    line-height: 1.12;
}

.display-medium {
    font-size: 2.8125rem; /* 45px */
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.16;
}

.display-small {
    font-size: 2.25rem; /* 36px */
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.22;
}

.headline-large {
    font-size: 2rem; /* 32px */
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.headline-medium {
    font-size: 1.75rem; /* 28px */
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.29;
}

.headline-small {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.33;
}

.title-large {
    font-size: 1.375rem; /* 22px */
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.27;
}

.title-medium {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    letter-spacing: 0.15px;
    line-height: 1.5;
}

.title-small {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.43;
}

.body-large {
    font-size: 1rem; /* 16px */
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

.body-medium {
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    letter-spacing: 0.25px;
    line-height: 1.43;
}

.body-small {
    font-size: 0.75rem; /* 12px */
    font-weight: 400;
    letter-spacing: 0.4px;
    line-height: 1.33;
}

.label-large {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.43;
}

.label-medium {
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.33;
}

.label-small {
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.45;
}

/* ============================================================================
 * LAYOUT CONTAINER
 * ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--md-sys-spacing-24);
    width: 100%;
}

/* Responsive container padding */
@media (max-width: 599px) {
    .container {
        padding: 0 var(--md-sys-spacing-20);
        max-width: 100%;
    }
}

/* Extra padding for very small screens */
@media (max-width: 374px) {
    .container {
        padding: 0 var(--md-sys-spacing-16);
    }
}

/* ============================================================================
 * HERO SECTION - Full viewport height landing area
 * ============================================================================ */

.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg, 
        var(--md-sys-color-surface) 0%, 
        var(--md-sys-color-surface-container) 100%
    );
    padding: var(--md-sys-spacing-48) var(--md-sys-spacing-24);
    position: relative;
    overflow: hidden;
}

/* Animated background gradient effect */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle, 
        var(--liquid-glass-bg) 0%, 
        transparent 70%
    );
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

/* ============================================================================
 * LOGO AND BRANDING
 * ============================================================================ */

.logo-container {
    margin-bottom: var(--md-sys-spacing-32);
    display: inline-block;
}

.app-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-level3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    padding: 12px;
    border: none;
}

.app-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.15),
                0 4px 12px rgba(10, 37, 64, 0.1);
}

/* Mobile logo size adjustment */
@media (max-width: 599px) {
    .app-logo {
        width: 96px;
        height: 96px;
    }
    
    .logo-container {
        margin-bottom: var(--md-sys-spacing-24);
    }
}

/* ============================================================================
 * HERO TYPOGRAPHY
 * ============================================================================ */

.hero-title {
    font-size: 3.25rem; /* 52px */
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
    letter-spacing: -1px;
    margin-bottom: var(--md-sys-spacing-12);
    line-height: 1.1;
}

.hero-tagline {
    font-size: 1.625rem; /* 26px */
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin-bottom: var(--md-sys-spacing-24);
    line-height: 1.2;
    font-style: italic;
}

.hero-description {
    font-size: 1.0625rem; /* 17px */
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.7;
    margin-bottom: var(--md-sys-spacing-48);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 700;
}

/* Responsive hero typography */
@media (max-width: 839px) {
    .hero-title {
        font-size: 2.75rem; /* 44px */
        line-height: 1.1;
    }
    
    .hero-tagline {
        font-size: 1.5rem; /* 24px */
        margin-bottom: var(--md-sys-spacing-20);
    }
    
    .hero-description {
        font-size: 1.0625rem; /* 17px */
        line-height: 1.6;
    }
}

@media (max-width: 599px) {
    .hero {
        padding: var(--md-sys-spacing-24) var(--md-sys-spacing-16);
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .hero-title {
        font-size: 2.5rem; /* 40px */
        line-height: 1.1;
        margin-bottom: var(--md-sys-spacing-16);
    }
    
    .hero-tagline {
        font-size: 1.375rem; /* 22px */
        margin-bottom: var(--md-sys-spacing-20);
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem; /* 16px */
        line-height: 1.7;
        margin-bottom: var(--md-sys-spacing-32);
        padding: 0 var(--md-sys-spacing-8);
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 374px) {
    .hero-title {
        font-size: 2.25rem; /* 36px */
    }
    
    .hero-tagline {
        font-size: 1.25rem; /* 20px */
    }
    
    .hero-description {
        font-size: 0.9375rem; /* 15px */
        padding: 0;
    }
}

/* ============================================================================
 * BUTTONS - M3 Filled and Outlined Styles
 * ============================================================================ */

.cta-buttons {
    display: flex;
    gap: var(--md-sys-spacing-16);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--md-sys-spacing-48);
}

/* Base button styles - M3 compliant */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--md-sys-spacing-8);
    padding: var(--md-sys-spacing-12) var(--md-sys-spacing-24);
    font-size: 0.875rem; /* 14px - labelLarge */
    font-weight: 600;
    letter-spacing: 0.1px;
    border-radius: var(--md-sys-shape-corner-medium);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    min-height: 48px; /* M3 minimum touch target */
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

/* M3 state layer for hover/focus */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
    opacity: 0.08;
}

.btn:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.btn:active::before {
    opacity: 0.12;
}

.btn i {
    font-size: 1.125rem; /* 18px */
    position: relative;
    z-index: 1;
}

.btn span,
.btn:not(:has(span)) {
    position: relative;
    z-index: 1;
}

/* Primary filled button - M3 Filled Button */
.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-sys-elevation-level1);
}

.btn-primary:hover {
    box-shadow: var(--md-sys-elevation-level2);
    transform: translateY(-1px);
}

/* Secondary outlined button - M3 Outlined Button */
.btn-secondary {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.btn-secondary:hover {
    background-color: var(--liquid-glass-bg);
}

/* Responsive button layout */
@media (max-width: 599px) {
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--md-sys-spacing-16);
        margin-bottom: var(--md-sys-spacing-32);
        padding: 0 var(--md-sys-spacing-8);
    }
    
    .btn {
        width: 100%;
        max-width: none;
        margin: 0;
        font-size: 1rem; /* 16px - larger for mobile */
        padding: var(--md-sys-spacing-16) var(--md-sys-spacing-24);
        min-height: 56px; /* Larger touch target */
    }
    
    .btn i {
        font-size: 1.25rem; /* 20px - larger icon */
    }
}

/* ============================================================================
 * SOCIAL LINKS - M3 Icon Button Style
 * ============================================================================ */

.social-links {
    display: flex;
    gap: var(--md-sys-spacing-16);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;  /* M3 minimum touch target */
    height: 48px;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 1.5rem; /* 24px */
    position: relative;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--md-sys-color-primary);
    opacity: 0;
    border-radius: var(--md-sys-shape-corner-full);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover::before {
    opacity: 0.08;
}

.social-links a:hover {
    color: var(--md-sys-color-secondary);
    transform: translateY(-2px);
}

.social-links a:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

@media (max-width: 599px) {
    .social-links {
        gap: var(--md-sys-spacing-12);
        margin-top: var(--md-sys-spacing-16);
    }
    
    .social-links a {
        width: 48px; /* Keep minimum touch target */
        height: 48px;
        font-size: 1.375rem; /* 22px - larger icons */
    }
}

/* ============================================================================
 * SIGN UP SECTION WITH TABS
 * ============================================================================ */

.signup-section {
    padding: var(--md-sys-spacing-64) var(--md-sys-spacing-24);
    background: var(--md-sys-color-surface-container-lowest);
}

/* Tab Navigation - M3 Segmented Button Style */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--md-sys-spacing-48);
    flex-wrap: wrap;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: var(--md-sys-spacing-4);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--md-sys-spacing-8);
    padding: var(--md-sys-spacing-12) var(--md-sys-spacing-24);
    font-size: 0.875rem;
    font-weight: 600;
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    border: none;
    border-radius: var(--md-sys-shape-corner-extra-large);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-height: 48px;
}

.tab-btn i {
    font-size: 1.125rem;
}

.tab-btn:hover {
    background-color: var(--liquid-glass-bg);
    color: var(--md-sys-color-on-surface);
}

.tab-btn:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -2px;
}

.tab-btn.active {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* Tab Content Container */
.tab-content-wrapper {
    max-width: 560px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    background: var(--md-sys-color-surface-container-lowest);
    padding: var(--md-sys-spacing-32);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-level2);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.form-intro {
    text-align: center;
    margin-bottom: var(--md-sys-spacing-32);
}

.form-intro h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: var(--md-sys-spacing-12);
}

.form-intro p {
    font-size: 0.9375rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

.benefits-list-inline {
    margin-top: var(--md-sys-spacing-16);
    padding: var(--md-sys-spacing-16);
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
}

.benefits-list-inline strong {
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

/* Responsive tabs */
@media (max-width: 599px) {
    .signup-section {
        padding: var(--md-sys-spacing-48) var(--md-sys-spacing-20);
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: var(--md-sys-spacing-4);
        padding: var(--md-sys-spacing-4);
        margin-bottom: var(--md-sys-spacing-32);
    }
    
    .tab-btn {
        width: 100%;
        padding: var(--md-sys-spacing-16) var(--md-sys-spacing-20);
        font-size: 1rem; /* Larger text */
        min-height: 56px; /* Larger touch target */
    }
    
    .tab-btn i {
        font-size: 1.25rem; /* Larger icon */
    }
    
    .tab-content {
        padding: var(--md-sys-spacing-32) var(--md-sys-spacing-24);
    }
    
    .form-intro h3 {
        font-size: 1.375rem; /* Larger heading */
        margin-bottom: var(--md-sys-spacing-16);
    }
    
    .form-intro p {
        font-size: 1rem; /* Larger text */
        line-height: 1.7;
    }
}

/* ============================================================================
 * MAILCHIMP FORM STYLING - M3 Text Field Style
 * ============================================================================ */

#mc_embed_signup,
#mc_embed_signup_attorneys {
    background: transparent;
    clear: left;
    font-family: var(--md-sys-typescale-font-family);
    width: 100%;
}

#mc_embed_signup form,
#mc_embed_signup_attorneys form {
    padding: 0;
    margin: 0;
}

#mc_embed_signup .mc-field-group,
#mc_embed_signup_attorneys .mc-field-group {
    margin-bottom: var(--md-sys-spacing-24);
    width: 100%;
}

#mc_embed_signup label,
#mc_embed_signup_attorneys label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: var(--md-sys-spacing-8);
}

/* Mobile-specific label styling */
@media (max-width: 599px) {
    #mc_embed_signup label,
    #mc_embed_signup_attorneys label {
        font-size: 1rem; /* Larger text for better readability */
        margin-bottom: var(--md-sys-spacing-12);
    }
}

#mc_embed_signup .asterisk,
#mc_embed_signup_attorneys .asterisk {
    color: var(--md-sys-color-error);
    font-weight: bold;
}

/* M3 Outlined Text Field Style */
#mc_embed_signup input[type="email"],
#mc_embed_signup input[type="text"],
#mc_embed_signup_attorneys input[type="email"],
#mc_embed_signup_attorneys input[type="text"] {
    width: 100%;
    padding: var(--md-sys-spacing-16);
    font-size: 1rem;
    font-family: var(--md-sys-typescale-font-family);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    background-color: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px; /* M3 standard text field height */
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none;
}

/* Mobile-specific input styling */
@media (max-width: 599px) {
    #mc_embed_signup input[type="email"],
    #mc_embed_signup input[type="text"],
    #mc_embed_signup_attorneys input[type="email"],
    #mc_embed_signup_attorneys input[type="text"] {
        font-size: 1rem; /* Prevent zoom on iOS */
        padding: var(--md-sys-spacing-20);
        min-height: 60px; /* Larger touch target */
    }
}

#mc_embed_signup input[type="email"]:focus,
#mc_embed_signup input[type="text"]:focus,
#mc_embed_signup_attorneys input[type="email"]:focus,
#mc_embed_signup_attorneys input[type="text"]:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    background-color: var(--md-sys-color-surface-container-lowest);
}

#mc_embed_signup input[type="email"]::placeholder,
#mc_embed_signup_attorneys input[type="email"]::placeholder {
    color: var(--md-sys-color-on-surface-variant);
}

/* M3 Filled Button for Form Submit */
#mc_embed_signup .button,
#mc_embed_signup_attorneys .button {
    width: 100%;
    padding: var(--md-sys-spacing-12) var(--md-sys-spacing-24);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--md-sys-typescale-font-family);
    letter-spacing: 0.1px;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: var(--md-sys-spacing-8);
    min-height: 48px;
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none;
}

/* Mobile-specific button styling */
@media (max-width: 599px) {
    #mc_embed_signup .button,
    #mc_embed_signup_attorneys .button {
        font-size: 1rem; /* Larger text */
        padding: var(--md-sys-spacing-16) var(--md-sys-spacing-24);
        min-height: 56px; /* Larger touch target */
        margin-top: var(--md-sys-spacing-12);
    }
}

#mc_embed_signup .button:hover,
#mc_embed_signup_attorneys .button:hover {
    background-color: var(--light-navy);
    box-shadow: var(--md-sys-elevation-level2);
    transform: translateY(-1px);
}

#mc_embed_signup .button:focus-visible,
#mc_embed_signup_attorneys .button:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Form response messages */
#mc_embed_signup .response,
#mc_embed_signup_attorneys .response {
    margin: var(--md-sys-spacing-16) 0;
    padding: var(--md-sys-spacing-12) var(--md-sys-spacing-16);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.875rem;
}

#mc_embed_signup #mce-error-response,
#mc_embed_signup_attorneys #mce-error-response-attorneys {
    background-color: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
    border: 1px solid var(--md-sys-color-error);
}

#mc_embed_signup #mce-success-response,
#mc_embed_signup_attorneys #mce-success-response-attorneys {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--md-sys-color-success);
    border: 1px solid var(--md-sys-color-success);
}

/* ============================================================================
 * FEATURES SECTION - M3 Card Grid
 * ============================================================================ */

.features {
    padding: var(--md-sys-spacing-64) var(--md-sys-spacing-24);
    background-color: var(--md-sys-color-surface);
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    text-align: center;
    margin-bottom: var(--md-sys-spacing-12);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    margin-bottom: var(--md-sys-spacing-48);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* M3 Responsive Grid - 12 column layout principles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--md-sys-spacing-24);
    max-width: 1000px;
    margin: 0 auto;
}

/* M3 Outlined Card */
.feature-card {
    background: var(--md-sys-color-surface-container-lowest);
    padding: var(--md-sys-spacing-24);
    border-radius: var(--md-sys-shape-corner-large);
    text-align: center;
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-level3);
    border-color: var(--md-sys-color-primary);
}

.feature-card:focus-within {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* M3 Icon Container */
.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--md-sys-spacing-16);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-large);
    color: var(--md-sys-color-on-primary-container);
    font-size: 1.75rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: var(--md-sys-spacing-12);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* Responsive features grid */
@media (max-width: 839px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--md-sys-spacing-16);
    }
}

@media (max-width: 599px) {
    .features {
        padding: var(--md-sys-spacing-48) var(--md-sys-spacing-20);
    }
    
    .section-title {
        font-size: 1.75rem; /* Larger for better readability */
        line-height: 1.2;
        margin-bottom: var(--md-sys-spacing-16);
    }
    
    .section-subtitle {
        font-size: 1rem; /* Larger subtitle */
        line-height: 1.6;
        margin-bottom: var(--md-sys-spacing-32);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--md-sys-spacing-20);
    }
    
    .feature-card {
        padding: var(--md-sys-spacing-24);
    }
    
    .feature-card h3 {
        font-size: 1.375rem; /* Larger card titles */
        margin-bottom: var(--md-sys-spacing-16);
    }
    
    .feature-card p {
        font-size: 1rem; /* Larger card text */
        line-height: 1.7;
    }
}

/* ============================================================================
 * CONTACT SECTION - M3 Card Button Grid
 * ============================================================================ */

.contact-section {
    padding: var(--md-sys-spacing-64) var(--md-sys-spacing-24);
    background-color: var(--md-sys-color-surface-container);
}

.contact-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--md-sys-spacing-24);
    max-width: 1000px;
    margin: 0 auto;
}

/* M3 Filled Tonal Card as Button */
.contact-card {
    background: var(--md-sys-color-surface-container-lowest);
    padding: var(--md-sys-spacing-32) var(--md-sys-spacing-24);
    border-radius: var(--md-sys-shape-corner-large);
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--md-sys-spacing-12);
    min-height: 160px;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-level3);
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-surface-container-low);
}

.contact-card:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.contact-card i {
    font-size: 2.25rem;
    color: var(--md-sys-color-primary);
    margin-bottom: var(--md-sys-spacing-4);
}

.contact-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.contact-card p {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 599px) {
    .contact-section {
        padding: var(--md-sys-spacing-48) var(--md-sys-spacing-20);
    }
    
    .contact-buttons-grid {
        grid-template-columns: 1fr;
        gap: var(--md-sys-spacing-20);
    }
    
    .contact-card {
        padding: var(--md-sys-spacing-32) var(--md-sys-spacing-24);
        min-height: 120px; /* Adequate touch target */
    }
    
    .contact-card i {
        font-size: 2.25rem; /* Larger icons */
    }
    
    .contact-card h3 {
        font-size: 1.25rem; /* Larger titles */
        margin-bottom: var(--md-sys-spacing-8);
    }
    
    .contact-card p {
        font-size: 1rem; /* Larger text */
        line-height: 1.6;
    }
}

/* ============================================================================
 * SEO CONTENT SECTION
 * ============================================================================ */

.seo-content {
    padding: var(--md-sys-spacing-64) var(--md-sys-spacing-24);
    background-color: var(--md-sys-color-surface-container-low);
}

.seo-text {
    max-width: 800px;
    margin: 0 auto;
}

.seo-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: var(--md-sys-spacing-24);
    letter-spacing: -0.5px;
}

.seo-text h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-top: var(--md-sys-spacing-32);
    margin-bottom: var(--md-sys-spacing-16);
}

.seo-text p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: var(--md-sys-spacing-16);
}

.seo-text strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
}

@media (max-width: 599px) {
    .seo-content {
        padding: var(--md-sys-spacing-48) var(--md-sys-spacing-16);
    }
    
    .seo-text h2 {
        font-size: 1.5rem;
    }
    
    .seo-text h3 {
        font-size: 1.25rem;
    }
    
    .seo-text p {
        font-size: 0.875rem;
    }
}

/* ============================================================================
 * FOOTER - M3 Surface Container Style
 * ============================================================================ */

.footer {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: var(--md-sys-spacing-48) var(--md-sys-spacing-24) var(--md-sys-spacing-32);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: var(--md-sys-spacing-16);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--md-sys-spacing-8);
    flex-wrap: wrap;
    margin-bottom: var(--md-sys-spacing-24);
}

.footer-links a {
    color: var(--md-sys-color-on-primary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--md-sys-spacing-8);
    border-radius: var(--md-sys-shape-corner-small);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-links a:focus-visible {
    outline: 2px solid var(--md-sys-color-on-primary);
    outline-offset: 2px;
}

.footer-links .divider {
    color: rgba(255, 255, 255, 0.5);
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 599px) {
    .footer {
        padding: var(--md-sys-spacing-32) var(--md-sys-spacing-16) var(--md-sys-spacing-24);
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--md-sys-spacing-4);
    }
    
    .footer-links .divider {
        display: none;
    }
}

/* ============================================================================
 * COMING SOON BOX (if needed)
 * ============================================================================ */

.coming-soon-box {
    text-align: center;
    padding: var(--md-sys-spacing-32);
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
}

.coming-soon-box i {
    font-size: 3rem;
    color: var(--md-sys-color-primary);
    margin-bottom: var(--md-sys-spacing-16);
}

.coming-soon-box h4 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: var(--md-sys-spacing-12);
}

.coming-soon-box p {
    font-size: 0.9375rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: var(--md-sys-spacing-16);
}

.coming-soon-box .benefits-list {
    text-align: left;
    max-width: 400px;
    margin: var(--md-sys-spacing-24) auto 0;
    padding: var(--md-sys-spacing-20);
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.875rem;
    line-height: 1.8;
}

.coming-soon-box .benefits-list strong {
    color: var(--md-sys-color-primary);
    font-size: 0.9375rem;
}

/* ============================================================================
 * ACCESSIBILITY IMPROVEMENTS
 * ============================================================================ */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero::before {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --md-sys-color-outline: #000000;
        --md-sys-color-outline-variant: #000000;
    }
    
    .btn-primary {
        border: 2px solid var(--md-sys-color-on-primary);
    }
    
    .feature-card,
    .contact-card,
    .tab-content {
        border-width: 2px;
    }
}

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

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: var(--md-sys-spacing-8) var(--md-sys-spacing-16);
    z-index: 100;
    transition: top 0.3s;
}

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

/* ============================================================================
 * PRINT STYLES
 * ============================================================================ */

@media print {
    .hero::before,
    .social-links,
    .cta-buttons,
    .tab-navigation,
    .signup-section,
    .contact-section {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 20px;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .feature-card,
    .contact-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
