/* Hallmark · genre: editorial · macrostructure: Photographic · H6 photographic fold
 *   knobs: fold-height=52dvh, plate=below-image left-bias, caption=material-annotation
 * theme: custom (tuned) · vibe: "northern daylight, oiled wood, precise"
 *   paper: var(--color-paper) · accent: var(--color-accent) — values live in tokens.css
 *   display: Newsreader 700 · body: IBM Plex Sans 400 · outlier: IBM Plex Mono (role: annotation)
 *   axes: light / roman-serif / warm
 * nav: N9 edge-aligned minimal · footer: Ft6 letter close
 * heads: S5 bottom-anchored (photo folds) · S4 inline (reading sections)
 * features: F3 tabular spec sheet · F4 step sequence · CTA: C2 inline form · C3 typographic link
 * enrichment: E8 photography (real assets supplied in kuvat/)
 * motion: state transitions + one disclosure primitive · studied: no · context: user-provided
 * contrast: pass (40–41) · slop test: 58/58
 *
 * Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 */

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

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

html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: clip; }

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

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-synthesis-weight: none;
  padding-bottom: env(safe-area-inset-bottom);
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-style: normal;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--space-md); top: -100%;
  z-index: var(--z-sticky);
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm); text-decoration: none; white-space: nowrap;
}
.skip:focus { top: var(--space-md); }

/* ----------------------------------------------------------------- nav -- */
/* N9. Wordmark left, one action right, nothing between. The space is the design. */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--page-gutter) var(--space-xl);
}

.nav__mark {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--weight-label);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: var(--rule-thick) solid var(--color-accent);
  transition: color var(--dur-short) var(--ease-out);
}
.nav__cta:hover { color: var(--color-accent); }
.nav__cta:active { color: var(--color-ink-2); }

/* --------------------------------------------------------------- folds -- */
/* The image edge is the divider. No rules between a photograph and its text. */

.fold { position: relative; }

.fold__img {
  width: 100%;
  height: clamp(15rem, 46dvh, 26rem);
  object-fit: cover;
}

.fold--hero .fold__img { height: clamp(16rem, 52dvh, 30rem); }

.fold__plate {
  max-width: 46rem;
  padding: var(--space-xl) var(--page-gutter) var(--space-2xl);
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}

/* Outlier slot 1 of 2 — the annotation of a photograph. */
.plate__note,
.fold__caption,
.swatch__note {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Small labels elsewhere are the body face, tracked out. Not a third font. */
.step__n,
.spec thead th,
.field label,
.foot__facts dt {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.plate__display {
  font-size: var(--text-display);
  max-width: 12ch;
}

.plate__body {
  max-width: var(--measure-narrow);
  color: var(--color-ink-2);
  font-size: var(--text-md);
  line-height: 1.5;
}

.fold__text {
  padding: var(--space-xl) var(--page-gutter) var(--space-2xl);
  max-width: 44rem;
}

/* S5 · bottom-anchored head. The photograph is the primary act; the name confirms it. */
.fold__label {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.fold--close .fold__img { height: clamp(14rem, 52dvh, 30rem); }
.fold--close .fold__caption {
  padding: var(--space-md) var(--page-gutter) 0;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: var(--text-base);
}

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

.band {
  padding: var(--space-3xl) var(--page-gutter);
  max-width: 72rem;
  margin-inline: 0;
}

.band--lede { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.band--wide { max-width: 78rem; padding-bottom: var(--space-2xl); }
.band--cta  { padding-top: var(--space-2xl); padding-bottom: var(--space-3xl); }

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1.32;
  letter-spacing: -0.012em;
  max-width: 24ch;
  margin-bottom: var(--space-lg);
  text-wrap: pretty;
}

.body { max-width: var(--measure); color: var(--color-ink-2); text-wrap: pretty; }
.body + .body { margin-top: var(--space-md); }
.body--intro { margin-bottom: var(--space-xl); }

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

/* S4 · inline head for the reading sections. Stacked, single column, no eyebrow. */
.head {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}
.head--cta { font-size: var(--text-3xl); }

/* -------------------------------------------------------- placeholders -- */
/* A field the client must fill. It is meant to look unfinished. */

.fill {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding-inline: var(--space-2xs);
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- spec -- */
/* F3 · tabular spec sheet. Hairlines between rows, no card, no borders around. */

.table-wrap { overflow-x: auto; margin-bottom: var(--space-2xl); }

.spec {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-base);
}

.spec th, .spec td {
  padding: var(--space-md) var(--space-lg) var(--space-md) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule-2);
  vertical-align: baseline;
}

.spec thead th {
  border-bottom-color: var(--color-rule);
  padding-bottom: var(--space-sm);
}

.spec tbody th {
  font-weight: var(--weight-label);
  color: var(--color-ink);
  white-space: nowrap;
}

.spec tbody td:first-of-type { color: var(--color-ink); }
.spec tbody tr:last-child th,
.spec tbody tr:last-child td { border-bottom: 0; }

.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ swatches -- */
/* The one deliberate grid-break: this strip ignores the page gutter. */

.swatches {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 15rem);
  gap: var(--space-md);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  margin: 0 calc(var(--page-gutter) * -1) 0 calc(var(--page-gutter) * -1);
  padding: 0 var(--page-gutter);
}

.swatches li { scroll-snap-align: start; }
.swatches img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.swatch__note { margin-top: var(--space-xs); }

/* --------------------------------------------------------------- steps -- */
/* F4 · numbered stages. The numeral sits above its heading, never beside it. */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-xl);
  counter-reset: none;
}

