/* =========================================================================
   Logos — landing styles

   Direction: the Bindery. The same paper, ink, oxblood, relief and
   grain the app is built from — every value below is lifted from the
   design system's tokens so the site and the product are one material.
   Two type voices: mono for the apparatus (labels, field names, numbers —
   the wire), serif for the prose (the page). No radii, no blur, no
   transitions.

   Composition: the type is the image. A monumental headline, a broadsheet
   canvas, and an editorial rail — each section opens with a giant chapter
   numeral in a left margin column, a column rule between rail and prose.
   Whitespace is structure, not leftover.

   Ink budget: rationed. Oxblood is a spot colour, not a field — it marks
   the one commitment on a screen and nothing else. Rules are hairlines
   except the double rule under the nameplate, which is the cover canon.

   Relief, not outline. Paper is lit from the upper left: raised things
   carry a light edge and a warm shade, pressed things are debossed into
   the sheet. Corners are barely rounded, the way a trimmed card is.
   Tactility is felt, never depicted — no objects, no drop shadows
   pretending to be photographs.

   Everything visual is a token: restyle the site by editing the :root
   block; nothing downstream hardcodes a colour or a size.
   ========================================================================= */

:root {
    /* Palette — the design system's own values, unchanged */
    --paper:      #efe7d6;  /* desk   */
    --paper-tint: #f3ecdc;  /* leaf   */
    --ink:        #2a211a;  /* primary ink   */
    --ink-soft:   #3e332a;  /* secondary ink */
    --muted:      #5d5245;  /* tertiary ink  */
    --faint:      #8c7d6b;  /* apparatus ink */
    --rule:       rgba(42, 33, 26, 0.22);
    --accent:     #7e2d1e;  /* oxblood, rationed */
    --on-accent:  #f9f5ea;

    /* Material — grain is procedural SVG noise, nothing downloaded.
       Frequency, octaves and alpha match the design system's desk grain. */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.16 0 0 0 0 0.13 0 0 0 0 0.1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    --top-light: rgba(255, 252, 240, 0.35);

    /* Relief — the light sits upper-left. A raised thing has a bright
       edge, a warm shade and a hairline of near-white inside its own
       border; a pressed thing has the same two lights inverted. */
    --raised:
        -2px -2px 5px rgba(255, 252, 240, 0.55),
        4px 5px 11px rgba(96, 71, 44, 0.19),
        inset 0 0 0 1px rgba(255, 252, 240, 0.35);
    --lifted:
        -3px -3px 7px rgba(255, 252, 240, 0.5),
        7px 10px 20px -3px rgba(96, 71, 44, 0.34),
        inset 0 0 0 1px rgba(255, 252, 240, 0.4);
    --well:
        inset 3px 3px 7px rgba(96, 71, 44, 0.2),
        inset -2px -2px 5px rgba(255, 252, 240, 0.8);
    --wax:
        -2px -2px 6px rgba(255, 252, 240, 0.5),
        6px 8px 18px rgba(96, 71, 44, 0.32);

    /* Corners — a trimmed card, not a pill */
    --r-cover:   2px;
    --r-control: 5px;
    --r-group:   6px;

    /* The wax — a physical object; its colour does not follow the
       colour scheme */
    --seal:      #713028;
    --seal-deep: #571f19;
    --seal-lite: #8a4237;

    /* Type families — the machine's own faces; nothing is downloaded */
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino,
                  "Book Antiqua", Georgia, "Times New Roman", serif;
    --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas,
                  "Liberation Mono", monospace;

    /* Type scale — monumental display over book-sized text */
    --fs-body:  clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    --fs-lead:  clamp(1.25rem,  1.05rem + 0.9vw, 1.6rem);
    --fs-h1:    clamp(3.2rem,   1.4rem + 8.8vw,  8.4rem);
    --fs-h2:    clamp(1.9rem,   1.3rem + 2.6vw,  3.3rem);
    --fs-h3:    1.35rem;
    --fs-pull:  clamp(1.9rem,   1.2rem + 2.8vw,  3.1rem);
    --fs-folio: clamp(3rem,     2rem + 3.8vw,    5.6rem);
    --fs-mono:  0.85rem;
    --fs-label: 0.78rem;

    /* Rhythm — a broadsheet canvas with an editorial rail */
    --wrap:     88rem;
    --rail:     8.5rem;
    --rail-gap: clamp(2rem, 4vw, 4rem);
    --prose:    40rem;
    --band-y:   clamp(4rem, 3rem + 6vw, 8.5rem);
    --pad-x:    clamp(1.25rem, 0.8rem + 2.5vw, 3.5rem);

    /* Rules — hairlines everywhere; the double rule is the exception */
    --hair:  1px solid var(--rule);
    --line:  1px solid rgba(42, 33, 26, 0.35);
    --heavy: 2.5px solid var(--ink);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper:      #191510;
        --paper-tint: #211c15;
        --ink:        #ece4d3;
        --ink-soft:   #d3cab7;
        --muted:      #9d9280;
        --faint:      #7d7261;
        --rule:       rgba(236, 228, 211, 0.16);
        --accent:     #c2604a;
        --on-accent:  #191510;

        --top-light: rgba(255, 252, 240, 0.03);

        /* The same lamp, turned down: the bright edge nearly vanishes and
           the shade does the work. */
        --raised:
            -2px -2px 5px rgba(255, 252, 240, 0.04),
            4px 5px 12px rgba(0, 0, 0, 0.45),
            inset 0 0 0 1px rgba(255, 252, 240, 0.05);
        --lifted:
            -3px -3px 7px rgba(255, 252, 240, 0.05),
            7px 10px 22px -3px rgba(0, 0, 0, 0.6),
            inset 0 0 0 1px rgba(255, 252, 240, 0.06);
        --well:
            inset 3px 3px 8px rgba(0, 0, 0, 0.5),
            inset -2px -2px 5px rgba(255, 252, 240, 0.045);
        --wax:
            -2px -2px 6px rgba(255, 252, 240, 0.05),
            6px 8px 18px rgba(0, 0, 0, 0.5);
    }
}

