:root {
  --pine: #123f3c;
  --pine-dark: #0a2f2d;
  --pine-soft: #dcecea;
  --wine: #7f3445;
  --wine-dark: #652536;
  --paper: #fffdf9;
  --paper-soft: #f4f6f2;
  --ink: #1c3030;
  --muted: #5d706e;
  --line: rgba(18, 63, 60, 0.16);
  --shadow: 0 22px 48px rgba(22, 56, 54, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper-soft);
  font-family: "Manrope", sans-serif;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  background: var(--paper);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__name {
  color: var(--pine);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.brand__tagline {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--wine);
}

.site-nav__featured {
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--pine);
}

.hero {
  min-height: min(780px, calc(100vh - 75px));
  display: grid;
  align-items: center;
  background: var(--pine-dark);
}

.hero__inner,
.editorial-band,
.gift-band,
.purchase-band__inner,
.site-footer,
.checkout-shell,
.status-shell {
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 72px;
  align-items: center;
  padding: 54px 0 64px;
}

.hero__copy {
  min-width: 0;
  color: #f9fbf8;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #bfe2dc;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(4.7rem, 10vw, 8.4rem);
  line-height: 0.84;
}

h2 {
  font-size: clamp(3rem, 6vw, 5.1rem);
  line-height: 0.94;
}

h3 {
  font-size: 2.3rem;
  line-height: 1;
}

.hero__lead {
  max-width: 650px;
  margin: 28px 0 0;
  overflow-wrap: anywhere;
  color: #d5e9e4;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero__actions,
.gift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.text-button,
.icon-button {
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
}

.button--large {
  min-height: 58px;
  padding: 0 28px;
}

.button--primary {
  color: #fff;
  background: var(--wine);
}

.button--primary:hover {
  background: var(--wine-dark);
}

.button--secondary {
  border-color: var(--line);
  color: var(--pine);
  background: var(--paper);
}

.button--secondary:hover {
  border-color: var(--pine);
}

.button--light {
  color: var(--pine-dark);
  background: #fff;
}

.button--outline-light {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  background: transparent;
}

.button:hover,
.text-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.button:disabled,
.text-button:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.cover-frame {
  margin: 0;
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: var(--shadow);
}

.cover-frame figcaption {
  margin-top: 12px;
  color: #bfe2dc;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.editorial-band,
.gift-band {
  padding: 104px 0;
}

.editorial-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 72px;
}

.section-heading {
  max-width: 560px;
}

.review-copy,
.gift-intro p,
.purchase-band p,
.thank-you__copy > p,
.status-panel p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.82;
}

.review-copy,
.gift-intro > *,
.purchase-band__inner > *,
.thank-you > * {
  min-width: 0;
}

.review-copy p {
  margin: 0 0 20px;
}

.review-copy__closing {
  padding: 18px 0 0 20px;
  border-left: 3px solid var(--wine);
  color: var(--pine);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.gift-band {
  border-top: 1px solid var(--line);
}

.gift-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: end;
  margin-bottom: 32px;
}

.gift-intro p {
  max-width: 720px;
  margin: 18px 0 0;
}

.gift-actions {
  justify-content: flex-end;
}

.reader {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.reader-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.reader-panel__text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.reader-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--pine);
  font-size: 0.86rem;
  font-weight: 800;
}

.reader-progress span:last-child {
  color: var(--muted);
}

.reader-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reader-controls--zoom {
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-color: var(--line);
  border-radius: 50%;
  color: var(--pine);
  background: var(--paper-soft);
  font-size: 1.2rem;
}

.icon-button--wide {
  width: 100%;
  border-radius: 6px;
}

