:root {
  --navy: #141a33;
  --cream: #efe9df;
  --peach: #e8b48c;
  --violet: #5a4a7a;
  --paper: #f6f2ea;
  --rule: #ddd5c6;
  --ink: #1d1b1a;
  --side: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);
  --display: 'Dela Gothic One', sans-serif;
  --shoulders: 'Big Shoulders Display', sans-serif;
  --serif: 'EB Garamond', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--violet); font-family: var(--serif); overflow-x: hidden; }
body.reader-open { overflow: hidden; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { opacity: .75; }
::selection { background: var(--peach); color: var(--navy); }
img { display: block; max-width: 100%; }
p { margin: 0; text-wrap: pretty; }

/* Shared type */
.label {
  font-family: var(--shoulders); font-weight: 800; font-size: 15px; letter-spacing: .2em;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--shoulders); font-weight: 800; font-size: 17px; letter-spacing: .14em;
  padding: 15px 24px; white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 2px solid currentColor; background: transparent; color: inherit;
}
.btn:hover { opacity: .85; }
.btn--outline:hover { opacity: .7; }
.btn--peach { background: var(--peach); border-color: var(--peach); color: var(--navy); }
.btn--violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn--outline-white { border-color: #fff; color: #fff; }
.btn--outline-navy { border-color: var(--navy); color: var(--navy); }
.btn[aria-disabled="true"], .btn[aria-disabled="true"]:hover { cursor: not-allowed; opacity: .5; }
.soon { font-family: var(--shoulders); font-weight: 700; font-size: 14px; letter-spacing: .16em; opacity: .8; }

.wrap { max-width: 1200px; margin: 0 auto; padding: var(--section-y) var(--side); }

/* 1. Hero */
.hero { position: relative; min-height: max(640px, 100vh); color: #fff; display: flex; flex-direction: column; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,26,51,.35), rgba(20,26,51,0));
}
.hero__header {
  position: relative; z-index: 2; padding: 22px var(--side);
  display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between;
  font-family: var(--shoulders); font-weight: 800; letter-spacing: .2em; font-size: 15px;
}
.hero__header nav { display: flex; flex-wrap: wrap; gap: 28px; }
.hero__header a { text-decoration: none; }
.hero__title {
  position: relative; padding: 3vw var(--side) 0; display: flex; flex-direction: column; gap: 20px;
  text-shadow: 0 2px 30px rgba(20,26,51,.4);
}
.hero__title h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(56px, 9vw, 140px); line-height: .98; letter-spacing: -.01em;
}
.hero__sub { font-family: var(--shoulders); font-weight: 800; font-size: clamp(18px, 2vw, 26px); letter-spacing: .16em; }
.hero__actions { position: relative; margin-top: auto; padding: 0 var(--side) clamp(20px, 3vw, 40px); }
.hero .btn--outline-white:hover { opacity: .75; }

/* 2. The book */
.book { background: var(--cream); color: var(--navy); }
.book .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 64px; align-items: center;
}
.book__text { display: flex; flex-direction: column; gap: 22px; }
.book__text .label { color: var(--violet); }
.synopsis { font-size: 22px; line-height: 1.55; max-width: 32em; }
.synopsis p + p { margin-top: 1em; }
.book__text .btn-row { margin-top: 8px; }
.book__cover { display: flex; justify-content: center; }
.book__cover img {
  width: 400px; aspect-ratio: 2 / 3; height: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 18px 40px rgba(0,0,0,.25);
}

/* 3. Excerpt */
.excerpt { background: var(--navy); color: var(--cream); }
.excerpt .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 48px; align-items: start;
}
.excerpt__head { display: flex; flex-direction: column; gap: 16px; }
.excerpt__head .label { color: var(--peach); }
.excerpt__head h2 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(48px, 5.5vw, 80px); line-height: .95; letter-spacing: -.01em;
}
.excerpt__body { grid-column: span 2; display: flex; flex-direction: column; gap: 22px; max-width: 34em; }
.excerpt__lead { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; font-style: italic; }
.excerpt__body p:not(.excerpt__lead) { font-size: 19px; line-height: 1.65; }
.excerpt__body .btn-row { margin-top: 8px; }
@media (max-width: 747px) { .excerpt__body { grid-column: auto; } }

