:root {
  --ink: #0b1d22;
  --paper: #f1ede3;
  --paper-soft: #faf7ef;
  --night: #0d171b;
  --teal: #456767;
  --gold: #d0b36f;
  --muted: #6f7772;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; }

.hero {
  min-height: 100svh;
  padding: 24px clamp(20px, 5vw, 76px) 70px;
  color: #f8f2e6;
  background:
    radial-gradient(circle at 78% 24%, rgba(208, 179, 111, .35), transparent 16%),
    linear-gradient(160deg, rgba(12, 28, 33, .94), rgba(18, 37, 36, .85) 48%, rgba(5, 9, 11, .98)),
    linear-gradient(120deg, #172e33, #091114);
  overflow: hidden;
}

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

.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(248, 242, 230, .42);
}

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

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

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

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

h1 {
  margin: 0;
  font-size: clamp(46px, 7.2vw, 92px);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
}

.intro {
  max-width: 560px;
  margin: 32px 0 28px;
  color: #dce6df;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

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

.cover {
  width: 100%;
  max-width: 360px;
  justify-self: center;
  border-radius: 18px;
  box-shadow: 0 35px 80px rgba(0,0,0,.45);
}

main {
  padding: clamp(48px, 8vw, 90px) clamp(16px, 5vw, 70px);
  background:
    radial-gradient(circle at 10% 18%, rgba(208, 179, 111, .14), transparent 22%),
    #d6d1c5;
}

.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(11, 29, 34, .18);
  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(760px, 82svh);
  padding: clamp(34px, 7vw, 74px);
  border-radius: 6px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(97, 113, 93, .16), transparent 18%),
    radial-gradient(circle at 2% 92%, rgba(178, 115, 87, .08), transparent 20%),
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(145deg, #f5f2e9, var(--paper));
  box-shadow: 0 26px 70px rgba(31, 27, 20, .18);
  overflow: hidden;
}

.book-page::before,
.book-page::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(69, 103, 103, .1);
  filter: blur(1px);
  pointer-events: none;
}

.book-page::before {
  right: -72px;
  top: -65px;
}

.book-page::after {
  left: -90px;
  bottom: -82px;
}

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

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

.book-page h2 {
  margin: 0;
  font-size: clamp(48px, 6.8vw, 78px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.055em;
}

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

.poem,
.about,
.foreword {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 2.45vw, 26px);
  line-height: 1.42;
}

.poem p,
.about p,
.foreword p {
  margin: 0 0 24px;
}

.foreword {
  max-width: 650px;
  font-style: italic;
  line-height: 1.5;
}

.about {
  max-width: 690px;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.5;
}

.about .closing,
.foreword .closing {
  color: #b77a56;
  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: #a4aaa4;
  background: #091114;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
}

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

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

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

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