/* ShipLedger landing · a printed sheet
 * mono-color: Cool Gray paper · Carbon (type, rules, CTA, one solid plate) + Ultramarine (the product, printed as duotone plates)
 *   layout   image field — the invoice blueprint rises into the headline from the right column, flush with the page edge;
 *            the finding card is a ledger slip laid over the blueprint's dissolving foot
 *   tension  diagonal · headline top-left → lede → blueprint → the ringed $96.00 bottom-right · release zone = the paper under the CTA
 *   gesture  one hand-drawn ring around the $96.00 on the finding card (broken stroke, draws once on load)
 *   process  clean plate separation for the product plates; halftone only where the blueprint dissolves into paper; 4% paper grain
 * impeccable bolder: one type scale with a real ceiling (96px / 700 display · 56px h2 · 30px rows · 17px body · 12px floor),
 *   5/12 asymmetries, one overlap (the slip on the blueprint), 1.5–3px rules, square corners, nothing decorative
 * Apple HIG: 17px body, 12px floor, no light weights, one typeface, ≥44px controls, rem throughout,
 *   interactive = carbon + underline only, Reduce Motion honored, images carry real alt text
 */

/* tokens.css is linked from the HTML before this file (no @import: the browser would only find it after downloading this one) */

/* Archivo, self-hosted (OFL): the variable wght 400–700 build in Google's latin and latin-ext subsets, fonts/*.woff2.
   No third-party request for a page that says "never shared"; the HTML preloads the latin file. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain — fixed, static, multiplied over everything at 4% */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

h1, h2, h3 { margin: 0; overflow-wrap: anywhere; min-width: 0; }
h1, h2 {
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-variant-numeric: proportional-nums;
  text-wrap: balance;
}
h1 { font-weight: 700; line-height: 0.98; letter-spacing: -0.035em; }

p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

/* Interactive = carbon + underline. The accent never signals interactivity. */
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2.5px; }

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

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

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in oklch, var(--paper) 94%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1.5px solid var(--ink);
}
.nav .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.nav .nav-links { justify-self: center; }
.nav .nav-cta { justify-self: end; }

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;                 /* ≥44px hit area */
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.nav-links { display: flex; align-items: center; gap: 0.75rem; }   /* hit areas 12px apart */
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.btn .cta-short { display: none; }
@media (max-width: 720px) {
  .nav .nav-links { display: none; }
  .nav .wrap { grid-template-columns: 1fr auto; gap: 1rem; }
  .nav .btn .cta-long { display: none; }
  .nav .btn .cta-short { display: inline; }
}

/* ---------- Buttons — a solid carbon block; hover knocks it out to paper ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--paper-on-ink);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:active { background: var(--ink); color: var(--paper-on-ink); }

/* ---------- Hero — the headline, and the invoice blueprint rising into it from the right column ---------- */

.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 3vw, 3rem); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  --rise: clamp(5rem, 11vw, 10rem);   /* how far the blueprint's mat climbs behind the headline */
}

.hero h1 {
  grid-column: 1 / -1;
  position: relative;
  z-index: var(--z-headline);
  font-size: var(--text-display);
  max-width: calc(15ch + 1.5rem);
  padding: 0 1.5rem 0.75rem 0;
  background: var(--paper);          /* paper knockout: the mat's rules stop at this block, never on a letter */
}

.hero-copy { grid-column: 1; grid-row: 2; padding-top: clamp(1.5rem, 3.5vw, 3rem); }
.hero .lede {
  font-size: var(--text-lede);
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 32ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
}
.hero-cta a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* The blueprint: an open mat (top + left rule) that climbs behind the headline's last lines;
   the image starts below the headline and ends flush with the page's right edge */
.blueprint {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: var(--z-plate);
  align-self: start;
  margin: calc(var(--rise) * -1) 0 0;
  padding: calc(var(--rise) + 1.25rem) 0 0 1.25rem;
  border-top: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
}
.blueprint img { width: 100%; }

/* The finding card — the deliverable itself: a ledger slip laid over the blueprint's dissolving foot,
   right of the measure, wide enough for its rows to set label · detail · amount on one line */
.finding {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: end;
  width: min(100%, 44rem);
  position: relative;
  z-index: var(--z-headline);
  container-type: inline-size;       /* rows re-flow on the card's own width, not the viewport's */
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem));   /* laps the halftone edge; on a phone the band is shallower, so lap less */
  padding: 1.25rem 1.4rem 1.1rem;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.finding-type {
  display: inline-block;
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 0.3em 0.55em 0.25em;
  margin-bottom: 0.9rem;
}
.finding .finding-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  max-width: none;
  text-wrap: balance;
}
.finding dl { margin: 0; border-top: 1.5px solid var(--ink); }
.finding dl > div {
  display: grid;
  grid-template-columns: 6.2em minmax(0, 1fr) auto;
  gap: 0.2rem 0.9rem;
  align-items: baseline;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.finding dt { color: var(--ink-72); font-weight: 500; }
.finding dd { margin: 0; text-wrap: pretty; }
.finding .amt { text-align: right; white-space: nowrap; font-weight: 600; }
.finding .tot { border-bottom: 1.5px solid var(--ink); }
.finding .tot dt { color: var(--ink); font-weight: 600; }
.finding .tot .amt { grid-column: 2 / -1; white-space: normal; padding-top: 0.35rem; }
.finding .tot .terms { white-space: nowrap; }
.finding .tot .circled { color: var(--accent); font-size: var(--text-figure); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.finding blockquote {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule);
  background: var(--accent-screen);
  font-style: italic;
  line-height: 1.45;
  hanging-punctuation: first;
}
.finding blockquote cite { display: block; margin-top: 0.4rem; font-style: normal; font-size: var(--text-xs); color: var(--ink-72); }
.finding .sources { margin: 0.85rem 0 0; font-size: var(--text-xs); color: var(--ink-72); max-width: none; }
.finding figcaption { margin-top: 0.85rem; padding-top: 0.65rem; border-top: 1px solid var(--rule); font-size: var(--text-xs); color: var(--ink-72); }
/* In the hero's column (and on phones) label and amount share a line and the detail runs full width under them;
   the three-column rows appear only once the card spans a whole single-column measure */
@container (max-width: 30rem) {
  .finding dl > div { grid-template-columns: minmax(0, 1fr) auto; }
  .finding dd:not(.amt), .finding .tot .amt { grid-column: 1 / -1; grid-row: 2; }
}

/* The one manual gesture — a hand-drawn ring around the difference */
.circled { position: relative; display: inline-block; padding: 0.05em 0.25em; }
.ring {
  position: absolute;
  inset: -30% -14%;
  width: 128%;
  height: 160%;
  overflow: visible;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; --rise: 0px; }
  .hero h1 { max-width: 15ch; padding: 0; }
  .hero-copy { grid-row: 2; }
  .blueprint { grid-column: 1; grid-row: 3; margin-top: 2.5rem; padding-top: 1.25rem; }
  .finding { grid-row: 4; }
}

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

