:root {
  --coal: #11110f;
  --charcoal: #24231f;
  --paper: #eee4d0;
  --oxide: #743126;
  --brass: #b09265;
  --muted: #aaa292;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --header-height: 82px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--coal); }
body {
  margin: 0;
  overflow: hidden;
  background: var(--coal);
  color: var(--paper);
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  position: relative;
  z-index: 20;
  height: var(--header-height);
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(17, 17, 15, .98);
  border-bottom: 1px solid rgba(176, 146, 101, .28);
}
.wordmark {
  white-space: nowrap;
  font-size: clamp(.94rem, 1.5vw, 1.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.wordmark span { color: var(--brass); }
.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2.7vw, 2.2rem);
  font-family: var(--sans);
  font-size: clamp(.61rem, .8vw, .73rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.site-header nav a {
  position: relative;
  padding: .7rem 0;
  white-space: nowrap;
  color: #c9c0b0;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--paper); }
.site-header nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: .25rem;
  left: 0;
  height: 1px;
  background: var(--oxide);
}

.screen {
  position: relative;
  height: calc(100dvh - var(--header-height));
  min-height: 0;
  overflow: hidden;
}
.eyebrow {
  margin: 0;
  color: var(--brass);
  font-family: var(--sans);
  font-size: clamp(.61rem, .8vw, .71rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
}

.home-screen {
  background: radial-gradient(circle at 72% 24%, #514b3e 0, #25241f 29%, #11110f 68%);
}
.home-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 7, .98), rgba(12, 12, 10, .73) 50%, rgba(12, 12, 10, .12));
  pointer-events: none;
}
.atmosphere {
  position: absolute;
  top: -32%;
  right: -12%;
  width: 56vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(182, 164, 128, .12);
  filter: blur(70px);
}
.home-layout {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}
.home-copy { min-width: 0; }
.home-copy h1 {
  margin: clamp(.7rem, 1.4vh, 1.1rem) 0 clamp(.8rem, 1.8vh, 1.4rem);
  max-width: 760px;
  font-size: clamp(2.85rem, 5.4vw, 4.45rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: .012em;
}
.home-copy h1 span { display: block; white-space: nowrap; }
.hero-lede {
  max-width: 640px;
  margin: 0;
  color: #d9cfbc;
  font-size: clamp(1.05rem, 1.7vw, 1.42rem);
  line-height: 1.48;
}
.home-copy blockquote {
  margin: clamp(1.1rem, 2.7vh, 2.25rem) 0 clamp(1rem, 2.2vh, 1.8rem);
  padding-left: 1.4rem;
  border-left: 2px solid var(--oxide);
}
.home-copy blockquote p {
  margin: 0;
  font-size: clamp(1.3rem, 2.1vw, 1.78rem);
  font-style: italic;
}
.home-copy blockquote cite {
  display: block;
  margin-top: .45rem;
  color: var(--brass);
  font-family: var(--sans);
  font-size: .67rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.fact-line {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.76rem, 1vw, .87rem);
  line-height: 1.6;
}
.button-row {
  width: min(100%, 690px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: clamp(1rem, 2.7vh, 2rem);
}
.button {
  min-width: 0;
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .82rem .85rem;
  border: 1px solid rgba(216, 200, 168, .48);
  border-radius: 2px;
  background: rgba(176, 146, 101, .10);
  color: var(--paper);
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .11em;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.button:hover {
  background: var(--oxide);
  border-color: var(--oxide);
  color: #fff7ea;
  transform: translateY(-2px);
}
.button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.button:active {
  background: #64291f;
  border-color: #64291f;
  color: #fff7ea;
  transform: translateY(0);
}
.button[aria-current="page"] {
  background: rgba(116, 49, 38, .34);
  border-color: var(--oxide);
  color: #fff7ea;
  box-shadow: inset 0 -2px 0 var(--brass);
}
.button[aria-current="page"]:hover {
  background: var(--oxide);
  border-color: var(--oxide);
}
.buy-short { display: none; }
.cover-wrap {
  width: min(100%, 360px);
  margin: 0 auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .55));
}
.cover-wrap img { width: 100%; }

.detail-screen {
  background: radial-gradient(circle at 82% 14%, #4a4438 0, #24231f 34%, #11110f 72%);
}
.detail-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(10, 10, 9, .95), rgba(18, 18, 16, .78) 55%, rgba(24, 23, 20, .44));
}
.detail-layout {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: clamp(1.8rem, 4.5vh, 4rem) clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 330px);
  align-items: center;
  gap: clamp(2.2rem, 6vw, 6rem);
}
.detail-copy h1 {
  margin: clamp(.7rem, 1.5vh, 1.1rem) 0 clamp(1rem, 2.5vh, 1.8rem);
  font-size: clamp(2.35rem, 4.8vw, 4.35rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: .008em;
}
.prose {
  max-width: 760px;
  color: #d1c7b6;
  font-size: clamp(.9rem, 1.25vw, 1.08rem);
  line-height: 1.66;
}
.prose p { margin: 0 0 clamp(.65rem, 1.5vh, 1rem); }
.prose p:last-child { margin-bottom: 0; }
.historical-note {
  max-width: 740px;
  margin: clamp(.9rem, 2vh, 1.5rem) 0 0;
  padding: .7rem 0 .7rem 1.15rem;
  border-left: 2px solid var(--oxide);
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(.66rem, .85vw, .77rem);
  line-height: 1.5;
}
.detail-cover {
  width: min(100%, 330px);
  margin: 0 auto;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .56));
}
.detail-cover img { width: 100%; }

