:root {
  --color-bg: #f7f3ea;
  --color-text: #211c16;
  --color-accent: #7a2e22;
  --color-accent-hover: #5f241a;
  --color-muted: #5a5148;
  --color-rule: rgba(33, 28, 22, 0.16);
  --color-paper: #fbf8f1;
  --color-cover: #2a2218;
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 40rem;
  --measure-wide: 56rem;
  --space: clamp(2.25rem, 5vw, 4rem);
  --gutter: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.85rem, 5.4vw, 2.65rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2rem);
  margin: 0 0 1.15rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0;
}

p {
  margin: 0 0 1.15rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-text);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 30;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--measure), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.sale-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.55rem var(--gutter);
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.4;
}

.sale-banner__text,
.sale-banner__timer {
  margin: 0;
}

.sale-banner__timer {
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.sale-banner__timer abbr {
  text-decoration: none;
  margin-right: 0.55rem;
  font-size: 0.92em;
}

.sale-banner__timer [data-unit] {
  font-weight: 600;
  margin-right: 0.15rem;
}

.sale-banner.is-expired .sale-banner__timer {
  margin-top: 0.15rem;
}

.hero {
  padding: calc(var(--space) + 0.5rem) 0 var(--space);
  text-align: center;
}

.hero .btn {
  margin-inline: auto;
}

.hero-price {
  justify-content: center;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.lede {
  font-size: 1.28rem;
  margin-bottom: 1.75rem;
}

.book-cover {
  position: relative;
  margin: 0 auto 1.75rem;
  width: min(15.5rem, 72vw);
  aspect-ratio: 5 / 7;
  background: var(--color-cover);
  color: var(--color-bg);
  box-shadow: 0 10px 28px rgba(33, 28, 22, 0.18), 4px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.book-cover--small {
  width: min(12.5rem, 58vw);
  margin: 0 auto 1.5rem;
}

.book-cover img,
.portrait img,
.sample img,
.inset-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover img[hidden],
.portrait img[hidden],
.sample img[hidden] {
  display: none;
}

.book-cover.has-image .book-cover__drawn,
.portrait.has-image .portrait__drawn,
.sample.has-image .sample__page {
  display: none;
}

.sample.has-image img {
  object-fit: contain;
  background: var(--color-paper);
}

.book-cover__drawn,
.portrait__drawn,
.sample__page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.book-cover__drawn {
  padding: 12% 11% 10%;
  justify-content: space-between;
  text-align: center;
}

.book-cover__kicker,
.book-cover__author {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-cover__title {
  margin: 0.4rem 0 0.7rem;
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  line-height: 1.15;
}

.book-cover__sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: min(100%, 24rem);
  padding: 0.85rem 1.4rem;
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-accent-hover);
}

.trust-line {
  margin-top: 0.9rem;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.section {
  padding: var(--space) 0;
  border-top: 1px solid var(--color-rule);
}

.about {
  display: grid;
  gap: 1.35rem;
}

.portrait {
  position: relative;
  width: min(14rem, 70vw);
  aspect-ratio: 5 / 6;
  margin: 0 auto;
  background: #d9d1c3;
}

.portrait__drawn {
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--color-text);
  text-align: center;
  padding: 1rem;
}

.portrait__drawn span {
  font-family: var(--font-heading);
  font-size: 2rem;
}

.portrait__drawn small {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.inset-photo {
  margin: 1.6rem 0 1.75rem;
}

.inset-photo__btn {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--color-rule);
  background: none;
  cursor: pointer;
}

.inset-photo figcaption {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--color-muted);
}

.samples {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.samples li {
  min-width: 0;
}

.sample {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  padding: 0;
  border: 1px solid rgba(33, 28, 22, 0.22);
  background: var(--color-paper);
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 20px rgba(33, 28, 22, 0.1);
  font: inherit;
}

.sample__page {
  padding: 0.7rem 0.65rem 1.7rem;
}

.sample__ch,
.sample__hint {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.sample__title {
  margin: 0.25rem 0 0.45rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  line-height: 1.2;
}

.sample__body {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.sample__hint {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  text-transform: none;
  letter-spacing: 0;
}

.chapters-heading {
  margin: 2rem 0 0.7rem;
}

.chapters {
  margin: 0;
  padding-left: 1.4rem;
}

.chapters li {
  margin-bottom: 0.35rem;
  padding-left: 0.25rem;
}

blockquote {
  margin: 0 0 1.75rem;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--color-text);
}

blockquote p {
  margin-bottom: 0.45rem;
}

blockquote footer {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.offer__sub {
  margin-bottom: 1.5rem;
}

.price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  margin-bottom: 1.15rem;
}

.price-now {
  font-family: var(--font-heading);
  font-size: 2.55rem;
  font-weight: 700;
  line-height: 1;
}

.price-was {
  font-size: 1.35rem;
  color: var(--color-muted);
}

.price-save {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 1.15rem;
}

.offer-list {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
}

.offer-list li {
  margin-bottom: 0.4rem;
}

.pay-note,
.guarantee,
.pay-trust {
  font-size: 1.1rem;
}

.guarantee {
  margin: 1rem 0 0.7rem;
}

.pay-trust {
  color: var(--color-muted);
  margin-bottom: 0.45rem;
}

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pay-methods li {
  border: 1px solid var(--color-rule);
  padding: 0.25rem 0.55rem;
  font-size: 1rem;
}

.faq-item {
  border-top: 1px solid var(--color-rule);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--color-rule);
}

.faq-q {
  width: 100%;
  min-height: 56px;
  padding: 0.85rem 2rem 0.85rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
}

.faq-q[aria-expanded="true"]::after {
  content: "−";
}

.faq-a {
  padding: 0 0 1rem;
}

.final-cta {
  text-align: center;
}

.final-cta .btn {
  margin-top: 0.4rem;
}

.signoff {
  margin-top: 1.25rem;
  font-family: var(--font-heading);
}

.site-footer {
  border-top: 1px solid var(--color-rule);
  padding: 2rem 0 2.5rem;
  font-size: 1.125rem;
  color: var(--color-muted);
  text-align: center;
}

.site-footer p {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--color-text);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 28, 22, 0.78);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--color-bg);
  padding: 1rem 1rem 1.25rem;
}

