/* Heinz Bros — house stylesheet.
   Two inks on paper: umber and oxblood, with a tarnished-brass rule.
   Light is the paper; dark is the leather. */

:root {
  --paper:      #EDE4D3;
  --paper-deep: #E2D6BE;
  --paper-edge: #D6C8AC;
  --ink:        #33251A;
  --ink-soft:   #6E5B45;
  --oxblood:    #7A2B1D;
  --brass:      #9A7B3F;
  --leather:    #4A3327;
  --cream:      #F2E9D8;

  --measure: 34rem;
  --gutter: clamp(1.15rem, 5vw, 2.5rem);

  --face-display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --face-body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --face-label: "IM Fell English SC", "Bodoni Moda", Georgia, serif;
  --face-data: "Courier Prime", "Courier New", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #221811;
    --paper-deep: #2C2018;
    --paper-edge: #433326;
    --ink:        #EBE0CC;
    --ink-soft:   #B6A184;
    --oxblood:    #CF7A5E;
    --brass:      #C6A45E;
  }
}

:root[data-theme="dark"] {
  --paper:      #221811;
  --paper-deep: #2C2018;
  --paper-edge: #433326;
  --ink:        #EBE0CC;
  --ink-soft:   #B6A184;
  --oxblood:    #CF7A5E;
  --brass:      #C6A45E;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-body);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

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

/* ---- Masthead ------------------------------------------------------ */

.masthead {
  border-bottom: 1px solid var(--paper-edge);
  padding-block: 1.6rem 0;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.6rem;
}

.mark { width: clamp(118px, 12vw, 142px); height: auto; flex: none; }

.masthead__words { display: flex; flex-direction: column; gap: 0.15rem; }

.wordmark {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
}

.wordmark a { color: inherit; text-decoration: none; }

.tagline {
  font-family: var(--face-label);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 1.3rem;
  border-top: 3px double var(--brass);
  padding-top: 0.55rem;
}

.nav a {
  font-family: var(--face-label);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--oxblood); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--oxblood); }

:where(a):focus-visible,
:where(button):focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

/* ---- Type ---------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--face-display);
  text-wrap: balance;
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-weight: 700;
  font-size: clamp(2rem, 1.45rem + 2.5vw, 2.95rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
}

h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 1.95rem);
}

h3 {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.005em;
}

p { margin: 0; max-width: var(--measure); }
.lede { font-size: 1.18em; }
.dropline { color: var(--ink-soft); font-style: italic; }

.eyebrow {
  font-family: var(--face-label);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--oxblood);
  margin: 0;
}

a { color: var(--oxblood); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

strong { font-weight: 600; }

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

main { padding-block: 2.6rem 0; }

.section { display: flex; flex-direction: column; gap: 1.1rem; }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack--tight { gap: 0.6rem; }
.sections { display: flex; flex-direction: column; gap: 3rem; }

.fleuron {
  display: block;
  width: 84px;
  height: auto;
  margin: 0.4rem auto;
  color: var(--brass);
}

.hr {
  border: 0;
  border-top: 1px solid var(--paper-edge);
  margin: 0;
}

/* ---- Specimen card ------------------------------------------------- */

.specimen {
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  box-shadow: inset 0 0 0 1px var(--paper-deep), inset 0 0 0 5px var(--paper-edge);
  padding: clamp(1.1rem, 4vw, 1.9rem);
}

.specimen__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1rem;
  border-bottom: 1px solid var(--paper-edge);
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
}

.specimen__title {
  font-family: var(--face-label);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.specimen__no {
  font-family: var(--face-data);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.fields {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.62rem 1.2rem;
  margin: 0;
  font-family: var(--face-data);
  font-size: 0.85rem;
  line-height: 1.55;
}

.fields dt {
  font-family: var(--face-label);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.fields dd { margin: 0; grid-column: 2; }
.fields dd + dd { margin-top: 0.45rem; }

/* A subject sits in a ledger: the reading on the left, its mark on the right. */
.fields dd.subject {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.9rem;
  align-items: start;
}

@media (max-width: 34rem) {
  .fields { grid-template-columns: 1fr; gap: 0.15rem; }
  .fields dd { grid-column: 1; }
  .fields dd.subject { grid-template-columns: 1fr; justify-items: start; }
  .fields dt { margin-top: 0.7rem; }
  .fields dt:first-child { margin-top: 0; }
}

/* Conclusion strength: encoded in the border, not only the colour. */
.mark-strength {
  font-family: var(--face-label);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  padding: 0.05rem 0.42rem;
  white-space: nowrap;
  align-self: start;
}

.mark-strength--documented { background: var(--ink); color: var(--paper); }
.mark-strength--probable { border: 1px solid var(--oxblood); color: var(--oxblood); }
.mark-strength--unproven { border: 1px dashed var(--ink-soft); color: var(--ink-soft); }

.specimen__note {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--paper-edge);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: none;
}

/* ---- Services ------------------------------------------------------ */

.services { display: flex; flex-direction: column; gap: 0; }

.service {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.35rem 1.2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--paper-edge);
}

.service:last-child { border-bottom: 1px solid var(--paper-edge); }

.service__numeral {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--brass);
  line-height: 1;
  padding-top: 0.15rem;
}

