:root {
  --orange: #f59e0b;
  --deep-orange: #c2410c;
  --yellow: #fde68a;
  --cream: #fff7ed;
  --rose: #fb7185;
  --ink: #251a17;
  --muted: #7c6258;
  --glass: rgba(255,255,255,.62);
  --border: rgba(255,255,255,.7);
  --shadow: 0 24px 80px rgba(92, 48, 20, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(253, 230, 138, .85), transparent 28%),
    radial-gradient(circle at 85% 35%, rgba(251, 113, 133, .35), transparent 25%),
    linear-gradient(145deg, #fff7ed 0%, #ffedd5 45%, #fef3c7 100%);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1;
  margin-top: 0;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1rem; }
h3 { font-size: 2rem; margin-bottom: .6rem; }
p { line-height: 1.75; }
button { font: inherit; }

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  text-align: center;
  background: #fff7ed;
  transition: opacity .7s, visibility .7s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-heart {
  font-size: 4rem;
  color: var(--rose);
  animation: beat 1s infinite;
}
@keyframes beat { 50% { transform: scale(1.25); } }

#rainCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .25;
}

#cursorGlow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(253,230,138,.35), transparent 68%);
  transform: translate(-50%, -50%);
}

.section {
  min-height: 100vh;
  padding: 7rem min(7vw, 90px);
  position: relative;
  display: grid;
  align-items: center;
}

.hero {
  text-align: center;
  overflow: hidden;
}
.hero-content {
  max-width: 1000px;
  margin: auto;
  position: relative;
  z-index: 2;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--deep-orange);
}
.intro {
  max-width: 650px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  animation: float 2s infinite;
}
@keyframes float { 50% { transform: translate(-50%, -8px); } }

.cloud {
  position: absolute;
  width: 320px;
  height: 110px;
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  filter: blur(1px);
  animation: drift 18s linear infinite alternate;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { width: 130px; height: 130px; left: 55px; top: -55px; }
.cloud::after { width: 170px; height: 170px; right: 45px; top: -75px; }
.cloud-one { top: 13%; left: -8%; }
.cloud-two { bottom: 14%; right: -10%; animation-duration: 24s; }
@keyframes drift { to { transform: translateX(120px); } }

.primary-btn, .secondary-btn, .floating-btn, .gallery-arrow {
  border: 0;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--deep-orange));
  padding: 1rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(194,65,12,.25);
  font-weight: 700;
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(194,65,12,.32); }
.secondary-btn {
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
}

.floating-btn {
  position: fixed;
  right: 1.2rem;
  top: 1.2rem;
  z-index: 30;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  background: var(--deep-orange);
  box-shadow: var(--shadow);
}

.glass-card, .letter {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 32px;
  padding: clamp(1.5rem, 4vw, 4rem);
}
.centered { text-align: center; max-width: 800px; margin: auto; }
.mini-heart { font-size: 3rem; color: var(--rose); }
.button-zone {
  height: 140px;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}
#noButton { position: relative; }
.hidden-message {
  opacity: 0;
  transform: translateY(8px);
  transition: .45s;
  color: var(--deep-orange);
  font-weight: 700;
}
.hidden-message.show { opacity: 1; transform: none; }

.section-heading {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}
.section-heading > p:last-child { color: var(--muted); }

.memory-grid, .adore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  width: 100%;
}
.memory-card, .adore-card {
  min-height: 180px;
  border-radius: 25px;
  padding: 1.4rem;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 15px 45px rgba(95,55,25,.1);
  transition: .35s;
}
.memory-card {
  cursor: pointer;
  display: grid;
  place-content: center;
  text-align: center;
  transform-style: preserve-3d;
}
.memory-card:hover, .memory-card.flipped {
  transform: translateY(-8px) rotate(-1deg);
  background: rgba(255,255,255,.9);
}
.memory-card .icon { font-size: 2.2rem; }
.memory-card .detail { display: none; color: var(--deep-orange); font-weight: 600; }
.memory-card.flipped .short { display: none; }
.memory-card.flipped .detail { display: block; }
.adore-card h3 { font-size: 1.7rem; }

.gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.photo-frame {
  width: min(760px, 76vw);
  text-align: center;
  background: rgba(255,255,255,.65);
  border-radius: 30px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.photo-frame img {
  width: 100%;
  height: min(62vh, 620px);
  object-fit: cover;
  border-radius: 22px;
  display: block;
}
.photo-placeholder {
  min-height: 420px;
  display: none;
  place-content: center;
  border: 2px dashed rgba(194,65,12,.35);
  border-radius: 22px;
  color: var(--muted);
}
.gallery-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 2rem;
  background: rgba(255,255,255,.8);
  color: var(--deep-orange);
}

.quiz-card { max-width: 850px; margin: auto; width: 100%; }
.quiz-question { margin-bottom: 2rem; }
.quiz-options { display: grid; gap: .75rem; }
.quiz-option {
  text-align: left;
  padding: 1rem;
  border: 1px solid rgba(194,65,12,.16);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  cursor: pointer;
}
.quiz-option.correct { background: #dcfce7; }
.quiz-option.wrong { background: #ffe4e6; }
#quizResult { font-weight: 700; color: var(--deep-orange); }

.timeline {
  max-width: 900px;
  margin: auto;
  border-left: 2px solid rgba(194,65,12,.28);
  padding-left: 2rem;
}
.timeline article {
  position: relative;
  margin-bottom: 2.5rem;
  background: rgba(255,255,255,.55);
  border-radius: 22px;
  padding: 1.5rem;
}
.timeline article::before {
  content: "♥";
  position: absolute;
  left: -2.75rem;
  top: 1rem;
  color: var(--rose);
  background: var(--cream);
  padding: .2rem;
}
.timeline time { color: var(--deep-orange); font-weight: 700; }

.counter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.counter div {
  padding: 1.2rem .5rem;
  border-radius: 22px;
  background: rgba(255,255,255,.7);
}
.counter strong { display: block; font-size: clamp(2rem, 5vw, 4rem); font-family: "Cormorant Garamond"; }
.counter span { color: var(--muted); }

.todo-list {
  max-width: 780px;
  margin: auto;
  display: grid;
  gap: .8rem;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(255,255,255,.65);
  cursor: pointer;
  user-select: none;
}
.todo-item.done { opacity: .65; text-decoration: line-through; }
.todo-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  display: grid;
  place-content: center;
  color: white;
}
.todo-item.done .todo-check { background: var(--orange); }

.letter { max-width: 850px; margin: auto; }
.signature {
  margin-top: 2rem;
  font-family: "Cormorant Garamond";
  font-size: 2rem;
  color: var(--deep-orange);
}
.signature span { font-size: 1.3rem; }

.final-section {
  background: radial-gradient(circle at center, #4a1d0f, #160c09 70%);
  color: white;
  text-align: center;
  overflow: hidden;
}
.final-content { margin: auto; position: relative; z-index: 2; }
.final-content > p:first-child { font-size: 2rem; letter-spacing: .3em; }
.nickname { font-family: "Cormorant Garamond"; font-size: clamp(4rem, 12vw, 9rem); margin: 0; color: var(--yellow); }
.infinity { font-size: 6rem; color: var(--rose); }
#stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
}
@keyframes twinkle { to { opacity: .2; transform: scale(.4); } }

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity .9s, transform .9s;
}
.reveal.visible { opacity: 1; transform: none; }

.confetti {
  position: fixed;
  top: -20px;
  z-index: 100;
  pointer-events: none;
  animation: fall 3s linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .5; }
}

@media (max-width: 700px) {
  .section { padding: 5rem 1.2rem; }
  .counter { grid-template-columns: repeat(2, 1fr); }
  .gallery { gap: .3rem; }
  .gallery-arrow { width: 42px; height: 42px; }
  .photo-frame { width: 78vw; }
  #cursorGlow { display: none; }
}
/* ========================================
   CINEMATIC CHAPTERS PAGE
======================================== */

.chapters-page {
  background: #120b0a;
  color: #fff7ed;
}

.chapters-page .main-header {
  background: rgba(18, 11, 10, 0.56);
  border-color: rgba(255, 255, 255, 0.12);
}

.chapters-page .site-logo,
.chapters-page .main-nav a {
  color: rgba(255, 247, 237, 0.76);
}

.chapters-page .main-nav a:hover,
.chapters-page .main-nav a.active {
  color: #fff7ed;
}

.chapter-opening {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
}

.opening-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opening-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 7, 6, 0.28),
      rgba(10, 7, 6, 0.78)
    ),
    radial-gradient(
      circle at center,
      transparent 10%,
      rgba(10, 7, 6, 0.66) 100%
    );
}

.opening-content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  padding: 9rem 1.5rem 4rem;
}

.opening-kicker {
  margin-bottom: 1.5rem;
  color: #fde68a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.opening-content h1 {
  margin-bottom: 1.6rem;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.92;
  text-wrap: balance;
}

.opening-content h1 span {
  display: block;
  margin-top: 0.25em;
  color: #fde68a;
}

.opening-description {
  max-width: 680px;
  margin: 0 auto 2.2rem;
  color: rgba(255, 247, 237, 0.72);
  font-size: 1.08rem;
}

.opening-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff7ed;
  text-decoration: none;
  font-weight: 600;
}

.opening-scroll-link span {
  animation: openingBounce 1.8s infinite;
}

@keyframes openingBounce {
  50% {
    transform: translateY(7px);
  }
}

.cinematic-chapter {
  position: relative;
  min-height: 120vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 9rem min(8vw, 110px) 7rem;
}

.chapter-background {
  position: absolute;
  inset: 0;
}

.chapter-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-image-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(10, 7, 6, 0.9) 0%,
      rgba(10, 7, 6, 0.62) 45%,
      rgba(10, 7, 6, 0.22) 100%
    ),
    linear-gradient(
      to top,
      rgba(10, 7, 6, 0.92),
      transparent 55%
    );
}