.lightbox__close {
  min-height: 56px;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.2rem;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox__img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox__page {
  width: 100%;
}

.lightbox__page {
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  padding: 1.25rem 1.15rem;
}

.lightbox__page .sample__page {
  position: static;
}

.lightbox__page .sample__ch {
  font-size: 0.95rem;
}

.lightbox__page .sample__title {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.lightbox__page .sample__body {
  font-size: 1.2rem;
  line-height: 1.6;
}

.lightbox__page .sample__hint {
  display: none;
}

.lightbox__caption {
  margin-top: 0.75rem;
  font-size: 1.1rem;
}

@media (min-width: 640px) {
  :root {
    --gutter: 1.5rem;
  }

  .sale-banner {
    font-size: 1.05rem;
    padding: 0.6rem var(--gutter);
  }

  .about {
    grid-template-columns: 13rem minmax(0, 1fr);
    align-items: start;
    gap: 1.75rem;
  }

  .portrait {
    width: 100%;
    margin: 0;
  }

  .samples {
    gap: 1rem;
  }

  .offer__grid {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .book-cover--small {
    margin: 0;
    width: 100%;
  }
}

@media (min-width: 900px) {
  .sale-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 1rem;
  }

  .sale-banner__timer {
    margin-top: 0;
  }

  .hero.wrap,
  .offer.wrap {
    width: min(var(--measure-wide), calc(100% - (var(--gutter) * 2)));
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15.5rem;
    grid-template-areas:
      "eyebrow cover"
      "title cover"
      "lede cover"
      "price cover"
      "cta cover"
      "trust cover";
    column-gap: 2.5rem;
    align-items: start;
    text-align: left;
  }

  .hero .eyebrow { grid-area: eyebrow; }
  .hero h1 { grid-area: title; }
  .hero .lede { grid-area: lede; margin-bottom: 1.25rem; }
  .hero .hero-price { grid-area: price; justify-content: flex-start; }
  .hero .book-cover { grid-area: cover; width: 100%; margin: 0; }
  .hero .btn { grid-area: cta; margin-inline: 0; }
  .hero .trust-line { grid-area: trust; }

  .final-cta {
    text-align: left;
  }

  .final-cta .btn {
    margin-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
