/* Human for AI — typographic, rubricated.
   Century Schoolbook where available; the red is #AF1616 throughout. */

:root {
    --ink: #1a1a1a;
    --muted: #6b6b6b;
    --faint: #8d8d8d;
    --paper: #fdfcf9;
    --line: #ddd9cf;
    --rubric: #af1616;
    --rubric-tint: #fbf1f1;
    --serif: "Century Schoolbook", "Century Schoolbook L", "New Century Schoolbook",
             "TeX Gyre Schola", "URW Bookman L", Georgia, "Times New Roman", serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    --measure: 44rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.narrow { padding-top: 3.5rem; padding-bottom: 4rem; }

p { margin: 0 0 1.15rem; }

/* Links: red, underlined, hairline — as on damiencharlotin.com. */

a {
    color: var(--rubric);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

/* Headings */

h1, h2, h3 { font-family: var(--serif); font-weight: 700; }

h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.1rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0.5rem 0 1rem;
}

/* Section heads are the rubric: small, red, letterspaced, over a hairline. */
h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--rubric);
    line-height: 1.4;
    margin: 3.25rem 0 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0 0 0.35rem;
}

/* The first section already sits under the hero rule — don't double it. */
main > section:first-child h2 {
    border-top: 0;
    padding-top: 0;
    margin-top: 2.75rem;
}

/* Rubricated drop cap for a lede paragraph. */
.lede::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.82;
    padding: 0.06em 0.12em 0 0;
    color: var(--rubric);
    font-weight: 700;
}

/* Code */

code, pre { font-family: var(--mono); font-size: 0.85em; }

code { color: #3a3a3a; }

pre {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-left: 3px solid var(--rubric);
    padding: 1rem 1.15rem;
    overflow-x: auto;
    line-height: 1.55;
}

pre code { color: inherit; }

/* Masthead / hero */

.hero {
    padding: 5rem 0 0;
    border-bottom: 1px solid var(--line);
}

.hero .wrap { padding-bottom: 2.75rem; }

.hero h1 { margin-bottom: 1.25rem; }

.eyebrow {
    font-family: var(--serif);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--rubric);
    margin: 0;
}

.eyebrow a { color: var(--rubric); text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.tagline {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 34rem;
    margin-bottom: 0;
}

.hero-actions { margin: 2rem 0 1rem; }

.hero-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Buttons: square, letterspaced, rubricated. */

.button {
    display: inline-block;
    font-family: var(--serif);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--rubric);
    color: #fff;
    text-decoration: none;
    border: 1px solid var(--rubric);
    padding: 0.6rem 1.15rem;
    margin: 0 0.4rem 0.5rem 0;
}

.button:hover { background: #8f1111; border-color: #8f1111; color: #fff; }

.button.ghost { background: transparent; color: var(--rubric); }
.button.ghost:hover { background: var(--rubric); color: #fff; }

/* Services: no boxes — a red rule in the margin, print-fashion. */

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    column-gap: 2.25rem;
    row-gap: 1.75rem;
    margin-top: 1.5rem;
}

.card { border-left: 2px solid var(--rubric); padding: 0.1rem 0 0.1rem 1rem; }

.card h3 { font-size: 1rem; }

.card p { margin: 0; font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

/* "Why retain a human?" — hexagonal rubric markers, after the footnote refs. */

.why {
    list-style: none;
    counter-reset: why;
    padding: 0;
    margin: 0;
}

.why li {
    counter-increment: why;
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.85rem;
}

.why li::before {
    content: counter(why);
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 1.55rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--rubric);
    clip-path: polygon(16% 0%, 84% 0%, 100% 50%, 84% 100%, 16% 100%, 0% 50%);
}

/* MCP: the endpoint gets tinted like a rubricated marginal note, since it is
   the one string on the page a reader is meant to copy. */

.endpoint {
    background: var(--rubric-tint);
    border: 1px solid var(--line);
    border-left: 3px solid var(--rubric);
    padding: 0.7rem 1rem;
    margin: 1.25rem 0 1.4rem;
    overflow-x: auto;
}

.endpoint code {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rubric);
    white-space: nowrap;
}

.categories {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
}

.categories li {
    border-left: 2px solid var(--line);
    padding: 0 0 0 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

.categories code { color: var(--rubric); font-weight: 700; }

/* Closing note to humans */

.for-humans { color: var(--muted); }
.for-humans h2 { color: var(--faint); }

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 4.5rem;
    padding: 1.5rem 0 3rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.site-footer p { margin: 0; }

.site-footer .footer-links { margin-top: 0.35rem; }

/* Legal documents — rendered from the Markdown at the repository root, so the
   styling has to work on whatever plain HTML a notice happens to produce. */

.legal h1 { margin-bottom: 0.6rem; }

/* The "Last updated" line the documents open with, set as a rubric date. */
.legal h1 + p em {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.legal ul { padding-left: 1.15rem; margin: 0 0 1.15rem; }

.legal li { margin-bottom: 0.4rem; }

.legal-source {
    margin-top: 3.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

/* About page */

.about-lede {
    display: grid;
    grid-template-columns: 13rem 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 1.75rem;
}

.portrait { margin: 0; }

.portrait img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    filter: grayscale(100%);
}

.portrait figcaption {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 0.45rem;
    line-height: 1.45;
}

@media (max-width: 34rem) {
    .about-lede { grid-template-columns: 1fr; }
    .portrait { max-width: 13rem; }
}

/* Contact form */

.contact-form { margin-top: 2.25rem; }

.field { margin-bottom: 1.3rem; }

.field label {
    display: block;
    font-family: var(--serif);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
}

.field textarea { line-height: 1.6; }

.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--rubric);
    box-shadow: 0 0 0 3px rgba(175, 22, 22, 0.15);
}

.field .help {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
}

.field .errorlist {
    color: var(--rubric);
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
    padding-left: 1.1rem;
}

/* Honeypot: hidden from browsers; the label tells honest readers to skip it. */
.hp-field { position: absolute; left: -6000px; }

.contact-form button {
    font-family: var(--serif);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--rubric);
    color: #fff;
    border: 1px solid var(--rubric);
    border-radius: 0;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
}

.contact-form button:hover { background: #8f1111; border-color: #8f1111; }

.flash-error {
    background: var(--rubric-tint);
    border: 1px solid var(--rubric);
    border-left-width: 3px;
    color: var(--rubric);
    padding: 0.8rem 1rem;
}
