/* ==========================================================================
   console.success — landing page
   Aesthetic: terminal / developer console · dark · neon success-green
   Fonts: Clash Display (display), Satoshi (body), JetBrains Mono (code)
   ========================================================================== */

:root {
    --bg: #0a0e0a;
    --bg-2: #0f140f;
    --panel: #11161180;
    --panel-solid: #131a13;
    --line: #1f2a1f;
    --line-bright: #2a3a2a;

    --green: #22c55e;
    --green-bright: #4ade80;
    --green-glow: #22c55e40;
    --green-deep: #15803d;

    --text: #d7e3d7;
    --text-dim: #8a9a8a;
    --text-mute: #5a6a5a;

    --amber: #fbbf24;
    --red: #f87171;

    --font-display: 'Clash Display', system-ui, sans-serif;
    --font-body: 'Satoshi', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --maxw: 1200px;
    --radius: 14px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* layered atmospheric background: radial green glow + faint grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 600px at 78% -5%, var(--green-glow), transparent 60%),
        radial-gradient(700px 500px at 5% 20%, #16201680, transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    opacity: .35;
}

/* film grain + scanlines for CRT vibe */
.grain, .scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
.grain {
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scanlines {
    background: repeating-linear-gradient(0deg, transparent 0 2px, #ffffff04 2px 3px);
    opacity: .4;
}

/* ---------- typography helpers ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, pre {
    font-family: var(--font-mono);
    font-size: .9em;
}
:not(pre) > code {
    background: var(--green-glow);
    color: var(--green-bright);
    padding: .1em .4em;
    border-radius: 5px;
    border: 1px solid var(--line-bright);
}
kbd {
    background: var(--panel-solid);
    border: 1px solid var(--line-bright);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: .05em .4em;
    font-size: .85em;
}

/* ---------- layout ---------- */
main { display: block; }
section { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--maxw); margin: 0 auto;
    backdrop-filter: blur(10px);
    background: linear-gradient(180deg, #0a0e0acc, #0a0e0a00);
}
.brand { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-weight: 700; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-prompt { color: var(--green); }
.brand-dot { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--green-bright); text-decoration: none; }
.nav-gh { color: var(--text) !important; }

/* ---------- hero ---------- */
.hero { padding: 70px 24px 60px; }
.hero-grid {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
    max-width: var(--maxw); margin: 0 auto;
}
.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: .82rem; color: var(--text-dim);
    border: 1px solid var(--line-bright); padding: 6px 12px; border-radius: 999px;
    background: var(--panel);
}
.kicker-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 22px 0 18px; color: var(--text); }
.accent {
    background: linear-gradient(120deg, var(--green-bright), var(--green-deep) 70%, var(--green-bright));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 200% auto;
    animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.lede { font-size: 1.18rem; color: var(--text-dim); max-width: 30ch; }
.lede code { font-size: .95em; }
.hero-cta { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-badges img { display: block; height: 22px; }

/* buttons */
.btn {
    font-family: var(--font-body); font-weight: 700; font-size: .98rem;
    padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--green); color: #04210d; border-color: var(--green-bright);
    box-shadow: 0 0 0 0 var(--green-glow), 0 6px 20px -8px var(--green);
}
.btn-primary:hover { background: var(--green-bright); box-shadow: 0 0 24px -2px var(--green); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-bright); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-bright); }

/* hero terminal mock */
.hero-term {
    border: 1px solid var(--line-bright); border-radius: var(--radius);
    background: var(--panel-solid); overflow: hidden;
    box-shadow: 0 30px 80px -30px #000, 0 0 60px -20px var(--green-glow);
}
.term-chrome {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px; background: #0c110c; border-bottom: 1px solid var(--line);
    font-family: var(--font-mono); font-size: .8rem;
}
.term-chrome.small { padding: 8px 12px; }
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.td-r { background: #ff5f57; } .td-y { background: #febc2e; } .td-g { background: #28c840; }
.term-title { margin-left: 8px; color: var(--text-mute); }
.term-status { margin-left: auto; color: var(--text-mute); font-size: .72rem; text-transform: lowercase; }
.term-status.live { color: var(--green-bright); }
.term-body {
    font-family: var(--font-mono); font-size: .92rem; line-height: 1.7;
    padding: 18px 20px; margin: 0; color: var(--text); overflow-x: auto;
}
.term-body .t-muted { color: var(--text-mute); }
.t-success-badge {
    display: inline-block; background: var(--green); color: #04210d;
    font-weight: 700; padding: 0 6px; border-radius: 4px;
    box-shadow: 0 0 12px -2px var(--green);
}
.t-cursor { color: var(--green-bright); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- reveal-on-load ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal:nth-child(1){animation-delay:.05s}
.reveal:nth-child(2){animation-delay:.15s}
.reveal:nth-child(3){animation-delay:.27s}
.reveal:nth-child(4){animation-delay:.39s}
.reveal:nth-child(5){animation-delay:.51s}
.reveal:nth-child(6){animation-delay:.63s}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- section heads ---------- */
.section-head { margin: 90px auto 40px; max-width: 760px; text-align: center; }
.section-num {
    font-family: var(--font-mono); color: var(--green); font-size: .85rem; letter-spacing: .2em;
    display: block; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--text); }
.section-sub { color: var(--text-dim); margin-top: 12px; font-size: 1.05rem; }
.section-sub code { font-size: .92em; }

/* ---------- demo ---------- */
.demo { padding-bottom: 20px; }
.demo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.demo-input-col, .demo-output-col {
    border: 1px solid var(--line-bright); border-radius: var(--radius);
    background: var(--panel-solid); overflow: hidden;
    box-shadow: 0 20px 50px -30px #000;
}
.playground { padding: 16px; }
#demo-input {
    width: 100%; background: #0a0f0a; color: var(--green-bright);
    border: 1px solid var(--line); border-radius: 8px; padding: 14px;
    font-family: var(--font-mono); font-size: .92rem; line-height: 1.6; resize: vertical;
    outline: none; transition: border-color .2s ease;
}
#demo-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.play-controls { display: flex; gap: 10px; margin-top: 12px; }
.btn-run { padding: 10px 18px; }
.btn-clear { padding: 10px 16px; }
.play-hint { font-size: .8rem; color: var(--text-mute); margin-top: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; align-items: center; }
.presets-label { font-size: .8rem; color: var(--text-mute); margin-right: 4px; font-family: var(--font-mono); }
.chip {
    font-family: var(--font-mono); font-size: .76rem; color: var(--text-dim);
    background: #0a0f0a; border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 10px; cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--green); color: var(--green-bright); }

.live-output {
    min-height: 240px; max-height: 360px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-word;
}
.live-output .placeholder { color: var(--text-mute); font-style: italic; }
.live-output .lo-line { padding: 3px 0; animation: typeIn .25s ease; }
.live-output .lo-prompt { color: var(--green); }
@keyframes typeIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.devtools-nudge { text-align: center; color: var(--text-dim); margin-top: 22px; font-size: .92rem; }

/* ---------- install ---------- */
.install { padding-bottom: 20px; }
.cmd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cmd-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-solid); }
.cmd-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #0c110c; border-bottom: 1px solid var(--line); }
.cmd-tag { font-family: var(--font-mono); font-size: .72rem; color: var(--green-bright); text-transform: uppercase; letter-spacing: .1em; }
.cmd-line { margin: 0; padding: 14px 16px; font-size: .88rem; overflow-x: auto; }
.cmd-line code { background: none; border: none; color: var(--text); padding: 0; }

