/* =========================
   HOMEPAGE
   Depends on global.css for:
   - :root variables
   - base typography
   - global buttons
   - shared layout widths
   ========================= */

/* =========================
   HOMEPAGE BASE CLEANUP
   ========================= */

.home .entry-title {
  display: none;
}

.home .entry-header {
  margin-bottom: 0;
}

.home .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home #page,
.home #main,
.home #primary,
.home #content,
.home .hentry,
.home .entry-content {
  background: transparent !important;
}

.home .entry-content > section:last-of-type {
  margin-bottom: 0 !important;
}

/* =========================
   HOMEPAGE SECTION RHYTHM
   ========================= */

.featured-book,
.published-works,
.home-photo-collage,
.closing-cta {
  position: relative;
}

.featured-book {
  position: relative;
  width: 100%;
  padding: 28px 40px 48px;
  overflow: hidden;
}

.published-works {
  width: 100%;
  padding: 20px 40px 36px;
}

.home-photo-collage {
  position: relative;
  width: 100%;
  padding: 24px 40px 56px;
}

.closing-cta {
  width: 100%;
  padding: 8px 40px 52px;
  text-align: center;
}

/* =========================
   FEATURED BOOK
   ========================= */

.featured-book::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(201, 119, 79, 0.16) 0%, rgba(201, 119, 79, 0.06) 42%, transparent 72%);
  filter: blur(20px);
  pointer-events: none;
}

.featured-book::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(83, 104, 136, 0.14) 0%, rgba(83, 104, 136, 0.05) 45%, transparent 72%);
  filter: blur(24px);
  pointer-events: none;
}

.featured-book-container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width-home);
  margin: 0 auto;
  padding: 0 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.featured-book-intro {
  max-width: 1000px;
  margin: 0 0 28px 7%;
  text-align: left;
}

.featured-book-title {
  margin: 0 0 2px;
  font-size: clamp(42px, 5.6vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.featured-book-label {
  display: inline-block;
  margin: 0;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Stage */

.featured-book-stage {
  position: relative;
  max-width: 1300px;
  min-height: 900px;
  margin: 0 auto 24px;
  padding: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-book-stage::before {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 226, 202, 0.55) 0%, rgba(245, 226, 202, 0.18) 42%, transparent 72%);
  z-index: 0;
  pointer-events: none;
}

.featured-book-image {
  position: relative;
  z-index: 3;
  width: min(100%, 700px);
  max-width: 500px;
}

.featured-book-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.22),
    0 10px 20px rgba(34, 38, 45, 0.10);
}

/* Quotes */

.featured-book-quote {
  position: absolute;
  z-index: 2;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 252, 247, 0.88);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.featured-book-quote-text {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #4f443a;
  hanging-punctuation: first;
}

.featured-book-quote-source {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: #78695b;
  font-style: normal;
}

.featured-book-quote-source em {
  font-style: italic;
}

.featured-book-quote--one {
  top: 2%;
  left: 1%;
  max-width: 600px;
  transform: rotate(-2deg);
}

.featured-book-quote--two {
  top: 8%;
  right: 1%;
  max-width: 500px;
  transform: rotate(2deg);
}

.featured-book-quote--three {
  top: 40%;
  left: 1%;
  max-width: 400px;
  transform: rotate(-1.5deg);
}

.featured-book-quote--four {
  bottom: 2%;
  right: 1%;
  max-width: 400px;
  transform: rotate(2deg);
}

.featured-book-quote--five {
  bottom: 2%;
  left: 1%;
  max-width: 600px;
  transform: rotate(-2deg);
}

.featured-book-quote--six {
  bottom: 30%;
  right: 1%;
  max-width: 600px;
  transform: rotate(1.5deg);
}

/* Actions under book */

.featured-book-content {
  max-width: 980px;
  margin: 0 auto 36px;
}

.featured-book-actions-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.featured-book-actions-left {
  display: flex;
  justify-content: center;
}

.featured-book-actions-right {
  display: flex;
  justify-content: flex-start;
}

