/* Showcases shared by the homepage and the section landings (Claude, design owner, 18 Oct 2026; canvas «Hero Redesign
   Concepts»). Drawn by showcases.py; showcase.js switches the scene window and stops the wall. Each page places them;
   a page sets --showcase-bleed to its side padding so the phone swipe rows reach the screen edge (default: --gutter). */

/* Scene window: one book's painted scene on its series colour, the cover leaning in front, thumbnails to switch book.
   showcase.js sets --win-tint/--win-accent per book. */
.hero-window { --win-tint: #E6EEE8; --win-accent: #214D42; --win-lean: clamp(40px, 5vw, 64px); }
.hero-window-mat { position: relative; margin-left: var(--win-lean); padding: clamp(12px, 1.5vw, 20px); border-radius: 30px;
  background: var(--win-tint); transition: background-color .7s ease; box-shadow: 0 24px 56px rgba(24, 58, 49, .12); }
.hero-window-frame { position: relative; aspect-ratio: 16 / 11; border-radius: 18px; overflow: hidden; background: #E6EEE8; }
.hero-window-scenes, .hero-window-covers { list-style: none; margin: 0; padding: 0; }
.hero-window-scene { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-window-scene.is-active { opacity: 1; }
.hero-window-scene img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease-out; }
.hero-window-scene.is-active img { transform: scale(1.05); }
.hero-window-chip { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); margin: 0;
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 253, 248, .95); box-shadow: 0 4px 14px rgba(24, 58, 49, .14);
  font-size: .86rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.hero-window-chip:has(.hero-window-mark:not([hidden])) { padding: 5px 16px 5px 5px; font-size: .92rem; }
.hero-window-mark { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--win-accent); color: #FFFDF8; }
.hero-window-mark[hidden] { display: none; }
.hero-window-arrows { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.hero-window-arrows[hidden] { display: none; }
.hero-window-arrows button { width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 253, 248, .94); color: var(--forest); box-shadow: 0 4px 14px rgba(24, 58, 49, .18); }
.hero-window-arrows button:hover { background: var(--paper); }
.hero-window-covers { position: absolute; z-index: 2; left: calc(-1 * var(--win-lean)); bottom: 28px; width: clamp(118px, 13.5vw, 184px); aspect-ratio: 360 / 444; }
.hero-window-cover { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; pointer-events: none; transform: rotate(-10deg) translateY(26px);
  transform-origin: 30% 100%; transition: opacity .5s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.hero-window-cover.is-active { opacity: 1; pointer-events: auto; transform: rotate(-4deg); }
.hero-window-cover a { display: block; }
.hero-window-under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 20px 0 0 var(--win-lean); }
.hero-window-caption { flex: 1 1 220px; display: grid; gap: 4px; margin: 0; color: var(--ink-soft); font-size: .95rem; }
.hero-window-title { font: 700 clamp(1.15rem, 1.6vw, 1.4rem)/1.15 var(--serif); color: var(--forest); }
.hero-window-caption a { font-weight: 700; color: var(--forest); }
.hero-window-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-window-thumbs[hidden] { display: none; }
.hero-window-thumbs button { flex: none; width: 46px; height: 64px; padding: 0; border: 0; border-radius: 5px; overflow: hidden; cursor: pointer; background: var(--paper);
  box-shadow: 0 6px 14px rgba(24, 58, 49, .18); outline: 3px solid transparent; outline-offset: 3px; transition: transform .25s ease, outline-color .25s ease; }
.hero-window-thumbs button[aria-pressed="true"] { outline-color: var(--win-accent); }
.hero-window-thumbs button:hover { transform: translateY(-4px); }
.hero-window-thumbs button:focus-visible { outline-color: var(--ochre); }
.hero-window-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (min-width: 880px) and (max-width: 1199px) { .hero-window-thumbs { gap: 8px; } .hero-window-thumbs button { width: 40px; height: 56px; } }

/* Walk: places in arch windows along a dotted trail, each book leaning on its arch. Each stop draws its own stretch of
   trail, so the stretches join up; the stops rise in one after another when they appear. */
.walk-trail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.walk-stop { min-width: 0; animation: walk-in .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes walk-in { from { opacity: 0; transform: translateY(18px); } }
.walk-link { position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; padding: 0 12px 4px; color: inherit; text-decoration: none; }
.walk-art { position: relative; display: block; width: min(100%, 212px); }
.walk-arch { display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border: 5px solid #fff; background: var(--cream);
  border-radius: 50% 50% 14px 14px / 40% 40% 14px 14px; box-shadow: 0 14px 30px rgba(24, 58, 49, .16); }
.walk-arch img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.walk-cover { position: absolute; bottom: -3%; right: -13%; width: 42%; transform: rotate(5deg); transition: translate .35s cubic-bezier(.2, .8, .2, 1); }
.walk-stop:nth-child(even) .walk-cover { transform: rotate(-3deg); }
.walk-path { align-self: stretch; display: grid; place-items: center; height: 40px; margin: 12px -12px 0; background: url("/assets/home/walk-trail.svg") center / 100% 40px no-repeat; }
.walk-marker { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--ochre); box-shadow: 0 0 0 5px var(--paper); }
.walk-label { display: grid; gap: 4px; margin-top: 10px; text-align: center; }
.walk-place { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); }
.walk-title { font: 700 1.08rem/1.2 var(--serif); color: var(--forest); }
.walk-link:hover .walk-arch img { transform: scale(1.05); }
.walk-link:hover .walk-cover { translate: 0 -8px; }
.walk-link:hover .walk-title { text-decoration: underline; text-underline-offset: 3px; }
.walk-link:focus-visible { outline: 3px solid var(--ochre); outline-offset: 4px; border-radius: 16px; }

