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

:root {
    --bg: #0a0a0c;
    --bg-raised: #111114;
    --bg-card: #16161a;
    --border: #252530;
    --text: #e0e0e6;
    --text-dim: #7a7a8a;
    --text-muted: #4a4a58;
    --accent: #3dffa0;
    --accent-dim: #1a8c55;
    --accent-glow: rgba(61, 255, 160, 0.08);
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
    --font-body: 'DM Sans', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover {
    opacity: 0.8;
}

/* ── Topo Canvas ──────────────────────────────────────────────────── */
#topo-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
}

/* ── Nav ───────────────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(10, 10, 12, 0.8);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo-bracket {
    color: var(--accent);
    font-weight: 400;
}

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

.nav-links a {
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--text);
    opacity: 1;
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.15;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
}

.hero-content {
    position: relative;
}

.hero-coord {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coord-label {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.coord-value {
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.hero h1 {
    font-family: var(--font-body);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

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

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

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    padding: 0.3rem 0.9rem;
    border-radius: 3px;
    margin-bottom: 1.5rem;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--accent-dim); }
    50% { border-color: var(--accent); box-shadow: 0 0 12px rgba(61, 255, 160, 0.15); }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}
.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 24px rgba(61, 255, 160, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--text-dim);
    opacity: 1;
}

/* ── Terminal ─────────────────────────────────────────────────────── */
.terminal {
    background: #0d0d10;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-width: 680px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
    background: #1a1a20;
    padding: 0 0.5rem 0 1rem;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.terminal-controls {
    display: flex;
    height: 100%;
}

.win-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: default;
    transition: background 0.15s;
}
.win-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
.win-close:hover {
    background: #c42b1c;
    color: #fff;
}

.terminal-body {
    padding: 1rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    height: 260px;
    overflow-y: auto;
}

.terminal-line {
    white-space: nowrap;
    color: var(--text-dim);
}

.t-prompt {
    color: var(--accent);
    margin-right: 0.5rem;
}

.t-green { color: var(--accent); }
.t-dim { color: var(--text-muted); }
.t-label { color: var(--text); }

.hero-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 4rem;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.stat {
    background: var(--bg-raised);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Sections ─────────────────────────────────────────────────────── */
section {
    position: relative;
    z-index: 1;
}

.section-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Features ─────────────────────────────────────────────────────── */
.features {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.feature-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    transition: background 0.3s, transform 0.3s;
}
.feature-card:hover {
    background: var(--bg-raised);
    transform: translateY(-2px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* ── How It Works ─────────────────────────────────────────────────── */
.how-it-works {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.steps {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 3rem;
    line-height: 1;
    padding-top: 0.2rem;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.step-code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
}

.step-connector {
    width: 24px;
    height: 48px;
    margin: 0.5rem 0 0.5rem 1rem;
    color: var(--text-muted);
}

/* ── Data Sources ────────────────────────────────────────────────── */
.data-sources {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.source-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.source-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: border-color 0.3s;
}
.source-card:hover {
    border-color: var(--accent-dim);
}

.source-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 1rem;
}

.source-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.source-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.source-detail {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* ── Compare ──────────────────────────────────────────────────────── */
.compare {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.compare-table {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.compare-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.compare-header {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
}

.compare-feature {
    font-weight: 600;
    color: var(--text);
}

.compare-them {
    color: var(--text-muted);
}

.compare-us {
    color: var(--accent);
    font-weight: 500;
}

/* ── GitHub nav icon ─────────────────────────────────────────────── */
.nav-github {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    transition: color 0.2s;
}
.nav-github:hover {
    color: var(--text);
    opacity: 1;
}

/* ── Roadmap ─────────────────────────────────────────────────────── */
.roadmap {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.roadmap-sub {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.roadmap-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.roadmap-phase {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.3s;
}
.roadmap-phase:hover {
    border-color: var(--accent-dim);
}

.phase-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.roadmap-phase h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.phase-status {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.status-active {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-glow);
}

.roadmap-phase ul {
    list-style: none;
    margin-bottom: 0.75rem;
}

.roadmap-phase li {
    font-size: 0.82rem;
    color: var(--text-dim);
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.roadmap-phase li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.phase-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── FAQ ──────────────────────────────────────────────────────────── */
.faq {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    font-size: 1rem;
    font-weight: 600;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item summary::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--accent);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    padding-bottom: 1.25rem;
}

/* ── CTA ──────────────────────────────────────────────────────────── */
.cta {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.cta p {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.cta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.cta-tech, .cta-targets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-chip {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.cta-chip-accent {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}

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

.footer-logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dim);
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-links a:hover {
    color: var(--text);
    opacity: 1;
}

.footer-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .compare-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .compare-header {
        display: none;
    }

    .compare-them::before {
        content: "Others: ";
        color: var(--text-muted);
    }

    .compare-us::before {
        content: "Terravox: ";
        color: var(--accent);
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .step {
        gap: 1rem;
    }

    .nav-links a:not(.nav-cta) {
        display: none;
    }

    .terminal {
        max-width: 100%;
    }
}

/* ── Animations ───────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeUp 0.8s ease-out;
}

.hero-stats {
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.feature-card {
    animation: fadeUp 0.6s ease-out both;
}
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }

.source-card {
    animation: fadeUp 0.6s ease-out both;
}
.source-card:nth-child(1) { animation-delay: 0.1s; }
.source-card:nth-child(2) { animation-delay: 0.2s; }
.source-card:nth-child(3) { animation-delay: 0.3s; }

.step {
    animation: fadeUp 0.6s ease-out both;
}

.compare-row:not(.compare-header) {
    animation: fadeUp 0.4s ease-out both;
}

.roadmap-phase {
    animation: fadeUp 0.5s ease-out both;
}

.faq-item {
    animation: fadeUp 0.4s ease-out both;
}