.service__body { display: flex; flex-direction: column; gap: 0.5rem; }

@media (max-width: 30rem) {
  .service { grid-template-columns: 1fr; }
  .service__numeral { font-size: 1.3rem; }
}

/* ---- Lists --------------------------------------------------------- */

.ruled {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ruled li {
  padding-block: 0.7rem;
  border-top: 1px solid var(--paper-edge);
  max-width: var(--measure);
}

.ruled li:last-child { border-bottom: 1px solid var(--paper-edge); }

.ruled__term {
  font-family: var(--face-label);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.plainlist { margin: 0; padding-left: 1.1rem; max-width: var(--measure); }
.plainlist li { padding-block: 0.18rem; }
.plainlist li::marker { color: var(--brass); }

/* ---- Callout ------------------------------------------------------- */

.callout {
  border-left: 3px double var(--oxblood);
  padding: 0.2rem 0 0.2rem 1.1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.callout strong { font-style: normal; color: var(--ink); }

/* ---- Contact ------------------------------------------------------- */

.address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.address__line {
  font-family: var(--face-data);
  font-size: 0.95rem;
  word-break: break-word;
}

.bigmail {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 0.9rem + 1.8vw, 1.9rem);
  text-decoration: none;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 0.1rem;
  word-break: break-word;
}

.bigmail:hover { border-bottom-color: var(--oxblood); }

/* ---- Colophon ------------------------------------------------------ */

.colophon {
  margin-top: 3.4rem;
  border-top: 3px double var(--brass);
  padding-block: 1.4rem 2.6rem;
  font-family: var(--face-label);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  justify-content: space-between;
}

.colophon p { max-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Standards ledger ---------------------------------------------- */

.stds { display: flex; flex-direction: column; }

.std {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--paper-edge);
}

.std:last-child { border-bottom: 1px solid var(--paper-edge); }

.std__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.std__head h3 { max-width: 28rem; }

.std__req {
  font-family: var(--face-data);
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ink-soft);
  border-left: 1px solid var(--paper-edge);
  padding-left: 0.85rem;
}

.mark-strength--kept { border: 1px solid var(--ink-soft); color: var(--ink-soft); }
.mark-strength--exceeded { background: var(--oxblood); color: var(--paper); }

/* ---- The scenario -------------------------------------------------- */
/* The emotional centre of the site. It is set as a passage rather than as
   copy: wider measure, looser leading, and a brass rule down the left, so
   it reads like something quoted from a book rather than something sold. */

.scene {
  border-left: 3px double var(--brass);
  padding-left: clamp(1rem, 4vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.scene p { max-width: 36rem; line-height: 1.72; }

.scene__open {
  font-family: var(--face-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.45rem);
  line-height: 1.34;
  max-width: 32rem;
}

/* The one line the whole page is built to earn. */
.scene__turn {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.22;
  color: var(--oxblood);
  max-width: 30rem;
  margin-block: 0.3rem;
}

.scene__after { font-style: italic; color: var(--ink-soft); }

/* ---- What the family does next ------------------------------------- */
/* Each item is an act by a relative, so the marker is a hand-set bullet
   rather than a number: these are not steps and they have no order. */

.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.acts li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.6rem;
  border-top: 1px solid var(--paper-edge);
  max-width: var(--measure);
}

.acts li:last-child { border-bottom: 1px solid var(--paper-edge); }

.acts li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.32rem;
  width: 7px;
  height: 7px;
  background: var(--brass);
  transform: rotate(45deg);
}

/* ---- Add-ons ------------------------------------------------------- */
/* Deliberately subordinate to the archive: smaller type, no numerals, and
   a stated dependency at the head. Nothing here is a front door. */

.addons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--paper-edge);
}

.addon {
  padding: 1.1rem 1.2rem 1.2rem 0;
  border-bottom: 1px solid var(--paper-edge);
}

.addon h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.addon p { font-size: 0.97rem; color: var(--ink-soft); max-width: 24rem; }

.addon__req {
  display: block;
  font-family: var(--face-label);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 0.35rem;
}

@media (min-width: 40rem) {
  .addon { padding-right: 2rem; }
}

/* ---- The deadline -------------------------------------------------- */
/* The one urgent thing on the site, and it is not a death. */

.deadline {
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  border-left: 4px solid var(--oxblood);
  padding: clamp(1.1rem, 4vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.deadline p { max-width: 34rem; }

.deadline__line {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.25;
  color: var(--ink);
}
