/* Karl — landing styles. Minimal, no framework, dark-first. */

:root {
    --bg: #0d1117;
    --bg-elev: #161b22;
    --bg-elev-2: #1c2128;
    --border: #30363d;
    --fg: #e6edf3;
    --fg-dim: #9ba7b3;
    --fg-mute: #6e7681;
    --accent: #7ee787;
    --accent-dim: #2ea043;
    --warn: #f0b72f;
    --link: #79c0ff;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max: 980px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

/* Compensate sticky header so anchored headings aren't hidden under it. */
section { scroll-margin-top: 72px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: var(--mono); }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

header.top {
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    position: sticky;
    top: 0;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10;
}
header.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header.top .brand {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 18px;
    color: var(--fg);
}
header.top .brand .dot { color: var(--accent); }
header.top nav a {
    color: var(--fg-dim);
    margin-left: 24px;
    font-size: 14px;
}
header.top nav a:hover { color: var(--fg); }
header.top nav a.nav-cta {
    color: var(--accent);
    border: 1px solid rgba(126, 231, 135, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-left: 28px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
header.top nav a.nav-cta:hover {
    background: rgba(126, 231, 135, 0.08);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* Hero */
section.hero {
    padding: 96px 0 72px;
    position: relative;
    overflow: hidden;
}
section.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            900px circle at 85% -10%,
            rgba(126, 231, 135, 0.10),
            transparent 60%
        ),
        radial-gradient(
            700px circle at -10% 110%,
            rgba(121, 192, 255, 0.06),
            transparent 55%
        );
    pointer-events: none;
    z-index: 0;
}
section.hero .wrap { position: relative; z-index: 1; }

/* Hero two-column on wide viewports. The visual collapses on narrow. */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 36px;
    align-items: center;
}
.hero-copy { min-width: 0; }
.hero-visual {
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}
.hero-visual .loop { width: 100%; height: 100%; display: block; }
.hero-visual .loop-pulse {
    filter: drop-shadow(0 0 8px rgba(126, 231, 135, 0.65));
}
.hero-visual .chip rect { transition: stroke 0.2s; }
.hero-visual .chip:hover rect { stroke: var(--accent); }
@media (max-width: 640px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { width: 100%; max-width: 280px; height: auto; margin: 12px auto 0; }
    .hero-visual .loop { aspect-ratio: 1 / 1; height: auto; }
}

/* Pull-quote band between hero and "how it works" */
section.quote-band {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(
            180deg,
            rgba(126, 231, 135, 0.025),
            rgba(126, 231, 135, 0.0) 100%
        );
}
section.quote-band blockquote {
    margin: 0;
    font-size: 22px;
    line-height: 1.45;
    color: var(--fg);
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 720px;
}
section.quote-band blockquote .mark {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 28px;
    line-height: 0;
    vertical-align: -4px;
    margin: 0 4px;
}
section.quote-band blockquote .accent { color: var(--accent); }
section.quote-band .quote-attr {
    margin: 14px 0 0;
    font-family: var(--mono);
    color: var(--fg-mute);
    font-size: 13px;
}
section.quote-band h2 { display: none; }
section.hero h1 {
    font-size: 42px;
    line-height: 1.1;
    margin: 0 0 22px;
    letter-spacing: -0.025em;
    font-weight: 600;
}
section.hero h1 .accent { color: var(--accent); }
section.hero .sub {
    color: var(--fg-dim);
    font-size: 19px;
    margin: 0 0 36px;
    max-width: 640px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    font-family: var(--sans);
}
.btn-primary {
    background: var(--accent-dim);
    color: #fff;
    border-color: var(--accent-dim);
}
.btn-primary:hover { background: #3fb453; text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elev); text-decoration: none; }
.btn .meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-family: var(--mono);
    margin-left: 6px;
}
.btn-ghost .meta { color: var(--fg-mute); }

/* Pricing */
.pricing-grid {
    align-items: stretch;
}
.pricing-card {
    display: flex;
    flex-direction: column;
}
.pricing-card-featured {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 1px rgba(126, 231, 135, 0.18),
                0 8px 32px rgba(126, 231, 135, 0.06);
}
.pricing-card .price {
    margin: 14px 0 4px;
    color: var(--fg);
}
.pricing-card .price-num {
    font-family: var(--mono);
    font-size: 32px;
    font-weight: 600;
    color: var(--fg);
}
.pricing-card .price-unit {
    color: var(--fg-mute);
    font-size: 14px;
    margin-left: 4px;
}
.pricing-card .price-sub {
    color: var(--fg-mute);
    font-size: 13px;
    margin: 0 0 16px;
}
.plan-points {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--fg-dim);
    flex: 1;
}
.plan-points li {
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.45;
}
.plan-points li::before {
    content: "›";
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-family: var(--mono);
}
.plan-cta {
    width: 100%;
    justify-content: center;
}

