/* ============ Matcha site styles ============ */
:root {
    --bg: #05080a;
    --bg-2: #060a0d;
    --panel: #0a1013;
    --panel-2: #0e1619;
    --line: #14222b;
    --line-2: #1d3441;
    --ink: #c8d6d8;
    --ink-dim: #7d9099;
    --ink-dim2: #52666e;

    --accent: #6aa84f;
    --accent-2: #85c26a;
    --accent-deep: #3b6b28;
    --green-soft: #8fb88b;

    --blue: #5aa3d8;
    --yellow: #d1b85a;

    --mono: "IBM Plex Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
    --sans:
        "IBM Plex Sans", ui-sans-serif, -apple-system, system-ui, sans-serif;
    --serif: "IBM Plex Serif", ui-serif, Georgia, serif;

    /* mouse glow position — updated by JS */
    --mx: 50%;
    --my: 30%;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Static ambient gradient */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(
            1000px 500px at 85% -10%,
            rgba(106, 168, 79, 0.06),
            transparent 60%
        ),
        radial-gradient(
            800px 400px at -10% 30%,
            rgba(106, 168, 79, 0.03),
            transparent 60%
        );
}

/* Mouse-follow glow overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        560px circle at var(--mx) var(--my),
        rgba(106, 168, 79, 0.055),
        transparent 70%
    );
}

a {
    color: inherit;
    text-decoration: none;
}

code,
kbd,
pre {
    font-family: var(--mono);
}

em {
    font-style: italic;
    color: var(--accent);
    font-family: var(--serif);
    font-weight: 500;
}

.dim {
    color: var(--ink-dim);
}

.underline-link {
    color: var(--accent);
    border-bottom: 1px dashed var(--accent-deep);
    padding-bottom: 1px;
    transition: color 0.15s;
}
.underline-link:hover {
    color: var(--accent-2);
}

.site {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Nav ---------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(5, 8, 10, 0.82);
    backdrop-filter: blur(12px);
    z-index: 50;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 15px;
    letter-spacing: -0.01em;
}

.wm-bracket {
    color: var(--accent);
    font-size: 12px;
    transform: translateY(-1px);
}
.wm-name {
    color: var(--ink);
    font-weight: 500;
}
.wm-dim {
    color: var(--ink-dim2);
    font-size: 12px;
}
.wm-logo {
    display: flex;
    align-items: center;
    align-self: center;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    font-family: var(--mono);
    font-size: 13px;
}
.nav-links a {
    color: var(--ink-dim);
    transition: color 0.15s;
    position: relative;
}
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}
.nav-links a:hover {
    color: var(--ink);
}
.nav-links a:hover::after {
    width: 100%;
}

.nav-github {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.nav-star {
    color: var(--accent);
    font-size: 12px;
}
.nav-right .btn {
    font-family: var(--mono);
    font-size: 13px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--line-2);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s,
        box-shadow 0.25s;
}
.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-k {
    font-size: 11px;
    color: var(--ink-dim);
    transition: color 0.15s;
}
.btn:hover .btn-k {
    color: var(--accent);
}
.btn-primary {
    background: var(--accent);
    color: #05080a;
    border-color: var(--accent);
    font-weight: 500;
}
.btn-primary:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #05080a;
    box-shadow: 0 0 28px rgba(106, 168, 79, 0.35);
}
.btn-primary .btn-k {
    color: #05080a;
    opacity: 0.6;
}
.btn-ghost {
    background: transparent;
}
.btn-lg {
    padding: 14px 22px;
    font-size: 14px;
}

/* ---------- Hero load animations ---------- */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    animation: heroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both 0.05s;
}
.hero-h1 {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.18s;
}
.hero-sub {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.32s;
}
.hero-cta {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.46s;
}
.quickstart {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.58s;
}
.hero-meta {
    animation: heroFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.72s;
}

/* ---------- Hero ---------- */
.hero {
    padding: 96px 0 72px;
    text-align: center;
}
.hero-copy {
    max-width: 720px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-dim);
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    margin-bottom: 28px;
}
.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(106, 168, 79, 0.2);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}
.hero-h1 {
    font-family: var(--sans);
    font-size: 62px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin: 0 0 24px;
    text-wrap: pretty;
}
.hero-h1 em {
    text-shadow: 0 0 56px rgba(106, 168, 79, 0.4);
}
.hero-sub {
    font-size: 17px;
    color: var(--ink-dim);
    max-width: 50ch;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.hero-meta {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
    margin-top: 32px;
}
.hero-meta .dim {
    display: block;
    color: var(--ink-dim2);
    font-size: 11px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- QuickStart ---------- */
.quickstart {
    background: var(--panel-2);
    border: 1px solid var(--line-2);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto 8px;
    max-width: 480px;
    text-align: left;
    box-shadow:
        0 20px 60px -20px rgba(0, 0, 0, 0.5),
        0 8px 20px -8px rgba(106, 168, 79, 0.06);
    transition:
        border-color 0.25s,
        box-shadow 0.25s;
}
.quickstart:hover {
    border-color: var(--accent-deep);
    box-shadow:
        0 24px 70px -20px rgba(0, 0, 0, 0.55),
        0 8px 28px -8px rgba(106, 168, 79, 0.16);
}
.qs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}
.qs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.qs-r {
    background: #2a1414;
}
.qs-y {
    background: #2a2514;
}
.qs-g {
    background: #0f2a16;
}
.qs-bar-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-dim2);
    margin-left: 6px;
}
.qs-code {
    margin: 0;
    padding: 20px 24px;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 2;
    color: var(--accent);
    min-height: 80px;
}
.qs-prompt {
    color: var(--ink-dim2);
}
.qs-caret {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Sections ---------- */
.section-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    padding: 80px 0 40px;
    border-top: 1px solid var(--line);
    align-items: end;
}
.section-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.04em;
}
.section-h2 {
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 0;
    text-wrap: pretty;
}
.section-h2 .dim {
    color: var(--ink-dim);
}
.section-head-r {
    color: var(--ink-dim);
    font-size: 15px;
    max-width: 44ch;
    margin: 0;
}
.section-head-r code {
    font-size: 13px;
    color: var(--accent);
    background: var(--panel);
    padding: 1px 5px;
    border-radius: 2px;
}

