/* ----------------------------------------
   Tornio
   Warm paper, walnut ink, a little brass.
   Font: Space Grotesk (text), IBM Plex Mono (code)
   ---------------------------------------- */

:root {
    --walnut: #6B4A31;
    --brass: #B8893A;
    --brass-light: #E0BC6E;
    --ink: #1F2428;
    --muted: #5C6166;
    --paper: #F6F5F0;
    --paper-deep: #EDEAE0;
    --rule: rgba(31, 36, 40, 0.14);
    --code-bg: #1F2428;
    --code-fg: #E9E6DD;
    --code-dim: rgba(233, 230, 221, 0.42);
    --red: #F2836B;
    --green: #8FC79A;
    --success: #1E7A4C;
    --error: #B3261E;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--walnut);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.landing-page {
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(124, 84, 56, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 84, 56, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--ink);
}

.landing-container {
    width: 100%;
    max-width: 980px;
    padding: 1.5rem 1.5rem 2rem;
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 4rem;
}

.brand {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brass);
}

/* Hero */
.landing-header {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 3rem;
    align-items: end;
    text-align: left;
    margin-bottom: 3.5rem;
}

.landing-header h1 {
    font-size: clamp(2.2rem, 5.2vw, 3.6rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0 0 1.5rem;
    max-width: 15ch;
}

.landing-header h1 em {
    font-style: normal;
    color: var(--walnut);
}

.tagline {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 34rem;
    margin: 0 0 2rem;
}

.hero-finch img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(107, 74, 49, 0.18));
}

/* Waitlist */
.waitlist-form {
    flex-direction: row;
    gap: 0.5rem;
    max-width: 30rem;
    margin: 0;
}

.form-group {
    flex: 1;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(31, 36, 40, 0.25);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.form-group input:focus {
    outline: 2px solid var(--brass);
    outline-offset: 1px;
    border-color: transparent;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    padding: 0.8rem 1.25rem;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--walnut);
}

.form-note {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-message:empty {
    display: none;
}

.form-message {
    max-width: 30rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.form-message.success { color: var(--success); }
.form-message.error { color: var(--error); }

/* Example */
.example {
    background: var(--code-bg);
    color: var(--code-fg);
    border-radius: 10px;
    margin: 0 0 5rem;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
    position: relative;
}

.example-head {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: var(--code-dim);
}

.example-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
}

.example pre {
    margin: 0;
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.8;
    overflow-x: auto;
}

.example .dim { color: var(--code-dim); }
.example .bad { color: var(--red); }
.example .ok  { color: var(--brass-light); }

.landing-header > *,
.example-body > *,
.steps li {
    min-width: 0;
}

.chart {
    margin: 0;
}

.chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.chart .grid {
    stroke: rgba(255, 255, 255, 0.08);
}

.chart .axis {
    fill: var(--code-dim);
    font-size: 9px;
    font-family: 'IBM Plex Mono', monospace;
}

.chart .marker {
    stroke: var(--red);
    stroke-dasharray: 3 3;
    opacity: 0.7;
}

.chart .marker.fix {
    stroke: var(--brass-light);
}

.chart .axis.fix {
    fill: var(--brass-light);
}

.chart .line {
    fill: none;
    stroke: var(--code-fg);
    stroke-width: 1.75;
    stroke-linejoin: round;
}

.diff {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.diff-head {
    padding: 0.6rem 1.25rem 0;
    font-size: 0.75rem;
    color: var(--code-dim);
}

.diff pre {
    padding: 0.6rem 0 1rem;
    tab-size: 4;
}

.diff pre span {
    display: block;
    padding: 0 1.25rem;
}

.diff .del {
    color: var(--red);
    background: rgba(242, 131, 107, 0.08);
}

.diff .add {
    color: var(--green);
    background: rgba(143, 199, 154, 0.08);
}

/* Section labels */
.landing-main h2 {
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brass);
    margin: 0 0 1.5rem;
}

/* Steps */
.steps {
    margin-bottom: 5rem;
}

.steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.steps li {
    border-top: 2px solid var(--ink);
    padding-top: 1.25rem;
}

.steps h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}

.steps p {
    margin: 0;
    color: var(--muted);
}

.steps code {
    display: block;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    background: var(--paper-deep);
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
    color: var(--walnut);
}

/* Who it's for */
.fit {
    margin-bottom: 4rem;
    padding: 2.5rem 0 0;
    border-top: 1px solid var(--rule);
}

.fit p {
    margin: 0;
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    line-height: 1.45;
    letter-spacing: -0.01em;
    max-width: 40rem;
}

/* Footer */
.landing-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--rule);
    padding-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.landing-footer p {
    margin: 0;
}

@media (max-width: 820px) {
    .landing-header {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-finch {
        display: none;
    }

    .example-body,
    .steps ol {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .landing-container {
        padding: 1.25rem 1rem 2rem;
    }

    .topbar {
        margin-bottom: 2.5rem;
    }

    .waitlist-form {
        flex-direction: column;
    }

    .example pre {
        font-size: 0.74rem;
    }
}
