/* =========================================
   ASHLEY ENJOLI — BOOKS PAGE
   /books/books.css
   ========================================= */

.books-page {
  background: var(--ivory, #f7f3eb);
  color: var(--espresso, #2b2420);
}

.book-kicker {
  margin: 0 0 14px;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--olive, #73705f);
}

.book-kicker--light { color: rgba(255, 253, 249, 0.74); }

.books-page h1,
.books-page h2,
.books-page h3 {
  font-family: var(--serif-display, "Cormorant Garamond", serif);
  font-weight: 500;
  color: var(--espresso, #2b2420);
}

.books-page h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.books-page h3 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.05;
}

.books-page p,
.books-page li { font-family: var(--serif-body, "Libre Caslon Text", serif); }

.book-long-copy { max-width: 680px; }
.book-long-copy p {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.85;
}
.book-long-copy strong { font-weight: 600; }
.book-long-copy em { font-style: italic; }
.book-signature {
  margin-top: 28px !important;
  font-family: var(--serif-display, "Cormorant Garamond", serif) !important;
  font-size: 2rem !important;
  font-style: italic;
  line-height: 1;
}

/* HERO */
.book-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 132px) 0 clamp(86px, 11vw, 150px);
  background:
    radial-gradient(circle at 84% 18%, rgba(230, 213, 207, 0.76), transparent 30%),
    linear-gradient(135deg, #fbf8f2 0%, #f5eee5 56%, #eee2d7 100%);
}

.book-hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -28%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(177, 138, 90, 0.18);
  pointer-events: none;
}

.book-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
}

.book-cover-wrap {
  position: relative;
  width: min(100%, 470px);
  margin-inline: auto;
}

.book-cover-wrap::before {
  content: "";
  position: absolute;
  inset: 8% -7% -8% 8%;
  z-index: -1;
  background: rgba(177, 138, 90, 0.10);
  border-radius: 2px;
  transform: rotate(2.5deg);
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--paper, #f0e8dc);
  border: 1px solid rgba(43, 36, 32, 0.08);
  box-shadow: 0 28px 70px rgba(43, 36, 32, 0.18);
}

.book-hero-copy { max-width: 680px; }
.book-hero-copy h1 {
  margin: 0;
  font-size: clamp(4.4rem, 8.7vw, 8.7rem);
  line-height: 0.79;
  letter-spacing: -0.055em;
}

.book-tagline {
  margin: clamp(28px, 4vw, 48px) 0 12px;
  font-family: var(--serif-display, "Cormorant Garamond", serif) !important;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-style: italic;
  line-height: 1.08;
  color: var(--brass, #b18a5a);
}

.book-lede {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.06rem, 1.6vw, 1.3rem);
  line-height: 1.8;
  color: rgba(43, 36, 32, 0.82);
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 34px;
}