/* 4. Buy */
.buy { background: var(--peach); color: var(--navy); }
.buy .wrap { display: flex; flex-direction: column; gap: 40px; }
.buy__head { display: flex; flex-direction: column; gap: 16px; }
.buy__head h2 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance;
}
.buy__notice {
  max-width: 34em; padding: 14px 18px; border-left: 4px solid var(--navy);
  background: rgba(239,233,223,.55); font-size: 20px; line-height: 1.5;
}
.buy__notice[hidden] { display: none; }
.buy__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.card { padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 18px; }
.card--navy { background: var(--navy); color: var(--cream); }
.card--navy .label { color: var(--peach); }
.card--cream { background: var(--cream); color: var(--navy); }
.card--cream .label { color: var(--violet); }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: 1; }
.card p { font-size: 20px; line-height: 1.55; }
.card .btn-row { margin-top: auto; align-items: center; }

/* 5. Author */
.author { background: var(--cream); color: var(--navy); }
.author .wrap {
  max-width: 960px; padding-block: clamp(56px, 7vw, 96px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 40px; align-items: center;
}
.polaroid {
  max-width: 280px; width: 100%; justify-self: center; padding: 14px 14px 58px;
  transform: rotate(-2.5deg); background-color: #f4efe2;
  background-image:
    radial-gradient(ellipse at 85% 92%, rgba(176,140,80,.22), transparent 45%),
    radial-gradient(ellipse at 8% 6%, rgba(176,140,80,.14), transparent 35%);
  box-shadow: 0 1px 2px rgba(60,40,20,.25), 0 14px 28px rgba(60,40,20,.18), inset 0 0 22px rgba(150,120,70,.22);
}
.polaroid__photo { position: relative; aspect-ratio: 1; background: #2a2622; }
.polaroid__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(.35) contrast(.92) brightness(1.04) saturate(.85);
}
.polaroid__photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 28px rgba(40,25,10,.35);
  background: linear-gradient(135deg, rgba(255,236,200,.12), transparent 45%, rgba(90,60,30,.12));
}
.author__text { grid-column: span 2; display: flex; flex-direction: column; gap: 16px; }
.author__text .label { color: var(--violet); }
.author__text p { font-size: 21px; line-height: 1.6; max-width: 30em; }
@media (max-width: 564px) { .author__text { grid-column: auto; } }

/* 6. Footer */
.footer {
  background: var(--navy); padding: 28px var(--side);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--shoulders); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--peach);
}
.footer a { text-decoration: none; }

/* Excerpt reader */
.reader {
  position: fixed; inset: 0; z-index: 50; background: var(--paper); color: var(--ink); overflow-y: auto;
}
.reader[hidden] { display: none; }
.reader__bar {
  position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--rule);
  padding: 16px var(--side); display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--shoulders); font-weight: 800; font-size: 15px; letter-spacing: .18em;
}
.reader__close {
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font: inherit; letter-spacing: inherit;
}
.reader__close:hover { opacity: .75; }
.reader article {
  max-width: 640px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) 24px;
  display: flex; flex-direction: column; gap: 22px;
}
.reader .label { color: var(--violet); }
.reader h2 {
  margin: 0 0 16px; font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -.01em;
}
.reader__text { display: flex; flex-direction: column; gap: 22px; }
.reader__text p { font-size: 21px; line-height: 1.75; }
.reader__end {
  background: var(--violet); color: #fff; padding: 32px; margin-top: 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.reader__end h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.05; }
.reader__end p { font-size: 19px; line-height: 1.5; }
.reader__end .btn { padding: 13px 22px; }
.reader__end .btn:hover { opacity: .75; }