/* Sections */
section { padding: 48px 0; border-top: 1px solid var(--border); }
section h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-mute);
    font-weight: 600;
    margin: 0 0 24px;
}
section h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
section p { color: var(--fg-dim); margin: 0 0 16px; }
section p strong { color: var(--fg); font-weight: 600; }

/* Feature grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}
.feature .tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.feature h3 { font-size: 18px; margin: 0 0 10px; }
.feature p { font-size: 14px; margin: 0; line-height: 1.5; }

/* Big stat */
.proof {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
}
.proof .stat {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.proof .stat .num {
    font-family: var(--mono);
    font-size: 44px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}
.proof .stat .label {
    color: var(--fg-dim);
    font-size: 14px;
    max-width: 460px;
}
.proof .narrative { color: var(--fg-dim); font-size: 14px; margin: 0; }

/* Stat trio above the proof prose */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    opacity: 0.55;
}
.stat-card .stat-num {
    font-family: var(--mono);
    font-size: 32px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}
.stat-card .stat-label {
    color: var(--fg-dim);
    font-size: 13px;
    line-height: 1.5;
}
@media (max-width: 560px) {
    .stat-row { grid-template-columns: 1fr; }
}

/* Code block */
pre.code {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 18px;
    font-size: 13px;
    color: var(--fg);
    overflow-x: auto;
    margin: 16px 0;
}
pre.code .comment { color: var(--fg-mute); }
pre.code .accent { color: var(--accent); }

/* Definition list */
dl.kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 24px;
    font-size: 14px;
    margin: 0;
}
dl.kv dt {
    color: var(--fg-mute);
    font-family: var(--mono);
    font-size: 13px;
}
dl.kv dd {
    margin: 0;
    color: var(--fg);
    word-break: break-all;
}
dl.kv dd.mono { font-family: var(--mono); font-size: 13px; }

/* Checklist */
ul.check { list-style: none; padding: 0; margin: 0; }
ul.check li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--fg-dim);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
ul.check li:last-child { border-bottom: 0; }
ul.check li::before {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 8px;
    color: var(--accent);
    font-weight: 600;
}
ul.check li.x::before { content: "✗"; color: var(--warn); }
ul.check li strong { color: var(--fg); }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 36px 0 60px;
    color: var(--fg-mute);
    font-size: 13px;
}
footer .wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
footer a { color: var(--fg-dim); }

/* Notices */
.notice {
    background: rgba(240, 183, 47, 0.08);
    border: 1px solid rgba(240, 183, 47, 0.3);
    color: var(--fg);
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 14px;
    margin: 24px 0;
}
.notice strong { color: var(--warn); }

/* Responsive */
@media (max-width: 720px) {
    section.hero { padding: 64px 0 48px; }
    section.hero h1 { font-size: 32px; }
    section.hero .sub { font-size: 17px; }
    .features { grid-template-columns: 1fr; }
    dl.kv { grid-template-columns: 1fr; gap: 4px 0; }
    dl.kv dd { margin-bottom: 12px; }
    header.top nav a { margin-left: 14px; }
    .proof .stat .num { font-size: 36px; }
}