.chapter-scene-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
}

.chapter-index {
  margin-bottom: 1rem;
  color: #fde68a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.chapter-scene-content h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(3.3rem, 7vw, 6.8rem);
  line-height: 0.95;
}

.chapter-introduction {
  max-width: 620px;
  margin-bottom: 2rem;
  color: rgba(255, 247, 237, 0.75);
  font-size: 1.15rem;
}

.chapter-story-card {
  max-width: 680px;
  padding: 2rem;
  background: rgba(18, 11, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chapter-story-card p {
  color: rgba(255, 247, 237, 0.78);
}

.chapter-story-card blockquote {
  margin: 1.6rem 0 0;
  padding-left: 1.3rem;
  color: #fde68a;
  border-left: 2px solid #f59e0b;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.25;
}

.chapter-location {
  margin-top: 1.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.chapter-location span {
  font-size: 1.3rem;
}

.chapter-location strong,
.chapter-location small {
  display: block;
}

.chapter-location small {
  color: rgba(255, 247, 237, 0.55);
}

@media (max-width: 700px) {
  .chapter-opening {
    min-height: 100svh;
  }

  .opening-content {
    padding-top: 8rem;
  }

  .cinematic-chapter {
    min-height: 110vh;
    padding: 8rem 1.2rem 4rem;
  }

  .chapter-image-overlay {
    background:
      linear-gradient(
        to top,
        rgba(10, 7, 6, 0.96) 5%,
        rgba(10, 7, 6, 0.72) 62%,
        rgba(10, 7, 6, 0.25) 100%
      );
  }

  .chapter-story-card {
    padding: 1.4rem;
  }
}
/* ========================================
   CHAPTER ONE — STRANGERS IN FAMILIAR PLACES
======================================== */

.story-chapter {
  position: relative;
  background: #0d0908;
  color: #fff7ed;
}

/* ----------------------------------------
   BOOK OPENING
----------------------------------------- */

.chapter-book-opening {
  position: relative;
  min-height: 100vh;
  padding: 8rem 1.5rem 5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at center,
      rgba(177, 119, 64, 0.2),
      transparent 42%
    ),
    linear-gradient(
      135deg,
      #140d0a,
      #080605
    );
}

.chapter-book-opening::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.05) 4px
    );
}

.book-page {
  position: absolute;
  top: 12%;
  bottom: 9%;
  width: min(43vw, 580px);
  background:
    linear-gradient(
      90deg,
      rgba(255, 247, 225, 0.98),
      rgba(235, 216, 180, 0.94)
    );
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.5),
    inset 0 0 70px rgba(90, 55, 25, 0.12);
}

.book-page-left {
  right: 50%;
  border-radius: 12px 2px 2px 12px;
  transform: perspective(1200px) rotateY(4deg);
}

.book-page-right {
  left: 50%;
  border-radius: 2px 12px 12px 2px;
  transform: perspective(1200px) rotateY(-4deg);
}

.book-page-left::after,
.book-page-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45px;
}

.book-page-left::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(45, 26, 16, 0.18),
    transparent
  );
}

.book-page-right::after {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(45, 26, 16, 0.18),
    transparent
  );
}

.book-opening-content {
  position: relative;
  z-index: 2;
  width: min(720px, 88%);
  padding: 4rem 2rem;
  color: #332118;
  text-align: center;
}

.book-volume {
  margin-bottom: 2rem;
  color: #8b5e3c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.book-ornament {
  margin-bottom: 1.5rem;
  color: #b77940;
  font-size: 1.3rem;
}

.book-chapter-number {
  margin-bottom: 0.7rem;
  color: #9a6742;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.book-opening-content h2 {
  max-width: 650px;
  margin: 0 auto 1rem;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.9;
}

.book-subtitle {
  color: #76523c;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-style: italic;
}

.book-line {
  width: 90px;
  height: 1px;
  margin: 2rem auto;
  background: #b77940;
}

.book-introduction {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  color: #684939;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.45;
}

.chapter-enter-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.45rem;
  color: #fff7ed;
  background: #4b2d20;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 14px 35px rgba(54, 31, 20, 0.24);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.chapter-enter-button:hover {
  transform: translateY(-4px);
  background: #70442f;
}

.chapter-enter-button span {
  animation: chapterArrowBounce 1.8s infinite;
}

@keyframes chapterArrowBounce {
  50% {
    transform: translateY(5px);
  }
}

/* ----------------------------------------
   LOCATION SCENES
----------------------------------------- */

.chapter-location-scene {
  position: relative;
  min-height: 120vh;
  padding: 9rem min(8vw, 110px) 7rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.scene-media {
  position: absolute;
  inset: 0;
}

.scene-media img,
.scene-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-media img {
  position: absolute;
  inset: 0;
}

.scene-video {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to right,
      rgba(9, 6, 5, 0.93) 0%,
      rgba(9, 6, 5, 0.62) 48%,
      rgba(9, 6, 5, 0.16) 100%
    ),
    linear-gradient(
      to top,
      rgba(9, 6, 5, 0.9),
      transparent 55%
    );
}

.scene-number {
  position: absolute;
  top: 8rem;
  right: min(7vw, 100px);
  z-index: 3;
}

.scene-number span {
  color: rgba(255, 247, 237, 0.18);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(7rem, 18vw, 16rem);
  font-weight: 700;
  line-height: 1;
}

.scene-content {
  position: relative;
  z-index: 4;
  width: min(690px, 100%);
}

.scene-content-right {
  margin-left: auto;
}

.scene-label {
  margin-bottom: 1rem;
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scene-content h3 {
  margin-bottom: 1.2rem;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.86;
}

.scene-location {
  margin-bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 247, 237, 0.68);
}

.scene-location p {
  margin: 0;
}

.scene-main-text {
  max-width: 600px;
  margin-bottom: 1.2rem;
  color: #fff7ed;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.25;
}

.scene-secondary-text {
  max-width: 590px;
  color: rgba(255, 247, 237, 0.7);
  font-size: 1.03rem;
}

.cinematic-quote {
  max-width: 580px;
  margin: 2rem 0 0;
  padding: 1.3rem 0 1.3rem 1.5rem;
  color: #fde68a;
  border-left: 2px solid #f59e0b;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  line-height: 1.35;
}

.scene-scroll-message {
  position: absolute;
  z-index: 4;
  right: min(7vw, 100px);
  bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 247, 237, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scene-scroll-arrow {
  animation: chapterArrowBounce 1.8s infinite;
}

/* ----------------------------------------
   TRANSITION
----------------------------------------- */

.chapter-transition {
  min-height: 55vh;
  padding: 7rem 1.5rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2rem;
  text-align: center;
  background:
    radial-gradient(
      circle at center,
      rgba(245, 158, 11, 0.1),
      transparent 44%
    ),
    #0d0908;
}

.chapter-transition p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 247, 237, 0.78);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.15;
}

.transition-line {
  width: 1px;
  height: 80px;
  background: linear-gradient(
    transparent,
    #f59e0b,
    transparent
  );
}

/* ----------------------------------------
   LEADERSHIP SCENE
----------------------------------------- */

.university-overlay {
  background:
    linear-gradient(
      to left,
      rgba(9, 6, 5, 0.95) 0%,
      rgba(9, 6, 5, 0.64) 48%,
      rgba(9, 6, 5, 0.2) 100%
    ),
    linear-gradient(
      to top,
      rgba(9, 6, 5, 0.92),
      transparent 58%
    );
}

.notebook-note {
  position: relative;
  max-width: 500px;
  margin-top: 2rem;
  padding: 2rem 2rem 2rem 2.8rem;
  color: #412a1f;
  background:
    repeating-linear-gradient(
      to bottom,
      #f8edcf,
      #f8edcf 31px,
      #c8d5db 32px
    );
  border-radius: 4px 18px 18px 4px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.5deg);
}

.notebook-note::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: rgba(205, 67, 67, 0.42);
}

.notebook-note p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.15;
}

.note-pin {
  position: absolute;
  top: -15px;
  right: 28px;
  color: #b77940;
  font-size: 1.8rem;
}

/* ----------------------------------------
   BEFORE WE KNEW EACH OTHER
----------------------------------------- */

.before-we-knew-scene {
  position: relative;
  min-height: 100vh;
  padding: 8rem 1.5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(
      circle at 30% 40%,
      rgba(245, 158, 11, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at 75% 65%,
      rgba(251, 113, 133, 0.1),
      transparent 25%
    ),
    #0d0908;
}

.before-we-knew-content {
  position: relative;
  z-index: 3;
  max-width: 930px;
}

.before-we-knew-content h3 {
  margin-bottom: 2rem;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: 0.98;
}

.before-we-knew-content > p:last-child {
  max-width: 650px;
  margin: auto;
  color: rgba(255, 247, 237, 0.64);
  font-size: 1.08rem;
}

.floating-memory {
  position: absolute;
  z-index: 1;
  padding: 1rem 1.4rem;
  color: rgba(255, 247, 237, 0.23);
  border: 1px solid rgba(255, 247, 237, 0.08);
  border-radius: 999px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.3rem, 4vw, 3.2rem);
  backdrop-filter: blur(10px);
  animation: floatingMemory 8s ease-in-out infinite;
}

.memory-one {
  top: 18%;
  left: 7%;
}

.memory-two {
  top: 20%;
  right: 8%;
  animation-delay: -2.5s;
}

.memory-three {
  right: 18%;
  bottom: 14%;
  animation-delay: -5s;
}

