/* ============================================
   typesprint — landing page
   monochrome matrix green on near-black
   jetbrains-mono everywhere
   ============================================ */

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

:root {
    --bg: #000000;
    --bg-near: #010503;
    --bg-panel: #020907;
    --bg-elev: #04110b;
    --grn: #00ff7f;
    --grn-dim: #0c8a43;
    --grn-glow: #5fff9a;
    --grn-deep: #062a16;
    --text: #9cf8c4;
    --text-dim: #5ab884;
    --text-muted: #2e6a47;
    --border: rgba(0, 255, 127, 0.18);
    --border-strong: rgba(0, 255, 127, 0.35);
    --radius: 4px;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   scan-lines + vignette (fixed full-viewport)
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 255, 127, 0.03) 0px,
            rgba(0, 255, 127, 0.03) 1px,
            transparent 1px,
            transparent 3px
        ),
        radial-gradient(ellipse 90% 70% at 50% 30%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(0, 255, 127, 0.09), transparent 60%);
}

/* ============================================
   matrix rain — pseudo falling columns
   ============================================ */
.rain {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.55;
}

.rain-col {
    position: absolute;
    top: -140%;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.9;
    color: var(--grn-dim);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.3em;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(0, 255, 127, 0.35);
    animation: fall linear infinite;
}

.rain-col:nth-child(1) { left: 6%;  animation-duration: 18s; animation-delay: -2s;  opacity: 0.7; }
.rain-col:nth-child(2) { left: 22%; animation-duration: 26s; animation-delay: -9s;  opacity: 0.45; color: var(--grn); }
.rain-col:nth-child(3) { left: 41%; animation-duration: 22s; animation-delay: -4s;  opacity: 0.35; }
.rain-col:nth-child(4) { left: 63%; animation-duration: 30s; animation-delay: -14s; opacity: 0.55; }
.rain-col:nth-child(5) { left: 81%; animation-duration: 20s; animation-delay: -6s;  opacity: 0.4;  color: var(--grn); }
.rain-col:nth-child(6) { left: 94%; animation-duration: 28s; animation-delay: -11s; opacity: 0.6; }

@keyframes fall {
    0%   { transform: translateY(0); }
    100% { transform: translateY(240vh); }
}

/* ============================================
   selection + links
   ============================================ */
a {
    color: var(--grn);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: var(--grn-glow);
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.6);
}

::selection {
    background: var(--grn);
    color: #000;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--grn);
    background: rgba(0, 255, 127, 0.08);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 127, 0.15);
}

.page {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
}

/* ============================================
   nav
   ============================================ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 2rem;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--grn);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 0 6px rgba(0, 255, 127, 0.4);
}

.nav-logo:hover { color: var(--grn-glow); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 500;
}

.nav-link:hover { color: var(--grn); }

.nav-cta {
    color: #000;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.45em 1em;
    border-radius: 2px;
    background: var(--grn);
    border: 1px solid var(--grn);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    transition: all 0.25s var(--ease);
    box-shadow: 0 0 14px rgba(0, 255, 127, 0.4);
}

.nav-cta:hover {
    color: #000;
    background: var(--grn-glow);
    box-shadow: 0 0 22px rgba(0, 255, 127, 0.75);
}

/* ============================================
   hero
   ============================================ */
.hero { padding: 1.5rem 0 4rem; }

.hero-inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.hero-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--grn);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    padding: 0.35em 1em;
    border-radius: 2px;
    background: rgba(0, 255, 127, 0.06);
    border: 1px solid var(--border-strong);
    margin-bottom: 2rem;
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.5);
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero-title .grad {
    color: var(--grn);
    text-shadow:
        0 0 8px rgba(0, 255, 127, 0.7),
        0 0 24px rgba(0, 255, 127, 0.35);
}

