:root {
  --ink: #1a3040;
  --paper: #efe7d5;
  --paper-soft: #fbf6ea;
  --mist: #c8c2b2;
  --gold: #b99453;
  --blue: #203849;
  --sepia: #9f7d55;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #e6ddcb;
  font-family: "Manrope", sans-serif;
}

a { color: inherit; }

.hero {
  min-height: 100svh;
  padding: 24px clamp(20px, 5vw, 76px) 70px;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 18%, rgba(185, 148, 83, .22), transparent 18%),
    radial-gradient(circle at 12% 80%, rgba(82, 110, 116, .12), transparent 24%),
    linear-gradient(120deg, rgba(255,255,255,.72), rgba(239,231,213,.84)),
    #efe7d5;
  overflow: hidden;
}

nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: clamp(54px, 9vw, 112px);
}

.back-link,
.ask-link,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.ask-link {
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(26, 48, 64, .35);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 355px);
  gap: clamp(34px, 8vw, 112px);
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
}

.hero-copy { max-width: 700px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(58px, 9vw, 118px);
  font-weight: 500;
  line-height: .84;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.intro {
  max-width: 620px;
  margin: 34px 0 28px;
  color: #244051;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
  font-style: italic;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 21px;
  border: 1px solid rgba(26, 48, 64, .28);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,.22);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.45);
}

.cover {
  width: 100%;
  max-width: 355px;
  justify-self: center;
  border-radius: 18px;
  box-shadow: 0 32px 76px rgba(61, 49, 35, .28);
}

main {
  padding: clamp(48px, 8vw, 90px) clamp(16px, 5vw, 70px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 148, 83, .13), transparent 22%),
    radial-gradient(circle at 88% 78%, rgba(32, 56, 73, .08), transparent 26%),
    #d8cfbd;
}

.reader-shell {
  max-width: 920px;
  margin: 0 auto;
}

.reader-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.reader-controls {
  display: flex;
  gap: 10px;
}

.reader-controls button,
.dots button {
  border: 1px solid rgba(26, 48, 64, .2);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.reader-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 19px;
}

.reader-controls button:hover,
.dots button:hover,
.dots button.active {
  color: var(--paper-soft);
  background: var(--ink);
  transform: translateY(-1px);
}

.book-page {
  position: relative;
  min-height: min(780px, 82svh);
  padding: clamp(34px, 7vw, 72px);
  border-radius: 6px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(185, 148, 83, .14), transparent 18%),
    radial-gradient(circle at 6% 92%, rgba(32, 56, 73, .08), transparent 20%),
    radial-gradient(circle at 22% 10%, rgba(255,255,255,.75), transparent 34%),
    linear-gradient(145deg, #fbf7ed, var(--paper));
  box-shadow: 0 26px 70px rgba(61, 49, 35, .16);
  overflow: hidden;
}

.book-page::before,
.book-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.book-page::before {
  right: -90px;
  top: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(185, 148, 83, .08);
}

.book-page::after {
  left: -100px;
  bottom: -70px;
  width: 320px;
  height: 170px;
  border: 1px solid rgba(32, 56, 73, .12);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.book-page-inner {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.page-section {
  margin: 0 0 20px;
  color: var(--sepia);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 11px;
  font-weight: 700;
}

.book-page h2 {
  margin: 0;
  font-size: clamp(46px, 6.4vw, 74px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.035em;
}

.rule {
  width: 84px;
  height: 2px;
  margin: 24px 0 32px;
  background: var(--sepia);
}

.prose,
.foreword,
.thanks {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 2.35vw, 26px);
  line-height: 1.5;
}

.prose p,
.foreword p,
.thanks p {
  margin: 0 0 24px;
}

.foreword {
  font-style: italic;
}

.thanks .closing,
.foreword .closing {
  color: #b06f4d;
  font-style: italic;
}

.book-page.changing {
  animation: pageTurn .28s ease;
}

@keyframes pageTurn {
  from { opacity: .35; transform: translateX(14px) rotateY(-3deg); }
  to { opacity: 1; transform: none; }
}

.dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
}

footer {
  padding: 28px clamp(20px, 5vw, 76px);
  color: #6f675a;
  background: #efe7d5;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
}

@media (max-width: 780px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(46px, 12vw, 76px);
  }

  .cover {
    max-width: 260px;
    justify-self: start;
  }

  .book-page {
    min-height: auto;
  }

  .reader-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