@keyframes floatingMemory {
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* ----------------------------------------
   CHAPTER ENDING
----------------------------------------- */

.chapter-ending {
  min-height: 100vh;
  padding: 8rem 1.5rem;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(
      rgba(9, 6, 5, 0.84),
      rgba(9, 6, 5, 0.96)
    ),
    url("../assets/images/coffee-transition.jpg") center / cover;
}

.chapter-ending-content {
  max-width: 850px;
}

.chapter-ending-number,
.chapter-ending-preview {
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.chapter-ending blockquote {
  margin: 2rem auto 5rem;
  color: #fff7ed;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1;
}

.chapter-ending h3 {
  margin: 1rem 0;
  color: #fde68a;
  font-size: clamp(3rem, 7vw, 6rem);
}

.chapter-ending-content > p:not(
  .chapter-ending-number,
  .chapter-ending-preview
) {
  max-width: 600px;
  margin: 0 auto 2.2rem;
  color: rgba(255, 247, 237, 0.65);
}

.next-chapter-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  color: #20120c;
  background: #fde68a;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.next-chapter-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.24);
}

/* ----------------------------------------
   MOBILE
----------------------------------------- */

@media (max-width: 760px) {
  .book-page {
    top: 10%;
    bottom: 7%;
    width: 46%;
  }

  .book-opening-content {
    width: 95%;
    padding: 3rem 0.8rem;
  }

  .book-opening-content h2 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .chapter-location-scene {
    min-height: 110vh;
    padding:
      8rem
      1.2rem
      4rem;
  }

  .scene-overlay,
  .university-overlay {
    background:
      linear-gradient(
        to top,
        rgba(9, 6, 5, 0.97) 5%,
        rgba(9, 6, 5, 0.75) 68%,
        rgba(9, 6, 5, 0.26) 100%
      );
  }

  .scene-content-right {
    margin-left: 0;
  }

  .scene-number {
    top: 6rem;
    right: 1.2rem;
  }

  .scene-scroll-message {
    display: none;
  }

  .notebook-note {
    padding: 1.5rem 1.4rem 1.5rem 2.5rem;
  }

  .floating-memory {
    opacity: 0.6;
  }

  .memory-one {
    top: 13%;
    left: -4%;
  }

  .memory-two {
    top: 24%;
    right: -8%;
  }

  .memory-three {
    right: 5%;
    bottom: 10%;
  }
}

/* =========================================================
   FINAL CHAPTERS PAGE FIXES
   Matches the latest chapters.html
========================================================= */

.chapters-page{margin:0;min-height:100%;overflow-x:hidden;background:#0d0908;color:#fff7ed}
.chapters-page main{width:100%;overflow:hidden}

/* Header */
.chapters-page .main-header{
  position:fixed;top:0;left:0;right:0;z-index:9999;
  min-height:72px;padding:0 2rem;
  display:flex;align-items:center;justify-content:space-between;gap:2rem;
  background:rgba(10,7,6,.88);border-bottom:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)
}
.chapters-page .site-logo{
  display:inline-flex;align-items:center;gap:.55rem;flex-shrink:0;
  color:#fff7ed;font-family:"Cormorant Garamond",Georgia,serif;
  font-size:1.35rem;font-weight:700;text-decoration:none;white-space:nowrap
}
.chapters-page .logo-heart{color:#fb7185}
.chapters-page .main-nav{
  display:flex;align-items:center;justify-content:flex-end;gap:1.25rem;
  overflow-x:auto;scrollbar-width:none
}
.chapters-page .main-nav::-webkit-scrollbar{display:none}
.chapters-page .main-nav a{
  position:relative;flex-shrink:0;padding:1.7rem 0;
  color:rgba(255,247,237,.68);font-size:.78rem;font-weight:600;
  text-decoration:none;white-space:nowrap;transition:color .25s ease
}
.chapters-page .main-nav a:hover,.chapters-page .main-nav a.active{color:#fde68a}
.chapters-page .main-nav a::after{
  content:"";position:absolute;left:0;bottom:1.15rem;width:100%;height:1px;
  background:#fde68a;transform:scaleX(0);transform-origin:right;
  transition:transform .25s ease
}
.chapters-page .main-nav a:hover::after,.chapters-page .main-nav a.active::after{
  transform:scaleX(1);transform-origin:left
}

/* Story */
.story-chapter{position:relative;background:#0d0908;color:#fff7ed}

/* Book opening */
.chapter-book-opening{
  position:relative;min-height:100vh;padding:8.5rem 1.5rem 4rem;
  display:grid;place-items:center;overflow:hidden;
  background:radial-gradient(circle at 50% 45%,rgba(177,119,64,.2),transparent 42%),
             linear-gradient(135deg,#140d0a,#080605)
}
.chapter-book-opening::before{
  content:"";position:absolute;inset:0;z-index:0;opacity:.12;pointer-events:none;
  background-image:repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(255,255,255,.05) 4px)
}
.book-page{
  position:absolute;top:16%;bottom:7%;width:min(43vw,580px);
  background:linear-gradient(90deg,rgba(255,247,225,.99),rgba(235,216,180,.96));
  box-shadow:0 35px 100px rgba(0,0,0,.5),inset 0 0 70px rgba(90,55,25,.12)
}
.book-page-left{right:50%;border-radius:12px 2px 2px 12px;transform:perspective(1200px) rotateY(4deg)}
.book-page-right{left:50%;border-radius:2px 12px 12px 2px;transform:perspective(1200px) rotateY(-4deg)}
.book-page-left::after,.book-page-right::after{content:"";position:absolute;top:0;bottom:0;width:46px}
.book-page-left::after{right:0;background:linear-gradient(to left,rgba(45,26,16,.2),transparent)}
.book-page-right::after{left:0;background:linear-gradient(to right,rgba(45,26,16,.2),transparent)}
.book-opening-content{
  position:relative;z-index:2;width:min(650px,88%);padding:3rem 2rem;color:#332118;text-align:center
}
.book-volume{margin:0 0 1.7rem;color:#8b5e3c;font-size:.72rem;font-weight:700;letter-spacing:.3em;text-transform:uppercase}
.book-ornament{margin-bottom:1.25rem;color:#b77940;font-size:1.25rem}
.book-chapter-number{margin:0 0 .8rem;color:#9a6742;font-size:.74rem;font-weight:700;letter-spacing:.36em;text-transform:uppercase}
.book-opening-content h1{
  max-width:580px;margin:0 auto 1rem;color:#332118;
  font-size:clamp(3rem,6vw,5.8rem);line-height:.91;text-wrap:balance
}
.book-subtitle{margin:0;color:#76523c;font-family:"Cormorant Garamond",Georgia,serif;font-size:1.48rem;font-style:italic}
.book-line{width:90px;height:1px;margin:1.8rem auto;background:#b77940}
.book-introduction{
  max-width:430px;margin:0 auto 2.2rem;color:#684939;
  font-family:"Cormorant Garamond",Georgia,serif;font-size:1.48rem;line-height:1.4
}
.chapter-enter-button{
  display:inline-flex;align-items:center;gap:.8rem;padding:.95rem 1.45rem;
  color:#fff7ed;background:#4b2d20;border-radius:999px;text-decoration:none;
  font-size:.88rem;font-weight:700;box-shadow:0 14px 35px rgba(54,31,20,.24);
  transition:transform .3s ease,background .3s ease,box-shadow .3s ease
}
.chapter-enter-button:hover{transform:translateY(-4px);background:#70442f;box-shadow:0 18px 45px rgba(54,31,20,.3)}
.chapter-enter-button span{animation:chapterArrowBounce 1.8s infinite}
@keyframes chapterArrowBounce{50%{transform:translateY(5px)}}

/* Location scenes */
.chapter-location-scene{
  position:relative;min-height:110vh;padding:9rem min(8vw,110px) 6rem;
  display:flex;align-items:flex-end;overflow:hidden;isolation:isolate
}
.scene-media{position:absolute;inset:0;z-index:-2;overflow:hidden;background:#15100e}
.scene-media img{width:100%;height:100%;display:block;object-fit:cover;object-position:center;transform:scale(1.02)}
.scene-overlay{
  position:absolute;inset:0;z-index:1;
  background:linear-gradient(to right,rgba(9,6,5,.94) 0%,rgba(9,6,5,.72) 42%,rgba(9,6,5,.26) 75%,rgba(9,6,5,.16) 100%),
             linear-gradient(to top,rgba(9,6,5,.96) 0%,rgba(9,6,5,.44) 45%,rgba(9,6,5,.12) 100%)
}
.university-overlay{
  background:linear-gradient(to left,rgba(9,6,5,.96) 0%,rgba(9,6,5,.74) 43%,rgba(9,6,5,.28) 78%,rgba(9,6,5,.15) 100%),
             linear-gradient(to top,rgba(9,6,5,.96) 0%,rgba(9,6,5,.45) 48%,rgba(9,6,5,.12) 100%)
}
.scene-number{position:absolute;top:8rem;right:min(7vw,100px);z-index:2;pointer-events:none}
.scene-number span{color:rgba(255,247,237,.17);font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(7rem,18vw,16rem);font-weight:700;line-height:1}
.scene-content{
  position:relative;z-index:3;width:min(690px,100%);padding:clamp(1.5rem,3vw,2.3rem);
  background:rgba(8,5,4,.56);border:1px solid rgba(255,255,255,.1);border-radius:28px;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 25px 80px rgba(0,0,0,.38)
}
.scene-content-right{margin-left:auto}
.scene-label{margin:0 0 1rem;color:#fde68a;font-size:.72rem;font-weight:700;letter-spacing:.28em;text-transform:uppercase}
.scene-content h2{margin:0 0 1.1rem;color:#fff7ed;font-size:clamp(3.3rem,8vw,7.4rem);line-height:.88;text-wrap:balance}
.scene-location{margin-bottom:1.9rem;display:flex;align-items:center;gap:.65rem;color:rgba(255,247,237,.68)}
.scene-location p{margin:0}
.scene-main-text{
  max-width:600px;margin:0 0 1.15rem;color:#fff7ed;
  font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(1.65rem,3vw,2.35rem);line-height:1.25
}
.scene-secondary-text{max-width:590px;margin:0 0 1rem;color:rgba(255,247,237,.76);font-size:1.03rem}
.cinematic-quote{
  max-width:580px;margin:1.8rem 0 0;padding:1.1rem 0 1.1rem 1.4rem;
  color:#fde68a;border-left:2px solid #f59e0b;
  font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(1.45rem,3vw,2.1rem);font-style:italic;line-height:1.35
}
.scene-scroll-message{
  position:absolute;right:min(7vw,100px);bottom:2.5rem;z-index:3;
  display:flex;align-items:center;gap:.7rem;color:rgba(255,247,237,.6);
  font-size:.74rem;letter-spacing:.2em;text-transform:uppercase
}
.scene-scroll-arrow{animation:chapterArrowBounce 1.8s infinite}

/* Transition */
.chapter-transition{
  min-height:50vh;padding:6rem 1.5rem;display:grid;place-items:center;align-content:center;gap:1.8rem;
  text-align:center;background:radial-gradient(circle at center,rgba(245,158,11,.11),transparent 42%),#0d0908
}
.chapter-transition p{
  max-width:760px;margin:0;color:rgba(255,247,237,.82);
  font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(2rem,4.5vw,3.8rem);line-height:1.15;text-wrap:balance
}
.transition-line{width:1px;height:72px;background:linear-gradient(transparent,rgba(245,158,11,.9),transparent)}

/* Notebook */
.notebook-note{
  position:relative;max-width:500px;margin-top:1.8rem;padding:2rem 2rem 2rem 2.8rem;color:#412a1f;
  background:repeating-linear-gradient(to bottom,#f8edcf,#f8edcf 31px,#c8d5db 32px);
  border-radius:4px 18px 18px 4px;box-shadow:0 25px 60px rgba(0,0,0,.35);transform:rotate(-1.2deg)
}
.notebook-note::before{content:"";position:absolute;top:0;bottom:0;left:24px;width:2px;background:rgba(205,67,67,.42)}
.notebook-note p{margin:0;font-family:"Cormorant Garamond",Georgia,serif;font-size:1.65rem;line-height:1.16}
.note-pin{position:absolute;top:-15px;right:28px;color:#b77940;font-size:1.8rem}

/* Before we knew each other */
.before-we-knew-scene{
  position:relative;min-height:100vh;padding:8rem 1.5rem;display:grid;place-items:center;
  overflow:hidden;text-align:center;
  background:radial-gradient(circle at 28% 38%,rgba(245,158,11,.12),transparent 28%),
             radial-gradient(circle at 73% 68%,rgba(251,113,133,.1),transparent 25%),#0d0908
}
.before-we-knew-content{position:relative;z-index:2;width:min(940px,100%)}
.before-we-knew-content h2{
  max-width:860px;margin:0 auto 1.7rem;color:#fff7ed;
  font-size:clamp(3rem,7vw,6.5rem);line-height:.97;text-wrap:balance
}
.before-we-knew-content>p:not(.scene-label){max-width:650px;margin:.45rem auto;color:rgba(255,247,237,.67);font-size:1.07rem}
.crossing-paths{
  width:min(850px,100%);margin:4rem auto 0;
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:2rem
}
.path-card{
  min-height:190px;padding:2rem;display:flex;flex-direction:column;justify-content:center;
  background:rgba(255,247,237,.06);border:1px solid rgba(255,247,237,.12);border-radius:24px;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 22px 60px rgba(0,0,0,.22)
}
.path-card>span{margin-bottom:1rem;color:#fde68a;font-size:.75rem;font-weight:700;letter-spacing:.25em}
.path-card strong{color:#fff7ed;font-family:"Cormorant Garamond",Georgia,serif;font-size:2.3rem;line-height:1}
.path-card small{margin-top:.65rem;color:rgba(255,247,237,.55)}
.path-connection{color:#fb7185;font-size:2rem}

/* Chapter ending */
.chapter-ending{
  position:relative;min-height:100vh;padding:8rem 1.5rem;display:grid;place-items:center;
  overflow:hidden;text-align:center;
  background:linear-gradient(rgba(9,6,5,.8),rgba(9,6,5,.96)),
             url("../assets/images/coffee-transition.jpg") center/cover no-repeat,#0d0908
}
.chapter-ending::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at center,rgba(245,158,11,.12),transparent 42%);pointer-events:none}
.chapter-ending-content{position:relative;z-index:2;max-width:850px}
.chapter-ending-number,.chapter-ending-preview{margin:0;color:#fde68a;font-size:.72rem;font-weight:700;letter-spacing:.31em;text-transform:uppercase}
.chapter-ending blockquote{
  margin:2rem auto 4.5rem;color:#fff7ed;font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(2.7rem,7vw,6.2rem);line-height:1;text-wrap:balance
}
.chapter-ending h2{margin:1rem 0;color:#fde68a;font-size:clamp(3rem,7vw,6rem);line-height:.95;text-wrap:balance}
.chapter-ending-content>p:not(.chapter-ending-number,.chapter-ending-preview){max-width:600px;margin:0 auto 2.2rem;color:rgba(255,247,237,.68)}
.next-chapter-button{
  display:inline-flex;align-items:center;gap:.8rem;padding:1rem 1.5rem;color:#20120c;background:#fde68a;
  border-radius:999px;text-decoration:none;font-weight:700;transition:transform .3s ease,box-shadow .3s ease
}
.next-chapter-button:hover{transform:translateY(-4px);box-shadow:0 18px 45px rgba(245,158,11,.24)}

/* Keep chapter content visible even if an old reveal class remains */
.chapters-page .story-chapter .reveal{opacity:1;transform:none}

/* Responsive */
@media(max-width:1100px){
  .chapters-page .main-header{align-items:flex-start;flex-direction:column;gap:.3rem;min-height:auto;padding:.75rem 1rem}
  .chapters-page .main-nav{width:100%;justify-content:flex-start;gap:1.15rem}
  .chapters-page .main-nav a{padding:.55rem 0 .75rem;font-size:.73rem}
  .chapters-page .main-nav a::after{bottom:.3rem}
  .chapter-book-opening{padding-top:10rem}
}
@media(max-width:760px){
  .chapter-book-opening{min-height:100svh;padding:9.5rem .8rem 3rem}
  .book-page{top:17%;bottom:7%;width:46%}
  .book-opening-content{width:96%;padding:2.7rem .6rem}
  .book-opening-content h1{font-size:clamp(2.6rem,13vw,4.6rem)}
  .book-subtitle{font-size:1.25rem}
  .book-introduction{max-width:340px;font-size:1.22rem}
  .chapter-location-scene{min-height:105svh;padding:8.5rem 1rem 3.5rem}
  .scene-overlay,.university-overlay{
    background:linear-gradient(to top,rgba(9,6,5,.98) 4%,rgba(9,6,5,.78) 65%,rgba(9,6,5,.28) 100%)
  }
  .scene-number{top:7.5rem;right:1rem}
  .scene-content,.scene-content-right{width:100%;margin-left:0;padding:1.35rem}
  .scene-content h2{font-size:clamp(3rem,15vw,5.2rem)}
  .scene-scroll-message{display:none}
  .notebook-note{padding:1.5rem 1.3rem 1.5rem 2.5rem}
  .crossing-paths{grid-template-columns:1fr;gap:1.25rem}
  .path-connection{transform:rotate(90deg)}
  .chapter-ending{padding:7rem 1rem}
}

/* =========================================================
   OUR CHAPTERS — REALISTIC FLIP BOOK
========================================================= */

.chapters-book-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  color: var(--ink);

  background:
    radial-gradient(
      circle at 12% 12%,
      rgba(253, 230, 138, 0.8),
      transparent 28%
    ),
    radial-gradient(
      circle at 86% 35%,
      rgba(251, 113, 133, 0.27),
      transparent 25%
    ),
    linear-gradient(
      145deg,
      #fff7ed 0%,
      #ffedd5 48%,
      #fef3c7 100%
    );
}

.chapters-book-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  opacity: 0.2;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(111, 74, 46, 0.04) 5px
    );
}

/* ---------- Header ---------- */

.book-main-header {
  position: relative;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  width: calc(100% - 2rem);
  max-width: 1450px;
  min-height: 72px;
  margin: 1rem auto 0;
  padding: 0 1.6rem;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow: 0 18px 55px rgba(92, 48, 20, 0.11);
}

.book-main-header .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;

  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.book-main-header .logo-heart {
  color: var(--rose);
}

.book-main-header .main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;

  overflow-x: auto;
  scrollbar-width: none;
}

.book-main-header .main-nav::-webkit-scrollbar {
  display: none;
}

.book-main-header .main-nav a {
  position: relative;
  flex-shrink: 0;

  padding: 1.7rem 0;

  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.book-main-header .main-nav a:hover,
.book-main-header .main-nav a.active {
  color: var(--deep-orange);
}

.book-main-header .main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1.15rem;

  width: 100%;
  height: 2px;

  background: linear-gradient(
    to right,
    var(--orange),
    var(--rose)
  );

  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 0.25s ease;
}

.book-main-header .main-nav a:hover::after,
.book-main-header .main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Main section ---------- */

.chapters-book-main {
  min-height: 100vh;
  padding: 5rem 1.5rem 6rem;
}

.book-page-heading {
  max-width: 820px;
  margin: 0 auto 3rem;
  text-align: center;
}

.book-page-heading .eyebrow {
  margin-bottom: 1rem;
}

.book-page-heading h1 {
  margin: 0 0 1.2rem;

  color: var(--ink);
  font-size: clamp(3.8rem, 9vw, 7rem);
  line-height: 0.88;
}

.book-heading-description {
  max-width: 620px;
  margin: auto;

  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Book environment ---------- */

.flipbook-section {
  position: relative;
  width: min(1200px, 100%);
  margin: auto;
  padding: 3rem 1rem 2rem;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 42px;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow:
    0 30px 100px rgba(92, 48, 20, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.flipbook-wrapper {
  position: relative;
  min-height: 660px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;
}

.story-flipbook {
  width: 860px;
  height: 620px;
  margin: 0 auto;
}

.story-flipbook {
  margin: auto;
}

.book-glow {
  position: absolute;
  z-index: 0;

  width: 330px;
  height: 330px;

  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.book-glow-one {
  top: 6%;
  left: -8%;

  background: radial-gradient(
    circle,
    rgba(253, 230, 138, 0.72),
    transparent 68%
  );
}

.book-glow-two {
  right: -10%;
  bottom: 5%;

  background: radial-gradient(
    circle,
    rgba(251, 113, 133, 0.35),
    transparent 68%
  );
}

.book-decoration-heart {
  position: absolute;
  z-index: 1;

  color: rgba(251, 113, 133, 0.22);
  font-family: Georgia, serif;

  pointer-events: none;

  animation: floatingBookHeart 5s ease-in-out infinite;
}

.heart-one {
  top: 10%;
  right: 8%;
  font-size: 3rem;
}

.heart-two {
  left: 8%;
  bottom: 15%;
  font-size: 2rem;
  animation-delay: -2.5s;
}

@keyframes floatingBookHeart {
  50% {
    transform: translateY(-12px) rotate(7deg);
  }
}

/* ---------- StPageFlip page container ---------- */

.stf__parent {
  margin: auto !important;
}

.stf__wrapper {
  filter: drop-shadow(0 28px 28px rgba(74, 39, 21, 0.22));
}

.book-page {
  position: relative;

  overflow: hidden;

  color: #3a271c;

  background: #fff6dc;

  box-shadow:
    inset 0 0 55px rgba(106, 67, 35, 0.1),
    0 0 1px rgba(69, 40, 22, 0.4);
}

/* ---------- Paper pages ---------- */

.paper-page {
  background:
    radial-gradient(
      circle at 20% 15%,
      rgba(255, 255, 255, 0.9),
      transparent 33%
    ),
    linear-gradient(
      135deg,
      #fffaf0,
      #f7e8c9
    );
}

.paper-texture {
  position: absolute;
  inset: 0;
  z-index: 0;

  opacity: 0.11;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(89, 57, 34, 0.16) 4px
    );
}

.page-content {
  position: relative;
  z-index: 2;

  height: 100%;
  padding: clamp(1.7rem, 4vw, 3.2rem);

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.centered-page-content {
  align-items: center;
  text-align: center;
}

.printed-page-number {
  position: absolute;
  right: 1.5rem;
  bottom: 1.2rem;
  z-index: 3;

  color: rgba(92, 65, 45, 0.46);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

/* ---------- Front and back covers ---------- */

.book-cover-page {
  color: #fff7ed;

  background:
    radial-gradient(
      circle at center,
      rgba(245, 158, 11, 0.15),
      transparent 40%
    ),
    linear-gradient(
      145deg,
      #7c2d12,
      #431407 60%,
      #251009
    );
}

.book-cover-inner {
  height: 100%;
  padding: 1.1rem;

  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018),
      rgba(255, 255, 255, 0.018) 2px,
      transparent 2px,
      transparent 6px
    );
}

.cover-border {
  height: 100%;
  padding: 2rem;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  border: 1px solid rgba(253, 230, 138, 0.45);
  border-radius: 12px;

  text-align: center;

  box-shadow:
    inset 0 0 0 6px rgba(253, 230, 138, 0.04),
    inset 0 0 55px rgba(0, 0, 0, 0.18);
}

.cover-symbol {
  margin-bottom: 1.5rem;

  color: var(--yellow);
  font-size: 1.5rem;
}

.cover-overline,
.cover-volume {
  margin: 0;

  color: rgba(255, 247, 237, 0.68);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.cover-border h2 {
  margin: 1.7rem 0;

  color: #fff7ed;
  font-size: clamp(2.9rem, 6vw, 5.1rem);
  line-height: 0.9;
}

.cover-border h2 span {
  display: block;
  margin-top: 0.35rem;

  color: var(--yellow);
}

.cover-divider {
  width: min(240px, 80%);
  margin: 0 0 1.5rem;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.cover-divider span {
  height: 1px;
  background: rgba(253, 230, 138, 0.42);
}

.cover-divider strong {
  color: var(--rose);
}

.cover-instruction {
  margin-top: 2rem;

  color: rgba(255, 247, 237, 0.52);
  font-size: 0.78rem;
}

.back-cover-content blockquote {
  max-width: 330px;
  margin: 1.4rem auto;

  color: var(--yellow);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1.15;
}

.back-cover-content p {
  color: rgba(255, 247, 237, 0.6);
}

/* ---------- General typography ---------- */

.small-page-label,
.chapter-volume {
  margin: 0 0 1rem;

  color: var(--deep-orange);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.page-ornament {
  margin-bottom: 1.2rem;

  color: var(--orange);
  font-size: 1.3rem;
}

.chapter-opening-page h2,
.future-book-page h2,
.final-message-page h2,
.love-date-page h2 {
  margin: 0 0 1rem;

  color: var(--ink);
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.9;
  text-wrap: balance;
}

.chapter-page-subtitle {
  margin: 0;

  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
}

.page-divider {
  width: 75px;
  height: 1px;
  margin: 1.8rem auto;

  background: linear-gradient(
    to right,
    transparent,
    var(--orange),
    transparent
  );
}

.chapter-opening-text {
  max-width: 360px;
  margin: 0;

  color: #674b3a;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.35;
}

.story-book-page h3,
.connection-page h3,
.distance-connection-page h3,
.phone-life-page h3 {
  margin: 0 0 1.4rem;

  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 0.94;
}

.story-book-page p,
.connection-page p,
.distance-connection-page p,
.phone-life-page p,
.future-book-page p,
.final-message-page p {
  color: #604738;
}

.story-lead {
  color: #4b3428 !important;

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
}

.page-quote {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;

  color: var(--deep-orange);
  border-left: 2px solid var(--orange);

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.35;
}

/* ---------- Photo pages ---------- */

.photo-book-page {
  position: relative;

  color: white;
  background: #1c100b;
}

.photo-book-page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1c100b;
}

.photo-book-page img {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
  object-position: center;

  z-index: 0;
}
.stf__item .photo-book-page {
  width: 100% !important;
  height: 100% !important;
}
.photo-book-page {
  position: relative;
  overflow: hidden;
  color: white;
  background: #1c100b;
}
.distance-photo-page.abood-photo img {
  object-position: center center;
}

.distance-photo-page.hind-photo img {
  object-position: center top;
}

.photo-page-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(26, 10, 5, 0.88),
      rgba(26, 10, 5, 0.12) 58%
    ),
    linear-gradient(
      to right,
      rgba(26, 10, 5, 0.14),
      transparent 50%
    );
}

.warm-photo-overlay {
  background:
    linear-gradient(
      to top,
      rgba(74, 31, 12, 0.86),
      rgba(74, 31, 12, 0.08) 60%
    );
}

.photo-page-caption {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 2rem;
  z-index: 3;
}

.photo-page-caption p {
  margin: 0;

  color: white;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
}

.photo-page-caption span {
  display: block;
  margin-top: 0.45rem;

  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

/* ---------- Dedication ---------- */

.dedication-quote {
  max-width: 360px;
  margin: 1.4rem auto;

  color: #604536;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  font-style: italic;
  line-height: 1.38;
}

.dedication-signature {
  margin-top: 2rem;

  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
}

.dedication-signature span {
  display: block;
  margin-top: 0.3rem;

  color: var(--deep-orange);
  font-size: 2rem;
}

/* ---------- Notebook ---------- */

.notebook-memory {
  margin-top: 1.7rem;
  padding: 1.4rem 1.4rem 1.4rem 2rem;

  color: #4d3629;

  background:
    repeating-linear-gradient(
      to bottom,
      #fff4d7,
      #fff4d7 29px,
      #c8d5db 30px
    );

  border-radius: 6px 18px 18px 6px;

  box-shadow: 0 15px 35px rgba(94, 55, 31, 0.14);

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  line-height: 1.25;

  transform: rotate(-1.2deg);
}

/* ---------- Paths ---------- */

.book-paths {
  width: 100%;
  margin: 2rem auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.book-path-item {
  padding: 1.2rem 0.7rem;

  display: flex;
  flex-direction: column;

  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(194, 65, 12, 0.1);
  border-radius: 18px;

  box-shadow: 0 12px 30px rgba(92, 48, 20, 0.08);
}

.book-path-item span {
  color: var(--orange);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

.book-path-item strong {
  margin-top: 0.4rem;

  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
}

.book-path-item small {
  margin-top: 0.3rem;
  color: var(--muted);
}

.book-path-heart {
  color: var(--rose);
  font-size: 1.6rem;
}

.connection-text {
  max-width: 350px;
  margin: auto;
}

/* ---------- Fanak date ---------- */

.date-memory-card {
  margin-top: 1.7rem;
  padding: 1.3rem;

  background:
    linear-gradient(
      135deg,
      rgba(253, 230, 138, 0.5),
      rgba(251, 113, 133, 0.13)
    );

  border: 1px solid rgba(194, 65, 12, 0.12);
  border-radius: 20px;
}

.date-memory-card span {
  color: var(--deep-orange);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}

.date-memory-card p {
  margin-bottom: 0;
}

/* ---------- Love date ---------- */

.large-page-heart {
  margin-bottom: 1.2rem;

  color: var(--rose);
  font-size: 3.6rem;

  animation: bookHeartBeat 1.8s ease-in-out infinite;
}

@keyframes bookHeartBeat {
  50% {
    transform: scale(1.1);
  }
}

.love-date-text {
  max-width: 360px;
  margin: 0 auto 1.5rem;

  color: #604738;
}

.love-date-page blockquote {
  margin: 0 auto 1.5rem;

  color: var(--deep-orange);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
}

/* ---------- Long-distance pages ---------- */

.distance-city-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 4;

  padding: 0.55rem 0.9rem;

  color: white;
  background: rgba(20, 10, 7, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.city-connection {
  width: 100%;
  margin: 1.8rem auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.7rem;
}

.city-block {
  padding: 1.1rem 0.5rem;

  background: rgba(255, 255, 255, 0.58);
  border-radius: 18px;

  box-shadow: 0 12px 30px rgba(92, 48, 20, 0.08);
}

.city-block span,
.city-block strong {
  display: block;
}

.city-block span {
  color: var(--deep-orange);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.city-block strong {
  margin-top: 0.4rem;

  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
}

.connection-line {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.connection-line span {
  width: 24px;
  height: 1px;

  background: var(--orange);
}

.connection-line strong {
  color: var(--rose);
}

/* ---------- Phone cards ---------- */

.phone-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.phone-memory-card {
  min-height: 125px;
  padding: 1rem;

  display: flex;
  flex-direction: column;
  justify-content: center;

  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(194, 65, 12, 0.09);
  border-radius: 20px;

  box-shadow: 0 12px 32px rgba(92, 48, 20, 0.08);
}

.phone-memory-card > span {
  margin-bottom: 0.4rem;

  color: var(--orange);
  font-size: 1.4rem;
}

.phone-memory-card strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
}

.phone-memory-card small {
  margin-top: 0.3rem;

  color: var(--muted);
  line-height: 1.3;
}

/* ---------- Relationship list ---------- */

.relationship-list {
  margin: 1.3rem 0;
  padding: 0;

  display: grid;
  gap: 0.65rem;

  list-style: none;
}

.relationship-list li {
  position: relative;

  padding: 0.78rem 0.8rem 0.78rem 2.3rem;

  color: #604738;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
}

.relationship-list li::before {
  content: "♥";
  position: absolute;
  left: 0.85rem;

  color: var(--rose);
}

/* ---------- Future ---------- */

.future-lines {
  width: min(330px, 100%);
  margin: 2rem auto;

  display: grid;
  gap: 1rem;
}

.future-lines span {
  height: 1px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(124, 98, 88, 0.35),
    transparent
  );
}

.future-final-line {
  color: var(--deep-orange) !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
}

/* ---------- Controls ---------- */

.flipbook-controls {
  position: relative;
  z-index: 5;

  margin-top: 1.5rem;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.book-control-button {
  min-width: 125px;
  padding: 0.9rem 1.2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  color: white;

  background:
    linear-gradient(
      135deg,
      var(--orange),
      var(--deep-orange)
    );

  border: 0;
  border-radius: 999px;

  cursor: pointer;

  box-shadow: 0 14px 34px rgba(194, 65, 12, 0.22);

  font-weight: 700;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.book-control-button:hover:not(:disabled) {
  transform: translateY(-3px);

  box-shadow: 0 18px 42px rgba(194, 65, 12, 0.3);
}

.book-control-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.book-page-indicator {
  min-width: 95px;
  padding: 0.85rem 1rem;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  color: var(--deep-orange);

  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow: 0 12px 30px rgba(92, 48, 20, 0.08);

  font-weight: 700;
}

.indicator-divider {
  color: var(--muted);
}

.book-gesture-hint {
  margin: 1rem 0 0;

  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .book-main-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;

    padding: 0.8rem 1rem;
  }

  .book-main-header .main-nav {
    width: 100%;
  }

  .book-main-header .main-nav a {
    padding: 0.55rem 0 0.75rem;
  }

  .book-main-header .main-nav a::after {
    bottom: 0.25rem;
  }
}

@media (max-width: 760px) {
  .chapters-book-main {
    padding: 3.5rem 0.65rem 4rem;
  }

  .book-page-heading {
    margin-bottom: 2rem;
    padding: 0 0.7rem;
  }

  .book-page-heading h1 {
    font-size: clamp(3.4rem, 17vw, 5.2rem);
  }

  .flipbook-section {
    padding: 2rem 0.25rem 1.5rem;
    border-radius: 28px;
  }

  .flipbook-wrapper {
    min-height: 650px;
  }

  .page-content {
    padding: 1.5rem;
  }

  .cover-border {
    padding: 1.4rem;
  }

  .cover-border h2 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .chapter-opening-page h2,
  .future-book-page h2,
  .final-message-page h2,
  .love-date-page h2 {
    font-size: clamp(2.5rem, 11vw, 3.7rem);
  }

  .story-book-page h3,
  .connection-page h3,
  .distance-connection-page h3,
  .phone-life-page h3 {
    font-size: clamp(2.3rem, 10vw, 3.4rem);
  }

  .book-paths,
  .city-connection {
    grid-template-columns: 1fr;
  }

  .book-path-heart {
    transform: rotate(90deg);
  }

  .connection-line {
    justify-content: center;
    transform: rotate(90deg);
  }

  .phone-memory-grid {
    grid-template-columns: 1fr;
  }

  .phone-memory-card {
    min-height: 95px;
  }

  .flipbook-controls {
    gap: 0.55rem;
  }

  .book-control-button {
    min-width: auto;
    padding: 0.8rem 0.9rem;
    font-size: 0.78rem;
  }

  .book-page-indicator {
    min-width: 70px;
    padding: 0.8rem 0.75rem;
    font-size: 0.8rem;
  }
}


/* =========================================
   MEMORIES PAGE
========================================= */

.memories-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 185, 190, 0.25), transparent 35%),
    radial-gradient(circle at top right, rgba(255, 220, 190, 0.3), transparent 30%),
    #fff9f5;
  color: #3f2929;
  font-family: "Inter", sans-serif;
}

.memories-page *,
.memories-page *::before,
.memories-page *::after {
  box-sizing: border-box;
}

.memories-page h1,
.memories-page h2,
.memories-page h3 {
  margin-top: 0;
  font-family: "Cormorant Garamond", serif;
}

.memories-page button,
.memories-page a {
  font: inherit;
}

.memories-main {
  width: 100%;
}

/* =========================================
   HEADER
========================================= */

.memories-main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  padding: 18px 5%;
  background: rgba(255, 249, 245, 0.88);
  border-bottom: 1px solid rgba(114, 71, 71, 0.12);
  backdrop-filter: blur(18px);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4e3030;
  font-family: "Cormorant Garamond", serif;
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.logo-heart {
  color: #c66b76;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  color: #6d5151;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  width: 0;
  height: 2px;
  margin: auto;
  content: "";
  background: #c66b76;
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #a84f5b;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* =========================================
   HERO
========================================= */

.memories-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 86vh;
  padding: 100px 20px;
  overflow: hidden;
  text-align: center;
}

.memories-hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.eyebrow {
  margin-bottom: 16px;
  color: #b6606c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.memories-hero h1 {
  margin-bottom: 24px;
  color: #4a2c2c;
  font-size: clamp(72px, 12vw, 150px);
  font-weight: 600;
  line-height: 0.78;
}

.memories-hero h1 span {
  display: block;
  color: #bd6874;
  font-style: italic;
}

.memories-hero-description {
  max-width: 660px;
  margin: 0 auto 34px;
  color: #735a5a;
  font-size: 17px;
  line-height: 1.9;
}

.enter-memories-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 25px;
  color: #fff;
  background: #563738;
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(86, 55, 56, 0.2);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.enter-memories-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(86, 55, 56, 0.28);
}

.memory-hero-glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.5;
}

.glow-left {
  top: 8%;
  left: -170px;
  background: rgba(242, 173, 183, 0.45);
}

.glow-right {
  right: -160px;
  bottom: 2%;
  background: rgba(245, 203, 167, 0.45);
}

.floating-memory-heart {
  position: absolute;
  color: rgba(188, 91, 105, 0.24);
  animation: memoryFloat 6s ease-in-out infinite;
}

.heart-a {
  top: 25%;
  left: 12%;
  font-size: 32px;
}

.heart-b {
  top: 18%;
  right: 14%;
  font-size: 22px;
  animation-delay: 1.5s;
}

.heart-c {
  right: 20%;
  bottom: 20%;
  font-size: 40px;
  animation-delay: 3s;
}

@keyframes memoryFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-18px) rotate(8deg);
  }
}

/* =========================================
   FEATURED MEMORY
========================================= */

.featured-memory-section {
  padding: 40px 5% 110px;
}

.featured-memory-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  max-width: 1180px;
  margin: auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(120, 76, 76, 0.1);
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(91, 58, 58, 0.13);
}

.featured-memory-media {
  position: relative;
  min-height: 570px;
  overflow: hidden;
}

.featured-memory-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-memory-card:hover .featured-memory-media img {
  transform: scale(1.035);
}

.featured-memory-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 22, 22, 0.28), transparent 55%);
}

.featured-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: #bd6874;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 15px 40px rgba(45, 25, 25, 0.25);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}

.featured-play-button:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.featured-memory-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 65px;
}

.memory-type-label {
  margin: 0 0 14px;
  color: #bd6874;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.featured-memory-content h2 {
  margin-bottom: 20px;
  color: #472c2c;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.98;
}

.featured-memory-content > p:not(.memory-type-label) {
  color: #715858;
  line-height: 1.85;
}

.featured-memory-details {
  display: flex;
  gap: 25px;
  margin: 28px 0;
  padding: 22px 0;
  border-top: 1px solid #eadcdc;
  border-bottom: 1px solid #eadcdc;
}

.featured-memory-details span {
  color: #765d5d;
  font-size: 13px;
}

.featured-memory-details strong {
  display: block;
  margin-bottom: 5px;
  color: #4a3030;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.open-featured-memory {
  align-self: flex-start;
  padding: 14px 22px;
  color: #fff;
  background: #bd6874;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

/* =========================================
   MEMORY MUSEUM
========================================= */

.memory-museum-section {
  padding: 105px 5%;
  background: #523536;
}

.memory-section-heading {
  max-width: 730px;
  margin: 0 auto 40px;
  text-align: center;
}

.memory-section-heading h2 {
  margin-bottom: 14px;
  color: #fff8f3;
  font-size: clamp(48px, 7vw, 78px);
}

.memory-section-heading > p:last-child {
  color: rgba(255, 248, 243, 0.7);
}

.memory-filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 45px;
  flex-wrap: wrap;
}

.memory-filter {
  padding: 11px 20px;
  color: #f8dfdf;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s ease;
}

.memory-filter:hover,
.memory-filter.active {
  color: #523536;
  background: #fff6ef;
  border-color: #fff6ef;
}

.memory-museum-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 75px;
  gap: 20px;
  max-width: 1240px;
  margin: auto;
}

.museum-memory-card {
  position: relative;
  grid-column: span 4;
  grid-row: span 5;
  min-height: 360px;
  overflow: hidden;
  background: #fff4ec;
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(30, 14, 14, 0.2);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease;
}

.museum-memory-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 65px rgba(30, 14, 14, 0.3);
}

.memory-card-large {
  grid-column: span 7;
  grid-row: span 7;
}

.memory-card-tall {
  grid-row: span 7;
}

.memory-card-wide {
  grid-column: span 8;
}

.photo-memory-card img,
.video-memory-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.museum-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(29, 13, 14, 0.82),
    rgba(29, 13, 14, 0.05) 65%
  );
}

.museum-card-type {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 8px 13px;
  color: #563738;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.museum-card-content {
  position: absolute;
  right: 25px;
  bottom: 24px;
  left: 25px;
  z-index: 2;
  color: #fff;
}

.museum-card-content p {
  margin: 0 0 8px;
  opacity: 0.75;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.museum-card-content h3 {
  margin: 0 0 7px;
  font-size: clamp(29px, 4vw, 45px);
  line-height: 1;
}

.museum-card-content span {
  opacity: 0.8;
  font-size: 13px;
}

/* =========================================
   VOICE CARDS
========================================= */

.voice-memory-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(255, 224, 219, 0.95)),
    #f5dad5;
}

.voice-memory-dark {
  color: #fff;
  background: linear-gradient(145deg, #7d4c53, #3d282a);
}

.voice-memory-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.voice-heart {
  display: block;
  margin-bottom: 16px;
  color: #bd6874;
  font-size: 42px;
}

.voice-memory-dark .voice-heart {
  color: #f5bdc5;
}

.voice-date {
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.7;
  text-transform: uppercase;
}

.voice-memory-content h3 {
  font-size: 34px;
  line-height: 1.05;
}

.memory-audio {
  width: 100%;
  margin-top: 17px;
}

.voice-card-decoration {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  opacity: 0.17;
}

.voice-card-decoration span {
  width: 5px;
  height: 50px;
  background: currentColor;
  border-radius: 10px;
}

.voice-card-decoration span:nth-child(2),
.voice-card-decoration span:nth-child(6) {
  height: 80px;
}

.voice-card-decoration span:nth-child(3),
.voice-card-decoration span:nth-child(5) {
  height: 105px;
}

.voice-card-decoration span:nth-child(4) {
  height: 135px;
}

/* =========================================
   LETTER CARDS
========================================= */

.letter-memory-card {
  display: grid;
  place-items: center;
  padding: 26px;
  background: #ead8be;
}

.letter-memory-rose {
  background: #e6bec5;
}

.letter-paper {
  width: 100%;
  min-height: 100%;
  padding: 36px 30px;
  background: #fffaf2;
  box-shadow: 0 15px 35px rgba(68, 39, 39, 0.16);
  transform: rotate(-1deg);
}

.letter-paper-date {
  color: #ae6870;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.letter-paper h3 {
  margin: 18px 0 14px;
  color: #4a3030;
  font-size: 38px;
}

.letter-paper p {
  color: #705858;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  line-height: 1.55;
}

.letter-signature {
  display: block;
  margin-top: 25px;
  color: #a85d67;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: italic;
}

/* =========================================
   VIDEO BUTTON
========================================= */

.memory-video-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #7e4650;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* =========================================
   ENDING SECTION
========================================= */

.memories-ending-section {
  padding: 130px 20px;
  text-align: center;
}

.ending-memory-heart {
  display: block;
  margin-bottom: 20px;
  color: #bd6874;
  font-size: 48px;
}

.memories-ending-section h2 {
  max-width: 850px;
  margin: 0 auto 25px;
  color: #4a3030;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 0.98;
}

.memories-ending-section > p:last-child {
  max-width: 660px;
  margin: auto;
  color: #745b5b;
  line-height: 1.8;
}

/* =========================================
   MEMORY MODAL
========================================= */

.memory-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.memory-modal.open {
  display: flex;
}

.memory-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 17, 18, 0.92);
  backdrop-filter: blur(10px);
}

.memory-modal-content {
  position: relative;
  z-index: 2;
  width: min(1050px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff9f4;
  border-radius: 26px;
}

.memory-modal-close {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 1002;
  width: 48px;
  height: 48px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 30px;
}

.modal-memory-item {
  display: none;
}

.modal-memory-item.active {
  display: block;
}

.modal-memory-item img,
.modal-memory-item video {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: #211516;
}

.modal-memory-description {
  padding: 30px 38px 38px;
  text-align: center;
}

.modal-memory-description p {
  color: #b15f6a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.modal-memory-description h2 {
  margin-bottom: 12px;
  color: #4a3030;
  font-size: 48px;
}

.modal-memory-description span {
  color: #745b5b;
  line-height: 1.7;
}

.modal-letter-item {
  padding: 50px;
}

.modal-letter-paper {
  max-width: 700px;
  margin: auto;
  padding: 55px;
  background: #fffdf7;
  box-shadow: 0 18px 50px rgba(67, 40, 40, 0.14);
}

.modal-letter-paper h2 {
  color: #4a3030;
  font-size: 52px;
}

.modal-letter-paper p {
  color: #735858;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  line-height: 1.65;
}

.modal-letter-paper span {
  display: block;
  margin-top: 30px;
  color: #a75965;
  font-family: "Cormorant Garamond", serif;
  font-size: 23px;
  font-style: italic;
}

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

@media (max-width: 1050px) {
  .memories-main-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .featured-memory-card {
    grid-template-columns: 1fr;
  }

  .featured-memory-media {
    min-height: 480px;
  }

  .memory-museum-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }

  .museum-memory-card,
  .memory-card-large,
  .memory-card-wide,
  .memory-card-tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 430px;
  }
}

@media (max-width: 700px) {
  .memories-main-header {
    position: relative;
    padding: 18px 22px;
  }

  .main-nav {
    gap: 12px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .memories-hero {
    min-height: 75vh;
    padding: 80px 20px;
  }

  .memories-hero h1 {
    font-size: 76px;
  }

  .featured-memory-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .featured-memory-media {
    min-height: 370px;
  }

  .featured-memory-content {
    padding: 38px 25px;
  }

  .featured-memory-details {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-museum-section {
    padding: 80px 18px;
  }

  .memory-museum-grid {
    grid-template-columns: 1fr;
  }

  .museum-memory-card,
  .memory-card-large,
  .memory-card-wide,
  .memory-card-tall {
    min-height: 420px;
  }

  .modal-memory-description {
    padding: 25px 20px 30px;
  }

  .modal-memory-description h2 {
    font-size: 38px;
  }

  .modal-letter-item {
    padding: 20px;
  }

  .modal-letter-paper {
    padding: 30px 24px;
  }
}


/* =========================================================
   MEMORY LANE — UNIFIED CHAPTERS THEME
   This block intentionally comes last so it safely overrides
   the older pink Memory Lane rules without breaking Chapters.
========================================================= */

.memories-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(253, 230, 138, 0.80), transparent 28%),
    radial-gradient(circle at 86% 35%, rgba(251, 113, 133, 0.27), transparent 25%),
    linear-gradient(145deg, #fff7ed 0%, #ffedd5 48%, #fef3c7 100%);
}

.memories-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.20;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(111, 74, 46, 0.04) 5px
    );
}

/* Shared floating header: same visual system as Our Chapters */
.memories-page .book-main-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: calc(100% - 2rem);
  max-width: 1450px;
  min-height: 72px;
  margin: 1rem auto 0;
  padding: 0 1.6rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 55px rgba(92, 48, 20, 0.11);
}