/* Moving wall: three tilted columns of covers and scenes drift up and down; hover or the button stops them. */
.books-wall-wrap { position: relative; min-width: 0; }
.books-wall { position: relative; height: clamp(440px, 44vw, 600px); overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent), linear-gradient(to right, transparent, #000 8%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent), linear-gradient(to right, transparent, #000 8%); mask-composite: intersect; }
.books-wall-tilt { position: absolute; inset: -22% -4% -22% 6%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; transform: rotate(-7deg); }
.books-wall-col { list-style: none; margin: 0; padding: 0 0 18px; display: flex; flex-direction: column; gap: 18px; animation: books-rise 90s linear infinite; }
.books-wall-col:nth-child(2) { animation-duration: 112s; animation-direction: reverse; }
.books-wall-col:nth-child(3) { animation-duration: 80s; }
.books-wall img { display: block; width: 100%; height: auto; border-radius: 3px 8px 8px 3px; box-shadow: 0 12px 26px rgba(24, 58, 49, .18), 0 2px 6px rgba(24, 58, 49, .1); }
.books-wall .is-scene img { border-radius: 14px; }
.books-wall:hover .books-wall-col, .books-wall-wrap.is-stopped .books-wall-col { animation-play-state: paused; }
@keyframes books-rise { to { transform: translateY(-50%); } }
.books-wall-toggle { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--forest); cursor: pointer; box-shadow: 0 4px 12px rgba(24, 58, 49, .14); }
.books-wall-toggle[hidden] { display: none; }
.books-wall-toggle .icon-play, .is-stopped .books-wall-toggle .icon-pause { display: none; }
.is-stopped .books-wall-toggle .icon-play { display: block; }

/* Fan of stories: postcards turning around a point far below, so together they draw an arc; the middle card is the
   featured story. Neighbours overlap, so the outer cards show only their city and the title appears when a card lifts
   (it stays in the link's name for screen readers); right-hand cards align to their visible right edge. */
.story-fan { position: relative; list-style: none; height: 410px; max-width: 1100px; margin: clamp(8px, 2vw, 20px) auto clamp(10px, 2vw, 24px); padding: 0; }
.story-fan-card { position: absolute; left: 50%; top: 34px; width: 236px; margin-left: -118px; transform: rotate(calc(var(--d) * var(--fan-step, 5.5deg))); transform-origin: 50% 1100px; }
@media (max-width: 1199px) { .story-fan { --fan-step: 4.4deg; } }
@media (max-width: 1023px) { .story-fan { --fan-step: 3.4deg; } }
.story-fan-card:hover, .story-fan-card:focus-within { z-index: 30 !important; }
.story-fan-card a { display: block; padding: 8px 8px 12px; border-radius: 12px; background: #fff; color: inherit; text-decoration: none;
  box-shadow: 0 18px 34px rgba(24, 58, 49, .18), 0 2px 6px rgba(24, 58, 49, .1); transition: translate .35s cubic-bezier(.2, .8, .2, 1); }
.story-fan-card a:hover, .story-fan-card a:focus-visible { translate: 0 -26px; }
.story-fan-card a:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
.story-fan-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 7px; }
.story-fan-label { display: grid; gap: 3px; padding: 10px 6px 0; }
.story-fan-label span { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); }
.story-fan-label strong { font: 700 1.02rem/1.2 var(--serif); color: var(--forest); }
.story-fan-card a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.story-fan-card.is-right .story-fan-label { text-align: right; }
.story-fan-card:not(.is-centre) .story-fan-label strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.story-fan-card:not(.is-centre):is(:hover, :focus-within) .story-fan-label strong { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }

/* Phones and small tablets: the window loses its lean and its thumbnails swipe; the walk and the fan become swipe rows. */
@media (max-width: 879px) {
  .hero-window { --win-lean: 0px; }
  .hero-window-covers { left: 10px; bottom: -38px; width: clamp(104px, 26vw, 150px); }
  .hero-window-under { margin-top: 12px; }
  .hero-window-caption { flex-basis: 100%; min-height: 56px; padding-left: calc(clamp(104px, 26vw, 150px) + 22px); }
  .hero-window-thumbs { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; width: calc(100% + 2 * var(--showcase-bleed, var(--gutter)));
    margin-inline: calc(-1 * var(--showcase-bleed, var(--gutter))); padding: 6px var(--showcase-bleed, var(--gutter)) 10px; scroll-padding-inline: var(--showcase-bleed, var(--gutter)); }
  .hero-window-thumbs::-webkit-scrollbar { display: none; }
  .hero-window-thumbs button { scroll-snap-align: start; }
  .walk-trail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--showcase-bleed, var(--gutter)));
    padding: 4px var(--showcase-bleed, var(--gutter)) 8px; scroll-padding-inline: var(--showcase-bleed, var(--gutter)); }
  .walk-trail::-webkit-scrollbar { display: none; }
  .walk-stop { flex: 0 0 228px; scroll-snap-align: start; }
  .books-wall { height: 420px; }
  .story-fan { height: auto; max-width: none; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--showcase-bleed, var(--gutter))); padding: 8px var(--showcase-bleed, var(--gutter)) 18px; scroll-padding-inline: var(--showcase-bleed, var(--gutter)); }
  .story-fan::-webkit-scrollbar { display: none; }
  .story-fan-card { position: relative; left: auto; top: auto; flex: 0 0 min(72vw, 250px); margin: 0; transform: none; z-index: auto !important; scroll-snap-align: start; }
  .story-fan-card.is-centre { order: -1; }
  .story-fan-card:not(.is-centre) .story-fan-label strong { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .story-fan-card.is-right .story-fan-label { text-align: left; }
  .story-fan-card a:hover, .story-fan-card a:focus-visible { translate: none; }
}
@media (max-width: 559px) {
  .hero-window-mat { border-radius: 22px; }
  .hero-window-frame { aspect-ratio: 4 / 3; border-radius: 14px; }
  .hero-window-chip { top: 10px; left: 10px; font-size: .8rem; padding: 7px 12px; }
  .hero-window-chip:has(.hero-window-mark:not([hidden])) { padding: 4px 12px 4px 4px; }
  .hero-window-mark { width: 30px; height: 30px; }
  .hero-window-mark svg { width: 19px; height: 19px; }
  .hero-window-arrows { right: 10px; bottom: 10px; }
  .hero-window-arrows button { width: 44px; height: 44px; }
  .books-wall { height: 340px; }
  .books-wall-tilt { grid-template-columns: repeat(2, minmax(0, 1fr)); inset: -22% -18% -22% 5%; }
  .books-wall-col:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .walk-stop, .books-wall-col { animation: none; }
  .story-fan-card a, .walk-arch img, .walk-cover, .hero-window-mat, .hero-window-scene, .hero-window-scene img, .hero-window-cover, .hero-window-thumbs button { transition: none; }
  .hero-window-scene.is-active img { transform: none; }
}
/* A walk stop's verified retail link, under the stop (only books with an `amazon` URL in books.json). */
.walk-buy { display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 4px; font-size: .92rem; font-weight: 700; color: var(--forest); text-align: center; }

/* Fan of covers: a series' books turning around a point far below, so they draw an arc whatever their number
   (cover_fan sets --step from the count). The middle cover is on top; a cover lifts and comes forward on hover. */
.cover-fan { position: relative; list-style: none; width: 100%; max-width: 560px; height: clamp(240px, 24vw, 320px); margin: 0 auto; padding: 0; }
.cover-fan-item { position: absolute; left: 50%; bottom: 6%; width: clamp(104px, 34%, 176px); transform: translateX(-50%) rotate(calc(var(--d) * var(--step)));
  transform-origin: 50% 300%; }
.cover-fan-item a { display: block; transition: translate .35s cubic-bezier(.2, .8, .2, 1); }
.cover-fan-item:hover, .cover-fan-item:focus-within { z-index: 30 !important; }
.cover-fan-item a:hover, .cover-fan-item a:focus-visible { translate: 0 -18px; }
.cover-fan-item a:focus-visible { outline: 3px solid var(--ochre); outline-offset: 4px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .cover-fan-item a { transition: none; } }
/* Series reels in the hero (PYP-055): the loop sits over the painted scene of its slide */
.hero-window-scene video.hero-window-loop { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .hero-window-scene video.hero-window-loop { display: none; } }