/* ------------------------------------------------------------------ base */

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background-color: var(--paper);
    /* The sheet is even. Paper does not have a vignette; it has fibre. */
    background-image:
        var(--grain),
        linear-gradient(180deg, var(--top-light), transparent 26rem);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: var(--fs-body);
    line-height: 1.6;
    font-variant-numeric: oldstyle-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.06;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 0.96; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; margin-bottom: 1.3rem; max-width: 26ch; }
h3 { font-size: var(--fs-h3); }

p {
    margin: 0 0 1.05rem;
    max-width: var(--prose);
    text-wrap: pretty;
    /* Hyphenated rag — how books set ragged text */
    hyphens: auto;
    -webkit-hyphens: auto;
}
p:last-child { margin-bottom: 0; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

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

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

/* --------------------------------------------------------------- helpers */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--pad-x);
}

.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;
}

.skip-link {
    position: absolute;
    left: 0.75rem; top: -3rem;
    background: var(--ink); color: var(--paper);
    padding: 0.5rem 0.9rem;
    font-family: var(--font-mono); font-size: var(--fs-mono);
    z-index: 100;
}
.skip-link:focus { top: 0.75rem; }

/* The mono voice: section numbers, labels, apparatus */
.kicker {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--faint);
    margin: 0 0 1.4rem;
    max-width: none;
}

/* Chapter folio: the section numeral set monumental in the rail */
.kn {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--fs-folio);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.01em;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

/* The machine voice keeps machine numerals and never hyphenates;
   oldstyle figures belong to the prose only */
.kicker, .stamp, .primitive-line, .sn, .in, .fax,
.masthead-sub, .issue-head, .issue-end, .field-label,
.field-input, .btn, .waitlist-note, .spec-row h3, .colophon p {
    font-variant-numeric: lining-nums tabular-nums;
    hyphens: none;
    -webkit-hyphens: none;
}

/* Ink, not pixels: the red prints into the paper grain */
@media (prefers-color-scheme: light) {
    .kn, .pn, .sn, .in, .stamp, .dot { mix-blend-mode: multiply; }
}

/* --------------------------------------------- the editorial rail grid */

@media (min-width: 901px) {
    .band:not(.hero) .wrap,
    .colophon .wrap {
        display: grid;
        grid-template-columns: var(--rail) minmax(0, 1fr);
        column-gap: var(--rail-gap);
    }
    .band:not(.hero) .wrap > *,
    .colophon .wrap > * { grid-column: 2; }
    .band:not(.hero) .wrap > .kicker,
    .colophon .wrap > .kicker {
        grid-column: 1;
        grid-row: 1 / span 60;
        margin: 0;
    }
    /* Column rule between rail and prose, centred in the gutter */
    .band:not(.hero) .wrap::before,
    .colophon .wrap::before {
        content: "";
        grid-column: 1;
        grid-row: 1 / span 60;
        justify-self: end;
        margin-right: calc(var(--rail-gap) / -2);
        border-right: var(--line);
    }
}