@media (max-width: 900px) {
  :root { --header-height: 74px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) minmax(190px, 275px); gap: 2.5rem; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) minmax(185px, 255px); gap: 2.5rem; }
}

@media (max-width: 680px) {
  :root { --header-height: 92px; }
  .site-header {
    padding: .75rem 1.1rem .65rem;
    display: block;
  }
  .wordmark { display: block; margin-bottom: .65rem; }
  .site-header nav { justify-content: space-between; gap: .55rem; }
  .site-header nav a { font-size: .57rem; letter-spacing: .08em; }
  .screen { height: calc(100dvh - var(--header-height)); }

  .home-layout {
    padding: clamp(1.1rem, 3vh, 1.8rem) 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: center;
    gap: clamp(.8rem, 2vh, 1.4rem);
  }
  .home-copy { text-align: left; }
  .home-copy h1 { font-size: clamp(2.25rem, 11vw, 3.1rem); }
  .home-copy h1 span { white-space: normal; }
  .hero-lede { font-size: clamp(.92rem, 4vw, 1.08rem); line-height: 1.4; }
  .home-copy blockquote { margin: .8rem 0; }
  .home-copy blockquote p { font-size: 1.25rem; }
  .fact-line { font-size: .7rem; line-height: 1.45; }
  .button-row { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .85rem; gap: .5rem; }
  .button { min-height: 2.55rem; padding: .66rem .4rem; font-size: .54rem; letter-spacing: .07em; }
  .cover-wrap { width: min(42vw, 175px); align-self: end; }

  .detail-layout {
    padding: clamp(1.2rem, 3.3vh, 2rem) 1.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(105px, 28vw);
    gap: 1.25rem;
  }
  .detail-copy h1 { font-size: clamp(1.85rem, 8vw, 2.55rem); }
  .prose { font-size: clamp(.76rem, 3.35vw, .92rem); line-height: 1.52; }
  .prose p { margin-bottom: .55rem; }
  .historical-note { margin-top: .65rem; font-size: .58rem; line-height: 1.38; }
  .detail-cover { width: 100%; }

}

