:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --red: #e3061c;
  --grey: #5e5e5d;
  --muted: #8a8a8a;
  --serif: "Crimson Pro", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 20px/1.55 var(--serif); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.wrap--narrow { width: min(680px, 100% - 32px); }
h2 { font: 600 34px/1.1 var(--serif); margin: 0 0 16px; }

.btn {
  display: inline-block; padding: 15px 28px; border-radius: 999px;
  background: var(--red); color: #fff; text-decoration: none;
  font: 600 15px/1 var(--sans); letter-spacing: .02em;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #c40518; }
.btn--dark { background: var(--ink); }
.btn--dark:hover { background: #2a2a2a; }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn.is-disabled { background: #bdbdbd; color: #fff; pointer-events: none; }

/* Hero */
.hero { position: relative; min-height: clamp(560px, 92vh, 920px); display: grid; place-items: end center; overflow: hidden; background: var(--ink); color: #fff; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 11, 11, .6), rgba(11, 11, 11, 0) 50%); pointer-events: none; }
.hero__inner { z-index: 1; }
.hero__inner { position: relative; text-align: center; padding: 0 16px clamp(48px, 11vh, 110px); }
.hero__logo { width: min(760px, 88vw); margin: 0 auto; }
.hero__tag { margin: 18px 0 28px; font-size: clamp(18px, 2.4vw, 24px); font-style: italic; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

/* Stats */
.stats { background: var(--ink); color: #fff; padding: 28px 16px; }
.stats ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; }
.stats li { display: flex; flex-direction: column; align-items: center; min-width: 120px; flex: 1; }
.stats strong { font: 600 34px/1 var(--serif); color: var(--red); }
.stats span { font: 500 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #bdbdbd; margin-top: 6px; }

/* Intro */
.intro { padding: 96px 0; }
.intro p { margin: 0 0 1.1em; }
.intro .sign { font-style: italic; margin-top: 1.6em; }

/* Book */
.book { background: var(--grey); color: #fff; padding: 80px 0; }
.book__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.book__mock, .book__opens img { border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
.book__format { font: 500 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #e6e6e6; }
.book__opens { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }

/* Gallery */
.gallery { padding: 88px 0; }
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 14px; grid-auto-flow: dense; }
.gallery figure { margin: 0; position: relative; overflow: hidden; }
.gallery figure.tall { grid-row: span 2; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { object-position: center 35%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 10px; bottom: 8px; font: 500 11px/1.3 var(--sans); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }

/* Quote */
.quote { background: var(--ink); padding: 90px 16px; text-align: center; }
.quote blockquote { margin: 0; color: var(--red); font: italic 400 clamp(30px, 5vw, 56px)/1.15 var(--serif); }

/* Buy */
.buy { padding: 96px 0; }
.buy__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.buy__price { font: 600 30px/1 var(--serif); margin: 0 0 14px; }
.buy__price:empty { display: none; }
.buy__ship { color: #555; font-size: 17px; }
.buy__tip { font-style: italic; color: #333; margin: 18px 0 0; }
.buy__note { margin-top: 14px; font: 500 12px/1.4 var(--sans); color: var(--muted); }

/* Footer */
.foot { background: var(--ink); color: #9a9a9a; text-align: center; padding: 48px 16px; font: 500 13px/1.5 var(--sans); }
.foot img { width: 240px; margin: 0 auto 14px; }

@media (max-width: 820px) {
  body { font-size: 18px; }
  .book__grid, .buy__grid, .book__opens { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .intro, .buy, .gallery { padding: 64px 0; }
  .stats li { min-width: 40%; }
}

/* Cart */
.cart { margin: 22px 0 6px; padding: 20px; border: 1px solid #e3e3e3; border-radius: 10px; }
.cart__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart__row strong { display: block; font-weight: 600; }
.cart__row span { color: #666; font-size: 16px; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #cfcfcf; background: #fff; font: 600 18px/1 var(--sans); cursor: pointer; }
.qty button:hover { border-color: var(--ink); }
.qty output { min-width: 22px; text-align: center; font: 600 16px/1 var(--sans); }
.cart__ful { border: 0; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.cart__ful legend { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #777; margin-bottom: 8px; }
.cart__ful label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.cart__ful input { accent-color: var(--red); width: 18px; height: 18px; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0; padding-top: 12px; border-top: 1px solid #eee; }
.cart__total strong { font: 600 26px/1 var(--serif); }
.cart__go { width: 100%; border: 0; cursor: pointer; }
.cart__go:disabled { background: #bdbdbd; cursor: default; transform: none; }
.cart__msg { color: var(--red); font-size: 16px; margin: 10px 0 0; }
.cart__msg:empty { display: none; }
.thanks { background: var(--red); color: #fff; text-align: center; padding: 14px 16px; font: 600 15px/1.4 var(--sans); }

/* Gallery lightbox */
.gallery figure { cursor: zoom-in; }
.gallery figure img { transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figure:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 8, .94); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lb[hidden] { display: none; }
.lb__fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb__fig img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.lb__fig figcaption { color: #d8d8d8; font: 500 13px/1.4 var(--sans); margin-top: 12px; text-align: center; }
.lb__btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 300 44px/1 var(--sans); padding: 10px 14px; opacity: .8; }
.lb__btn:hover, .lb__btn:focus-visible { opacity: 1; color: var(--red); }
.lb__close { top: 10px; right: 14px; }
.lb__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 820px) {
  .lb { padding: 56px 12px; }
  .lb__prev, .lb__next { top: auto; bottom: 10px; transform: none; }
}

/* SEO / accessibility helpers */
.hero__title { margin: 0; }
.intro h2 { font: 600 30px/1.15 var(--serif); margin: 0 0 22px; }
.intro .about { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e5e5e5; font-size: 17px; color: #555; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