.hero-title .glow {
    color: var(--grn-dim);
    font-weight: 500;
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: clamp(0.92rem, 1.3vw, 1.05rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* wpm meter */
.wpm-meter {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto 2rem;
    max-width: 560px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    background: rgba(0, 20, 10, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.wpm-cell {
    flex: 1;
    padding: 0.85rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border-right: 1px dashed var(--border);
}

.wpm-cell:last-child { border-right: none; }

.wpm-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.wpm-val {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--grn);
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.6);
    font-variant-numeric: tabular-nums;
}

.wpm-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: -0.3rem;
}

/* cta buttons */
.hero-cta-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.75em 1.7em;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 2px;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    transition: all 0.3s var(--ease);
    border: 1px solid transparent;
}

.btn-primary {
    color: #000;
    background: var(--grn);
    border-color: var(--grn);
    box-shadow: 0 0 18px rgba(0, 255, 127, 0.4), inset 0 0 0 2px rgba(0, 0, 0, 0);
    animation: cta-pulse 2.2s ease-in-out infinite;
}

.btn-primary:hover {
    color: #000;
    background: var(--grn-glow);
    box-shadow: 0 0 28px rgba(0, 255, 127, 0.8);
    transform: translateY(-1px);
}

.btn-primary .caret {
    animation: blink 1s steps(2) infinite;
}

.btn-ghost {
    color: var(--grn);
    background: transparent;
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    color: var(--grn-glow);
    border-color: var(--grn);
    box-shadow: 0 0 14px rgba(0, 255, 127, 0.35);
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 255, 127, 0.4); }
    50%      { box-shadow: 0 0 28px rgba(0, 255, 127, 0.75); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.blink {
    color: var(--grn);
    animation: blink 1s steps(2) infinite;
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.8);
}

/* ============================================
   demo (terminal blocks)
   ============================================ */
.hero-demo {
    margin: 0 auto;
    max-width: 780px;
}

.demo {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text);
    background: linear-gradient(180deg, rgba(0, 10, 5, 0.95), rgba(0, 20, 10, 0.85));
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    padding: 1.4rem 1.6rem;
    text-align: left;
    overflow-x: auto;
    white-space: pre;
    box-shadow:
        0 0 0 1px rgba(0, 255, 127, 0.08),
        0 0 40px rgba(0, 255, 127, 0.12),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.demo::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 127, 0.03) 0px,
        rgba(0, 255, 127, 0.03) 1px,
        transparent 1px,
        transparent 4px
    );
    border-radius: 3px;
}

.c-dim    { color: var(--text-muted); }
.c-accent { color: var(--grn); }
.c-ok     { color: var(--grn); text-shadow: 0 0 6px rgba(0, 255, 127, 0.4); }
.c-err    { color: #ff4d6d; text-decoration: underline; text-decoration-color: #ff4d6d; text-shadow: 0 0 6px rgba(255, 77, 109, 0.5); }
.bold     { font-weight: 700; }

/* ============================================
   features grid
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    padding: 4rem 0 3rem;
}

.feature {
    padding: 1.75rem 1.6rem 1.5rem;
    background: var(--bg-near);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.35s var(--ease);
    position: relative;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 3px;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0, 255, 127, 0) inset;
    transition: box-shadow 0.35s var(--ease);
}

.feature:hover {
    border-color: var(--grn);
    transform: translateY(-3px);
    box-shadow: 0 0 22px rgba(0, 255, 127, 0.25), 0 0 60px rgba(0, 255, 127, 0.08);
}

.feature:hover::before {
    box-shadow: 0 0 0 1px rgba(0, 255, 127, 0.4) inset;
}

.feature-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grn);
    background: rgba(0, 255, 127, 0.06);
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.feature-icon svg { width: 18px; height: 18px; }

.feature h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--grn);
    margin-bottom: 0.55rem;
    text-shadow: 0 0 6px rgba(0, 255, 127, 0.25);
}

.feature p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ============================================
   why not monkeytype
   ============================================ */
.why {
    padding: 3rem 0;
    max-width: 780px;
    margin: 0 auto;
    text-align: left;
}

.why-inner {
    padding: 2rem 2rem 2.2rem;
    background: var(--bg-near);
    border: 1px solid var(--border);
    border-left: 3px solid var(--grn);
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 28px rgba(0, 255, 127, 0.1);
}

.why-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.why h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 700;
    color: var(--grn);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}