/* Features grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 24px;
}
.feature {
    position: relative;
    overflow: hidden;
    background: var(--bg);
    padding: 32px 28px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    transition:
        background 0.2s,
        opacity 0.7s ease,
        transform 0.7s ease;
}
.feature::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature:hover::before {
    transform: scaleX(1);
}
.feature:hover {
    background: var(--bg-2);
}
.feature-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
}
.feature-dash {
    color: var(--ink-dim2);
}
.feature-title {
    font-family: var(--sans);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    line-height: 1.2;
}
.feature-body {
    color: var(--ink-dim);
    font-size: 14px;
    margin: 0 0 20px;
    flex: 1;
    line-height: 1.55;
}
.feature-mono {
    margin: 0;
    background: var(--panel-2);
    border: 1px solid var(--line-2);
    padding: 10px 12px;
    font-size: 11.5px;
    color: var(--accent);
    border-radius: 2px;
    white-space: pre-wrap;
    transition: border-color 0.2s;
}
.feature:hover .feature-mono {
    border-color: var(--accent-deep);
}

/* Install */
.install-card {
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 80px;
    transition: border-color 0.25s;
}
.install-card:hover {
    border-color: var(--line-2);
}
.install-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    padding: 0 8px;
    overflow-x: auto;
}
.install-tab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    color: var(--ink-dim);
    font-family: var(--mono);
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition:
        color 0.15s,
        border-color 0.15s;
    white-space: nowrap;
}
.install-tab:hover {
    color: var(--ink);
}
.install-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.install-tabs-spacer {
    flex: 1;
}
.install-plat {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-dim2);
    padding-right: 12px;
    white-space: nowrap;
}
.install-code {
    margin: 0;
    padding: 36px 28px;
    font-size: 15px;
    color: var(--accent);
    background: var(--bg-2);
    white-space: pre-wrap;
    line-height: 1.7;
    overflow-x: auto;
}
.install-foot {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    padding: 12px 28px;
    border-top: 1px solid var(--line);
    background: var(--bg);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
}
.install-foot .dim {
    color: var(--ink-dim2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
    margin-right: 6px;
}

/* CTA */
.cta {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-top: 20px;
    padding: 100px 0;
    text-align: center;
    background: repeating-linear-gradient(
        0deg,
        transparent 0 26px,
        rgba(106, 168, 79, 0.02) 26px 27px
    );
}
.cta-pre {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 16px;
}
.cta-h2 {
    font-size: 60px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.04;
    margin: 0 0 36px;
}
.cta-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: 64px 0 32px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 3fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
}
.footer-tag {
    color: var(--ink-dim);
    font-size: 13px;
    margin: 16px 0 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.footer-h {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-dim2);
    margin-bottom: 12px;
}
.footer-cols a {
    display: block;
    color: var(--ink-dim);
    font-size: 13px;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.15s;
}
.footer-cols a:hover {
    color: var(--accent);
}
.footer-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-dim2);
}
.footer-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-dim);
}
.footer-meta {
    display: flex;
    gap: 8px;
}
.footer-meta .sep {
    color: var(--line-2);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero-h1 {
        font-size: 46px;
    }
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-head {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .section-h2 {
        font-size: 34px;
    }
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    .cta-h2 {
        font-size: 40px;
    }
}

@media (max-width: 640px) {
    .site {
        padding: 0 20px;
    }
    .nav-links {
        display: none;
    }
    .nav-right {
        display: none;
    }
    .hero {
        padding: 64px 0 48px;
    }
    .hero-h1 {
        font-size: 36px;
    }
    .hero-sub {
        font-size: 15px;
    }
    .hero-cta .btn-lg {
        padding: 12px 18px;
        font-size: 13px;
    }
    .quickstart {
        max-width: 100%;
    }
    .qs-code {
        font-size: 12px;
        padding: 16px 18px;
    }
    .hero-meta {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .section-h2 {
        font-size: 28px;
    }
    .cta-h2 {
        font-size: 30px;
    }
    .install-code {
        font-size: 13px;
        padding: 24px 18px;
    }
    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-eyebrow,
    .hero-h1,
    .hero-sub,
    .hero-cta,
    .quickstart,
    .hero-meta {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .feature {
        opacity: 1;
        transform: none;
    }
    .dot-live,
    .qs-caret {
        animation: none;
        opacity: 1;
    }
    .feature::before {
        transition: none;
    }
}
