/* Marketing site. Plain CSS on purpose: there is no front-end build step. */

:root {
    --paper: #faf8f4;
    --sheet: #fffefb;
    --ink: #17171a;
    --ink-soft: #3d3d42;
    --muted: #6d6b66;
    --rule: #ddd9d0;
    --rule-strong: #c2bdb1;
    --accent: #a33a17;
    --measure: 64ch;

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif 4", Georgia, serif;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

    --gutter: clamp(20px, 5vw, 40px);
    --container: 1120px;

    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.015em;
    text-wrap: balance;
    margin: 0;
}

h1 {
    font-size: clamp(2.6rem, 5.6vw, 4.4rem);
    line-height: 1.04;
}

h2 {
    font-size: clamp(1.8rem, 3.1vw, 2.7rem);
    line-height: 1.12;
}

h3 {
    font-size: 1.0625rem;
    font-family: var(--sans);
    font-weight: 650;
    letter-spacing: -0.005em;
}

p {
    margin: 0;
    text-wrap: pretty;
}

.wrap {
    width: min(var(--container), 100% - var(--gutter) * 2);
    margin-inline: auto;
}

.lead {
    font-size: clamp(1.0625rem, 1.5vw, 1.22rem);
    line-height: 1.58;
    color: var(--ink-soft);
    max-width: var(--measure);
}

.muted {
    color: var(--muted);
}

.stack > * + * {
    margin-top: var(--stack-gap, 20px);
}

/* Small uppercase monospace labels do the signposting instead of pill badges. */
.label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.label--accent {
    color: var(--accent);
}

.num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ---------- Header ---------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(10px);
}

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
    position: relative;
}

.masthead__toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.masthead__toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.masthead.is-open .masthead__toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.masthead.is-open .masthead__toggle span:nth-child(2) {
    opacity: 0;
}

.masthead.is-open .masthead__toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.wordmark b {
    font-weight: inherit;
}

.wordmark__by {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
    padding-left: 10px;
    border-left: 1px solid var(--rule-strong);
}

.wordmark__mark {
    width: 22px;
    height: 22px;
    display: block;
}

.wordmark span {
    color: var(--accent);
}

.masthead__nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.875rem;
}

.masthead__nav a {
    text-decoration: none;
    color: var(--ink-soft);
}

.masthead__nav a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 13px 20px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
    background: #000;
}

.btn__meta {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
}

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

.btn--ghost:hover {
    background: transparent;
    border-color: var(--ink);
}

.btn--invert {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
}

.btn--invert:hover {
    background: #fff;
}

/* Text link with a rule under it, used where a second button would be noise. */
.textlink {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 2px;
}

.textlink:hover {
    border-color: var(--ink);
}

/* ---------- Sections ---------- */

.section {
    padding-block: clamp(64px, 9vw, 116px);
}

.section--tight {
    padding-block: clamp(48px, 6vw, 72px);
}

.section__head {
    max-width: 46ch;
    margin-bottom: 48px;
}

.section__head .label {
    margin-bottom: 18px;
}

.section__head h2 + p {
    margin-top: 18px;
}

.rule-top {
    border-top: 1px solid var(--rule);
}

/* ---------- Hero ---------- */

.hero {
    padding-block: clamp(64px, 10vw, 128px) clamp(48px, 6vw, 72px);
}

.hero h1 {
    max-width: 17ch;
}

.hero .label {
    margin-bottom: 26px;
}

.hero .lead {
    margin-top: 26px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-top: 38px;
}

/* ---------- Figure strip: real numbers, hairline separated ---------- */

.figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.figures__caption {
    grid-column: 1 / -1;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--rule);
}

/* Outer columns sit flush with the container so the strip aligns to the text
   column above it; inner columns are inset on both sides of their rule. */
.figure {
    padding: 26px 24px 30px;
    border-right: 1px solid var(--rule);
}

.figure:first-of-type {
    padding-left: 0;
}

.figure:last-of-type {
    padding-right: 0;
    border-right: 0;
}

