/* The public contact page, /contact.html (docs/claude/notes/116-contact-page.md). Bump ?v= in contact.html on every edit.

   One sheet of a visitors' book. Three decisions carry the look:
   - a field's underline is its writing line, so the rules on the sheet are the form itself and nothing is boxed;
   - the double line down the inline-start edge is a ledger's margin rule, the only ornament;
   - one ink of the team's (stamp violet) for the two things the team does: the button that sends, and the "Received" stamp
     on a message that arrived.
   Printed matter (labels, headings, the stamp) is IBM Plex Sans Condensed, a business-form face; what a person writes is
   Newsreader, so their own words read as entered by hand into the book. Logical properties throughout: the page mirrors. */

:root {
    --ct-paper: #f3f5f1;
    --ct-sheet: #fbfcfa;
    --ct-ink: #16233a;
    --ct-muted: #566173;
    --ct-rule: #b5c0b8;
    --ct-margin: #d98c86;
    --ct-stamp: #4a3fa8;
    --ct-on-stamp: #ffffff;
    --ct-error: #a8261c;
    --ct-form: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --ct-hand: "Newsreader", Georgia, "Times New Roman", serif;
    --site-nav-color: var(--ct-ink);
    --site-nav-border: var(--ct-rule);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ct-paper: #12171e;
        --ct-sheet: #18202a;
        --ct-ink: #e6ebef;
        --ct-muted: #9ba7b4;
        --ct-rule: #364452;
        --ct-margin: #8f524f;
        --ct-stamp: #aba5ff;
        --ct-on-stamp: #12171e;
        --ct-error: #ff9a8f;
    }
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--ct-paper);
    color: var(--ct-ink);
    font-family: var(--ct-form);
    font-size: 1rem;
    line-height: 1.5;
}

[hidden] { display: none !important; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--ct-stamp); }
:focus-visible { outline: 2px solid var(--ct-stamp); outline-offset: 3px; }

.ct-skip {
    position: absolute;
    inset-inline-start: 16px;
    inset-block-start: -4rem;
    padding: 8px 14px;
    background: var(--ct-stamp);
    color: var(--ct-on-stamp);
    font-weight: 600;
    text-decoration: none;
    z-index: 2;
}
.ct-skip:focus { inset-block-start: 8px; color: var(--ct-on-stamp); }

.ct-top {
    max-width: 68rem;
    margin: 0 auto;
    padding: 20px 16px 0;
}
.ct-home {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.ct-page {
    max-width: 68rem;
    margin: 0 auto;
    padding: 28px 16px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.ct-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.01em;
}
.ct-lede {
    margin: 0 0 14px;
    max-width: 30ch;
    /* even lines, so a narrow column never leaves "e-" at the end of one and "mail." alone on the next */
    text-wrap: balance;
    font-family: var(--ct-hand);
    font-size: 1.3rem;
    line-height: 1.35;
}
.ct-small {
    margin: 0;
    max-width: 44ch;
    font-size: 0.9rem;
    color: var(--ct-muted);
}

/* ── the sheet ── */
.ct-sheet {
    position: relative;
    min-width: 0;
    background: var(--ct-sheet);
    border: 1px solid var(--ct-rule);
    padding-block: 12px 28px;
    padding-inline: 40px 18px;
}
.ct-sheet::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 18px;
    width: 5px;
    border-inline: 1px solid var(--ct-margin);
    pointer-events: none;
}

.ct-row {
    min-width: 0;
    margin: 0;
    padding: 14px 0 0;
    border: 0;
}
.ct-row > label:not(.ct-check),
.ct-interest > legend {
    display: block;
    padding: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ct-muted);
}
.ct-hint { font-weight: 400; margin-inline-start: 6px; }

.ct-row input[type="text"],
.ct-row input[type="email"],
.ct-row input[type="tel"],
.ct-row textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 6px 0 7px;
    border: 0;
    border-block-end: 1px solid var(--ct-rule);
    border-radius: 0;
    background: transparent;
    color: var(--ct-ink);
    font-family: var(--ct-hand);
    font-size: 1.22rem;
    line-height: 1.35;
    -webkit-appearance: none;
    appearance: none;
}
.ct-row textarea {
    min-height: 8.6rem;
    margin-block-start: 6px;
    padding-block: 0 7px;
    resize: vertical;
    /* One rule under every line a person writes, starting at the top edge, where the first line of text starts, so there
       is no rule above the first line. One repeating gradient over the whole box, not a small tile repeated: a tile whose
       height is not a whole number of device pixels (a zoomed page, a 125 % display) is resampled, and its bottom rule
       bleeds into a faint line along the top. The line is rounded to a whole pixel where the browser can (below). */
    --ct-line: 1.35em;
    line-height: var(--ct-line);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--ct-line) - 1px), var(--ct-rule) calc(var(--ct-line) - 1px), var(--ct-rule) var(--ct-line));
    background-position: 0 0;
    background-attachment: local;
    border-block-end: 0;
}
@supports (line-height: round(1.35em, 1px)) {
    .ct-row textarea { --ct-line: round(1.35em, 1px); }
}
.ct-row input:focus-visible,
.ct-row textarea:focus-visible {
    outline: 0;
    border-block-end-color: var(--ct-stamp);
    box-shadow: 0 2px 0 0 var(--ct-stamp);
}
.ct-row textarea:focus-visible { box-shadow: inset 0 0 0 2px var(--ct-stamp); }
.ct-row [aria-invalid="true"] { border-block-end-color: var(--ct-error); box-shadow: 0 1px 0 0 var(--ct-error); }