.memories-page .book-main-header .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.memories-page .book-main-header .logo-heart {
  color: var(--rose);
}

.memories-page .book-main-header .main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.memories-page .book-main-header .main-nav::-webkit-scrollbar {
  display: none;
}

.memories-page .book-main-header .main-nav a {
  position: relative;
  flex-shrink: 0;
  padding: 1.7rem 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.memories-page .book-main-header .main-nav a:hover,
.memories-page .book-main-header .main-nav a.active {
  color: var(--deep-orange);
}

.memories-page .book-main-header .main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1.15rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--orange), var(--rose));
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.memories-page .book-main-header .main-nav a:hover::after,
.memories-page .book-main-header .main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero */
.memories-page .memories-hero {
  min-height: calc(100vh - 88px);
  padding: 7rem 1.5rem 6rem;
  background: transparent;
}

.memories-page .eyebrow {
  color: var(--deep-orange);
}

.memories-page .memories-hero h1 {
  color: var(--ink);
}

.memories-page .memories-hero h1 span {
  color: var(--deep-orange);
}

.memories-page .memories-hero-description {
  color: var(--muted);
}

.memories-page .enter-memories-button,
.memories-page .open-featured-memory {
  color: #fff7ed;
  background: linear-gradient(135deg, var(--orange), var(--deep-orange));
  box-shadow: 0 14px 35px rgba(194, 65, 12, 0.24);
}

