/* ============================
   CSS Variables & Reset
   ============================ */

:root {
    --qy-primary: #1C64F2;
    --qy-dark: #0F172A;
    --qy-bg-light: #F8FAFC;
    --qy-card-border: #E2E8F0;
    --qy-header-text: #1E293B;
    --qy-body-text: #334155;
    --qy-critical: #DC2626;
    --qy-high: #F97316;
    --white: #ffffff;
    
    /* Legacy aliases for compatibility */
    --primary: var(--qy-primary);
    --dark: var(--qy-dark);
    --light-bg: var(--qy-bg-light);
    --text: var(--qy-header-text);
    --text-secondary: var(--qy-body-text);
    --card-border: var(--qy-card-border);
    --shadow: rgba(15, 23, 42, 0.08);
    --shadow-lg: rgba(15, 23, 42, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

/* ============================
   Container & Layout
   ============================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

.section-alt {
    background-color: var(--qy-bg-light);
}

/* ============================
   Header
   ============================ */

.header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--qy-header-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--qy-primary);
}

.nav-link.contact-link {
    background-color: var(--qy-primary);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 999px;
    transition: background-color 0.1s ease, transform 0.1s ease;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.nav-link.contact-link:hover {
    background-color: #1553c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

/* ============================
   Hero Section
   ============================ */

.hero {
    background-color: #ffffff;
    padding: 120px 0 100px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--qy-header-text);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--qy-body-text);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, color 0.1s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--qy-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 15px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: #1553c7;
    transform: translateY(-1px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--qy-primary);
    border: 1px solid var(--qy-primary);
}

.btn-secondary:hover {
    background-color: var(--qy-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ============================
   Section Styles
   ============================ */

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--qy-header-text);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--qy-body-text);
    max-width: 800px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.section-text {
    font-size: 18px;
    text-align: center;
    color: var(--qy-body-text);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================
   Multi-Tenant Section
   ============================ */

.section-multitenant {
    background: var(--light-bg);
}

.multitenant-card {
    background-color: #ffffff;
    border: 1px solid var(--qy-card-border);
    border-radius: 12px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    max-width: 1000px;
    margin: 0 auto;
}

/* ============================
   Local-First Section
   ============================ */

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

/* ============================
   Pipeline Section
   ============================ */

.section-pipeline {
    background: var(--light-bg);
}

.pipeline-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.card {
    background-color: #ffffff;
    border: 1px solid var(--qy-card-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.card h3, .card h4, .card-title {
    color: var(--qy-header-text);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p, .card-text {
    color: var(--qy-body-text);
    font-size: 16px;
    line-height: 1.6;
}

/* Pipeline Diagram */

.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--qy-card-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.pipeline-stage {
    flex-shrink: 0;
}

.pipeline-box {
    background-color: var(--qy-primary);
    color: #ffffff;
    padding: 16px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(28, 100, 242, 0.3);
    white-space: nowrap;
}

.pipeline-arrow {
    font-size: 28px;
    color: var(--qy-primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================
   Features Section
   ============================ */

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.feature-card {
    text-align: center;
}

/* ============================
   Evidence Pipeline Section
   ============================ */

.evidence-pipeline-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 40px;
}

.evidence-step h3 {
    color: var(--qy-header-text);
    margin-bottom: 8px;
}

.evidence-step p {
    color: var(--qy-body-text);
}

/* ============================
   Dashboard Section
   ============================ */

.section-dashboard {
    background: var(--light-bg);
}

.dashboard-container {
    max-width: 1100px;
    margin: 0 auto;
}

.dashboard-preview-wrapper {
    margin-top: 48px;
}

.screenshot-frame {
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--qy-card-border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    padding: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.screenshot-frame img,
.dashboard-preview {
    display: block;
    width: 100%;
    border-radius: 14px;
}

/* ============================
   Footer
   ============================ */

.footer,
.site-footer {
    background-color: var(--qy-dark);
    color: #e5e7eb;
    padding: 24px 0;
}

.footer-content,
.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-link,
.site-footer a {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.2s ease;
}

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

.footer-copyright,
.site-footer small {
    font-size: 0.875rem;
    color: rgba(229, 231, 235, 0.8);
}

/* ============================
   Responsive Design
   ============================ */

@media (max-width: 768px) {
    .nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 14px;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 32px;
    }

    .section-subtitle,
    .section-text {
        font-size: 16px;
    }

    .pipeline-cards {
        grid-template-columns: 1fr;
    }

    .pipeline-diagram {
        flex-direction: column;
        padding: 20px;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        font-size: 24px;
    }

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

    .dashboard-preview-wrapper {
        padding: 16px;
    }

    .footer-links {
        gap: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo {
        height: 32px;
    }

    .pipeline-box {
        padding: 12px 20px;
        font-size: 14px;
    }
}