@media (max-height: 700px) and (min-width: 681px) {
  .home-layout, .detail-layout { padding-top: 1.4rem; padding-bottom: 1.4rem; }
  .home-copy h1 { font-size: clamp(2.55rem, 5vw, 3.65rem); }
  .home-copy blockquote { margin: 1rem 0; }
  .detail-copy h1 { font-size: clamp(2.15rem, 4.3vw, 3.4rem); }
  .prose { font-size: .9rem; line-height: 1.48; }
  .historical-note { margin-top: .75rem; }
  .cover-wrap { width: min(30vh, 285px); }
  .detail-cover { width: min(31vh, 260px); }
}

@media (max-width: 680px) and (max-height: 720px) {
  :root { --header-height: 78px; }
  .site-header { padding-top: .55rem; padding-bottom: .45rem; }
  .wordmark { margin-bottom: .4rem; font-size: .79rem; }
  .site-header nav a { font-size: .5rem; }
  .home-layout { grid-template-columns: minmax(0, 1fr) minmax(105px, 30vw); grid-template-rows: 1fr; align-items: center; gap: 1rem; }
  .home-copy h1 { font-size: clamp(1.8rem, 8.8vw, 2.45rem); }
  .hero-lede { font-size: .78rem; }
  .home-copy blockquote { margin: .55rem 0; padding-left: .8rem; }
  .home-copy blockquote p { font-size: 1rem; }
  .home-copy blockquote cite { font-size: .5rem; }
  .fact-line { display: none; }
  .button-row { margin-top: .55rem; gap: .35rem; }
  .button { min-height: 2.1rem; padding: .5rem .22rem; font-size: .43rem; letter-spacing: .055em; }
  .buy-long { display: none; }
  .buy-short { display: inline; }
  .cover-wrap { width: 100%; align-self: center; }

  .detail-layout { padding-top: .8rem; padding-bottom: .8rem; }
  .detail-copy h1 { margin: .45rem 0 .65rem; font-size: clamp(1.55rem, 7.5vw, 2.05rem); }
  .prose { font-size: .66rem; line-height: 1.35; }
  .historical-note { font-size: .5rem; line-height: 1.28; }

}

@media (orientation: landscape) and (max-height: 520px) {
  :root { --header-height: 58px; }
  .site-header { display: flex; padding: 0 1.1rem; }
  .wordmark { margin: 0; }

  .home-layout {
    padding-top: .8rem;
    padding-bottom: .8rem;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 175px);
    grid-template-rows: 1fr;
    gap: 2rem;
  }
  .home-copy h1 { margin: .45rem 0 .55rem; font-size: clamp(2rem, 5vw, 2.65rem); }
  .hero-lede { font-size: .9rem; line-height: 1.35; }
  .home-copy blockquote { margin: .55rem 0; padding-left: 1rem; }
  .home-copy blockquote p { font-size: 1.15rem; }
  .home-copy blockquote cite { margin-top: .25rem; font-size: .53rem; }
  .fact-line { font-size: .65rem; line-height: 1.35; }
  .button-row { margin-top: .55rem; gap: .5rem; }
  .button { min-height: 2.2rem; padding: .52rem .45rem; font-size: .5rem; letter-spacing: .07em; }
  .cover-wrap { width: min(43vh, 165px); }

  .detail-layout {
    padding-top: .65rem;
    padding-bottom: .65rem;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 155px);
    gap: 2rem;
  }
  .detail-copy h1 { margin: .35rem 0 .55rem; font-size: clamp(1.7rem, 4vw, 2.2rem); }
  .prose { font-size: .69rem; line-height: 1.32; }
  .prose p { margin-bottom: .38rem; }
  .historical-note { margin-top: .4rem; padding-top: .4rem; padding-bottom: .4rem; font-size: .49rem; line-height: 1.25; }
  .detail-cover { width: min(45vh, 150px); }

}

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


@media (max-width: 520px) {
  .detail-screen .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-screen .detail-cover {
    display: none;
  }
}

/* =========================================================
   CONSISTENCY LOCK
   The visible background and book-cover geometry are shared
   by every page. Page content may differ; these values do not.
   ========================================================= */
