/* ============================================================
   DiffAI — Landing Page Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a2e;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

/* ----- Layout ----- */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}

.section-alt {
    background: #f8f9fc;
}

.section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-sub {
    text-align: center;
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 56px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ----- Navigation ----- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    padding-bottom: 24px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
}

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

.nav-links a {
    color: #94a3b8;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ffffff;
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    background: transparent;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.btn-ghost {
    color: #94a3b8;
    background: transparent;
    border: 1.5px solid transparent;
}

.btn-ghost:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}

/* ----- Hero ----- */
.hero {
    background: #0a0e1a;
    color: #e2e8f0;
    padding-bottom: 96px;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding-top: 64px;
}

.hero-text h1 {
    font-size: 3rem;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 1.1875rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-code {
    position: relative;
}

.hero-code pre {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px 28px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.7;
}

.hero-code code {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", Menlo, monospace;
    color: #e2e8f0;
}

/* ----- Syntax Colors ----- */
.k { color: #93c5fd; }
.s { color: #86efac; }
.h { color: #fbbf24; }
.c { color: #64748b; }

/* ----- Steps ----- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step {
    text-align: center;
    padding: 8px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.step p {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.65;
    max-width: 320px;
    margin: 0 auto;
}

/* ----- Cards ----- */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.0625rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.card p {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.65;
}

/* ----- API Preview ----- */
.api-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.api-block {
    position: relative;
}

.api-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 10px;
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 4px;
}

.api-block pre {
    background: #1e293b;
    border-radius: 8px;
    padding: 24px;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.7;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.api-block code {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", Menlo, monospace;
    color: #e2e8f0;
}

/* ----- Pricing ----- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pricing-card--recommended {
    border-color: #3b82f6;
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15);
}

.pricing-card--recommended:hover {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
}

.pricing-limit {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 28px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 28px;
}

.pricing-features li {
    font-size: 0.875rem;
    color: #475569;
    padding: 6px 0;
    padding-left: 22px;
    position: relative;
    line-height: 1.5;
}

.pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.8125rem;
}

.pricing-features {
    flex: 1;
}

.pricing-card .btn {
    width: 100%;
    margin-top: auto;
}

.pricing-card .btn-outline {
    color: #1a1a2e;
    border-color: #d1d5db;
}

.pricing-card .btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

/* ----- Footer ----- */
.footer {
    background: #0a0e1a;
    padding: 40px 0;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-size: 1.125rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
}

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

.footer-links a {
    font-size: 0.875rem;
    color: #64748b;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #e2e8f0;
}

/* ============================================================
   Dark Mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
    body {
        background: #0a0e1a;
        color: #e2e8f0;
    }

    .section {
        background: #0f1219;
    }

    .section-alt {
        background: #0a0e1a;
    }

    .section h2 {
        color: #f1f5f9;
    }

    .section-sub {
        color: #94a3b8;
    }

    /* Steps */
    .step h3 {
        color: #f1f5f9;
    }

    .step p {
        color: #94a3b8;
    }

    /* Cards */
    .card {
        background: #1a1f2e;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }

    .card h3 {
        color: #f1f5f9;
    }

    .card p {
        color: #94a3b8;
    }

    /* API Preview */
    .api-label {
        background: #1e293b;
        color: #94a3b8;
    }

    .api-block pre {
        border-color: rgba(255, 255, 255, 0.06);
    }

    /* Pricing */
    .pricing-card {
        background: #1a1f2e;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .pricing-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }

    .pricing-card h3 {
        color: #f1f5f9;
    }

    .pricing-price {
        color: #f1f5f9;
    }

    .pricing-limit {
        color: #94a3b8;
    }

    .pricing-features li {
        color: #cbd5e1;
    }

    .pricing-card .btn-outline {
        color: #e2e8f0;
        border-color: rgba(255, 255, 255, 0.15);
    }

    .pricing-card .btn-outline:hover {
        color: #93c5fd;
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.08);
    }

    .pricing-card--recommended {
        box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2);
    }

    .pricing-card--recommended:hover {
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
    }
}

/* ============================================================
   Responsive — Tablet and below
   ============================================================ */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .section h2 {
        font-size: 1.625rem;
    }

    .section-sub {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    /* Nav */
    .nav {
        flex-wrap: wrap;
        gap: 16px;
    }

    .nav-links {
        gap: 20px;
    }

    /* Hero */
    .hero {
        padding-bottom: 64px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 40px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1.0625rem;
    }

    .hero-code pre {
        font-size: 0.8125rem;
        padding: 20px;
    }

    /* Steps */
    .steps {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    /* Cards */
    .cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* API Preview */
    .api-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .api-block pre {
        font-size: 0.75rem;
        padding: 16px;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}
