/* Premium opening-book experience */

.opening-page {
  min-height: 100vh;
  margin: 0;
  padding: clamp(16px, 3vw, 44px);
  display: grid;
  place-items: center;
  overflow-x: hidden;
  color: #2f291f;
  background:
    radial-gradient(circle at 20% 10%, rgba(214, 184, 116, 0.24), transparent 32rem),
    linear-gradient(135deg, #171b18, #25322c 48%, #111512);
}

.book-stage {
  width: min(1240px, 100%);
  perspective: 2200px;
}

.book-cover {
  position: relative;
  min-height: min(760px, calc(100vh - 60px));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f7e6ba;
  cursor: default;
  border-radius: 18px 34px 34px 18px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 9%, transparent 91%, rgba(0, 0, 0, 0.24)),
    radial-gradient(circle at 50% 34%, rgba(201, 162, 74, 0.16), transparent 18rem),
    linear-gradient(145deg, #0c352f, #174c43 56%, #09251f);
  border: 1px solid rgba(201, 162, 74, 0.64);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.48);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(.2, .72, .2, 1), opacity .7s ease;
}

.book-cover.opening {
  transform: rotateY(-104deg);
  opacity: 0;
  pointer-events: none;
}

.cover-border {
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(201, 162, 74, 0.52);
  border-radius: 12px 26px 26px 12px;
}

.cover-border::before,
.cover-border::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(239, 226, 191, 0.24);
  border-radius: inherit;
}

.cover-spine {
  position: absolute;
  inset: 0 auto 0 36px;
  width: 18px;
  border-right: 1px solid rgba(239, 226, 191, 0.18);
  border-left: 1px solid rgba(0, 0, 0, 0.34);
  background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(255, 255, 255, .06), rgba(0, 0, 0, .26));
}

.cover-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 48px;
  text-align: center;
}

.cover-emblem {
  font-size: 88px !important;
  color: #c9a24a;
}

.cover-kicker,
.cover-subtitle {
  text-transform: uppercase;
  letter-spacing: .2em;
}

.cover-kicker {
  font-size: .78rem;
}

.book-cover h1 {
  margin: 22px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.4rem, 10vw, 8rem);
  line-height: .78;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.cover-rule {
  width: 130px;
  height: 1px;
  margin: 28px auto;
  background: #c9a24a;
}

.cover-button,
.page-action,
.begin-journey-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.cover-button {
  margin-top: 26px;
  padding: 14px 22px;
  color: #17322b;
  background: linear-gradient(180deg, #f2dfac, #c9a24a);
}

.book-spread {
  display: none;
  grid-template-columns: 1fr 22px 1fr;
  min-height: min(760px, calc(100vh - 60px));
  overflow: hidden;
  border-radius: 18px;
  background: #efe0bf;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.46);
  transform-origin: center;
}

.book-spread.active {
  display: grid;
  animation: revealSpread .9s ease both;
}

.book-page {
  position: relative;
  padding: clamp(28px, 4vw, 58px);
  overflow: auto;
  background:
    repeating-linear-gradient(0deg, rgba(81, 57, 26, .022), rgba(81, 57, 26, .022) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .46), transparent 18rem),
    #f3e5c7;
}

.page-left {
  box-shadow: inset -24px 0 34px rgba(75, 48, 18, 0.12);
}

.page-right {
  box-shadow: inset 24px 0 34px rgba(75, 48, 18, 0.10);
}

.book-gutter {
  position: relative;
  background: linear-gradient(90deg, #9d825d, #d9c294 48%, #8e724d);
}

.book-gutter::after {
  content: "";
  position: absolute;
  inset: 0 9px;
  box-shadow: 0 0 18px rgba(53, 31, 9, .35);
}

.page-number {
  position: absolute;
  top: 22px;
  right: 28px;
  color: #7e6a4b;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.chapter-label {
  color: #7f6233;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.book-page h2,
.book-page h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.book-page h2 {
  margin: 10px 0 18px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: .96;
}

.drop-cap::first-letter {
  float: left;
  margin: 4px 8px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4rem;
  line-height: .7;
  color: #174c43;
}

.panorama {
  margin: 24px 0;
}

.panorama img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border: 8px solid rgba(255, 250, 242, .62);
  box-shadow: 0 14px 28px rgba(71, 48, 21, .2);
}

.panorama figcaption {
  margin-top: 7px;
  color: #78684f;
  font-size: .78rem;
  font-style: italic;
}

.opening-quote {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  color: #4d4437;
}

.opening-facts {
  grid-template-columns: 1fr 1fr;
}

.opening-facts article,
.journey-themes article,
.history-timeline article {
  padding: 14px;
  border: 1px solid rgba(112, 83, 45, .28);
  border-radius: 14px;
  background: rgba(255, 250, 242, .38);
}

.opening-facts .material-icons,
.journey-themes .material-icons {
  color: #174c43;
}

.opening-facts strong,
.opening-facts p {
  display: block;
}

.opening-facts p,
.guide-list p,
.journey-themes p,
.history-timeline p {
  margin: 5px 0 0;
  color: #655b4d;
  line-height: 1.4;
}

.guide-list,
.journey-themes,
.history-timeline {
  display: grid;
  gap: 10px;
}

.guide-list > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
}

.history-timeline article {
  position: relative;
  padding-left: 24px;
}

.history-timeline article::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9a24a;
}

.history-timeline time {
  color: #174c43;
  font-weight: 700;
}

.map-motif {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #7f6233;
}

.map-motif div {
  flex: 1;
  height: 1px;
  background: #b99a63;
}

.journey-themes article {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
}

.begin-journey-button {
  width: 100%;
  margin-top: 24px;
  padding: 15px 20px;
  color: #fffaf2;
  background: linear-gradient(135deg, #0f332e, #2f6f62);
}

.page-action {
  margin-top: 16px;
  padding: 11px 16px;
  color: #fffaf2;
  background: #174c43;
}

.text-button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  border: 0;
  color: #6b5b43;
  background: transparent;
  cursor: pointer;
}

@keyframes revealSpread {
  from { opacity: 0; transform: rotateY(8deg) scale(.98); }
  to { opacity: 1; transform: rotateY(0) scale(1); }
}

@media (max-width: 860px) {
  .opening-page {
    padding: 10px;
  }

  .book-cover,
  .book-spread {
    min-height: auto;
  }

  .book-spread,
  .book-spread.active {
    grid-template-columns: 1fr;
  }

  .book-gutter {
    display: none;
  }

  .book-page {
    overflow: visible;
  }

  .page-left,
  .page-right {
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  .cover-content {
    padding: 32px 20px;
  }

  .opening-facts {
    grid-template-columns: 1fr;
  }

  .panorama img {
    height: 170px;
  }
}