.button--dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--espresso, #2b2420);
  background: var(--espresso, #2b2420);
  color: var(--white, #fffdf9);
  text-decoration: none;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button--dark:hover {
  transform: translateY(-2px);
  background: transparent;
  color: var(--espresso, #2b2420);
}

.book-actions .text-link {
  position: relative;
  display: inline-block;
  color: var(--espresso, #2b2420);
  text-decoration: none;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.book-actions .text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.book-actions .text-link:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

/* SECTIONS */
.book-section { padding: clamp(88px, 10vw, 150px) 0; }
.book-section-heading {
  max-width: 820px;
  margin-bottom: clamp(44px, 6vw, 76px);
}
.book-intro { background: var(--white, #fffdf9); }

.book-intro-grid,
.book-for-grid,
.book-note-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(50px, 9vw, 130px);
  align-items: start;
}

.book-intro-grid > div:first-child,
.book-for-grid > div:first-child,
.book-note-grid > div:first-child {
  position: sticky;
  top: 128px;
}

.drop-cap::first-letter {
  float: left;
  margin: 0.04em 0.10em 0 0;
  font-family: var(--serif-display, "Cormorant Garamond", serif);
  font-size: 5rem;
  line-height: 0.72;
  color: var(--brass, #b18a5a);
}

/* THEMES */
.book-themes { background: var(--paper, #f0e8dc); }
.book-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line, rgba(43, 36, 32, 0.14));
  border-bottom: 1px solid var(--line, rgba(43, 36, 32, 0.14));
}
.book-theme {
  min-height: 330px;
  padding: 34px 30px 42px;
  border-right: 1px solid var(--line, rgba(43, 36, 32, 0.14));
}
.book-theme:last-child { border-right: none; }
.book-theme-number {
  margin: 0 0 76px;
  font-family: var(--sans, "Inter", sans-serif) !important;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--brass, #b18a5a);
}
.book-theme p:last-child {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(43, 36, 32, 0.78);
}

/* WHO IT'S FOR */
.book-for { background: var(--ivory, #f7f3eb); }
.book-for-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line, rgba(43, 36, 32, 0.14));
}
.book-for-list li {
  position: relative;
  margin: 0;
  padding: 26px 18px 26px 46px;
  border-bottom: 1px solid var(--line, rgba(43, 36, 32, 0.14));
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}
.book-for-list li::before {
  content: "✦";
  position: absolute;
  left: 8px;
  top: 27px;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.72rem;
  color: var(--brass, #b18a5a);
}

/* NOTE */
.book-note {
  background:
    linear-gradient(rgba(255, 253, 249, 0.96), rgba(255, 253, 249, 0.96)),
    radial-gradient(circle at 20% 20%, rgba(230, 213, 207, 0.52), transparent 38%);
}

/* PURCHASE */
.book-purchase {
  position: relative;
  overflow: hidden;
  padding: clamp(82px, 10vw, 138px) 0;
  background: var(--espresso, #2b2420);
  color: var(--white, #fffdf9);
}
.book-purchase::before {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255, 253, 249, 0.08);
}
.book-purchase-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.6fr);
  gap: clamp(48px, 10vw, 140px);
  align-items: end;
}
.book-purchase h2 {
  max-width: 820px;
  color: var(--white, #fffdf9);
}
.book-purchase-grid > div:last-child p {
  margin: 0 0 28px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(255, 253, 249, 0.76);
}
.book-button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--white, #fffdf9);
  background: var(--white, #fffdf9);
  color: var(--espresso, #2b2420);
  text-decoration: none;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}
.book-button-light:hover {
  transform: translateY(-2px);
  background: transparent;
  color: var(--white, #fffdf9);
}

/* AUTHOR */
.author-books { background: var(--white, #fffdf9); }
.author-books-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(52px, 9vw, 126px);
  align-items: center;
}
.author-photo {
  position: relative;
  width: min(100%, 480px);
}
.author-photo::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 46%;
  height: 46%;
  z-index: 0;
  background: var(--blush, #e6d5cf);
}
.author-photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.author-books-grid > div:last-child { max-width: 720px; }
.author-books-grid > div:last-child > p:not(.book-kicker) {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.82;
  color: rgba(43, 36, 32, 0.80);
}

.books-page a:focus-visible,
.books-page button:focus-visible {
  outline: 2px solid var(--brass, #b18a5a);
  outline-offset: 4px;
}

@media (max-width: 1040px) {
  .book-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-theme:nth-child(2) { border-right: none; }
  .book-theme:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line, rgba(43, 36, 32, 0.14));
  }
  .book-purchase-grid { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 860px) {
  .book-hero-grid,
  .book-intro-grid,
  .book-for-grid,
  .book-note-grid,
  .author-books-grid { grid-template-columns: 1fr; }

  .book-hero { padding-top: 56px; }
  .book-cover-wrap { width: min(72vw, 420px); }
  .book-hero-copy { max-width: 760px; }
  .book-hero-copy h1 { font-size: clamp(4.1rem, 14vw, 7.4rem); }

  .book-intro-grid > div:first-child,
  .book-for-grid > div:first-child,
  .book-note-grid > div:first-child { position: static; }

  .author-photo { width: min(78vw, 460px); }
}

@media (max-width: 640px) {
  .book-section { padding: 76px 0; }
  .book-hero { padding: 48px 0 84px; }
  .book-cover-wrap { width: min(82vw, 370px); }
  .book-hero-copy h1 {
    font-size: clamp(3.75rem, 17vw, 6rem);
    line-height: 0.82;
  }
  .book-tagline { margin-top: 26px; }
  .book-actions { align-items: flex-start; flex-direction: column; }
  .button--dark,
  .book-button-light { width: 100%; }

  .book-theme-grid { grid-template-columns: 1fr; }
  .book-theme {
    min-height: auto;
    padding: 28px 8px 34px;
    border-right: none;
    border-bottom: 1px solid var(--line, rgba(43, 36, 32, 0.14));
  }
  .book-theme:last-child { border-bottom: none; }
  .book-theme-number { margin-bottom: 34px; }
  .book-for-list li { padding-left: 38px; }
  .author-photo::after { right: -12px; bottom: -12px; }
}

@media (prefers-reduced-motion: reduce) {
  .button--dark,
  .book-button-light,
  .book-actions .text-link::after { transition: none; }

  .button--dark:hover,
  .book-button-light:hover { transform: none; }
}
