/* nowhere.frkhd.com
   tight rewrite. linear/railway/planetscale direction.
   palette: warm navy, green "connected" accent.
   =================================================================== */

:root {
    --bg: #0f1419;
    --bg-soft: #131a21;
    --surface: #1a2028;
    --surface-hi: #212933;
    --border: #2a3440;
    --border-hi: #36424f;

    --text: #e8edf3;
    --text-dim: #8b95a7;
    --text-faint: #5b6777;

    --primary: #22c55e;
    --primary-hi: #34d77a;
    --primary-dim: rgba(34, 197, 94, 0.14);

    --amber: #f59e0b;
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.12);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;

    --max: 1160px;
    --max-wide: 1280px;

    --font-display: 'Clash Display', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }

code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 6px;
    color: var(--text);
}

::selection { background: var(--primary); color: #0a0d11; }

.page { width: 100%; }

/* NAV =============================================================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 20, 25, 0.72);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.nav-logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}
.nav-link {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-cta:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--text);
}

/* SECTION CORE ====================================================== */
section {
    padding: 96px 28px;
    border-top: 1px solid var(--border);
}
section:first-of-type { border-top: 0; }
.section-inner {
    max-width: var(--max);
    margin: 0 auto;
}
.section-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--primary);
    margin-bottom: 14px;
}
.section-title {
    font-family: var(--font-body);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: var(--text);
}
.section-lede {
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 680px;
    margin: 0 0 48px;
}

/* reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* HERO ============================================================== */
.hero {
    padding: 120px 28px 100px;
    border-top: 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    /* soft radial warmth, no network graph */
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at center,
        rgba(34, 197, 94, 0.08) 0%,
        rgba(34, 197, 94, 0.03) 30%,
        transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.hero-inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}
.hero-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--primary);
    background: var(--primary-dim);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 28px;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.25rem, 5.5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 auto 22px;
    max-width: 18ch;
    color: var(--text);
}
.hero-sub {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 58ch;
    margin: 0 auto 36px;
}
.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 72px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: transform 0.12s var(--ease),
                background 0.15s var(--ease),
                border-color 0.15s var(--ease),
                box-shadow 0.15s var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--primary);
    color: #0a0d11;
    box-shadow: 0 6px 20px -6px rgba(34, 197, 94, 0.55);
}
.btn-primary:hover {
    background: var(--primary-hi);
    color: #0a0d11;
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-hi);
}
.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--text);
    background: var(--primary-dim);
}

/* TERMINAL ========================================================== */
.hero-terminal-wrap {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    position: relative;
}
.terminal {
    background: #0c1116;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.04) inset;
    position: relative;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    background: #11171d;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2a3440;
}
.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #22c55e; }
.terminal-title {
    flex: 1;
    text-align: center;
    color: var(--text-faint);
}
.terminal-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 0.04em;
}
.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

.terminal-body {
    padding: 18px 20px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.75;
    color: var(--text);
    min-height: 340px;
    max-height: 440px;
    overflow: hidden;
    position: relative;
    white-space: pre;
}
.t-line { display: block; }
.t-prompt { color: var(--primary); margin-right: 6px; }
.t-cmd { color: var(--text); }
.t-dim { color: var(--text-faint); }
.t-ok { color: var(--primary); }
.t-warn { color: var(--amber); }
.t-err { color: var(--red); }
.t-tag {
    display: inline-block;
    color: var(--text-dim);
    font-weight: 600;
    min-width: 42px;
}
.t-url { color: var(--amber); }
.t-caret {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--primary);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1.05s steps(2) infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* scan lines, subtle */
.terminal-scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.018) 0px,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    opacity: 0.6;
}

.hero-stamp {
    margin-top: 18px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.06em;
}

