/* ProseDown landing page — hand-tuned, no framework, no build step */

:root {
    --bg: #0d0d12;
    --bg-alt: #15151c;
    --bg-card: #181820;
    --text: #e8e8ee;
    --muted: #a0a0b0;
    --dim: #5a5a6a;
    --accent: #6ea8ff;
    --accent-hover: #8fb9ff;
    --rule: #25252f;
    --code-bg: #1c1c25;
    --kw: #c4dff9;
    --str: #b8e0a3;
    --meta: #d99c7a;
    --src: #b8e0a3;
    --ops: #c4dff9;
    --dst: #d99c7a;
    --hd: #f5d877;
    --container: 880px;
}

* { box-sizing: border-box; }

html {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 120ms ease, color 120ms ease;
}

a:hover {
    color: var(--accent-hover);
    border-bottom-color: currentColor;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
}

/* ========== Hero ========== */

.hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(180deg, #11111a 0%, var(--bg) 100%);
}

.logotype {
    font-size: clamp(48px, 9vw, 88px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 16px;
}

.logotype .prose {
    color: var(--text);
}

.logotype .down {
    color: var(--accent);
}

.tagline {
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    margin: 0 0 16px;
}

.subtagline {
    font-size: 17px;
    color: var(--muted);
    max-width: 580px;
    margin: 0 0 32px;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.install {
    background: var(--code-bg);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--rule);
    font-size: 15px;
}

.install::before {
    content: "$ ";
    color: var(--dim);
}

.button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}

.button:hover {
    border-color: var(--accent);
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.button.primary {
    background: var(--accent);
    color: #0d0d12;
    border-color: var(--accent);
    font-weight: 600;
}

.button.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #0d0d12;
}

.version {
    font-size: 13px;
    color: var(--dim);
    margin: 0;
}

/* ========== Sections ========== */

.section {
    padding: 64px 0;
    border-bottom: 1px solid var(--rule);
}

.section.alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: clamp(24px, 4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}

.section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
}

.section p {
    font-size: 16px;
    color: var(--text);
    max-width: 640px;
}

.section p code,
.section li code,
.section h2 code {
    background: var(--code-bg);
    border: 1px solid var(--rule);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--kw);
}

/* ========== Code blocks ========== */

.code {
    background: var(--code-bg);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 18px 22px;
    overflow-x: auto;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
}

.code code {
    color: var(--text);
    background: none;
    padding: 0;
    border: none;
}

.code .dim    { color: var(--dim); }
.code .kw     { color: var(--kw); }
.code .str    { color: var(--str); }
.code .meta   { color: var(--meta); }
.code .key    { color: var(--accent); }
.code .hd     { color: var(--hd); font-weight: 600; }

/* ========== ASCII diagrams ========== */

.ascii {
    background: var(--code-bg);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 18px 22px;
    overflow-x: auto;
    margin: 0 0 18px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
    white-space: pre;
}

.ascii .src { color: var(--src); font-weight: 600; }
.ascii .ops { color: var(--ops); font-weight: 600; }
.ascii .dst { color: var(--dst); font-weight: 600; }
.ascii .kw  { color: var(--text); }
.ascii .dim { color: var(--dim); font-style: italic; }

/* ========== Comparison table ========== */

.compare {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 24px;
    font-size: 14px;
}

.compare th,
.compare td {
    text-align: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--rule);
}

.compare thead th {
    color: var(--muted);
    font-weight: 600;
    vertical-align: bottom;
    border-bottom: 2px solid var(--rule);
}

.compare thead th small {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: var(--dim);
    margin-top: 4px;
}

.compare tbody th {
    text-align: left;
    color: var(--text);
    font-weight: 500;
    background: transparent;
}

.compare td:last-child {
    color: var(--accent);
    font-weight: 600;
}

.compare td small {
    color: var(--dim);
    font-weight: 400;
    margin-left: 4px;
}

/* ========== Principles ========== */

.principles {
    padding-left: 22px;
    max-width: 640px;
}

.principles li {
    margin-bottom: 12px;
    color: var(--muted);
}

.principles li strong {
    color: var(--text);
    font-weight: 600;
}

/* ========== Get started grid ========== */

.get-started {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.get-started > div {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.get-started h3 {
    margin-top: 0;
}

.get-started pre {
    margin-bottom: 8px;
}

.get-started small {
    color: var(--dim);
}

/* ========== Footer ========== */

.footer {
    padding: 32px 0;
    color: var(--muted);
    font-size: 14px;
}

.footer p {
    margin: 0;
    text-align: center;
}

/* ========== Responsive tweaks ========== */

@media (max-width: 600px) {
    .hero { padding: 48px 0 40px; }
    .section { padding: 48px 0; }
    .ascii { font-size: 11px; }
    .compare { font-size: 12px; }
    .compare th, .compare td { padding: 6px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ========== Skip link (a11y) ========== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #0d0d12;
    padding: 8px 14px;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 6px 0;
    transition: top 120ms ease;
}

.skip-link:focus {
    top: 0;
    border-bottom: none;
}

/* ========== Top navigation ========== */

.topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 13, 18, 0.85);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--rule);
}

.topnav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
}

.topnav-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    border-bottom: none;
}

.topnav-brand .prose { color: var(--text); }
.topnav-brand .down  { color: var(--accent); }

.topnav-brand:hover {
    border-bottom: none;
}

.topnav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 22px;
    font-size: 14px;
}

.topnav-links a {
    color: var(--muted);
    border-bottom: none;
}

.topnav-links a:hover {
    color: var(--text);
}

@media (max-width: 600px) {
    .topnav-links {
        gap: 14px;
        font-size: 13px;
    }
}

/* ========== Section lede ========== */

.lede {
    color: var(--muted);
    font-size: 17px;
    margin: -8px 0 28px;
    max-width: 640px;
}

/* ========== ASCII art caption ========== */

.ascii-caption {
    text-align: center;
    margin: -12px 0 20px;
    font-size: 13px;
}

/* ========== Cheat sheet grid ========== */

.cheat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 8px 0 28px;
}

.cheat-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cheat-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-feature-settings: "ss01";
}

.cheat-card .code {
    margin: 0 0 12px;
    font-size: 13px;
    padding: 12px 14px;
}

.cheat-card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
}

.cheat-card p + .code,
.cheat-card .code + p {
    margin-top: 12px;
}

.cheat-list {
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: 14px;
    color: var(--muted);
}

.cheat-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.cheat-cta {
    text-align: center;
    margin-top: 28px;
}

/* ========== "Pick your path" cards ========== */

.paths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.path {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 24px;
}

.path > header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.path-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #0d0d12;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.path h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.path h3 em {
    color: var(--accent);
    font-style: italic;
}

.path p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 14px;
    line-height: 1.55;
}

.path ol {
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
    font-size: 14px;
}

.path ol li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.path ol li a {
    color: var(--text);
}
