:root {
  --bg: #f7f5f0;
  --panel: #efebe3;
  --ink: #1b1815;
  --muted: #6b6762;
  --line: rgba(27, 24, 21, 0.14);
  --accent: #8f4f16;
  --accent-ink: #ffffff;
  --gutter: clamp(22px, 5vw, 56px);
  --section: clamp(72px, 11vw, 128px);
  --display: "Fraunces", Georgia, serif;
  --body: "Libre Franklin", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

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

/* micro labels: the same tracked caps the book uses for its form labels */
.label {
  font: 600 12px/1.2 var(--body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

header.site { padding: 28px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mark {
  font: 600 13px/1 var(--body);
  letter-spacing: 0.26em;
  text-decoration: none;
  white-space: nowrap;
}
header.site nav a {
  font: 500 15px/1 var(--body);
  text-decoration: none;
  color: var(--muted);
  padding: 14px 0;
}
header.site nav a:hover, header.site nav a:focus-visible { color: var(--ink); }

/* hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
h1 {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-size: clamp(48px, 7.2vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
}
h1.book { font-size: clamp(44px, 6vw, 88px); }
.sub { font-size: 19px; line-height: 1.55; max-width: 32rem; margin: 0 0 36px; color: rgba(27, 24, 21, 0.82); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 16px/1 var(--body);
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}
.button:hover { background: #7a4312; }
.button:focus-visible, .textlink:focus-visible, .row:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.textlink {
  font: 500 16px/1 var(--body);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 6px;
  padding: 16px 0;
  transition: text-decoration-color 160ms ease;
}
.textlink:hover { text-decoration-color: var(--accent); }

/* the signature: the real pages from the book, fanned like paper on a bar top */
.paper { position: relative; aspect-ratio: 0.8; max-width: 600px; justify-self: end; width: 112%; margin-right: -6%; }
.paper img {
  position: absolute;
  width: 74%;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 24, 21, 0.10), 0 12px 32px rgba(27, 24, 21, 0.14);
}
.paper .back { right: 0; top: 1%; transform: rotate(5deg); }
.paper .front { left: 0; top: 9%; transform: rotate(-4deg); }
.paper.single { aspect-ratio: 0.7; max-width: 440px; }
.paper.single img { width: 90%; left: 5%; top: 3%; transform: rotate(-2deg); }

/* sections */
section { padding: var(--section) 0; }
section.panel { background: var(--panel); }
h2 {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.lede { max-width: 34rem; color: rgba(27, 24, 21, 0.82); margin: 0 0 56px; }

.books { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 96px); }
.book-entry { border-top: 1px solid var(--ink); padding-top: 28px; }
.book-entry h3 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.book-entry .subtitle { font-family: var(--display); font-style: italic; font-size: 19px; margin: 0 0 20px; }
.book-entry p { max-width: 30rem; margin: 0 0 24px; }
.book-entry .meta { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.muted { color: var(--muted); font-size: 15px; }

.rows { border-top: 1px solid var(--line); max-width: 48rem; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.row strong { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; }
.row span.meta { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.row .get { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px; }
.row:hover .get { text-decoration-color: var(--accent); }

.tip { margin-top: 32px; font-size: 15px; color: var(--muted); max-width: 30rem; }

footer.site { padding: 56px 0 64px; border-top: 1px solid var(--line); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; align-items: baseline; }
footer.site p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .paper { justify-self: center; max-width: 340px; width: 100%; margin-right: 0; }
  .paper.single { max-width: 340px; }
  .books { grid-template-columns: 1fr; }
  .sub { font-size: 18px; }
  .hero { padding-bottom: 40px; }
  .row strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