.featured-book-cta {
  min-width: 190px;
  white-space: nowrap;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.featured-book-cta:hover,
.featured-book-cta:focus {
  transform: translateY(-2px);
}

.featured-book-retailers {
  text-align: left;
}

.retailer-label {
  display: inline-block;
  margin: 0 0 10px;
  color: #6a685f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.retailer-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.retailer-button {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  opacity: 0.95;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.retailer-button:hover,
.retailer-button:focus {
  transform: translateY(-2px);
}

/* Video */

.featured-book-video {
  max-width: 900px;
  margin: 32px auto 0;
  text-align: center;
}

.featured-book-video-label {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  text-align: center;
  font-style: italic;
}

.featured-book-video-label em {
  font-style: italic;
  font-weight: 500;
}

.featured-book-video iframe {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

/* =========================
   PUBLISHED WORKS
   ========================= */

.published-works-container {
  max-width: var(--max-width-home);
  margin: 0 auto;
  padding: 0 24px;
}

.published-works-heading {
  margin: 0 0 24px 2%;
  font-size: clamp(36px, 4.8vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: left;
}

.published-works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 24px;
}

.book-card {
  width: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: center;
}

.book-card-image-link {
  display: block;
  text-decoration: none;
}

.book-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  box-shadow:
    -8px 12px 20px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.book-card:nth-child(odd) img {
  transform: rotate(-0.8deg);
}

.book-card:nth-child(even) img {
  transform: rotate(0.8deg);
}

.book-card-image-link:hover img,
.book-card:hover img,
.book-card:focus-within img {
  transform: translateY(-4px) rotate(0deg) scale(1.02);
  box-shadow:
    -12px 18px 28px rgba(0, 0, 0, 0.22),
    0 8px 16px rgba(0, 0, 0, 0.12);
}

.book-card-content {
  padding-top: 16px;
}

.book-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.8em;
}

.book-card p {
  margin-bottom: 14px;
}

.book-card-button {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.book-card-button:hover,
.book-card-button:focus {
  transform: translateY(-2px);
}

/* =========================
   PHOTO COLLAGE
   ========================= */

.home-photo-collage-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-photo-collage-intro {
  max-width: 900px;
  margin: 0 0 30px 6%;
  text-align: left;
}

.home-photo-collage-title {
  margin: 0 0 5px;
  font-size: clamp(36px, 4.8vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.home-photo-collage-text {
  max-width: 760px;
  margin: 0;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-soft);
}

.home-photo-collage-stage {
  position: relative;
  max-width: 1260px;
  min-height: 900px;
  margin: 0 auto;
}

.collage-photo {
  position: absolute;
  margin: 0;
  background: #fffdf8;
  padding: 10px;
  border-radius: 8px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.collage-photo img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.collage-photo--one {
  width: 500px;
  top: 5px;
  left: 34%;
  transform: rotate(-0.5deg);
  z-index: 3;
}

.collage-photo--one img {
  height: 500px;
}

.collage-photo--two {
  width: 400px;
  top: 8px;
  left: 1%;
  transform: rotate(-4deg);
  z-index: 2;
}

.collage-photo--two img {
  height: 350px;
}

.collage-photo--three {
  width: 300px;
  top: 15px;
  right: -1%;
  transform: rotate(3deg);
  z-index: 1;
}

.collage-photo--three img {
  height: 500px;
}

.collage-photo--four {
  width: 500px;
  bottom: 2px;
  left: 5%;
  transform: rotate(2deg);
  z-index: 2;
}

.collage-photo--four img {
  height: 500px;
}

.collage-photo--five {
  width: 550px;
  bottom: 0;
  right: 3%;
  transform: rotate(-3deg);
  z-index: 1;
}

.collage-photo--five img {
  height: 400px;
}

.collage-photo:hover {
  transform: translateY(-6px) rotate(0deg);
  transition: transform 0.3s ease;
}

/* =========================
   CLOSING CTA
   ========================= */

.closing-cta-container {
  max-width: 760px;
  margin: 0 auto;
}

.closing-cta-text {
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}

.closing-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.closing-cta-button {
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.closing-cta-button:hover,
.closing-cta-button:focus {
  transform: translateY(-2px);
}

/* =========================
   HOMEPAGE RESPONSIVE
   ========================= */

@media (min-width: 1200px) {
  .featured-book-quote {
    max-width: 315px;
  }
}

@media (max-width: 1100px) {
  .featured-book,
  .published-works,
  .home-photo-collage,
  .closing-cta {
    padding-left: 28px;
    padding-right: 28px;
  }

  .featured-book-stage {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: center;
    padding-top: 0;
  }

  .featured-book-image {
    order: -1;
    max-width: 400px;
    margin-bottom: 8px;
  }

  .featured-book-quote {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none !important;
    max-width: 700px;
    width: 100%;
  }

  .featured-book-actions-wrap {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-book-actions-left,
  .featured-book-actions-right {
    justify-content: center;
  }

  .featured-book-retailers {
    text-align: center;
  }

  .retailer-buttons {
    justify-content: center;
  }

  .home-photo-collage-intro,
  .featured-book-intro {
    margin-left: 0;
  }

  .home-photo-collage-stage {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .collage-photo {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    transform: none !important;
  }

  .collage-photo img {
    height: 240px !important;
  }

  .collage-photo--one {
    grid-column: 1 / -1;
    max-width: 640px;
    justify-self: center;
  }

  .published-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .featured-book,
  .published-works,
  .home-photo-collage,
  .closing-cta {
    padding-top: 24px;
    padding-bottom: 42px;
  }

  .featured-book-stage {
    margin-bottom: 22px;
  }
}

@media (max-width: 680px) {
  .featured-book,
  .published-works,
  .home-photo-collage,
  .closing-cta {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 40px;
  }

  .featured-book-container,
  .home-photo-collage-container,
  .published-works-container {
    padding: 0;
  }

  .featured-book-intro {
    margin: 0 0 36px;
    text-align: center;
  }

  .featured-book-title {
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.08;
    white-space: normal;
  }

  .featured-book-label,
  .retailer-label {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .featured-book-image {
    max-width: 320px;
  }

  .featured-book-quote {
    padding: 12px 14px;
  }

  .featured-book-quote-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .featured-book-quote-source {
    font-size: 11px;
  }

  .featured-book-content {
    margin-bottom: 28px;
  }

  .featured-book-video {
    margin-top: 26px;
  }

  .featured-book-video-label {
    font-size: 19px;
    line-height: 1.45;
  }

  .published-works-heading,
  .home-photo-collage-title {
    line-height: 1.08;
  }

  .home-photo-collage-intro {
    margin: 0 0 22px;
  }

  .home-photo-collage-stage {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .collage-photo {
    padding: 8px;
  }

  .collage-photo img {
    height: 220px !important;
  }

  .closing-cta {
    padding-top: 4px;
  }

  .closing-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .published-works-grid {
    grid-template-columns: 1fr;
  }

  .book-card img {
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }
}