.why p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
    line-height: 1.7;
}

.why-kicker {
    margin-top: 1.2rem !important;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border);
    color: var(--grn) !important;
    font-style: italic;
    text-shadow: 0 0 6px rgba(0, 255, 127, 0.3);
}

/* ============================================
   modes
   ============================================ */
.modes {
    padding: 3rem 0;
}

.modes h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--grn);
    text-align: center;
    text-shadow: 0 0 12px rgba(0, 255, 127, 0.4);
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.mode-card {
    padding: 1.3rem;
    background: var(--bg-near);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.mode-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 0 16px rgba(0, 255, 127, 0.15);
}

.mode-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.mode-head code {
    font-size: 0.8rem;
    padding: 0.3em 0.6em;
    background: rgba(0, 255, 127, 0.08);
    border: 1px solid var(--border-strong);
    color: var(--grn);
}

.mode-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #000;
    background: var(--grn);
    padding: 0.15em 0.55em;
    border-radius: 2px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.mode-demo {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--grn);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 0.8rem 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    overflow-x: auto;
    white-space: pre;
    text-shadow: 0 0 6px rgba(0, 255, 127, 0.25);
}

.mode-card p {
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.55;
}

/* ============================================
   install
   ============================================ */
.install {
    padding: 3rem 0 2rem;
}

.install h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--grn);
    text-align: center;
    text-shadow: 0 0 12px rgba(0, 255, 127, 0.4);
}

.install-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
}

.install-card {
    padding: 1.4rem;
    background: var(--bg-near);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s var(--ease);
}

.install-card:hover {
    border-color: var(--border-strong);
}

.install-card h3 {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--grn);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.soon {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.15em 0.55em;
    border-radius: 2px;
    text-transform: lowercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.install-card pre {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    padding: 0.85rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--grn);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    flex: 1;
    text-shadow: 0 0 5px rgba(0, 255, 127, 0.3);
}

.install-card .note {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.install-card code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
}

/* ============================================
   footer
   ============================================ */
.footer {
    padding: 3rem 0 1rem;
    border-top: 1px dashed var(--border);
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

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

.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--grn); }

/* ============================================
   mobile
   ============================================ */
@media (max-width: 720px) {
    .page { padding: 0.85rem 1rem; }
    .nav { padding: 0.5rem 0 1rem; margin-bottom: 1rem; }
    .nav-logo span { display: none; }
    .rain { opacity: 0.3; }
    .rain-col { font-size: 10px; }
    .hero { padding: 0.5rem 0 2.5rem; }
    .hero-kicker { font-size: 0.65rem; padding: 0.3em 0.85em; letter-spacing: 0.2em; }
    .hero-sub { font-size: 0.88rem; }
    .wpm-meter { max-width: 100%; }
    .wpm-val { font-size: 1.3rem; }
    .wpm-label { font-size: 0.6rem; letter-spacing: 0.2em; }
    .hero-demo { font-size: 10px; }
    .demo { font-size: 10px; padding: 0.95rem 1rem; }
    .features { padding: 2rem 0 1.5rem; grid-template-columns: 1fr; }
    .feature { padding: 1.35rem 1.25rem 1.15rem; }
    .why { padding: 1.5rem 0; }
    .why-inner { padding: 1.3rem 1.3rem 1.5rem; }
    .modes { padding: 2rem 0; }
    .modes-grid { grid-template-columns: 1fr; }
    .install { padding: 2rem 0 1rem; }
    .install-grid { grid-template-columns: 1fr; }
    .footer { padding: 2rem 0 1rem; margin-top: 2rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
