:root {
  color-scheme: dark;
  --night: #0b1428;
  --panel: #14213a;
  --paper: #f3efe5;
  --muted: #d0cbd0;
  --gold: #d2b478;
  --rule: #645a4b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--paper); font: 1rem/1.65 var(--sans); }
a { color: var(--gold); text-underline-offset: .24em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.85rem, 4vw, 3rem); letter-spacing: -.025em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.reading-width { max-width: 65ch; }
.skip { position: absolute; top: .8rem; left: 1rem; z-index: 2; transform: translateY(-200%); background: var(--night); padding: .55rem 1rem; }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 5.6rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--paper); font: 1.5rem var(--serif); text-decoration: none; white-space: nowrap; }
.brand img { width: 2.65rem; border-radius: 50%; }
.site-nav { display: flex; flex-wrap: wrap; gap: .2rem 1.45rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .9375rem; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--gold); text-decoration: underline; }
.hero { background: radial-gradient(ellipse at 78% 48%, #1b2c4b, var(--night) 72%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 8rem); }
.hero h1 { max-width: 11ch; }
.tagline { margin-bottom: 1rem; color: var(--gold); font-size: .92rem; letter-spacing: .08em; }
.button { display: inline-flex; align-items: center; min-height: 46px; margin-top: 1.6rem; padding: .55rem 1.1rem; background: var(--gold); color: var(--night); border: 1px solid var(--gold); font: inherit; text-decoration: none; }
.button:hover { background: var(--paper); color: var(--night); }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.6rem, 1.5vw, 1.2rem); align-items: center; }
.showcase figure { margin: 0; }
.showcase img, .cover { box-shadow: 0 .8rem 2rem #0007; outline: 1px solid #d2b47855; }
.showcase a { display: block; }
.showcase a:hover img { outline: 2px solid var(--gold); }
.showcase figure:nth-child(2) { margin-top: -2rem; }
.home-followup { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.home-followup h2 { margin-bottom: .6rem; }
.page { padding-block: clamp(2.5rem, 7vw, 6.5rem); }
.page-title { margin-bottom: clamp(2rem, 5vw, 3.6rem); }
.catalog-entry { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); gap: clamp(1.35rem, 5vw, 4rem); padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }
.catalog-entry .cover { width: 100%; }
.catalog-entry h2 a { color: var(--paper); text-decoration-color: var(--gold); }
.metadata { margin: .85rem 0 1.4rem; color: var(--gold); }
.book-nav { display: inline-block; margin-bottom: 2rem; }
.book-detail, .about-layout { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.book-detail h1 { font-size: clamp(2.35rem, 5vw, 4.55rem); }
.book-detail .cover { width: 100%; }
.book-detail .reading-width + p { margin-top: 1.25rem; }
.author-credit { margin-top: .8rem; font-family: var(--serif); font-size: 1.25rem; }
.purchase { margin-top: 2rem; padding: 1.25rem; background: var(--panel); border-top: 1px solid var(--gold); }
.purchase h2 { font-size: 1.55rem; margin-bottom: .55rem; }
.purchase-options { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.purchase-options button { min-height: 44px; padding: .45rem .8rem; border: 1px solid var(--gold); border-radius: 0; background: transparent; color: var(--muted); font: inherit; }
.author-emblem { width: min(100%, 22rem); border-radius: 50%; }
.about-layout h2, .reading-group h2 { margin-bottom: 1rem; }
.reading-group { background: var(--panel); border-top: 1px solid var(--gold); padding: clamp(1.4rem, 5vw, 3rem); }
.site-footer { border-top: 1px solid var(--rule); padding-block: 1.75rem; color: var(--muted); }
.site-footer p { font-family: var(--serif); font-size: 1.1rem; }

@media (max-width: 57rem) {
  .hero-inner { grid-template-columns: 1fr; }
  .showcase { max-width: 38rem; }
}
@media (max-width: 43rem) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: .3rem; padding-top: .9rem; padding-bottom: .45rem; }
  .site-nav { gap: .1rem 1rem; }
  .book-detail, .about-layout, .home-followup, .catalog-entry { grid-template-columns: 1fr; }
  .catalog-entry .cover { width: min(55%, 13rem); }
  .book-detail .cover { width: min(80%, 20rem); }
  .about-layout .author-emblem { width: min(60%, 13rem); }
  .hero-inner { padding-block: 3rem 3.5rem; }
  .showcase figure:nth-child(2) { margin-top: -1rem; }
}
@media (max-width: 24rem) {
  .wrap { width: calc(100% - 2rem); }
}
