/* =====================================================
   WORLD OF LUCY KAY
   Story Page - story.css v0.1
   The Greenhouse That Should Not Exist
===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background: #0c0a06;
  color: #f6eedf;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

/* =====================================================
   PAGE BACKGROUND
===================================================== */

.story-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 70px;
}

.story-bg {
  position: fixed;
  inset: 0;
  background: url("story-bg.webp") center center / cover no-repeat;
  z-index: 0;
  transform: scale(1.02);
}

.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 237, 193, 0.14), rgba(0, 0, 0, 0.18) 38%, rgba(0, 0, 0, 0.56) 100%),
    linear-gradient(to bottom, rgba(16, 10, 5, 0.28), rgba(16, 10, 5, 0.12) 30%, rgba(16, 10, 5, 0.58) 100%);
}

.gold-frame {
  position: fixed;
  inset: 22px;
  border: 1px solid rgba(186, 146, 79, 0.52);
  z-index: 5;
  pointer-events: none;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

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

.story-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 34px 56px 0;
}

.back-link,
.shop-link {
  color: rgba(250, 240, 220, 0.92);
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  transition: 0.3s ease;
}

.back-link:hover,
.shop-link:hover {
  color: #e3bf75;
  text-shadow: 0 0 14px rgba(227, 191, 117, 0.45);
}

.shop-link {
  justify-self: end;
}

.story-logo {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 174, 92, 0.88);
  border-radius: 50%;
  background: rgba(28, 22, 13, 0.54);
  color: #f5d48a;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.85rem;
  box-shadow: 0 0 20px rgba(203, 164, 91, 0.24);
}

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

.story-hero {
  position: relative;
  z-index: 8;
  max-width: 1000px;
  margin: 50px auto 24px;
  padding: 0 24px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 12px;
  color: rgba(214, 171, 89, 0.96);
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.68);
}

.story-hero h1 {
  color: #fff7e7;
  font-family: "Cinzel", serif;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.52);
}

.story-hero h1 span {
  display: block;
  font-size: clamp(2.5rem, 4.4vw, 4.9rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 0.94;
}

.story-hero h1 em {
  display: block;
  margin-top: 8px;
  color: #f4e7c9;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3.1vw, 3.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}

.chapter-label {
  margin-top: 18px;
  color: rgba(255, 245, 225, 0.86);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-style: italic;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

/* =====================================================
   STORY CARD
===================================================== */

.chapter-card {
  position: relative;
  z-index: 8;
  width: min(900px, 88vw);
  margin: 42px auto 34px;
  padding: 54px 62px;
  border: 1px solid rgba(187, 149, 86, 0.46);
  background:
    linear-gradient(rgba(77, 58, 33, 0.13), rgba(77, 58, 33, 0.13)),
    rgba(247, 236, 214, 0.78);
  color: #2a1f14;
  backdrop-filter: blur(5px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 22px 60px rgba(0, 0, 0, 0.26);
}

.chapter-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(168, 129, 67, 0.22);
  pointer-events: none;
}

.chapter-card p {
  margin-bottom: 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.26rem;
  line-height: 1.7;
}

.chapter-opening {
  font-size: 1.46rem !important;
  line-height: 1.72 !important;
}

.chapter-card h2 {
  margin: 28px 0 20px;
  color: #6b4d17;
  font-family: "Cinzel", serif;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: center;
}

.chapter-card blockquote {
  margin: 22px auto 28px;
  padding: 18px 22px;
  max-width: 640px;
  border-left: 2px solid rgba(173, 132, 63, 0.62);
  background: rgba(255, 250, 241, 0.42);
  color: #4b3720;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.32rem;
  font-style: italic;
  line-height: 1.7;
}

.final-line {
  margin-top: 28px !important;
  color: #5f4514;
  font-size: 1.62rem !important;
  font-style: italic;
  text-align: center;
}

/* =====================================================
   CHAPTER NAV
===================================================== */

.chapter-nav {
  position: relative;
  z-index: 8;
  width: min(900px, 88vw);
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.chapter-button {
  position: relative;
  display: inline-block;
  padding: 15px 30px;
  border: 1px solid rgba(224, 180, 89, 0.82);
  background: rgba(22, 18, 12, 0.6);
  color: #f7dc9d;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: 0.3s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.chapter-button::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(224, 180, 89, 0.2);
  pointer-events: none;
}

.chapter-button:hover {
  background: rgba(14, 30, 14, 0.88);
  border-color: rgba(245, 203, 112, 0.95);
  color: #ffe4a8;
  box-shadow:
    0 0 20px rgba(224, 180, 89, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.chapter-button.muted {
  opacity: 0.78;
}

/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-header,
.story-hero,
.chapter-card,
.chapter-nav {
  animation: fadeUp 1.15s ease both;
}

.story-hero { animation-delay: 0.12s; }
.chapter-card { animation-delay: 0.24s; }
.chapter-nav { animation-delay: 0.36s; }

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

@media (max-width: 900px) {
  .chapter-card {
    width: min(92vw, 760px);
    padding: 42px 30px;
  }
}

@media (max-width: 760px) {
  .gold-frame {
    inset: 12px;
  }

  .story-header {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
    padding: 24px 20px 0;
  }

  .back-link,
  .shop-link {
    justify-self: center;
  }

  .story-hero {
    margin-top: 36px;
  }

  .chapter-card {
    padding: 34px 22px;
  }

  .chapter-card p,
  .chapter-card blockquote {
    font-size: 1.2rem;
  }

  .chapter-opening {
    font-size: 1.34rem !important;
  }

  .final-line {
    font-size: 1.42rem !important;
  }

  .chapter-nav {
    width: 92vw;
  }

  .chapter-button {
    width: 100%;
    text-align: center;
  }
}


/* =====================================================
   STORY ILLUSTRATIONS
===================================================== */

.story-illustration {
  position: relative;
  width: min(520px, 92%);
  margin: 46px auto 52px;
  padding: 14px;
  background: rgba(255, 248, 232, 0.72);
  border: 1px solid rgba(150, 105, 48, 0.32);
  box-shadow:
    0 16px 36px rgba(83, 54, 23, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  text-align: center;
}

.story-illustration::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(137, 94, 42, 0.16);
  pointer-events: none;
}

.story-illustration img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(120, 82, 38, 0.22);
}

.story-illustration figcaption {
  margin-top: 12px;
  color: #6b4a22;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.35;
}