.step {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  max-width: var(--measure);
}

.step__n { font-size: var(--text-sm); color: var(--color-accent); }
.step__h { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }

/* ------------------------------------------------------------------ qa -- */

.qa { border-top: var(--rule-hair) solid var(--color-rule); max-width: var(--measure); }

.q { border-bottom: var(--rule-hair) solid var(--color-rule); }

.q__s {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-md) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  transition: color var(--dur-short) var(--ease-out);
}
.q__s::-webkit-details-marker { display: none; }
.q__s::after {
  content: "+";
  margin-inline-start: auto;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--text-md);
  color: var(--color-accent);
  transition: transform var(--dur-short) var(--ease-in-out);
}
.q[open] .q__s::after { transform: rotate(45deg); }
.q__s:hover { color: var(--color-accent); }
.q__s:active { color: var(--color-ink-2); }

/* No open/close animation: the page is motion-cut by design. The mark rotates,
   the panel simply is there — the same discipline the photographs get. */
.q__a { padding-bottom: var(--space-lg); }

/* ---------------------------------------------------------------- form -- */
/* C2 · the CTA is the form. Underlines, not boxes. */

.quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg) var(--space-xl);
  max-width: 46rem;
  margin-top: var(--space-xl);
}

.field { display: grid; gap: var(--space-2xs); align-content: start; }
.field--full { grid-column: 1 / -1; }
/* The select needs to look like a select. A glyph from the annotation face,
   not an icon from a library the page doesn't otherwise use. */
.field--select { position: relative; }
.field--select::after {
  content: "▾";
  position: absolute;
  right: 0;
  bottom: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
  pointer-events: none;
}



.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--color-ink);
  background: transparent;
  border: 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  border-radius: 0;
  padding: var(--space-xs) 0;
  min-height: 44px;
  width: 100%;
  outline: 2px solid transparent;   /* reserved at rest — no geometry shift */
  outline-offset: 2px;
  transition: border-color var(--dur-short) var(--ease-out);
}
.field textarea { resize: vertical; min-height: var(--space-3xl); }
.field select { appearance: none; padding-inline-end: var(--space-lg); }

.field input::placeholder,
.field textarea::placeholder { color: var(--color-muted); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-bottom-color: var(--color-ink-2); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-color: var(--color-focus);
  border-bottom-color: var(--color-focus);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  color: var(--color-muted);
  border-bottom-style: dashed;
  opacity: 0.55;
  cursor: not-allowed;
}

.field__msg {
  font-size: var(--text-sm);
  color: var(--color-muted);
  min-height: 1.25rem;
}
/* State is never carried by colour alone — the mark and the copy carry it too. */
.field[data-state="error"] input,
.field[data-state="error"] select,
.field[data-state="error"] textarea {
  border-bottom-color: var(--color-accent);
  box-shadow: 0 1px 0 0 var(--color-accent);
}
.field[data-state="error"] .field__msg { color: var(--color-accent-ink); }
.field[data-state="error"] .field__msg::before { content: "! "; font-weight: var(--weight-label); color: var(--color-accent); }
.field[data-state="ok"] .field__msg::before { content: "✓ "; font-weight: var(--weight-label); color: var(--color-accent); }

