/* ============================================================
   Homepage Styles
   ============================================================ */

/* ─── Landing Token Overrides ─────────────────────── */

:root {
    --text-muted: #7a7a88;
    --text-dim: #55555f;
    --bg-card-hover: #1a1a1f;
    --accent-dim: rgba(102, 126, 234, 0.12);
    --accent-glow: rgba(102, 126, 234, 0.06);
    --dropdown-bg: rgba(12, 12, 16, 0.95);
    --radius: 12px;
    --radius-sm: 8px;
}

[data-theme-mode="light"] {
    --text-muted: #555568;
    --text-dim: #8888a0;
    --bg-card-hover: #e8e8f0;
    --accent-dim: rgba(74, 92, 216, 0.08);
    --accent-glow: rgba(74, 92, 216, 0.04);
    --dropdown-bg: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   Layout
   ============================================================ */

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

/* ============================================================
   Mobile Dropdown
   ============================================================ */

.dropdown {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--dropdown-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
    z-index: 99;
    flex-direction: column;
    gap: 4px;
}

.dropdown--open {
    display: flex;
}

.dropdown a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 0;
}

.dropdown a:hover {
    color: var(--text);
}

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

.hero {
    padding: calc(var(--header-height) + 40px) 0 56px;
    text-align: center;
}

.hero__name {
    font-size: 78px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 16px;
    color: var(--text);
}

.hero__tagline {
    font-size: 22px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto 32px;
}

.hero__badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.badge {
    font-size: 15px;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.badge--accent {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.btn--primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.btn--primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn--ghost:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ============================================================
   Install
   ============================================================ */

.install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 56px;
}

.install__cmd {
    font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
    font-size: 17px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    color: var(--text-muted);
}

.install__cmd span {
    color: var(--accent);
}

/* ============================================================
   Sections
   ============================================================ */

.section {
    margin-bottom: 56px;
}

.section__title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 16px;
    padding-left: 2px;
}

/* ============================================================
   Feature Grid
   ============================================================ */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s ease;
}

.feature:hover {
    border-color: var(--border-hover);
}

.feature__icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.feature__name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.feature__desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   Navigation Cards
   ============================================================ */

.nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.nav-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.nav-card__icon {
    font-size: 30px;
}

.nav-card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.nav-card__desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
}

.nav-card__link {
    font-size: 15px;
    color: var(--accent);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   Examples List
   ============================================================ */

.example-grid {
    display: grid;
    gap: 6px;
}

.example-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.15s ease;
}

.example-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.example-item__name {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    min-width: 160px;
}

.example-item__desc {
    font-size: 15px;
    color: var(--text-dim);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.example-item__arrow {
    color: var(--text-dim);
    font-size: 14px;
    transition:
        transform 0.15s ease,
        color 0.15s ease;
    flex-shrink: 0;
}

.example-item:hover .example-item__arrow {
    transform: translateX(3px);
    color: var(--text-muted);
}

/* ============================================================
   Code Sample
   ============================================================ */

.code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
}

.code pre {
    font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
}

.code .kw {
    color: #c792ea;
}
.code .fn {
    color: #82aaff;
}
.code .str {
    color: #c3e88d;
}
.code .cm {
    color: #555;
}
.code .num {
    color: #f78c6c;
}
.code .prop {
    color: #f07178;
}
.code .par {
    color: #89ddff;
}
.code .op {
    color: #89ddff;
}

/* ─── Light theme: code ──────────────────────────── */

[data-theme-mode="light"] .code {
    background: var(--bg-card);
}
[data-theme-mode="light"] .code pre {
    color: var(--text-muted);
}
[data-theme-mode="light"] .code .kw {
    color: #7c3aed;
}
[data-theme-mode="light"] .code .fn {
    color: #2563eb;
}
[data-theme-mode="light"] .code .str {
    color: #16a34a;
}
[data-theme-mode="light"] .code .cm {
    color: #94a3b8;
}
[data-theme-mode="light"] .code .num {
    color: #ea580c;
}
[data-theme-mode="light"] .code .prop {
    color: #dc2626;
}
[data-theme-mode="light"] .code .par {
    color: #6366f1;
}
[data-theme-mode="light"] .code .op {
    color: #6366f1;
}

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

footer {
    text-align: center;
    padding: 48px 0 40px;
    color: var(--text-dim);
    font-size: 16px;
    border-top: 1px solid var(--border);
}

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

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

.footer__links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

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

/* Reset shell.css 720px breakpoint — landing has no sidebar,
   so the hamburger collapses at 640px instead */
@media (max-width: 720px) {
    .header__hamburger {
        display: none;
    }

    .header__nav {
        display: flex;
    }
}

/* ─── Tablet ─────────────────────────────────────── */

@media (max-width: 800px) {
    .hero__name {
        font-size: 64px;
    }

    .hero__tagline {
        font-size: 20px;
    }

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

    .nav-card__icon {
        font-size: 26px;
    }

    .nav-card__title {
        font-size: 18px;
    }
}

/* ─── Mobile ─────────────────────────────────────── */

@media (max-width: 640px) {
    .header__nav {
        display: none;
    }

    .header__hamburger {
        display: block;
    }

    .dropdown--open {
        display: flex;
    }

    .hero {
        padding: calc(var(--header-height) + 28px) 0 36px;
    }

    .hero__name {
        font-size: 48px;
        letter-spacing: -1.5px;
    }

    .hero__tagline {
        font-size: 17px;
        margin-bottom: 24px;
    }

    .hero__badges {
        margin-bottom: 28px;
    }

    .badge {
        font-size: 13px;
    }

    .btn {
        font-size: 15px;
        padding: 9px 18px;
    }

    .install__cmd {
        font-size: 14px;
        padding: 8px 14px;
    }

    .install {
        margin-bottom: 40px;
    }

    .section__title {
        font-size: 14px;
    }

    .feature__icon {
        font-size: 22px;
    }

    .feature__name {
        font-size: 15px;
    }

    .feature__desc {
        font-size: 13px;
    }

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

    .nav-card {
        padding: 20px 18px;
    }

    .nav-card__icon {
        font-size: 24px;
    }

    .nav-card__title {
        font-size: 17px;
    }

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

    .nav-card__link {
        font-size: 13px;
    }

    .example-item__name {
        font-size: 15px;
        min-width: 0;
    }

    .example-item__desc {
        display: none;
    }

    .code pre {
        font-size: 14px;
    }

    footer {
        font-size: 14px;
        padding: 36px 0 32px;
    }
}

/* ─── Small phone ────────────────────────────────── */

@media (max-width: 420px) {
    .hero__name {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .hero__tagline {
        font-size: 16px;
    }

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

    .badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}