.memories-page .enter-memories-button:hover,
.memories-page .open-featured-memory:hover {
  box-shadow: 0 18px 44px rgba(194, 65, 12, 0.31);
}

.memories-page .glow-left {
  background: rgba(253, 230, 138, 0.62);
}

.memories-page .glow-right {
  background: rgba(251, 113, 133, 0.26);
}

.memories-page .floating-memory-heart {
  color: rgba(251, 113, 133, 0.25);
}

/* Featured memory */
.memories-page .featured-memory-card {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.memories-page .memory-type-label {
  color: var(--deep-orange);
}

.memories-page .featured-memory-content h2 {
  color: var(--ink);
}

.memories-page .featured-memory-content > p:not(.memory-type-label),
.memories-page .featured-memory-details span {
  color: var(--muted);
}

.memories-page .featured-memory-details {
  border-color: rgba(194, 65, 12, 0.16);
}

.memories-page .featured-memory-details strong {
  color: var(--ink);
}

.memories-page .featured-play-button {
  color: var(--deep-orange);
}

/* Museum: dark leather-book section */
.memories-page .memory-museum-section {
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.12), transparent 30%),
    radial-gradient(circle at 85% 75%, rgba(251, 113, 133, 0.10), transparent 28%),
    linear-gradient(145deg, #4b1f0f, #251009 62%, #160c09);
}

