/* Self-hosted fonts */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/space-grotesk-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

/* Design tokens */
:root {
    --bg: #0A0E17;
    --text: #F0F0F0;
    --accent: #3B82F6;
    --secondary: #94A3B8;
    --bg-subtle: #111827;
    --max-width: 900px;
    --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-wordmark {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--text);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

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

/* Main content */
main {
    padding-top: 4rem;
}

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* Hero */
.hero {
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 780px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--secondary);
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 2.5rem;
}

/* CTA button */
.cta {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border: none;
    transition: background 0.2s, transform 0.15s;
}

.cta:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.cta-secondary {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(148, 163, 184, 0.3);
    transition: border-color 0.2s, transform 0.15s;
}

.cta-secondary:hover {
    border-color: var(--secondary);
    transform: translateY(-1px);
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Section divider */
.divider {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Problem section */
.problem h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.problem p {
    color: var(--secondary);
    max-width: 700px;
    font-size: 1.05rem;
}

/* What We're Building */
.building h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin-bottom: 3rem;
}

.pillars {
    display: grid;
    gap: 3rem;
}

.pillar h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.pillar p {
    color: var(--secondary);
    font-size: 1.05rem;
    max-width: 640px;
}

/* Current work */
.current h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.current p {
    color: var(--secondary);
    max-width: 700px;
    font-size: 1.05rem;
}

/* CTA section */
.cta-section {
    text-align: center;
    padding: 5rem 2rem 6rem;
}

.cta-section p {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 2.5rem 2rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info {
    color: var(--secondary);
    font-size: 0.85rem;
}

.footer-info a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-info a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ─── Product Page ─── */

/* Product hero */
.product-hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.product-hero .product-label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.product-hero h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.product-hero .tagline {
    font-size: 1.25rem;
    color: var(--secondary);
    line-height: 1.6;
    max-width: 640px;
    margin-bottom: 2.5rem;
}

/* Platform badges */
.platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.platform-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--bg-subtle);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: border-color 0.2s, color 0.2s;
}

.platform-badge:hover {
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text);
}

/* Section headers (product pages) */
.section-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--secondary);
    font-size: 1.05rem;
    max-width: 640px;
    margin-bottom: 2.5rem;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.feature-card {
    padding: 1.75rem;
    background: var(--bg-subtle);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: rgba(148, 163, 184, 0.2);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.feature-card p {
    color: var(--secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Vision list (numbered) */
.vision-list {
    list-style: none;
    counter-reset: vision;
    display: grid;
    gap: 2rem;
}

.vision-list li {
    counter-increment: vision;
    padding-left: 3rem;
    position: relative;
}

.vision-list li::before {
    content: counter(vision);
    position: absolute;
    left: 0;
    top: 0.1em;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent);
    line-height: 1;
}

.vision-list h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.vision-list p {
    color: var(--secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Deploy options */
.deploy-options {
    display: grid;
    gap: 2.5rem;
}

.deploy-option h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.deploy-option p {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.deploy-option a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.deploy-option a:hover {
    text-decoration: underline;
}

/* Code blocks */
.code-block {
    background: #0D1117;
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
    font-family: 'SFMono-Regular', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--secondary);
}

.code-block .comment {
    color: #6B7280;
}

/* Contribution areas */
.contrib-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contrib-item {
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.contrib-item h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.contrib-item p {
    color: var(--secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.contrib-links {
    display: flex;
    gap: 1.5rem;
}

.contrib-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.contrib-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .nav-inner {
        padding: 0.85rem 1.25rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .section {
        padding: 3.5rem 1.25rem;
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 4rem;
    }

    .product-hero {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }

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

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

    .vision-list li {
        padding-left: 2.25rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
