:root {
    /* Brand Colors */
    --brand-green: #34d399;
    --brand-green-hover: #10b981;
    --brand-green-bg: #d1fae5;

    /* Light Mode Variables */
    --bg-body: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    /* Glassmorphism */
    --bg-gradient-start: #f9fafb;
    --bg-gradient-end: #f3f4f6;

    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --btn-primary-bg: #111827;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #000000;

    --btn-secondary-bg: #f3f4f6;
    --btn-secondary-text: #1f2937;
    --btn-secondary-hover: #e5e7eb;

    --toggle-bg: #f3f4f6;
    --toggle-icon: #4b5563;

    /* Status Colors */
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
}

body.dark-mode {
    /* Dark Mode Variables */
    --bg-body: #0f172a;
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;

    --text-main: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);

    --btn-primary-bg: #ffffff;
    --btn-primary-text: #0f172a;
    --btn-primary-hover: #f1f5f9;

    --btn-secondary-bg: #334155;
    --btn-secondary-text: #f8fafc;
    --btn-secondary-hover: #475569;

    --toggle-bg: #334155;
    --toggle-icon: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header (Shared) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s, box-shadow 0.3s, padding 0.3s;
    padding: 1.5rem 0;
    margin: 0;
    max-width: none;
    /* Override container max-width for full sticky header */
}

.sticky-header .header-content {
    /* Inner container for sticky header content */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sticky-header.scrolled {
    background-color: var(--bg-header);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}


.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--toggle-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toggle-icon);
    cursor: pointer;
    transition: background 0.2s;
}

.theme-toggle:hover {
    opacity: 0.8;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

body.dark-mode .sun-icon {
    display: block;
}

body.dark-mode .moon-icon {
    display: none;
}

/* Buttons */
.btn-cta-small {
    background: var(--brand-green);
    color: #064e3b;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-cta-small:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary-large {
    background: var(--brand-green);
    color: #064e3b;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary-large:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(52, 211, 153, 0.3);
}

.btn-secondary-large {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
}

/* Hero Section (Landing) */
.hero-section {
    padding: 140px 1rem 5rem 1rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    background: var(--brand-green-bg);
    color: var(--success-text);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero-title-large {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.text-highlight {
    color: var(--brand-green);
}

.hero-subtitle-large {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Legacy Hero (Connect Page) */
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-main);
    letter-spacing: -0.05em;
    margin-top: 2rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 3rem auto;
    text-align: center;
    line-height: 1.6;
}

/* Section Containers */
.section-container {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.bg-offset {
    background: var(--bg-gradient-start);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

/* Cards Grid (Problem) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: left;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s;
}

.feature-card:hover {
    box-shadow: var(--card-hover-shadow);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stat-box {
    margin-top: auto;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.progress-bar {
    height: 4px;
    width: 60px;
    margin-top: 1rem;
    border-radius: 2px;
}

.progress-bar.red {
    background: #ef4444;
}

.progress-bar.yellow {
    background: #f59e0b;
}

/* Flow Diagram (How it works) */
.flow-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    min-width: 140px;
}

.flow-node.highlight {
    background: var(--brand-green);
    color: #064e3b;
    padding: 2rem 2.5rem;
    transform: scale(1.1);
    box-shadow: 0 10px 25px -5px rgba(52, 211, 153, 0.4);
}

.node-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.node-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.node-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.node-text-large {
    font-weight: 700;
    font-size: 1.25rem;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Small Feature Grid */
.features-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.small-card {
    text-align: left;
    padding: 1.5rem;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-circle.blue {
    background: #dbeafe;
    color: #1e40af;
}

.icon-circle.purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.icon-circle.yellow {
    background: #fef3c7;
    color: #92400e;
}

.icon-circle.green {
    background: #d1fae5;
    color: #065f46;
}

/* Comparison Grid (Impact) */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    text-align: left;
}

.comparison-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.header-icon {
    font-size: 2rem;
}

.pain-points,
.solution-box {
    margin-bottom: 2rem;
}

.label-tiny {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.label-tiny.red {
    color: #ef4444;
}

.label-tiny.green {
    color: #10b981;
}

.comparison-card ul {
    list-style: none;
}

.comparison-card li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.red-x::before {
    content: "✕";
    color: #ef4444;
    font-weight: bold;
}

.red-alert::before {
    content: "⚠️";
    font-size: 0.9rem;
}

.green-check::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
}

.solution-box {
    background: var(--bg-gradient-end);
    /* Subtle bg for solution */
    padding: 1.5rem;
    border-radius: 1rem;
}

/* Footer CTA */
.footer-cta {
    background: var(--background);
    /* Or specific color if needed */
    padding: 8rem 0;
    text-align: center;
}

.footer-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.footer-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.btn-secondary-large.bg-dark {
    background: #1f2937;
    color: white;
}

/* Footer Bottom */
footer {
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

/* Legacy Support (Keeping styles for existing connect/success/error pages) */
.connect-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 3rem auto;
    border: 1px solid var(--card-border);
    transition: transform 0.2s;
}

.connect-card:hover {
    box-shadow: var(--card-hover-shadow);
}

.btn-connect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #000;
    color: #fff;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    width: 100%;
}

.btn-connect:hover {
    opacity: 0.9;
}

body.dark-mode .btn-connect {
    background: #fff;
    color: #000;
}

.btn-icon-square {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

/* Trusted By Section (Legacy) */
.trusted-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.trusted-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.trust-icons {
    display: flex;
    gap: 2rem;
    align-items: center;
    color: var(--text-muted);
}

.trust-icons svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title-large {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Simplified mobile handling */
    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions .btn-cta-small {
        display: none;
    }

    /* Hide CTA on small mobile if needed */
}

/* Additional Styles for Connect Page */
.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.5rem;
    opacity: 0.8;
    font-weight: 500;
}

.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn-connect.disabled {
    background-color: var(--btn-secondary-bg);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid var(--card-border);
    pointer-events: none;
}

.btn-connect.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-connect.disabled .btn-icon-square {
    filter: grayscale(1);
    opacity: 0.5;
}

.badge-status {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: var(--card-border);
    color: var(--text-secondary);
    margin-left: auto;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 0, 0, 0.05);
}