.memories-page .memory-section-heading h2 {
  color: #fff7ed;
}

.memories-page .memory-section-heading > p:last-child {
  color: rgba(255, 247, 237, 0.68);
}

.memories-page .memory-filter {
  color: rgba(255, 247, 237, 0.82);
  border-color: rgba(253, 230, 138, 0.30);
}

.memories-page .memory-filter:hover,
.memories-page .memory-filter.active {
  color: #251a17;
  background: var(--yellow);
  border-color: var(--yellow);
}

.memories-page .museum-memory-card {
  box-shadow: 0 22px 58px rgba(18, 8, 5, 0.32);
}

.memories-page .museum-card-type {
  color: var(--deep-orange);
  background: rgba(255, 247, 237, 0.92);
}

.memories-page .voice-memory-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(253,230,138,.58)),
    #fff7ed;
}

.memories-page .voice-memory-dark {
  color: #fff7ed;
  background: linear-gradient(145deg, #7c2d12, #431407 62%, #251009);
}

.memories-page .voice-heart {
  color: var(--deep-orange);
}

.memories-page .voice-memory-dark .voice-heart {
  color: var(--yellow);
}

.memories-page .letter-memory-card {
  background: #e6c998;
}

.memories-page .letter-memory-rose {
  background: #e8b9a7;
}

.memories-page .letter-paper {
  background:
    linear-gradient(rgba(255,255,255,.60), rgba(255,255,255,.60)),
    #fff6dc;
}

.memories-page .letter-paper-date,
.memories-page .letter-signature {
  color: var(--deep-orange);
}

.memories-page .letter-paper h3 {
  color: var(--ink);
}

.memories-page .letter-paper p {
  color: #604738;
}

.memories-page .memory-video-button {
  color: var(--deep-orange);
}

/* Ending */
.memories-page .memories-ending-section {
  background:
    radial-gradient(circle at center, rgba(253, 230, 138, 0.35), transparent 42%);
}

.memories-page .ending-memory-heart {
  color: var(--rose);
}

.memories-page .memories-ending-section h2 {
  color: var(--ink);
}

.memories-page .memories-ending-section > p:last-child {
  color: var(--muted);
}

/* Modal */
.memories-page .memory-modal-backdrop {
  background: rgba(22, 12, 9, 0.94);
}

.memories-page .memory-modal-content {
  background: #fff7ed;
}

.memories-page .modal-memory-description p {
  color: var(--deep-orange);
}

.memories-page .modal-memory-description h2,
.memories-page .modal-letter-paper h2 {
  color: var(--ink);
}

.memories-page .modal-memory-description span,
.memories-page .modal-letter-paper p {
  color: var(--muted);
}

.memories-page .modal-letter-paper {
  background: #fffaf0;
}

.memories-page .modal-letter-paper span {
  color: var(--deep-orange);
}

/* Responsive shared header */
@media (max-width: 1100px) {
  .memories-page .book-main-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  .memories-page .book-main-header .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1.15rem;
  }

  .memories-page .book-main-header .main-nav a {
    padding: 0.55rem 0 0.75rem;
    font-size: 0.73rem;
  }

  .memories-page .book-main-header .main-nav a::after {
    bottom: 0.3rem;
  }
}