.quote__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
}

.btn {
  font-family: var(--font-body);
  font-weight: var(--weight-label);
  font-size: var(--text-base);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius-xs);
  min-height: 44px;
  padding-inline: var(--space-xl);
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out),
              filter var(--dur-short) var(--ease-out);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: progress; opacity: 0.55; filter: saturate(0.4); }
.btn[data-state="sending"] .btn__label::after { content: " …"; }

.quote__status { font-size: var(--text-sm); color: var(--color-ink-2); max-width: 34ch; }
.quote__status[data-tone="error"]::before { content: "! "; font-weight: var(--weight-label); color: var(--color-accent); }

.quote__alt { margin-top: var(--space-xl); font-size: var(--text-base); color: var(--color-muted); }
.quote__alt .sep { padding-inline: var(--space-xs); }

/* --------------------------------------------------------------- links -- */
/* C3 · typographic link. A word, an arrow, a rule. */

.tlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: var(--space-xs);
  font-weight: var(--weight-label);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  transition: border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
}
.tlink:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.tlink:active { color: var(--color-ink-2); border-bottom-color: var(--color-ink-2); }

.quote__alt .tlink { min-height: 0; padding-block: 0; }

/* -------------------------------------------------------------- footer -- */
/* Ft6 · letter close. The page ends the way a letter does. */

.foot {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding: var(--space-2xl) var(--page-gutter) var(--space-3xl);
  display: grid;
  gap: var(--space-xl);
  max-width: 72rem;
}

.foot__close {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  font-size: var(--text-lg);
  line-height: 1.4;
  max-width: 30ch;
}
.foot__sign { font-weight: var(--weight-display); }

.foot__facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule-2);
  padding-top: var(--space-lg);
}
.foot__facts dt { margin-bottom: var(--space-2xs); }
.foot__facts dd { margin: 0; }
.foot__facts address { font-style: normal; line-height: 1.45; }
.foot__facts a { text-decoration: none; border-bottom: var(--rule-hair) solid var(--color-rule); white-space: nowrap; }
.foot__facts a:hover { border-bottom-color: var(--color-accent); }

.foot__ps { font-size: var(--text-sm); color: var(--color-muted); max-width: var(--measure); }
.foot__ps code { font-family: inherit; color: var(--color-ink-2); }

/* --------------------------------------------------------- breakpoints -- */

/* Below 40rem the spec sheet stops being a table. A row of three columns that
   scrolls sideways is worse than three stacked lines that don't. */
@media (max-width: 39.999rem) {
  .table-wrap { overflow-x: visible; }
  .spec, .spec thead, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: auto; }
  .spec { min-width: 0; }
  .spec thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec tbody tr {
    padding-block: var(--space-md);
    border-bottom: var(--rule-hair) solid var(--color-rule-2);
  }
  .spec tbody tr:last-child { border-bottom: 0; }
  .spec tbody th,
  .spec tbody td { padding: 0; border: 0; }
  .spec tbody th {
    font-size: var(--text-sm);
    font-weight: var(--weight-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    white-space: normal;
    margin-bottom: var(--space-3xs);
  }
  .spec tbody td.muted { margin-top: var(--space-2xs); }
}

@media (min-width: 40rem) {
  body { font-size: 1.09375rem; }
  .steps { gap: var(--space-2xl); }
  /* Pairs, deliberately: who you are · how to reach you, then size · job. */
  .quote { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60rem) {
  .fold__plate { padding-block: var(--space-xl) var(--space-3xl); }
  .fold__text { padding-block: var(--space-2xl) var(--space-3xl); }
  .band { padding-block: var(--space-4xl); }
  .band--lede {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: start;
  }
  .lede { margin-bottom: 0; max-width: 30ch; }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2xl) var(--space-3xl);
  }
  .step { max-width: none; }
}

@media (hover: hover) and (pointer: fine) {
  .swatches img { transition: opacity var(--dur-short) var(--ease-out); }
  .swatches li:hover img { opacity: 0.86; }
}

@media (pointer: coarse) {
  .btn,
  .field input,
  .field select,
  .field textarea { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
