/* Marilyn Thomas — Louisiana's Mercy
   Direction: "Family Record" (see _private/design/DIRECTION.md) */

@font-face {
  font-family: "Libre Caslon Display";
  src: url("assets/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --paper: #F3EDE3;
  --paper-2: #EAE1D3;
  --ink: #221D19;
  --muted: #574D44;
  --ox: #6F2018;       /* from the cover's title ink */
  --ox-dark: #561811;
  --rule: #C9B8A2;
  --night: #221D19;
  --night-text: #EFE7DB;
  --display: "Libre Caslon Display", "Big Caslon", Georgia, serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
  --space: clamp(64px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ox); }
em { font-style: italic; }
h1, h2, h3 { font-weight: 400; }

:focus-visible { outline: 3px solid var(--ox); outline-offset: 3px; border-radius: 1px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--ink); color: var(--paper); padding: .6em 1em; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--paper); }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ox);
}
.marker { font-family: var(--display); font-size: 1.15rem; letter-spacing: .04em; margin-right: .5em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 237, 227, .95);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { font: 400 1.3rem/1 var(--display); letter-spacing: .01em; text-decoration: none; padding-block: 8px; }
.site-nav ul { list-style: none; padding: 0; display: flex; gap: clamp(18px, 2.4vw, 34px); }
.site-nav a { font-size: .95rem; text-decoration: none; color: var(--muted); padding-block: 10px; display: inline-block; }
.site-nav a:hover { color: var(--ox); text-decoration: underline; }
.site-nav .nav-buy { color: var(--ox); font-weight: 600; }
.menu-toggle { display: none; }

/* ---------- 1 · opening ---------- */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-block: clamp(40px, 6.5vw, 96px);
}
.hero h1 {
  font: 400 clamp(3rem, 7.2vw, 6.4rem)/.95 var(--display);
  letter-spacing: -.015em; margin: .32em 0 .32em;
}
.hero h1 span { display: block; }
.subtitle { font-style: italic; font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.45; color: var(--muted); max-width: 28ch; }
.lede { font-size: clamp(1.08rem, 1.45vw, 1.24rem); max-width: 42ch; margin-top: clamp(24px, 3vw, 36px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--rule); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 28px; }
.btn {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 48px; padding: .8em 1.45em;
  background: var(--ox); color: #fff; border: 1px solid var(--ox);
  font-weight: 600; font-size: 1rem; line-height: 1.25; text-decoration: none;
}
.btn:hover { background: var(--ox-dark); border-color: var(--ox-dark); color: #fff; }
.btn:focus-visible { outline-color: var(--ink); }
.text-link { font-weight: 600; padding-block: 12px; }
.hero-cover img {
  width: 100%; max-width: 410px; margin-inline: auto;
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -24px rgba(34, 29, 25, .55);
}
.hero-cover figcaption { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 14px; }

/* ---------- 2 · the record (signature) ---------- */
.record { background: var(--paper-2); border-block: 1px solid var(--rule); padding-block: var(--space); }
.record-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: clamp(32px, 6vw, 96px); align-items: end; }
.record-intro .eyebrow { grid-column: 1 / -1; }
.record-intro h2 { margin-bottom: 0; max-width: 18ch; }
.record h2, .mercy h2, .teller h2, .book h2 {
  font: 400 clamp(2rem, 3.8vw, 3.1rem)/1.08 var(--display); letter-spacing: -.005em; margin: .35em 0 .45em;
}
.record-intro > p:last-child { color: var(--muted); max-width: 44ch; padding-bottom: .3em; }
.descent {
  list-style: none; padding: 0; margin-top: clamp(44px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative;
}
.descent::before {           /* the line of descent */
  content: ""; position: absolute; left: 0; right: 0; top: 2.05rem; height: 1px; background: var(--ink);
}
.descent li { position: relative; padding-right: clamp(20px, 3vw, 44px); }
.gen-num {
  position: relative; display: inline-block; background: var(--paper-2);
  padding-right: .45em; font: 400 3.6rem/1 var(--display); color: var(--ox); min-height: 3.6rem;
}
.descent li + li .gen-num { padding-left: .45em; margin-left: -.45em; }
.gen-label { margin-top: 18px; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.descent h3 { font: 400 clamp(1.6rem, 2.5vw, 2.15rem)/1.1 var(--display); margin: .2em 0 .45em; }
.descent p:last-child { max-width: 30ch; }

/* ---------- 3 · Mercy ---------- */
.mercy { padding-block: var(--space); }
.mercy-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.mercy-intro > p:not(.eyebrow) { max-width: 46ch; margin-bottom: 1em; }
.reader-note { margin-top: 28px; padding: 16px 20px; border-left: 3px solid var(--ox); background: var(--paper-2); max-width: 46ch; font-size: .98rem; }
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3.5vw, 48px); padding-top: 10px; }
.ledger h3 { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ox); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.ledger dl > div { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.ledger dt { font: 400 clamp(1.3rem, 1.9vw, 1.6rem)/1.15 var(--display); }
.ledger dd { color: var(--muted); font-size: .98rem; margin-top: 4px; }
.ledger-col:last-child dl > div:last-child dt { color: var(--ox); }

/* ---------- 4 · Marilyn ---------- */
.teller { background: var(--paper-2); border-top: 1px solid var(--rule); padding-block: var(--space); }
.teller-grid {
  display: grid; align-items: start;
  grid-template-columns: clamp(260px, 21vw, 300px) minmax(0, 1.1fr) minmax(0, .9fr);
  grid-template-areas: "portrait head history" "portrait body history";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 3.4vw, 52px);
}
@media (min-width: 1101px) {      /* three-column layout: years sit above their entries */
  .teller .history li { grid-template-columns: 1fr; gap: 6px; }
}
.teller-text { display: contents; }
.teller-head { grid-area: head; }
.teller-body { grid-area: body; }
.teller-body > p { max-width: 48ch; margin-bottom: 1em; }
.history { grid-area: history; }