.ct-interest > legend { margin-block-end: 2px; }
.ct-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 28px;
}
.ct-opt,
.ct-check {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 6px 0;
    cursor: pointer;
    font-family: var(--ct-hand);
    font-size: 1.14rem;
    line-height: 1.3;
    color: var(--ct-ink);
}
.ct-opt { border-block-end: 1px solid var(--ct-rule); }
.ct-opt input,
.ct-check input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--ct-stamp);
}
.ct-opt:has(input:checked) { color: var(--ct-stamp); }
.ct-opt:has(input:focus-visible),
.ct-check:has(input:focus-visible) { outline: 2px solid var(--ct-stamp); outline-offset: 2px; }
.ct-opt input:focus-visible,
.ct-check input:focus-visible { outline: 0; }

.ct-consent { padding-block-start: 18px; }
.ct-check { align-items: flex-start; font-size: 1.05rem; }
.ct-check input { margin-block-start: 0.15rem; }

.ct-err {
    margin: 5px 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ct-error);
}
.ct-err:empty { display: none; }

/* Off the page, not display:none: a program that skips hidden fields still fills this one. */
.ct-trap {
    position: absolute;
    inset-inline-start: -200vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ct-actions { padding-block-start: 22px; }
.ct-send {
    display: inline-block;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 2px;
    background: var(--ct-stamp);
    color: var(--ct-on-stamp);
    font-family: var(--ct-form);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
}
.ct-send:hover { color: var(--ct-on-stamp); filter: brightness(1.12); }
.ct-send:active { filter: brightness(0.94); }
.ct-send[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.ct-status {
    min-height: 1.5em;
    margin: 10px 0 0;
    font-size: 0.95rem;
    color: var(--ct-muted);
}
.ct-status.is-error { color: var(--ct-error); font-weight: 500; }

/* ── a message that arrived ── */
.ct-thanks { padding-block-start: 14px; }
.ct-stamp {
    display: inline-block;
    margin: 4px 0 18px;
    padding: 7px 14px 6px;
    border: 3px double var(--ct-stamp);
    color: var(--ct-stamp);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform: rotate(-5deg);
    transform-origin: 0 100%;
    opacity: 0.88;
}
.ct-stamp-date { display: block; font-size: 0.78rem; letter-spacing: 0.1em; font-weight: 500; }
.ct-page[data-state="sent"] .ct-stamp { animation: ct-press 300ms cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes ct-press {
    from { transform: rotate(-5deg) scale(1.7); opacity: 0; }
    to { transform: rotate(-5deg) scale(1); opacity: 0.88; }
}
.ct-thanks h2 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 5vw, 2.3rem);
    font-weight: 600;
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.ct-thanks h2:focus { outline: 0; }
.ct-thanks-line {
    margin: 0 0 18px;
    max-width: 40ch;
    font-family: var(--ct-hand);
    font-size: 1.18rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.ct-entry { margin: 0 0 22px; }
.ct-entry > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-block-end: 1px solid var(--ct-rule);
}
.ct-entry dt { font-size: 0.92rem; font-weight: 500; color: var(--ct-muted); padding-block-start: 0.2rem; }
.ct-entry dd { margin: 0; font-family: var(--ct-hand); font-size: 1.14rem; overflow-wrap: anywhere; }
.ct-book { margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ct-book-note { font-size: 0.9rem; color: var(--ct-muted); }
.ct-more { margin: 0; }
.ct-again {
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--ct-ink);
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.ct-again:hover { color: var(--ct-stamp); }

@media (min-width: 34rem) {
    .ct-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ct-sheet { padding-inline: 56px 32px; padding-block-end: 36px; }
    .ct-sheet::before { inset-inline-start: 28px; }
}

@media (min-width: 60rem) {
    .ct-page {
        grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
        gap: 56px;
        padding-block-start: 44px;
        align-items: start;
    }
    .ct-intro { position: sticky; inset-block-start: 32px; }
    .ct-top { padding-block-start: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .ct-page[data-state="sent"] .ct-stamp { animation: none; }
}
