:root {
  --paper: #f6f1e9;
  --paper-2: #efe6d8;
  --ink: #1d1a17;
  --ink-soft: #5b544c;
  --accent: #d63f86;
  --mustard: #f2b33d;
  --teal: #2f8692;
  --display: "Big Shoulders Display", Impact, sans-serif;
  --accent-ink: #fff;
  --line: #ddd2c1;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font: 900 clamp(3.5rem, 8vw, 6.5rem)/.92 var(--display); text-transform: uppercase; letter-spacing: 0; }
h1 span { display: block; font-size: .55em; color: var(--accent); }
.subtitle { font: 700 clamp(1.1rem, 2vw, 1.4rem) var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin: 1rem 0 1.25rem; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; }
.small { font-size: .875rem; }
.muted { color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font: 900 1.5rem var(--display); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.site-header nav { display: flex; gap: clamp(.75rem, 2vw, 1.75rem); align-items: center; font-size: .95rem; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); }
.site-header nav a:hover { color: var(--ink); }
.site-header nav .nav-buy { color: var(--accent-ink); background: var(--accent); padding: .4rem 1rem; border-radius: 999px; }
@media (max-width: 640px) { .site-header nav a:not(.nav-buy) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1.5px solid var(--ink);
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #b92f6f; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; min-width: 280px; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Layout */
main > section { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.section { padding-top: clamp(4rem, 9vw, 7rem) !important; padding-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.prose { max-width: 62ch; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center; min-height: calc(100vh - 70px); padding-top: 3rem !important; padding-bottom: 3rem !important;
}
.lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 34ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-cover { display: flex; justify-content: center; perspective: 1400px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-cover { order: -1; }
}

/* Placeholder cover */
.cover, .hero-cover img {
  width: min(340px, 75vw); aspect-ratio: 2 / 3; border-radius: 3px 8px 8px 3px;
  box-shadow: 0 30px 60px -20px rgba(40, 20, 10, .45), 0 0 0 1px rgba(0,0,0,.05);
  transform: rotateY(-12deg); transition: transform .5s;
}
.hero-cover:hover .cover, .hero-cover:hover img { transform: rotateY(-4deg); }
.cover {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 2rem 1.75rem;
  background: radial-gradient(circle at 70% 80%, #d0613f 0 22%, transparent 23%), linear-gradient(160deg, #23303a, #13191f);
  color: #f6efe4;
}
.cover::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.12); }
.cover-author { font: 500 .85rem var(--sans); letter-spacing: .25em; text-transform: uppercase; opacity: .85; }
.cover-title { font: 800 2.6rem/1 var(--serif); }
.cover-mark { width: 40px; height: 2px; background: #d0613f; }

/* Praise */
.praise-strip {
  border-top: 6px solid var(--mustard) !important;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-top: 2.5rem !important; padding-bottom: 2.5rem !important;
}
.praise-strip blockquote { margin: 0; font: 400 1.2rem/1.4 var(--serif); }
.praise-strip cite { display: block; margin-top: .5rem; font: normal 500 .8rem var(--sans); color: var(--ink-soft); }
@media (max-width: 820px) { .praise-strip {
  border-top: 6px solid var(--mustard) !important; grid-template-columns: 1fr; } }

/* Book facts + extract */
.book-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 2rem 0; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.book-facts dd { margin: 0; font-weight: 500; }
.extract summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.extract[open] summary { margin-bottom: 1rem; }
.extract .prose { font-family: var(--serif); font-size: 1.1rem; padding-left: 1.25rem; border-left: 2px solid var(--line); }

/* Buy */
.buy { text-align: center; }
.buy-head { max-width: 44ch; margin: 0 auto 2.5rem; }
.buy-head p:last-child { color: var(--ink-soft); }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 860px; margin: 0 auto 2rem; }
.format {
  position: relative; text-align: left; padding: 1.5rem; border-radius: 14px;
  background: #fffaf2; border: 1.5px solid var(--line); cursor: pointer;
  font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.format:hover { transform: translateY(-2px); border-color: var(--ink-soft); }
.format[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.format .f-name { font: 600 1.35rem var(--serif); display: block; }
.format .f-price { font-size: 1.6rem; font-weight: 600; display: block; margin: .25rem 0 .5rem; }
.format .f-note { font-size: .85rem; color: var(--ink-soft); display: block; }
.format .f-soon { position: absolute; top: 1rem; right: 1rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: var(--paper-2); padding: .2rem .5rem; border-radius: 999px; color: var(--ink-soft); }
.checkout { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.retailers { margin-top: 2.5rem; }
.retailers ul { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.retailers a { display: inline-block; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; background: #fffaf2; }
.retailers a:hover { border-color: var(--ink); }

/* About */
.portrait img, .portrait-placeholder { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.portrait-placeholder { display: grid; place-items: center; background: var(--paper-2); color: var(--ink-soft); border: 1.5px dashed var(--line); }
.socials a { color: var(--accent); }

/* Events */
.events { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.events li { display: grid; grid-template-columns: 90px 1fr auto; gap: 1.5rem; align-items: center; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.events time { font: 900 1.3rem var(--display); text-transform: uppercase; color: var(--teal); }
.events strong { display: block; }
.events span { color: var(--ink-soft); font-size: .95rem; }
.events a { font-weight: 600; font-size: .9rem; }

/* Newsletter */
.newsletter > * { max-width: none; }
.newsletter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
  margin-top: clamp(4rem, 9vw, 7rem) !important; padding: clamp(2rem, 5vw, 3.5rem) !important;
  background: var(--ink); color: var(--paper); border-radius: 20px;
  max-width: calc(var(--max) - 6rem) !important;
}
.newsletter p { color: #c9bfb1; margin: 0; }
.newsletter h2 { color: var(--mustard); }
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; margin-left: 1.25rem !important; margin-right: 1.25rem !important; } }

/* Forms */
input, textarea {
  width: 100%; padding: .8rem 1rem; border-radius: 10px; border: 1.5px solid var(--line);
  font: inherit; background: #fffaf2; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-form input { flex: 1 1 220px; border-color: transparent; }
.inline-form .form-msg { flex-basis: 100%; }
.stack-form { display: grid; gap: 1rem; }
.stack-form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.stack-form .btn { justify-self: start; }
.form-msg:empty { display: none; }
.form-msg { margin: 0; }

/* Footer */
.site-footer { max-width: var(--max); margin: clamp(4rem, 9vw, 7rem) auto 0; padding: 2rem clamp(1.25rem, 4vw, 3rem); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.site-footer p { margin: 0; }

/* Thank-you page */
.thanks { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 3rem 1.5rem; }
.thanks > div { max-width: 46ch; }

/* Book page extras */
.more-praise p { font-family: var(--serif); font-size: 1.15rem; margin-bottom: .75rem; }
.more-praise span { display: block; font: 500 .8rem var(--sans); color: var(--ink-soft); }
.portrait img { aspect-ratio: 1; }
h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
.hero-cover img, .portrait img { height: auto; display: block; }

/* Observer Books of the Year */
.accolade {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem) !important;
}
.accolade-badge {
  width: 150px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: .25rem; padding: 1rem;
  background: var(--mustard); color: var(--ink); transform: rotate(-8deg);
  box-shadow: 0 12px 30px -12px rgba(40, 20, 10, .4);
}
.accolade-badge span { font: italic 400 .95rem var(--serif); }
.accolade-badge strong { font: 900 1.25rem/1 var(--display); text-transform: uppercase; }
.accolade figure { margin: 0; padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--teal); color: #fff; border-radius: 18px; }
.accolade blockquote { margin: 0; font: 400 clamp(1.2rem, 2.2vw, 1.55rem)/1.4 var(--serif); }
.accolade figcaption { margin-top: 1rem; font-size: .9rem; font-weight: 600; }
.accolade figcaption a { color: var(--mustard); }
@media (max-width: 640px) { .accolade { grid-template-columns: 1fr; justify-items: center; } }

/* Substack band: heading and button on one line */
.newsletter { display: flex !important; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.newsletter h2 { margin: 0; }
.newsletter .btn { white-space: nowrap; }
@media (max-width: 640px) { .newsletter .btn-large { min-width: 0; width: 100%; padding: 1rem 1.25rem; } }

/* Sub-pages, About, shop terms */
.subpage { min-height: 60vh; }
.page-cta { text-align: center; }
.about .prose { max-width: 70ch; }
.icon-link { display: inline-flex; color: var(--ink); transition: color .15s, transform .15s; }
.icon-link:hover { color: var(--accent); transform: translateY(-1px); }
.shop-terms { max-width: 46ch; }