/* Portrait slot — the frame keeps its 4:5 shape whether it holds the monogram or a photograph */
.portrait { grid-area: portrait; margin-top: .45rem; }
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--paper); border: 1px solid var(--ink);
  container-type: inline-size;
  box-shadow: 0 22px 44px -26px rgba(34, 29, 25, .45);
}
.portrait-frame::after {            /* inner rule, like a mounted record card */
  content: ""; position: absolute; inset: 9px; border: 1px solid var(--rule); pointer-events: none;
}
.portrait-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.portrait-frame:has(img)::after { border-color: rgba(243, 237, 227, .55); }
.portrait-caption { margin-top: 18px; text-align: center; font-style: italic; font-size: .92rem; line-height: 1.4; color: var(--muted); }
.portrait:has(img) .portrait-caption { display: none; }   /* disappears once a real photograph is installed */
.monogram {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 400 4.5rem/1 var(--display); font-size: 42cqw; letter-spacing: -.04em; user-select: none;
}
.mono-m { color: var(--ox); }
.mono-t { color: var(--ink); margin-left: -.05em; }
.monogram::after {                  /* short rule beneath, echoing the descent line */
  content: ""; position: absolute; left: 50%; bottom: 17%; width: 22%; height: 1px; background: var(--ox); transform: translateX(-50%);
}
.teller-lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.5; }
.history { list-style: none; padding: 0; border-left: 1px solid var(--ink); margin-top: clamp(0px, 4vw, 56px); }
.history li { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: 20px; padding: 0 0 36px 28px; position: relative; }
.history li:last-child { padding-bottom: 0; }
.history li::before { content: ""; position: absolute; left: -5px; top: .9rem; width: 9px; height: 9px; background: var(--ox); border-radius: 50%; }
.year { font: 400 2.4rem/1 var(--display); color: var(--ox); }
.history h3 { font: 400 1.45rem/1.2 var(--display); margin-bottom: 4px; }
.history p { color: var(--muted); font-size: .98rem; }

/* ---------- 5 · why ---------- */
.why { background: var(--night); color: var(--night-text); padding-block: clamp(72px, 10vw, 136px); }
.why-line {
  font-style: italic; font-weight: 300; font-size: clamp(1.6rem, 3.4vw, 2.75rem); line-height: 1.3;
  max-width: 30ch; margin-inline: auto; text-align: center;
}