@media (max-width: 700px) {
  .memories-page .memories-hero {
    min-height: 78svh;
    padding-top: 5rem;
  }

  .memories-page .featured-memory-section,
  .memories-page .memory-museum-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.museum-memory-card video,
.museum-memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.museum-memory-card {
  position: relative;
  overflow: hidden;
}

.memory-video-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);

  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.92);
  color: #c74717;
  font-size: 20px;
  cursor: pointer;
}

.video-memory-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #160a07;
}

.video-memory-card video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  display: block;
}

.featured-memory-media {
  position: relative;
  width: 100%;
  height: 680px;
  overflow: hidden;
  background: #1b0c08;
}

.featured-memory-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
}

.featured-memory-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;

  width: 70px;
  height: 70px;

  border: 2px solid #24110c;
  border-radius: 50%;

  transform: translate(-50%, -50%);

  background: rgba(255, 255, 255, 0.95);
  color: #d24714;

  font-size: 20px;
  cursor: pointer;
}

.featured-memory-play.is-playing {
  opacity: 0;
}

.featured-memory-media:hover .featured-memory-play.is-playing {
  opacity: 1;
}

@media (max-width: 900px) {
  .featured-memory-media {
    height: 520px;
  }
}

/* Make voice controls clickable */
.voice-memory-card {
  position: relative;
}