.figure__value {
    display: block;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    letter-spacing: -0.04em;
    line-height: 1;
}

.figure__label {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Two-up variant used where the strip sits beside prose rather than full width. */
.figures--pairs {
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--rule);
    margin-top: 36px;
}

.figures--pairs .figure:nth-of-type(odd) {
    padding-left: 0;
    border-right: 1px solid var(--rule);
}

.figures--pairs .figure:nth-of-type(even) {
    padding-right: 0;
    border-right: 0;
}

.figures--pairs .figure:nth-of-type(-n + 2) {
    border-bottom: 1px solid var(--rule);
}

/* ---------- Ledger rows: replaces the card grid ---------- */

.ledger {
    border-top: 1px solid var(--ink);
}

.ledger__row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 20ch) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
}

.ledger__index {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    padding-top: 2px;
}

.ledger__row p {
    color: var(--ink-soft);
    max-width: 58ch;
}

/* ---------- Document sheet ---------- */

.sheet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(36px, 6vw, 84px);
    align-items: start;
}

.sheet {
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    padding: clamp(22px, 3vw, 34px);
}

.sheet__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ink);
}

.sheet__head h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 600;
}

.sheet__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sheet__table th {
    text-align: left;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 400;
    padding: 14px 0 8px;
    border-bottom: 1px solid var(--rule);
}

.sheet__table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: baseline;
}

.sheet__table td:last-child,
.sheet__table th:last-child {
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sheet__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 16px;
    font-size: 0.9rem;
}

.sheet__total strong {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.checklist {
    list-style: none;
    margin: 28px 0 32px;
    padding: 0;
    border-top: 1px solid var(--rule);
}

.checklist li {
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
}

/* ---------- Plans as a spec sheet ---------- */

.plans {
    display: grid;
    grid-template-columns: repeat(var(--plan-count, 4), minmax(0, 1fr));
    border-top: 1px solid var(--ink);
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 26px 26px 30px;
    border-right: 1px solid var(--rule);
}

.plan:first-child {
    padding-left: 0;
}

.plan:last-child {
    border-right: 0;
    padding-right: 0;
}

.plan--lead {
    background: linear-gradient(180deg, rgba(163, 58, 23, 0.045), transparent 220px);
}

/* Align every plan on the same baselines so the sheet reads across, not just
   down. Each plan hands its rows back to the parent grid. */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 1001px) {
        .plans {
            grid-template-rows: repeat(7, auto);
        }

        .plan {
            display: grid;
            grid-row: span 7;
            grid-template-rows: subgrid;
        }

        /* The row already sits at the bottom, so let the buttons share a
           baseline rather than each one sinking below a shorter note. */
        .plan__cta {
            align-self: start;
            margin-top: 0;
        }
    }
}

/* Matches the line box so plans without a label still reserve the same space. */
.plan__label {
    min-height: 1.6em;
    margin-bottom: 16px;
}

.plan__name {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 600;
}

.plan__price {
    margin-top: 18px;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.9rem;
    letter-spacing: -0.045em;
}

.plan__terms {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--muted);
}

.plan__desc {
    margin-top: 16px;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.plan__spec {
    margin: 22px 0 26px;
    padding: 0;
    font-size: 0.85rem;
    border-top: 1px solid var(--rule);
}

.plan__spec div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
}

.plan__spec dt {
    color: var(--muted);
}