/* ---------- 6 · the book ---------- */
.book { padding-block: var(--space); }
.book-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.book-cover { box-shadow: 0 24px 48px -22px rgba(34, 29, 25, .55); }
.book h2 { margin-bottom: .15em; }
.book-sub { font-style: italic; color: var(--muted); font-size: 1.12rem; max-width: 36ch; }
.facts { margin-top: 26px; border-top: 1px solid var(--rule); max-width: 560px; }
.facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding-block: 11px; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: .25em; }
.facts > div:last-child dt { align-self: center; padding-top: 0; }
.copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; margin-left: 10px; padding: 0 14px;
  font: 600 .88rem/1 var(--text); color: var(--ox); background: transparent;
  border: 1px solid var(--ox); cursor: pointer; vertical-align: middle;
}
.copy:hover { background: var(--ox); color: #fff; }
.copy-status { font-size: .88rem; color: var(--muted); margin-left: 6px; }
.buy { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.buy-note { font-weight: 400; font-size: .82rem; opacity: .9; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.any-store { margin-top: 16px; color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-block: 26px; font-size: .95rem; color: var(--muted); }
.foot-name { font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
.foot a { padding-block: 10px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .teller-grid {
    grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
    grid-template-areas: "portrait head" "portrait body" "portrait history";
    grid-template-rows: auto auto 1fr;
  }
  .teller .history { margin-top: 28px; }
  .mercy-grid { grid-template-columns: 1fr; }
  .mercy-intro > p:not(.eyebrow) { max-width: 60ch; }
  .reader-note { max-width: 60ch; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
  .bar { min-height: 56px; }
  .brand { font-size: 1.2rem; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
    font: 600 .95rem/1 var(--text); color: var(--ink); background: transparent; border: 1px solid var(--ink); cursor: pointer;
  }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .js .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 4px var(--gutter) 12px; }
  .site-nav a { display: block; padding-block: 13px; font-size: 1.05rem; border-bottom: 1px solid var(--rule); }
  .site-nav li:last-child a { border-bottom: 0; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 18px; padding: 0; }
  html:not(.js) .bar { flex-wrap: wrap; }

  .hero-grid {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    grid-template-areas: "cover head" "body body";
    gap: 22px 18px; align-items: center; padding-block: 22px 44px;
  }
  .hero-text { display: contents; }
  .hero-head { grid-area: head; }
  .hero-body { grid-area: body; }
  .hero-cover { grid-area: cover; }
  .hero-cover img { max-width: none; box-shadow: 0 16px 30px -16px rgba(34, 29, 25, .6); }
  .hero-cover figcaption { display: none; }
  .hero .eyebrow { font-size: .7rem; letter-spacing: .12em; }
  .hero h1 { font-size: clamp(2.05rem, 9.6vw, 2.7rem); margin: .25em 0 .3em; }
  .subtitle { font-size: clamp(.92rem, 4.1vw, 1.05rem); }
  .lede { margin-top: 0; padding-top: 20px; }
  .actions { margin-top: 22px; }

  .descent { grid-template-columns: 1fr; gap: 34px; }
  .descent::before { display: none; }
  .descent li:not(:last-child)::before { content: ""; position: absolute; left: 1.55rem; top: .5rem; bottom: -34px; width: 1px; background: var(--ink); }
  .descent li { padding: 0 0 0 4.4rem; }
  .gen-num, .descent li + li .gen-num {
    position: absolute; left: 0; top: -.1rem; width: 3.1rem; margin: 0; padding: .1em 0;
    text-align: center; font-size: 2.3rem; min-height: 0;
  }
  .gen-label { margin-top: 4px; }

  .mercy-grid, .teller-grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .history { margin-top: 0; }
  .record-intro { grid-template-columns: 1fr; }
  .record-intro h2 { margin-bottom: .45em; }
  .history li { grid-template-columns: 1fr; gap: 4px; padding-left: 22px; }
  .year { font-size: 2rem; }
  .teller-grid {
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    grid-template-areas: "portrait head" "body body" "history history";
    grid-template-rows: auto; column-gap: 18px; align-items: center;
  }
  .teller-body { margin-top: 24px; align-self: start; }
  .teller .history { margin-top: 12px; align-self: start; }
  .portrait { margin-top: 0; }
  .portrait-caption { margin-top: 8px; font-size: .8rem; line-height: 1.35; }
  .portrait-frame::after { inset: 6px; }
  .teller-head .eyebrow { font-size: .7rem; letter-spacing: .12em; }
  .teller-head h2 { font-size: clamp(1.75rem, 8.4vw, 2.2rem); }

  .book-grid { display: block; }
  .book-cover { width: 46%; max-width: 220px; margin-bottom: 28px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .buy .btn { flex: 1 1 100%; }
}

@media (max-width: 360px) {
  .hero-grid { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 18px 14px; }
  .hero .eyebrow { font-size: .64rem; letter-spacing: .1em; }
}

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