/* TerraPerf Landing Page Styles */
/* Color scheme matching terraperf-frontend */

:root {
    /* Primary: cyan/teal (HSL 195 85% 45%) */
    --primary: #0891b2;
    --primary-light: #06b6d4;
    --primary-dark: #0e7490;

    /* Accent: teal (HSL 180 80% 50%) */
    --accent: #14b8a6;

    /* Neutrals */
    --background: #ffffff;
    --foreground: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;

    /* Spacing */
    --container-max: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border radius */
    --radius: 0.5rem;
    --radius-lg: 1rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background gradient */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(8, 145, 178, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(20, 184, 166, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    padding: var(--spacing-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

/* Hero */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.025em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: var(--foreground);
}

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

.hero-description {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 600px;
    margin-bottom: var(--spacing-2xl);
}

.hero-description strong {
    color: var(--foreground);
    font-weight: 600;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    width: 100%;
    max-width: 960px;
    margin-top: var(--spacing-lg);
}

.feature {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(20, 184, 166, 0.1));
    border-radius: var(--radius);
    margin-bottom: var(--spacing-md);
    color: var(--primary);
}

.feature h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--foreground);
}

.feature p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Waitlist Section */
.waitlist-section {
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
}

.waitlist-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--foreground);
}

.waitlist-description {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: var(--spacing-lg);
}

.waitlist-form {
    width: 100%;
}

.form-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.email-input::placeholder {
    color: var(--muted);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.consent-group {
    margin-bottom: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--background);
    transition: all 0.2s ease;
    position: relative;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

.form-message {
    padding: var(--spacing-sm);
    border-radius: var(--radius);
    font-size: 0.875rem;
    text-align: center;
}

.form-message.success {
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent);
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Legal Content (Privacy Policy) */
.legal-content {
    flex: 1;
    padding: var(--spacing-lg) 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--foreground);
}

.legal-content .last-updated {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: var(--spacing-xl);
}

.legal-content section {
    margin-bottom: var(--spacing-xl);
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--foreground);
}

.legal-content p {
    margin-bottom: var(--spacing-sm);
    color: var(--muted);
    line-height: 1.7;
}

.legal-content ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--muted);
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.7;
}

.legal-content address {
    font-style: normal;
    line-height: 1.7;
    color: var(--muted);
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: inherit;
}

/* Footer */
.footer {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
}

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

.footer a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .waitlist-section {
        padding: var(--spacing-lg);
    }

    .form-group {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }

    .legal-content h1 {
        font-size: 2rem;
    }
}

/* Prefers dark mode (optional enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --foreground: #f1f5f9;
        --muted: #94a3b8;
        --border: #1e293b;
    }

    .bg-gradient {
        background:
            radial-gradient(ellipse at 20% 0%, rgba(8, 145, 178, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 100%, rgba(20, 184, 166, 0.15) 0%, transparent 50%);
    }

    .feature {
        background: rgba(30, 41, 59, 0.5);
    }

    .waitlist-section {
        background: rgba(30, 41, 59, 0.5);
    }

    .email-input {
        background: rgba(15, 23, 42, 0.8);
    }

    .checkbox-custom {
        background: rgba(15, 23, 42, 0.8);
    }

    .form-message.error {
        background: rgba(239, 68, 68, 0.15);
        color: #f87171;
    }
}
