/* "A Return to Light" ebook landing page. Uses tokens from site.css. */

.ebook-main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: clamp(24px, 3vh, 40px) 0;
}

/* ---------- Book viewer ---------- */

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.book-frame {
  position: relative;
  width: min(100%, calc((100vh - 240px) * .7727));
  min-width: 260px;
  aspect-ratio: 816 / 1056;
  overflow: hidden;
  cursor: pointer;
  background: var(--cacao);
  box-shadow: 0 30px 60px -30px rgba(75, 46, 36, .6);
}

.book-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .5s var(--ease);
  transform: translateX(0);
}

.book-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.book-slide--contents { background: var(--paper); }

.book-slide picture,
.book-slide img {
  width: 100%;
  height: 100%;
}
.book-slide img {
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.book-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.book-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--cacao);
  background: transparent;
  color: var(--cacao);
  font: 400 18px/1 var(--font-ui);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-btn:hover:not(:disabled) { background: var(--oat-deep); }
.book-btn:disabled { opacity: .3; cursor: default; }

.book-count {
  min-width: 48px;
  text-align: center;
  font: 400 12px/1 var(--font-mono);
  letter-spacing: .12em;
}

/* ---------- Product info ---------- */

.product {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 540px;
}

.title-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  font: 400 12px/1 var(--font-mono);
  letter-spacing: .14em;
  color: var(--muted);
}

.product h1 {
  margin: 0;
  font: 400 clamp(48px, 5.6vw, 84px)/1 var(--font-display);
  letter-spacing: -.015em;
  text-wrap: balance;
}

.subtitle {
  margin: 0;
  font: italic 400 clamp(20px, 1.8vw, 26px)/1.3 var(--font-read);
  color: var(--muted);
  text-wrap: balance;
}

.buy-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.price { font: 400 44px/1 var(--font-display); }

.btn-buy {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--radius);
  background: var(--apricot);
  color: var(--cacao);
  text-decoration: none;
  white-space: nowrap;
  font: 500 16px/1 var(--font-ui);
}
a.btn-buy:hover { background: var(--apricot-hover); color: var(--cacao); }

/* Pre-launch state: same look, no hover, not clickable. */
.btn-buy[aria-disabled="true"] { cursor: default; }

.buy-note {
  font: 400 11px/1.4 var(--font-mono);
  letter-spacing: .12em;
  color: var(--muted);
}

.description {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  font: 400 16px/1.65 var(--font-ui);
  text-wrap: pretty;
}
.description p { margin: 0; }
.description em { font-family: var(--font-read); }

@media (prefers-reduced-motion: reduce) {
  .book-track { transition: none; }
}