.voice-memory-card .memory-audio-wrapper {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  z-index: 20;

  transform: translateY(-50%);
  pointer-events: auto;
}

.voice-memory-card .memory-audio-wrapper audio {
  position: relative;
  z-index: 21;

  width: 100%;
  pointer-events: auto;
}

/* Decorative layers must not block the audio controls */
.voice-memory-card .museum-card-overlay,
.voice-memory-card .museum-card-content,
.voice-memory-card .museum-card-type {
  pointer-events: none;
}
.dynamic-letter-text {
  white-space: pre-line;
  line-height: 1.9;
}

.dynamic-letter-text {
  white-space: pre-line;
  line-height: 1.9;
}

.letter-memory-card {
  cursor: pointer;
}

.letter-memory-card:focus-visible {
  outline: 3px solid rgba(150, 70, 80, 0.4);
  outline-offset: 5px;
}

.voice-memory-card {
  position: relative;
}

.voice-memory-card .memory-audio-wrapper {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  pointer-events: auto;
}

.voice-memory-card .memory-audio-wrapper audio {
  position: relative;
  z-index: 21;
  width: 100%;
  pointer-events: auto;
}

.voice-memory-card .museum-card-overlay,
.voice-memory-card .museum-card-content,
.voice-memory-card .museum-card-type {
  pointer-events: none;
}

/* ==================================================
   COCO EMERGENCY BUTTON
================================================== */

.coco-floating-btn {
  position: fixed;

  right: 92px;
  bottom: 24px;

  z-index: 9998;

  min-width: 155px;

  display: flex;
  align-items: center;
  gap: 11px;

  padding: 10px 15px 10px 10px;

  border-radius: 999px;

  border:
    1px solid
    rgba(255, 255, 255, 0.28);

  background:
    linear-gradient(
      135deg,
      #d8182b,
      #a50818
    );

  color: white;

  text-decoration: none;

  box-shadow:
    0 10px 28px
    rgba(177, 8, 25, 0.38),
    0 0 0 1px
    rgba(255, 255, 255, 0.08)
    inset;

  overflow: visible;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}


/* HEART */

.coco-emergency-icon {
  position: relative;

  z-index: 2;

  flex: 0 0 43px;

  width: 43px;
  height: 43px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.16);

  color:
    #fff4f5;

  font-size: 20px;

  box-shadow:
    inset 0 1px 1px
    rgba(255, 255, 255, 0.3);

  animation:
    cocoEmergencyBeat
    1.55s ease-in-out
    infinite;
}


/* TEXT */

.coco-emergency-text {
  position: relative;

  z-index: 2;

  display: flex;
  flex-direction: column;

  line-height: 1;
}


.coco-emergency-text strong {
  font-size: 12px;

  font-weight: 800;

  letter-spacing: 1.7px;

  color: #ffffff;
}


.coco-emergency-text small {
  margin-top: 5px;

  font-family:
    "Caveat",
    cursive;

  font-size: 16px;

  color:
    rgba(255, 255, 255, 0.82);
}


/* PULSE RING */

.coco-pulse-ring {
  position: absolute;

  inset: -5px;

  border:
    2px solid
    rgba(225, 22, 42, 0.45);

  border-radius: 999px;

  pointer-events: none;

  animation:
    cocoEmergencyPulse
    1.8s ease-out
    infinite;
}


/* HOVER */

.coco-floating-btn:hover {
  transform:
    translateY(-4px)
    scale(1.03);

  filter:
    brightness(1.08);

  box-shadow:
    0 16px 40px
    rgba(177, 8, 25, 0.48),
    0 0 24px
    rgba(225, 24, 44, 0.24);
}


/* HEARTBEAT */

@keyframes cocoEmergencyBeat {

  0%,
  100% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.18);
  }

  30% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.12);
  }

  65% {
    transform: scale(1);
  }

}


/* OUTER EMERGENCY PULSE */

@keyframes cocoEmergencyPulse {

  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  30% {
    opacity: 0.65;
  }

  100% {
    opacity: 0;
    transform: scale(1.14);
  }

}


/* MOBILE */

@media (max-width: 600px) {

  .coco-floating-btn {
    right: 75px;
    bottom: 18px;

    min-width: auto;

    padding: 8px 12px 8px 8px;
  }


  .coco-emergency-icon {
    width: 40px;
    height: 40px;

    flex-basis: 40px;

    font-size: 18px;
  }


  .coco-emergency-text strong {
    font-size: 10px;

    letter-spacing: 1.3px;
  }


  .coco-emergency-text small {
    font-size: 14px;
  }

}