.copy-btn {
    font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
    background: transparent; color: var(--text-mute); border: 1px solid var(--line); border-radius: 6px;
    padding: 3px 9px; cursor: pointer; transition: all .15s ease;
}
.copy-btn:hover { color: var(--green-bright); border-color: var(--green); }
.copy-btn.copied { color: var(--green-bright); border-color: var(--green); background: var(--green-glow); }
.copy-btn.dark { color: var(--text); border-color: var(--line-bright); }

/* ---------- usage / tabs ---------- */
.usage { padding-bottom: 20px; }
.tabs { display: flex; gap: 4px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
    font-family: var(--font-mono); font-size: .85rem; font-weight: 500; color: var(--text-dim);
    background: transparent; border: 1px solid var(--line); border-radius: 8px;
    padding: 8px 16px; cursor: pointer; transition: all .15s ease;
}
.tab:hover { color: var(--text); border-color: var(--line-bright); }
.tab.active { color: var(--green-bright); border-color: var(--green); background: var(--green-glow); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .4s ease; }
.code-block {
    border: 1px solid var(--line-bright); border-radius: var(--radius); background: var(--panel-solid);
    overflow-x: auto;
}
.code-block pre { margin: 0; padding: 22px 24px; font-size: .9rem; line-height: 1.8; }
/* syntax tokens */
.c-key { color: #c084fc; }      /* keyword */
.c-fn  { color: #60a5fa; }      /* function/identifier */
.c-method { color: var(--green-bright); }
.c-str { color: var(--amber); }
.c-com { color: var(--text-mute); font-style: italic; }
.c-attr { color: #c084fc; }

.callout {
    margin-top: 24px; padding: 16px 20px; border-radius: 12px;
    background: #1a140880; border: 1px solid #42360c;
    color: var(--text-dim); font-size: .92rem;
}
.callout strong { color: var(--amber); }
.callout code { background: #00000040; }

/* ---------- features ---------- */
.features { padding-bottom: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel); padding: 26px 24px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: 0 16px 40px -24px var(--green-glow); }
.feature-ico { font-size: 1.7rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.25rem; margin-bottom: 8px; color: var(--text); }
.feature p { color: var(--text-dim); font-size: .95rem; }

/* ---------- stats ---------- */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin: 90px auto; padding: 36px 24px;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num {
    display: block; font-family: var(--font-display); font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem); color: var(--green-bright);
    text-shadow: 0 0 30px var(--green-glow);
}
.stat-unit { font-size: .5em; color: var(--text-dim); margin-left: 2px; }
.stat-label { font-family: var(--font-mono); font-size: .8rem; color: var(--text-mute); text-transform: lowercase; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 40px 24px 80px; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 24px; }
.cta-cmd {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--panel-solid); border: 1px solid var(--green);
    border-radius: 12px; padding: 12px 18px;
    box-shadow: 0 0 40px -10px var(--green-glow);
}
.cta-cmd code { background: none; border: none; color: var(--green-bright); padding: 0; font-size: .95rem; }
.cta-links { display: flex; gap: 24px; justify-content: center; margin-top: 26px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 24px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-brand { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.footer-meta { color: var(--text-dim); font-size: .9rem; }
.footer-meta a { color: var(--text); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-dim); font-size: .9rem; }

/* ---------- a11y ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .demo-wrap { grid-template-columns: 1fr; }
    .cmd-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: 28px; }
    .nav-links { gap: 16px; }
    .nav-links a:not(.nav-gh) { display: none; }
}
@media (max-width: 520px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 40px; }
    .footer-inner { flex-direction: column; text-align: center; }
}