.zoom-label {
  color: var(--pine);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.reader-stage {
  display: grid;
  grid-template-rows: auto 1fr;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.text-button {
  min-height: 36px;
  padding: 0 12px;
  border-color: var(--line);
  border-radius: 4px;
  color: var(--pine);
  background: var(--paper);
}

.page-shell {
  display: grid;
  place-items: start center;
  min-height: 660px;
  max-height: 900px;
  padding: 26px;
  overflow: auto;
  background: #e4ece9;
}

#book-canvas {
  display: block;
  height: auto;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 18px 34px rgba(22, 56, 54, 0.18);
}

.pdf-fallback {
  display: none;
  width: 100%;
  min-height: 660px;
  border: 0;
  background: #fff;
}

.reader.is-fallback #book-canvas {
  display: none;
}

.reader.is-fallback .pdf-fallback {
  display: block;
}

.reader:fullscreen {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 14px;
  background: #e4ece9;
  overflow: auto;
}

.reader:fullscreen .reader-panel {
  display: none;
}

.reader:fullscreen .page-shell {
  height: calc(100vh - 102px);
  min-height: 0;
}

.purchase-band {
  background: var(--wine-dark);
}

.purchase-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 52px;
  align-items: center;
  padding: 84px 0;
  color: #fff;
}

.purchase-band h2 {
  max-width: 760px;
}

.purchase-band p {
  max-width: 700px;
  margin: 18px 0 0;
  color: #f0dce1;
}

.purchase-action {
  width: min(100%, 340px);
}

.purchase-action .button {
  width: 100%;
}

.purchase-note {
  min-height: 42px;
  color: #f0dce1 !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  text-align: center;
}

.site-footer {
  padding-top: 26px;
  padding-bottom: 26px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.checkout-page {
  background: #e5efed;
}

.checkout-shell,
.status-shell {
  padding: 38px 0 52px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--pine);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.thank-you {
  display: grid;
  grid-template-columns: minmax(260px, 410px) minmax(0, 1fr);
  gap: 58px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.thank-you h1,
.status-panel h1 {
  color: var(--pine);
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  line-height: 0.9;
}

.thank-you__copy > p {
  margin: 20px 0 0;
}

.delivery-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.delivery-form label {
  color: var(--pine);
  font-size: 0.84rem;
  font-weight: 800;
}

.delivery-form input {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.delivery-form input:focus {
  border-color: var(--pine);
  outline: 3px solid rgba(18, 63, 60, 0.12);
}

.form-message {
  min-height: 44px;
  margin: 16px 0 0;
  color: var(--pine);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

.form-message.is-error {
  color: var(--wine);
}

.status-panel {
  max-width: 740px;
  padding: 48px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.status-panel p {
  margin: 20px 0 26px;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner,
  .editorial-band,
  .gift-intro,
  .reader,
  .purchase-band__inner,
  .thank-you {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    gap: 38px;
  }

  .cover-frame--hero {
    width: min(100%, 340px);
  }

  .editorial-band,
  .gift-band {
    padding: 76px 0;
  }

  .gift-actions {
    justify-content: flex-start;
  }

  .reader-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .purchase-action {
    width: min(100%, 420px);
  }

  .thank-you {
    gap: 34px;
    padding: 34px;
  }

  .cover-frame--thanks {
    width: min(100%, 280px);
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .site-header {
    position: static;
    display: grid;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .brand__logo {
    width: 42px;
    height: 42px;
  }

  .hero__inner,
  .editorial-band,
  .gift-band,
  .purchase-band__inner,
  .checkout-shell,
  .status-shell {
    width: min(calc(100% - 28px), 1180px);
  }

  h1 {
    font-size: clamp(4rem, 20vw, 5.5rem);
  }

  h2 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .hero__actions,
  .gift-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .reader {
    min-height: 560px;
  }

  .reader-panel {
    padding: 20px;
  }

  .page-shell,
  .pdf-fallback {
    min-height: 520px;
  }

  .page-shell {
    padding: 14px;
  }

  .thank-you,
  .status-panel {
    padding: 24px;
  }

  .thank-you h1,
  .status-panel h1 {
    font-size: clamp(3.2rem, 15vw, 4.4rem);
  }
}