/* -------------------------------------------------------------- masthead */

.masthead-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.3rem 1rem;
}
.wordmark {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}
.wordmark:hover { color: var(--ink); }

.masthead-nav {
    display: flex;
    gap: 2rem;
}
.masthead-nav a {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}
.masthead-nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    color: var(--accent);
}

/* The cover canon: a hairline above a heavy rule, with air between. It
   appears here and nowhere else on the page. */
.masthead-top { position: relative; }
.masthead-top::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 6px;
    border-top: 1px solid var(--ink);
    border-bottom: var(--heavy);
}
.masthead-sub {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 0.55rem;
    border-bottom: var(--line);
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* The creed — Hamann's clause ends "…language, logos": the nameplate
   above completes the sentence. The one serif voice in the apparatus row. */
.motto {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink);
}

/* ----------------------------------------------------------------- bands */

.band { padding-block: var(--band-y); }

/* Sections part on a hairline. The double rule belongs to the nameplate
   and appears once on the page; repeating it spends the cover canon. */
.band + .band { border-top: var(--hair); }

/* ------------------------------------------------------------------ hero */

.hero { padding-block: clamp(3.5rem, 9vh, 7.5rem) clamp(3.5rem, 7vh, 6rem); }

h1 { margin-bottom: clamp(2.25rem, 5vw, 4rem); }
.dot { color: var(--accent); }

.hero-row {
    display: grid;
    grid-template-columns: minmax(0, 38rem) minmax(17rem, 24rem);
    justify-content: space-between;
    align-items: start;
    gap: clamp(2rem, 5vw, 6rem);
}

.lead {
    font-size: var(--fs-lead);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 38rem;
}

/* The stamp line: a solid red plate */
.stamp {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0.55em 0 0.5em;
    margin: 2.4rem 0 2.4rem;
    border-top: 2px solid var(--accent);
}

/* Cover sheet — a ruled form, struck like a teletype */
.fax {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.fax th, .fax td {
    border-bottom: var(--hair);
    padding: 0.6rem 0;
    text-align: left;
    vertical-align: baseline;
}
.fax th {
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    width: 5.5rem;
    padding-right: 1.25rem;
    white-space: nowrap;
}
.fax td {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Drop cap on the opening paragraph of the first section — the oldest
   mark of a page set by hand */
#problem h2 + p::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.84;
    padding: 0.05em 0.14em 0 0;
    font-weight: 700;
}

/* ------------------------------------------------------------------ pull */

.pull {
    font-size: var(--fs-pull);
    line-height: 1.22;
    font-style: italic;
    font-weight: 700;
    margin-top: 2.4rem;
    padding-top: 1.6rem;
    border-top: var(--line);
    text-wrap: balance;
    max-width: 54rem;
}

/* ------------------------------------------------------------ primitives */

.primitives {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
    margin-top: 2.4rem;
    max-width: 54rem;
}
/* The editorial rule: the design system's one weighted rule, used where
   a heading needs to sit under something. */
.primitive { border-top: 2px solid var(--ink); padding-top: 1.2rem; }
.primitive h3 { margin-bottom: 0.6rem; }
.pn { color: var(--accent); }

/* The claim, in the apparatus voice and the spot ink. No plate — the
   design system inks its emphasis, it does not reverse it out. */
.primitive-line {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0 0 0.55em;
    margin-bottom: 1rem;
    border-bottom: var(--hair);
}

/* ----------------------------------------------------------------- steps */

.steps {
    list-style: none;
    margin: 2.4rem 0 0;
    padding: 0;
    max-width: 54rem;
}
.step {
    border-top: var(--line);
    padding-block: 1.6rem;
}
.step:last-child { padding-bottom: 0; }
.step h3 { margin-bottom: 0.6rem; }
.sn {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-right: 0.55rem;
}

/* ------------------------------------------------------------------ spec */

.spec { margin-top: 2.4rem; border-bottom: var(--line); max-width: 54rem; }
.spec-row {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1rem 2rem;
    border-top: var(--hair);
    padding-block: 1.25rem;
    align-items: start;
}
.spec-row:first-child { border-top: var(--line); }

/* Reversed plate: paper on ink */
.spec-row h3 {
    justify-self: start;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--ink);
    padding: 0.35em 0.6em;
}
.spec-row p { margin: 0; }