.plan__spec dd {
    margin: 0;
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

/* The mono face is reserved for figures. */
.plan__spec dd.plan__spec-text {
    font-family: var(--sans);
}

.plan__cta {
    margin-top: auto;
}

.plan__cta .btn,
.plan__cta .textlink {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.plan__note {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ---------- Two-column prose ---------- */

.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
    border-top: 1px solid var(--ink);
    padding-top: 36px;
}

.columns ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.columns li {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
}

/* ---------- FAQ ---------- */

.faq {
    border-top: 1px solid var(--ink);
    max-width: 78ch;
}

.faq details {
    border-bottom: 1px solid var(--rule);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: baseline;
    padding: 22px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-family: var(--mono);
    color: var(--muted);
    font-weight: 400;
}

.faq details[open] summary::after {
    content: "–";
}

.faq p {
    padding-bottom: 24px;
    color: var(--ink-soft);
    max-width: var(--measure);
}

/* ---------- Closing band ---------- */

.band {
    background: var(--ink);
    color: var(--paper);
}

.band__inner {
    padding-block: clamp(56px, 8vw, 96px);
}

.band h2 {
    max-width: 20ch;
}

.band p {
    margin-top: 20px;
    color: #b6b4ae;
    max-width: 56ch;
}

.band .label {
    color: #8d8a83;
    margin-bottom: 20px;
}

.band__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-top: 34px;
}

.band .textlink {
    color: var(--paper);
    border-color: rgba(250, 248, 244, 0.4);
}

.band .textlink:hover {
    border-color: var(--paper);
}

/* ---------- Footer ---------- */

.colophon {
    border-top: 1px solid var(--rule);
    padding-block: 32px 44px;
    font-size: 0.85rem;
    color: var(--muted);
}

.colophon__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
}

.colophon a {
    color: var(--ink-soft);
    text-decoration: none;
    margin-right: 18px;
}

.colophon a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Forms ---------- */

.panel {
    max-width: 620px;
    margin-block: clamp(48px, 7vw, 88px);
    background: var(--sheet);
    border: 1px solid var(--rule-strong);
    padding: clamp(26px, 4vw, 44px);
}

label {
    display: block;
    margin: 22px 0 7px;
    font-size: 0.85rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    font: inherit;
    font-size: 0.95rem;
}

input:focus,
textarea:focus {
    outline: 2px solid var(--ink);
    outline-offset: -1px;
    border-color: var(--ink);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.alert {
    padding: 13px 16px;
    margin-block: 20px;
    border-left: 3px solid var(--accent);
    background: rgba(163, 58, 23, 0.06);
    font-size: 0.92rem;
}

.alert--ok {
    border-color: #2f6b45;
    background: rgba(47, 107, 69, 0.07);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan {
        border-bottom: 1px solid var(--rule);
        padding-block: 28px;
    }

    .plan:nth-child(odd) {
        padding-left: 0;
        padding-right: 26px;
        border-right: 1px solid var(--rule);
    }

    .plan:nth-child(even) {
        padding-left: 26px;
        padding-right: 0;
        border-right: 0;
    }

    .plan--lead {
        background: none;
    }

    .sheet-grid {
        grid-template-columns: 1fr;
    }

    .figures,
    .figures--pairs {
        grid-template-columns: repeat(2, 1fr);
    }

    .figure:nth-of-type(odd) {
        padding-left: 0;
        border-right: 1px solid var(--rule);
    }

    .figure:nth-of-type(even) {
        padding-right: 0;
        border-right: 0;
    }

    .figure:nth-of-type(-n + 2) {
        border-bottom: 1px solid var(--rule);
    }
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .wordmark__by {
        display: none;
    }

    .masthead__toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .masthead__nav {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0 16px;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        box-shadow: 0 16px 28px rgba(23, 23, 26, 0.06);
    }

    .masthead.is-open .masthead__nav {
        display: flex;
    }

    .masthead__nav a {
        padding: 12px var(--gutter);
        border-bottom: 1px solid var(--rule);
    }

    .masthead__nav a:last-child {
        border-bottom: 0;
        margin-top: 8px;
    }

    .masthead__cta {
        display: inline-flex;
        width: fit-content;
        margin-inline: var(--gutter);
        padding: 10px 14px;
        border: 1px solid var(--ink);
        background: var(--ink);
        color: var(--paper);
    }

    .ledger__row {
        grid-template-columns: 2.5rem 1fr;
        gap: 6px 16px;
    }

    .ledger__row p {
        grid-column: 2;
    }

    .plans,
    .columns {
        grid-template-columns: 1fr;
    }

    .plan:nth-child(odd),
    .plan:nth-child(even) {
        padding-inline: 0;
        border-right: 0;
    }

    .columns {
        gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
