/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Calming, professional color palette */
    --primary-blue: #6366f1;
    --primary-blue-light: #818cf8;
    --primary-blue-dark: #4f46e5;
    --accent-teal: #06b6d4;
    --accent-teal-light: #67e8f9;
    --warm-white: #fefefe;
    --soft-gray: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --success-green: #059669;
    --warning-amber: #d97706;
    --error-red: #dc2626;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Crimson Text', Georgia, 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;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--warm-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Elements */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.02) 0%,
        rgba(6, 182, 212, 0.01) 50%,
        rgba(99, 102, 241, 0.02) 100%
    );
    z-index: -2;
}

.neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: neural-pulse 20s ease-in-out infinite;
}

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

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-element {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    left: var(--x);
    top: var(--y);
    animation: gentle-float 15s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes gentle-float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% { 
        transform: translate(10px, -20px) scale(1.2);
        opacity: 0.6;
    }
    50% { 
        transform: translate(-5px, -40px) scale(0.8);
        opacity: 0.4;
    }
    75% { 
        transform: translate(-15px, -20px) scale(1.1);
        opacity: 0.5;
    }
}

/* Crisis Banner */
.crisis-banner {
    background: linear-gradient(135deg, var(--error-red), #ef4444);
    color: white;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.crisis-banner a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.crisis-banner a:hover {
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    padding: var(--space-xl) 0;
    text-align: center;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(99, 102, 241, 0.3));
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: logo-glow 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes logo-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

/* Main Content */
.main-content {
    padding-bottom: var(--space-3xl);
}

.hero-section {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-blue-dark);
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Hero Title */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
    margin-bottom: var(--space-sm);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-3xl) 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* For exactly 4 cards, ensure good layout on larger screens */
@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
    }
}

/* For medium screens, show 2 cards per row */
@media (min-width: 768px) and (max-width: 1199px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-teal-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Trust Section */
.trust-section {
    margin: var(--space-3xl) 0;
    padding: var(--space-2xl);
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.trust-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trust-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.trust-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Signup Section */
.signup-section {
    margin: var(--space-3xl) 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.signup-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.signup-section > p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 1.125rem;
}

.signup-form {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group label {
    position: absolute;
    top: -8px;
    left: var(--space-md);
    background: white;
    padding: 0 var(--space-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.cta-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
}

.cta-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

.form-disclaimer {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Progress Section */
.progress-section {
    margin: var(--space-3xl) 0;
    padding: var(--space-2xl);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.progress-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
    text-align: center;
}

.progress-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.progress-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.progress-label {
    flex: 0 0 180px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    border-radius: 9999px;
    width: var(--progress);
    transition: width 2s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s ease-in-out infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    flex: 0 0 40px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    margin-top: var(--space-3xl);
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--border-color);
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h4 {
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    padding: var(--space-sm) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .progress-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .progress-label {
        flex: none;
        text-align: center;
    }
    
    .progress-percent {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .crisis-banner {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .form-group input,
    .form-group select {
        padding: var(--space-sm) 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 styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-secondary: #000;
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .feature-card,
    .trust-item,
    .signup-form {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .floating-elements,
    .neural-network,
    .bg-gradient,
    .crisis-banner {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}