.coda {
    margin-top: 1.8rem;
    font-style: italic;
}

/* ----------------------------------------------------------------- issue */

.issue {
    border: 0;
    border-radius: var(--r-group);
    background: var(--paper-tint);
    box-shadow: var(--lifted);
    padding: 1.5rem 1.6rem 1.2rem;
    margin: 2.4rem 0 3rem;
    max-width: var(--prose);
}
.issue-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 0.8rem;
    border-bottom: var(--line);
}
.issue-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.issue-list li {
    border-bottom: var(--hair);
    padding: 0.7rem 0;
    font-size: 1.05rem;
}
.in {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-right: 0.9rem;
}
.issue-end {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    margin: 1.1rem 0 0;
    max-width: none;
}

/* -------------------------------------------------------------- waitlist */

.waitlist { max-width: var(--prose); }

.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.field-row {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
}

/* Fill-in-the-blank: a line on paper */
.field-input {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--ink);
    background: rgba(42, 33, 26, 0.03);
    border: 0;
    border-radius: var(--r-control);
    padding: 0.85rem 0.9rem;
    box-shadow: var(--well);
}
.field-input:focus-visible {
    outline: none;
    box-shadow: var(--well), 0 0 0 2px var(--accent);
}

.btn {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-accent);
    background: var(--accent);
    border: 0;
    border-radius: var(--r-control);
    padding: 0.9rem 1.4rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--wax);
}
.btn:hover { background: #6d2619; }
/* It presses into the paper rather than sliding across it. */
.btn:active {
    box-shadow: var(--well);
    background: #6d2619;
}

.waitlist-note {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--muted);
    margin: 0.9rem 0 0;
}
.waitlist-note[data-state] { color: var(--accent); }

/* -------------------------------------------------------------- colophon */

.colophon {
    position: relative;
    border-top: var(--line);
    padding-block: 2.6rem 3.25rem;
}
/* Mirror of the masthead's thick-over-thin: thin-over-thick closes the page */
.colophon::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0; right: 0;
    border-top: 1px solid var(--ink);
}
.colophon p {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    line-height: 1.7;
    color: var(--muted);
}
.colophon .kicker { margin-bottom: 1rem; }
.colophon-meta {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 1.4rem;
}

/* The Lakonic seal — the client's mark, rendered natively in flat tones:
   wax, deep, and light. No gloss, no blur, no photograph. */
.seal {
    display: block;
    width: clamp(96px, 9vw, 128px);
    height: auto;
    margin-top: 2.2rem;
}
.seal-wax  { fill: var(--seal); stroke: var(--seal-deep); stroke-width: 2; }
.seal-ring-deep { fill: none; stroke: var(--seal-deep); stroke-width: 1.6; }
.seal-ring-lite { fill: none; stroke: var(--seal-lite); stroke-width: 1.6; }
.seal-l      { fill: var(--seal-deep); }
.seal-l-lite { fill: var(--seal-lite); }
.seal text {
    font-family: var(--font-serif);
    font-size: 62px;
    font-weight: 700;
    text-anchor: middle;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
    .hero-row { grid-template-columns: 1fr; gap: 2.25rem; }
    .fax { max-width: 26rem; }
}

@media (max-width: 640px) {
    .primitives { grid-template-columns: 1fr; }
    .spec-row { grid-template-columns: 1fr; gap: 0.6rem; }
    .field-row { flex-direction: column; align-items: stretch; }
    .field-input { width: 100%; }
    .masthead-sub span:last-child { display: none; }
    .wordmark { font-size: 1.7rem; }
}

/* --- Legal pages -------------------------------------------------------
   A long-form document rather than a poster: one measure, headings that
   step down quietly, and no rules or ornament competing with the text.
   ---------------------------------------------------------------------- */

.legal h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin: 2.6rem 0 0.8rem;
    max-width: var(--prose);
}

.legal h4 {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 1.6rem 0 0.5rem;
}

.legal-date {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.legal-lede {
    font-size: var(--fs-lead);
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.legal-list {
    max-width: var(--prose);
    margin: 0 0 1.1rem;
    padding-left: 1.1rem;
    list-style: none;
}

.legal-list li {
    position: relative;
    margin-bottom: 0.7rem;
    line-height: 1.55;
}

/* An interpunct rather than a bullet: same mark the editions use. */
.legal-list li::before {
    content: "·";
    position: absolute;
    left: -1.1rem;
    color: var(--accent);
    font-weight: 700;
}

.legal-list strong { font-weight: 600; }