section[id] { scroll-margin-top: 5rem; }
.section-title { font-size: var(--text-h2); }

/* What it checks — three ruled rows: title and description, then the product specimen at full measure */

.checks { padding-block: var(--space-section); }
.checks .section-title { margin-bottom: 1.5rem; }
.types { margin: 0; border-top: 3px solid var(--ink); }
.types > div {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
  gap: 1.75rem clamp(2rem, 5vw, 5rem);
  padding-block: 2.75rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.types dt {
  font-size: var(--text-row);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.types dd { margin: 0; font-size: var(--text-lede); line-height: 1.45; letter-spacing: -0.01em; max-width: 40ch; color: var(--ink-80); }
.types dd.spec { grid-column: 1 / -1; max-width: none; }   /* full measure: the app's own type at roughly its own size */

/* A specimen: the plate on a paper mat inside a hairline */
.spec { position: relative; padding: 0.75rem; border: 1px solid var(--ink); }
.spec img { width: 100%; }

@media (max-width: 640px) {
  .types > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .types dd.spec { margin-top: 1rem; }
}

/* ring stroke + draw-on */
.ring path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.loaded .ring path {
  stroke-dasharray: 250;
  stroke-dashoffset: 250;
  animation: draw 700ms var(--ease-out) 600ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Your data — the solid black plate; the three promises knocked out in paper, the delete dialog as proof */

.data {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding-block: var(--space-section);
}
.data .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.data .section-title { grid-column: 1 / -1; color: inherit; }
.data .statement {
  font-size: var(--text-statement);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin: 0 0 2rem;
  text-wrap: pretty;                 /* seven lines in the column: pretty keeps the last line from being one word */
}
.data p { font-size: var(--text-body); line-height: 1.55; max-width: 44ch; color: var(--paper-on-ink-85); }
.data p:last-child { margin: 0; }
.data a {
  color: var(--paper-on-ink);
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 500;
}
.data :focus-visible { outline-color: var(--paper-on-ink); }
.data .spec { border-color: var(--paper-on-ink-85); padding: 0.75rem; max-width: 34rem; }   /* the dialog at its own size */
@media (max-width: 880px) {
  .data .wrap { grid-template-columns: 1fr; }
}

/* ---------- Footer — the headline again, then the legal row ---------- */

footer { border-top: 3px solid var(--ink); }

.foot-statement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-block: clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--rule);
}
.foot-line {
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-variant-numeric: proportional-nums;
  max-width: 18ch;
  margin: 0;
  text-wrap: balance;
}
@media (max-width: 720px) {
  .foot-statement { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  font-size: var(--text-sm);
}
footer nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }   /* hit areas 12px apart once the -0.5rem margins are taken off */
footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.5rem; margin-inline: -0.5rem; }
footer .legal-note { flex-basis: 100%; max-width: none; font-size: var(--text-xs); color: var(--ink-72); margin: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loaded .ring path { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Contact — a question and one paragraph; a name · email · message form that posts to api/contact.js ---------- */

.reach { padding-block: var(--space-section); border-top: 3px solid var(--ink); }
.reach .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.reach-copy p {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: var(--text-lede);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink-80);
}

.form { display: grid; gap: 1.25rem; position: relative; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 600; font-size: var(--text-sm); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.7rem 1rem;
  min-height: 3rem;
  width: 100%;
}
.field ::placeholder { color: var(--ink-72); opacity: 1; }   /* 5.7:1 — a hint the visitor can still read */
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.form .btn { justify-self: start; min-width: 9rem; }

.form-status { display: none; margin: 0; padding: 0.8rem 1rem; font-size: var(--text-sm); border: 1.5px solid var(--ink); max-width: none; }
.form.sent > :not(.form-status) { display: none; }
.form-status.ok, .form-status.err { display: block; }

@media (max-width: 880px) { .reach .wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Legal pages — one column of prose ---------- */

.legal { padding-block: clamp(3rem, 7vw, 5rem); }
.legal .wrap { max-width: 48rem; }
.legal h1 { font-size: var(--text-h2); margin-bottom: 0.5rem; }
.legal .updated { font-size: var(--text-xs); color: var(--ink-72); margin: 0 0 2rem; }
.legal article { border-top: 3px solid var(--ink); padding-top: 1.5rem; margin-top: 1.5rem; }
.legal h2 { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.2; margin: 2.25rem 0 0.75rem; }
.legal h3 { font-size: var(--text-body); font-weight: 600; margin: 1.5rem 0 0.4rem; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.legal code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }
