/* MoonTales website: the story pages (/stories, /stories/<slug>, /press). Built on site.css:
   same colours, fonts, sky and header. */

.chip {
  display: inline-block;
  margin-left: 6px;
  line-height: 1;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a2300;
  background: var(--gold);
  padding: 5px 8px 4px;
  border-radius: 999px;
  vertical-align: 2px;
}

/* ---------- breadcrumbs ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.crumbs a {
  color: var(--soft);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--text);
}

/* ---------- a book: hero ---------- */

.bk-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 28px 0 72px;
}

.bk-cover {
  position: relative;
  margin: 0 auto;
  width: min(100%, 340px);
  aspect-ratio: 1 / 1.6;
  border-radius: 22px;
  overflow: hidden;
  background: #2a2350;
  transform: rotate(-2deg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 30px 60px -20px rgba(6, 3, 26, 0.9),
    0 0 120px -30px rgba(255, 190, 110, 0.45);
}

.bk-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}

/* "Watch the beginning": the cover is the video's poster; the cartoon (9:16) plays in its place */
.bk-media {
  margin: 0 auto;
  width: min(100%, 340px);
}

.bk-cover.watch {
  width: 100%;
  aspect-ratio: 9 / 16;
  transform: none;
}

.bk-cover.watch video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #2a2350;
}

/* the big play button over the poster (site.js shows it; the player's own controls still work) */
.watch-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  color: #2a1206;
  background: linear-gradient(135deg, var(--play-a), var(--play-b));
  box-shadow: 0 12px 30px -8px rgba(240, 107, 92, 0.9), 0 0 0 6px rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.watch-play:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.watch-play[hidden] {
  display: none;
}

.watch-play svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.watch-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  text-align: center;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(255, 214, 115, 0.18), transparent 70%),
    rgba(14, 10, 40, 0.86);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.watch-end[hidden] {
  display: none;
}

.watch-end p {
  margin: 0;
  font-size: 15px;
  color: var(--soft);
}

.watch-end .watch-end-h {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  color: var(--text);
}

.watch-again {
  margin-top: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.watch-again:hover {
  background: rgba(255, 255, 255, 0.16);
}

.watch-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 14px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--soft);
  text-align: center;
}

.watch-cap svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.both {
  margin: 18px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
}

.bk-intro h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02;
}

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
}

.facts li {
  font-size: 14px;
  font-weight: 800;
  color: var(--soft);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--line);
}

.season-note {
  margin: 18px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.listen {
  margin-top: 26px;
  max-width: 520px;
  padding: 16px 18px 14px;
  border-radius: 20px;
  background: rgba(20, 16, 60, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 115, 0.28);
}

.listen-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 16px;
}

.listen-h svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.listen audio {
  display: block;
  width: 100%;
  height: 44px;
}

.listen-note {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
}

.cta p {
  margin: 0;
  max-width: 22em;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

/* ---------- a book: the pages ---------- */

.bk-read {
  padding: 24px 0 40px;
}

.bk-read > h2,
.bk-about h2,
.more h2,
.press-h {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
}

.pages {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
}

.pg {
  scroll-margin-top: 90px;
}

.pg-pic {
  margin: 0;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2350, #1b1745);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 22px 40px -22px rgba(0, 0, 0, 0.85);
  transition: box-shadow 0.4s ease;
}

.pg-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

.pg.reading .pg-pic {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 60px -10px rgba(255, 214, 115, 0.6);
}

.pg-words {
  padding: 14px 4px 0;
}

.pg-n {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.pg-t {
  margin: 0;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
}

.pg-t.verse {
  font-style: italic;
  font-size: 18px;
}

.the-end {
  margin: 48px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-style: italic;
  font-size: 30px;
  color: var(--gold);
}

.locked,
.final-card {
  position: relative;
  margin: 48px auto 0;
  max-width: 760px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 30px;
  text-align: center;
  background:
    radial-gradient(80% 90% at 50% 0%, rgba(255, 214, 115, 0.16), transparent 60%),
    rgba(20, 16, 60, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 115, 0.25), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.locked h2,
.final-card h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
}

.locked p,
.final-card p {
  margin: 14px auto 22px;
  max-width: 34em;
  font-size: 17px;
  color: var(--soft);
}

.moon.small {
  width: 74px;
  margin: 0 auto 22px;
  box-shadow:
    inset -6px -7px 14px rgba(190, 120, 40, 0.35),
    inset 4px 4px 10px rgba(255, 255, 240, 0.5),
    0 0 30px 6px rgba(255, 214, 115, 0.35);
}

/* ---------- a book: about + final ---------- */

.bk-about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  padding: 72px 0 24px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
}

.about-copy p {
  margin: 16px 0 0;
  font-size: 18px;
  color: var(--soft);
  max-width: 40em;
}

.about-copy .thought b {
  color: var(--gold);
}

.about-facts {
  margin: 8px 0 0;
}

.about-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.about-facts dt {
  color: var(--muted);
  font-weight: 700;
}

.about-facts dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.bk-final {
  padding: 24px 0 40px;
}

/* ---------- cards: the index, "more stories" ---------- */

.more {
  padding: 40px 0 110px;
}

.cards {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 32px 20px;
}

.cards.big {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 44px 26px;
}

.card a {
  display: block;
  text-decoration: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 0.64;
  border-radius: 16px;
  overflow: hidden;
  background: #2a2350;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 22px 40px -20px rgba(0, 0, 0, 0.8);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card a:hover .card-cover {
  transform: translateY(-6px);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}

.card-cover .free {
  position: absolute;
  top: 10px;
  left: 10px;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6);
}

.card-title {
  margin: 14px 0 0;
  font-size: 21px;
  line-height: 1.18;
}

.cards:not(.big) .card-title {
  font-size: 18px;
}

.card a:hover .card-title {
  color: var(--gold);
}

.card-line {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--soft);
}

.card-meta {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.more-all {
  margin: 36px 0 0;
  text-align: center;
}

/* ---------- the index ---------- */

.ix {
  padding-bottom: 90px;
}

.ix-head {
  padding: 40px 0 16px;
  max-width: 760px;
}

.ix-head h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1;
}

.ix-head h1 em {
  display: block;
}

.ix .bk-final {
  padding-top: 90px;
}

/* ---------- press ---------- */

.press {
  padding-bottom: 100px;
}

.press-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin: 28px auto 64px;
}

.press-card {
  padding: 28px;
  border-radius: 24px;
  background: rgba(20, 16, 60, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
}

.press-card h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.press-card img {
  border-radius: 52px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}

.press-card p {
  margin: 18px 0 0;
}

.press-card p a,
.press-facts a {
  color: var(--gold);
  font-weight: 800;
}

.press-facts {
  margin: 0 0 22px;
}

.press-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.press-facts dt {
  color: var(--muted);
  font-weight: 700;
}

.press-facts dd {
  margin: 0;
  font-weight: 700;
}

.shots {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.shots img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 40px -24px rgba(0, 0, 0, 0.8);
}

/* ---------- smaller screens ---------- */

@media (max-width: 980px) {
  .pages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bk-about,
  .press-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bk-hero {
    grid-template-columns: 1fr;
    padding: 18px 0 48px;
    gap: 26px;
  }

  .bk-cover {
    width: 62vw;
    border-radius: 18px;
  }

  .bk-media {
    width: 70vw;
  }

  .bk-media .bk-cover.watch {
    width: 100%;
  }

  .bk-intro {
    text-align: center;
  }

  .facts,
  .cta {
    justify-content: center;
  }

  .listen {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .cta p {
    text-align: center;
  }

  .pages {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pg-t {
    font-size: 18px;
  }

  .bk-about {
    padding-top: 48px;
    margin-top: 40px;
  }

  .cards,
  .cards.big {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .card-title,
  .cards:not(.big) .card-title {
    font-size: 17px;
  }

  .card-line {
    font-size: 14px;
  }

  .ix-head {
    padding-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-cover,
  .pg-pic {
    transition: none;
  }
}