/* 2. PROBLEM / SOLUTION ============================================ */
.compare-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}
.compare-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px 28px 24px;
}
.compare-bad { border-top: 2px solid var(--red); }
.compare-good { border-top: 2px solid var(--primary); }
.compare-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 18px;
}
.compare-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}
.compare-mark-bad { background: var(--red-dim); color: var(--red); }
.compare-mark-good { background: var(--primary-dim); color: var(--primary); }
.compare-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.compare-list li {
    padding: 12px 0;
    border-top: 1px dashed var(--border);
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
}
.compare-list li:first-child { border-top: 0; padding-top: 6px; }

/* 3. HOW ============================================================ */
.how-diagram {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin: 40px 0 28px;
    overflow: hidden;
}
.how-diagram svg {
    width: 100%;
    height: auto;
    display: block;
}
.how-prose {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 780px;
    margin: 0;
}

/* 4. FEATURES ======================================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 40px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 26px 24px 24px;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.feature:hover {
    border-color: var(--border-hi);
    background: var(--surface-hi);
}
.feature-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    background: var(--primary-dim);
    color: var(--primary);
    margin-bottom: 16px;
}
.feature-icon svg { width: 18px; height: 18px; }
.feature h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--text);
}
.feature p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-dim);
}

/* 5. INSTALL / QUICKSTART =========================================== */
.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin-top: 32px;
    margin-bottom: 20px;
}
.tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 8px 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active {
    background: var(--primary-dim);
    color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.tab-lede {
    font-size: 14px;
    color: var(--text-dim);
    margin: 0 0 14px;
}

pre {
    position: relative;
    background: #0c1116;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 22px;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text);
}
pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
}
.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    appearance: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hi); }
.copy-btn.done { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }

/* 6. COMPARE TABLE ================================================== */
.table-wrap {
    margin-top: 32px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.ctable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--surface);
}
.ctable th, .ctable td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.ctable thead th {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.ctable tbody tr:last-child th,
.ctable tbody tr:last-child td { border-bottom: 0; }
.ctable th[scope="row"] {
    font-weight: 500;
    color: var(--text);
    background: var(--bg-soft);
    width: 32%;
}
.ctable td {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 13px;
}
.ctable td.y { color: var(--primary); }
.ctable td.n { color: var(--red); }
.ctable td.m { color: var(--amber); }
.ctable-mine { color: var(--primary) !important; }
.ctable-bad { color: var(--red) !important; }

/* 7. STORY ========================================================== */
.story-inner { max-width: 720px; }
.story p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0 0 20px;
}
.story-sig {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-faint);
    margin-top: 28px;
}

/* FOOTER ============================================================ */
.footer {
    padding: 72px 28px 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}
.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-h {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.footer-col a {
    color: var(--text);
    font-size: 14px;
    transition: color 0.15s var(--ease);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
}

/* TOAST ============================================================= */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--surface-hi);
    border: 1px solid var(--border-hi);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 10px 18px;
    border-radius: var(--r-sm);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
    z-index: 100;
}
.toast.in {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE ======================================================== */
@media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .compare-pair { grid-template-columns: 1fr; }
    .section-title { font-size: 1.75rem; }
    section { padding: 64px 22px; }
    .footer { padding: 56px 22px 32px; }
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 640px) {
    .hero { padding: 80px 22px 60px; }
    .nav-inner { padding: 12px 22px; }
    .nav-links { gap: 14px; }
    .nav-link { display: none; }
    .nav-cta { display: inline-flex; }
    .feature-grid { grid-template-columns: 1fr; }
    .hero-sub { font-size: 1rem; }
    .btn { padding: 11px 18px; font-size: 14px; }
    .terminal-title { display: none; }
    .terminal-body { font-size: 12px; padding: 14px 14px 16px; min-height: 300px; }
    .ctable th, .ctable td { padding: 10px 12px; font-size: 12.5px; }
    .ctable th[scope="row"] { width: 40%; }
    .footer-cols { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 420px) {
    .hero-ctas { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
}

/* MOTION SAFETY ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .t-caret { animation: none; opacity: 1; }
    .dot-live { animation: none; }
    .terminal-scan { display: none; }
}