.home-screen,
.detail-screen {
  background: radial-gradient(circle at 72% 24%, #514b3e 0, #25241f 29%, #11110f 68%);
}

.home-screen::after,
.detail-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 7, .98), rgba(12, 12, 10, .73) 50%, rgba(12, 12, 10, .12));
  pointer-events: none;
}

.atmosphere {
  display: none;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
}

.cover-wrap,
.detail-cover {
  width: min(100%, 360px);
  margin: 0 auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .55));
}

.cover-wrap img,
.detail-cover img {
  width: 100%;
}

@media (max-width: 900px) {
  .home-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 275px);
  }

  .cover-wrap,
  .detail-cover {
    width: min(100%, 275px);
  }
}

@media (max-width: 680px) {
  .cover-wrap,
  .detail-cover {
    width: min(28vw, 175px);
  }
}

@media (max-height: 700px) and (min-width: 681px) {
  .cover-wrap,
  .detail-cover {
    width: min(30vh, 285px);
  }
}

/* Shared desktop geometry: the cover occupies the same box in the same place. */
.home-layout,
.detail-layout {
  width: min(1240px, 100%);
  padding: clamp(2rem, 5vh, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
  gap: clamp(2.5rem, 6vw, 6rem);
}

@media (max-width: 900px) {
  .home-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 275px);
    gap: 2.5rem;
  }
}

/* Compact portrait layout: all content remains inside one screen. */
@media (max-width: 680px) {
  .home-layout,
  .detail-layout {
    padding: .9rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 28vw);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: .85rem;
  }

  .cover-wrap,
  .detail-cover {
    width: 100%;
    align-self: center;
  }

  .home-copy h1 {
    margin: .45rem 0 .5rem;
    font-size: clamp(1.85rem, 8.8vw, 2.35rem);
    line-height: 1.01;
  }

  .hero-lede {
    font-size: clamp(.76rem, 3.35vw, .9rem);
    line-height: 1.3;
  }

  .home-copy blockquote {
    margin: .55rem 0;
    padding-left: .8rem;
  }

  .home-copy blockquote p {
    font-size: 1rem;
  }

  .home-copy blockquote cite {
    margin-top: .25rem;
    font-size: .5rem;
  }

  .fact-line {
    font-size: .58rem;
    line-height: 1.35;
  }

  .detail-copy h1 {
    margin: .45rem 0 .65rem;
    font-size: clamp(1.55rem, 7.2vw, 2rem);
    line-height: 1.02;
  }

  .prose {
    font-size: clamp(.62rem, 2.72vw, .74rem);
    line-height: 1.34;
  }

  .prose p {
    margin-bottom: .4rem;
  }

  .historical-note {
    margin-top: .45rem;
    padding: .4rem 0 .4rem .65rem;
    font-size: .48rem;
    line-height: 1.28;
  }

  .button-row {
    margin-top: .55rem;
    gap: .36rem;
  }

  .button {
    min-height: 2.15rem;
    padding: .48rem .25rem;
    font-size: .46rem;
    letter-spacing: .045em;
  }
}

@media (max-width: 680px) {
  .detail-screen .detail-cover {
    display: block;
  }
}

@media (max-width: 680px) {
  .detail-screen .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 28vw);
  }

  .detail-screen .detail-cover {
    width: 100%;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .detail-copy h1 {
    margin: .22rem 0 .38rem;
    font-size: clamp(1.35rem, 3.2vw, 1.75rem);
    line-height: 1;
  }

  .prose {
    font-size: .56rem;
    line-height: 1.22;
  }

  .prose p {
    margin-bottom: .24rem;
  }

  .historical-note {
    margin-top: .28rem;
    padding: .28rem 0 .28rem .55rem;
    font-size: .4rem;
    line-height: 1.18;
  }

  .detail-copy .button-row {
    margin-top: .4rem;
  }

  .detail-copy .button {
    min-height: 2rem;
    padding-top: .4rem;
    padding-bottom: .4rem;
  }
}
