/* Pellow & Vane, Savile Row. Brown paper, chalk, ink, the ledger. Phone first. */

:root {
  --cream: #f4efe4;
  --cream-deep: #ebe3d3;
  --kraft: #d8c3a0;
  --kraft-edge: #a98a5c;
  --kraft-deep: #c4a97e;
  --ink: #1e1b17;
  --ink-soft: #55504a;
  --rule: #b9ad98;
  --navy: #1f2a3a;
  --navy-deep: #151d29;
  --chalk: #f4efe4;
  --thread: #a3321f;

  --serif: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", "Menlo", "Courier New", monospace;

  --gutter: 20px;
  --measure: 34em;
}

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

html {
  font-size: 106.25%; /* 17px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.55;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--thread); }
a:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; }

h1, h2, h3 {
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6.5vw, 4rem); }
h2 { font-size: clamp(1.55rem, 4.5vw, 2.5rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--chalk);
  padding: 8px 12px; z-index: 50;
}
.skip:focus { left: 8px; }

/* Small mono labels, the pencil on the pattern */
.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.75em;
}
.label.on-dark { color: #cfc6b3; }

/* ---------- Header ---------- */

.site-head {
  padding: 18px var(--gutter) 0;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  min-width: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark svg { width: 44px; height: 44px; flex: none; }
.wordmark .name {
  font-size: 1.3rem;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.01em;
}
.wordmark .name .amp { font-style: italic; color: var(--thread); padding: 0 0.05em; }
.wordmark .since {
  display: block;
  white-space: normal;
  max-width: 15em;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}
.head-phone {
  flex: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--ink);
  padding: 8px 10px;
  line-height: 1;
}
.head-phone:hover { background: var(--ink); color: var(--chalk); }

.site-nav { margin-top: 14px; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 18px;
}
.site-nav a, .site-nav span {
  display: inline-block;
  padding: 8px 0 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.site-nav span { color: var(--ink-soft); }
.site-nav span { opacity: 0.75; }

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

.band { padding: 56px var(--gutter); }
.band > .inner { max-width: 1120px; margin: 0 auto; }
.band.kraft { background: var(--kraft); }
.band.deep { background: var(--cream-deep); }
.band.navy { background: var(--navy); color: var(--chalk); }
.band.navy a:hover { text-decoration-color: var(--chalk); }
.band.tight { padding-top: 36px; padding-bottom: 36px; }

.lede { font-size: 1.2rem; line-height: 1.45; }

/* Opening */
.opening h1 { margin-bottom: 0.6em; }
.opening .lede { margin-bottom: 1.4em; }

/* Ruth's quote, or anyone's */
.quote {
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--thread);
  max-width: var(--measure);
}
.quote p {
  font-size: 1.25rem;
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 0.5em;
}
.quote footer, .quote cite {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.navy .quote { border-left-color: var(--chalk); }
.navy .quote footer, .navy .quote cite { color: #cfc6b3; }

/* Telephone call-out */
.ring {
  margin: 1.6em 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.ring .number {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 3px solid var(--thread);
  padding-bottom: 2px;
  margin-bottom: 10px;
  line-height: 1.15;
}
.ring .number:hover { color: var(--thread); }
.ring p { font-size: 1rem; }
.navy .ring { border-top-color: #4a586c; }
.navy .ring .number { border-bottom-color: var(--chalk); }
.navy .ring .number:hover { color: #fff; }

/* ---------- Photograph frames (pattern pieces) ---------- */

.photo {
  position: relative;
  background: var(--kraft);
  border: 1px solid var(--kraft-edge);
  box-shadow: inset 0 0 0 10px var(--kraft), inset 0 0 0 11px var(--kraft-edge);
  aspect-ratio: 4 / 5;
  width: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.photo.wide { aspect-ratio: 3 / 2; }
.photo.tall { aspect-ratio: 3 / 4; }
.photo.square { aspect-ratio: 1 / 1; }
.photo .grain {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.photo .caption {
  position: relative;
  margin: 0;
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ink);
  max-width: none;
}
.photo .caption strong { font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 4px; }
.kraft .photo { background: var(--cream-deep); box-shadow: inset 0 0 0 10px var(--cream-deep), inset 0 0 0 11px var(--kraft-edge); }
.figure { margin: 0; }
.navy .figure figcaption { color: #cfc6b3; }
.figure figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- The ledger ---------- */

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  max-width: 760px;
}
.ledger li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "item value"
    "remark remark";
  gap: 4px 16px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ledger .item { grid-area: item; font-size: 1.05rem; }
.ledger .value {
  grid-area: value;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.02rem;
  white-space: nowrap;
  text-align: right;
}
.ledger .remark {
  grid-area: remark;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: none;
}
.ledger .remark::before { content: "Remarks: "; font-style: normal; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ledger.no-remark-label .remark::before { content: none; }
.navy .ledger { border-top-color: var(--chalk); }
.navy .ledger li { border-bottom-color: #4a586c; }
.navy .ledger .remark { color: #d8d0bf; }
.kraft .ledger li { border-bottom-color: var(--kraft-edge); }
.kraft .ledger .remark { color: #4a4034; }
.ledger-head {
  display: none;
}

/* Ledger entries with a year in the margin (the stories) */
.entries { list-style: none; margin: 0; padding: 0; max-width: 760px; border-top: 2px solid var(--ink); }
.entries li {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  gap: 6px 14px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--rule);
}
.entries .year {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-top: 0.25em;
}
.entries .entry h3 { margin-bottom: 0.35em; }
.entries .entry p { max-width: none; }
.entries .entry p + p { margin-top: 0.6em; }
.entries .rem {
  display: inline-block;
  margin-top: 0.4em;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.entries .rem::before { content: "Remarks: "; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }
.navy .entries { border-top-color: var(--chalk); }
.navy .entries li { border-bottom-color: #4a586c; }
.navy .entries .year, .navy .entries .rem { color: #cfc6b3; }

/* Numbered steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 760px; border-top: 2px solid var(--ink); }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3em 1fr;
  gap: 4px 14px;
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--mono);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--thread);
  padding-top: 0.1em;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { max-width: none; }
.steps .when {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5em;
}
.steps.on-kraft li { border-bottom-color: var(--kraft-edge); }

/* Big stat row, plain */
.figures {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 16px;
}
.figures li { border-top: 1px solid var(--rule); padding-top: 10px; }
.figures .n {
  display: block;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.figures .d { display: block; font-size: 0.95rem; color: var(--ink-soft); margin-top: 4px; }
.navy .figures li { border-top-color: #4a586c; }
.navy .figures .d { color: #cfc6b3; }
.kraft .figures li { border-top-color: var(--kraft-edge); }
.kraft .figures .d { color: #4a4034; }

/* The door */
.door {
  padding: 72px var(--gutter);
  background: var(--navy);
  color: var(--chalk);
  text-align: center;
}
.door .rule {
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  line-height: 1.2;
  margin: 0 auto 0.6em;
  max-width: 14em;
  font-style: italic;
}
.door .rule span { display: block; }
.door p { margin: 0 auto; color: #cfc6b3; max-width: 30em; }
.door .label { margin-bottom: 1.2em; }

/* Questions */
.qa { max-width: 760px; margin: 0; }
.qa dt {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.35em;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.qa dd { margin: 0 0 22px; }
.qa dd p { max-width: none; }
.kraft .qa dt { border-top-color: var(--kraft-edge); }

/* Two-column at width */
.split { display: grid; gap: 32px; }
.split > * { min-width: 0; }
.people { display: grid; gap: 40px; }
.person h3 { margin-top: 18px; font-size: 1.35rem; }
.person .role { margin-bottom: 0.6em; }
.person p { max-width: none; }

/* Aside (the book pocket) */
.pocket {
  border: 1px solid var(--ink);
  padding: 22px;
  max-width: 34em;
  position: relative;
}
.pocket::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 0;
  height: 10px;
  border-bottom: 1px dashed var(--ink);
}
.pocket p { max-width: none; }
.pocket h3 { margin-top: 6px; }

/* Text block spacing */
.prose h2 { margin-top: 0; }
.prose + .prose { margin-top: 40px; }
.stack > * + * { margin-top: 40px; }

/* Links that look like a line in the ledger */
.more {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-top: 1.2em;
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink);
  color: var(--cream);
  padding: 48px var(--gutter) 40px;
}
.site-foot .inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 30px; }
.site-foot h2 { font-size: 1.35rem; margin-bottom: 0.6em; }
.site-foot p, .site-foot li { color: #d8d0bf; }
.site-foot a { color: var(--cream); }
.site-foot a:hover { text-decoration-color: var(--thread); }
.site-foot .label { color: #a79d8a; }
.site-foot .number {
  font-family: var(--mono); font-weight: 500;
  font-size: 1.5rem; text-decoration: none;
  border-bottom: 2px solid var(--thread);
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot .hours li { display: flex; justify-content: space-between; gap: 12px; max-width: 22em; border-bottom: 1px solid #3a352f; padding: 6px 0; }
.site-foot .hours span:last-child { font-family: var(--mono); font-size: 0.9rem; white-space: nowrap; }
.site-foot .small { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: #a79d8a; margin-top: 10px; }
.site-foot .other { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; }

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .figures { grid-template-columns: repeat(4, 1fr); }
  .site-foot .inner { grid-template-columns: 1fr 1fr; }
  .people { grid-template-columns: 1fr 1fr; }
  .ledger li {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 900px) {
  :root { --gutter: 48px; }
  html { font-size: 112.5%; } /* 18px */
  .band { padding: 88px var(--gutter); }
  .band.tight { padding-top: 56px; padding-bottom: 56px; }
  .masthead { align-items: center; }
  .site-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; padding-top: 16px; }
  .site-head .masthead { display: contents; }
  .site-head .wordmark { grid-column: 1; }
  .site-head .site-nav { grid-column: 2; margin-top: 0; }
  .site-head .head-phone { grid-column: 3; }
  .site-nav ul { gap: 4px 26px; }
  .wordmark .since { font-size: 0.68rem; max-width: none; }
  .site-nav a, .site-nav span { padding: 18px 0 20px; }
  .split { grid-template-columns: 1fr 1fr; align-items: start; gap: 64px; }
  .split.wide-left { grid-template-columns: 3fr 2fr; }
  .split.wide-right { grid-template-columns: 2fr 3fr; }
  .opening .split { grid-template-columns: 5fr 4fr; }
  .opening .figures { grid-template-columns: 1fr 1fr; align-self: center; }
  .ledger li {
    grid-template-columns: 1.2fr auto 1.6fr;
    grid-template-areas: "item value remark";
    gap: 0 28px;
  }
  .ledger .remark { font-size: 0.92rem; }
  .ledger-head {
    display: grid;
    grid-template-columns: 1.2fr auto 1.6fr;
    gap: 0 28px;
    max-width: 760px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-bottom: 8px;
  }
  .ledger-head span:nth-child(2) { text-align: right; }
  .navy .ledger-head { color: #cfc6b3; }
  .entries li { grid-template-columns: 6em 1fr; gap: 0 24px; }
  .steps li { grid-template-columns: 4em 1fr; gap: 0 24px; }
  .steps li::before { font-size: 2rem; }
  .people { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .person h3 { font-size: 1.25rem; }
  .site-foot .inner { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (min-width: 1200px) {
  .band > .inner { max-width: 1200px; }
}

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

/* ---- Bench photographs: added AFTER the build, identically on every site. ----
   Each picture fills the frame the design drew, cropped from the centre; the frame keeps
   the size the design gave it (its label is hidden, not removed). */
[data-bench-frame="static"] { position: relative; }
[data-bench-frame] { isolation: isolate; overflow: clip; }  /* clip, not hidden: hidden makes a grid item a scroll container and changes its automatic minimum size, which re-lays out some designs */
[data-bench-frame] > .bench-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; z-index: -1; margin: 0; border: 0; }
[data-bench-frame]:not([data-bench-over]) .bench-label { visibility: hidden; }
[data-bench-frame][data-bench-frame]:not([data-bench-over])::before,
[data-bench-frame][data-bench-frame]:not([data-bench-over])::after { visibility: hidden; }  /* hidden, not removed: some designs size the frame with a pseudo-element */
[data-bench-over] .bench-label { display: none; }
[data-bench-over] > .bench-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--bench-scrim) 0%, color-mix(in srgb, var(--bench-scrim) 88%, transparent) 42%, color-mix(in srgb, var(--bench-scrim) 35%, transparent) 72%, transparent 100%); }
@media (max-width: 700px) { [data-bench-over] > .bench-scrim { background: color-mix(in srgb, var(--bench-scrim) 82%, transparent); } }
