/* The Birder page only. Two colours from the cover: the pale blue of its moon disc (--sky) and the cloud white
   it sits on (--cloud). The hero stage is that cloud white, so the black bird reads the whole way across.
   The hero is the cover (artwork by Lydia Hall) with its perched blackbird cut out as its own layer; js/the-birder.js
   lifts it off the branch under the reader's hand and sets it down beside the title. */
:root { --sky: #7a9fb5; --sky-ink: #100d0c; --cloud: #dfe4e8; }

/* ---------- hero ---------- */
.hero { position: relative; height: 180vh; background: var(--cloud); color: var(--sky-ink); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--cloud); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "book" "say"; grid-template-rows: auto auto auto; align-content: center; gap: 1rem 0; padding: 3rem var(--gutter) 1.2rem; }
.title { grid-area: title; }
.title h1 { font-size: clamp(3rem, 12vw, 6.4rem); margin: 0; color: var(--sky-ink); }
/* the second moon from the cover, where the bird lands */
.perch { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; margin-left: .12em; border-radius: 50%; }
html.js:not(.still) .perch { background: var(--sky); opacity: 0; transform: scale(.6); }   /* js raises it to full as the bird lifts */
html:not(.js) .perch, html.still .perch { display: none; }
.book { grid-area: book; position: relative; justify-self: end; width: min(66vw, calc((100svh - 400px) * .652), 330px); aspect-ratio: 900 / 1380; box-shadow: 0 16px 34px rgba(0, 0, 0, .55); background: #1c2a36; }
.plate { width: 100%; height: auto; display: block; }
.patch, .bird { position: absolute; left: 50.333%; top: 13.333%; width: 11.111%; height: auto; display: none; }
.bird { z-index: 2; transform-origin: 50% 50%; will-change: transform; }
html.js:not(.still) .patch, html.js:not(.still) .bird { display: block; }
.say { grid-area: say; }
.say .lead { font-size: clamp(1.18rem, 4.6vw, 1.45rem); line-height: 1.3; margin: 0 0 1rem; }
.stage .btn { background: var(--ground); color: var(--paper); }
.stage .btn:hover { background: var(--sky); color: var(--sky-ink); }
.stage .link { text-decoration-color: var(--sky-ink); }
.stage :focus-visible { outline-color: var(--sky-ink); }
.book { box-shadow: 0 16px 34px rgba(16, 13, 12, .28); }
/* two columns from 700px: the title and the line beside the cover (tablets in portrait included) */
@media (min-width: 700px) {
  .stage { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title book" "say book"; grid-template-rows: 1fr 1fr; align-items: start; column-gap: 5vw; row-gap: 1.2rem; padding: 2rem calc(var(--spine) + 4vw) 2rem 7vw; }
  .book { width: min(calc(84svh * .652), 44vw, 420px); align-self: center; }
  .title { align-self: end; }
  .say { align-self: start; max-width: 36rem; }
  .say .lead { font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.25; margin-bottom: 1.4rem; }
}
@media (min-width: 700px) and (max-width: 899px) { .title h1 { font-size: 7.2vw; } }   /* the moon stays on the title's line */
@media (min-width: 900px) { .book { width: min(calc(84svh * .652), 34vw, 460px); } }
@media (max-width: 899px) { .stage { padding-right: calc(var(--gutter) + 26px); } }
/* no JavaScript or reduced motion: the unaltered cover, no pin, no cut-out */
html:not(.js) .hero, html.still .hero { height: auto; }
html:not(.js) .stage, html.still .stage { position: relative; height: auto; min-height: 0; overflow: visible; padding-bottom: 2.5rem; }

/* ---------- the blurb on the cover's sky ---------- */
.sky { background: var(--sky); color: var(--sky-ink); }
.sky h2 { color: var(--sky-ink); }
.sky .formats { color: var(--sky-ink); }
.sky .link { text-decoration-color: var(--sky-ink); }
.sky :focus-visible { outline-color: var(--sky-ink); }
.sky .btn { background: var(--ground); color: var(--paper); }
.sky .btn:hover { background: var(--paper); color: var(--ground); }

/* ---------- the walk: seven named places, the bird goes name to name ---------- */
.walk .in { position: relative; }
.places { list-style: none; margin: 1.8rem 0 0; padding: 0 0 0 4.4rem; }
.places li { border-top: 1px solid #d9d0c2; padding: 1rem 0 .9rem; }
.places li:last-child { border-bottom: 1px solid #d9d0c2; }
.places .name { text-wrap: balance; font-family: var(--cap); font-weight: 400; font-size: clamp(2.1rem, 8vw, 4.8rem); line-height: .95; letter-spacing: .02em; color: var(--ground); display: block; }
.hop { position: absolute; left: 0; top: 0; width: 3rem; height: auto; display: none; will-change: transform; }
html.js .hop { display: block; }
@media (min-width: 900px) { .places { padding-left: 7rem; } .hop { width: 4.6rem; } .places li { padding: 1.3rem 0 1.1rem; } }

/* ---------- the linocuts: all twelve full pages ----------
   Lorna's scans of the printed linocuts (her 'print' files: black ink on white paper, no colour), uncropped at
   2480 x 3508 (Sparrowhawk, Nightingale and Swan padded to that with their own paper). Each sits on a thin margin
   of that paper (--print, the off-white sampled from the scans' corners)
   with a shadow, so a print whose edge is black still reads as a sheet on the dark ground.
   Phones: a shelf the reader slides along (snaps print to print; Previous and Next below it, js/the-birder.js), which
   bleeds to the right edge of the screen past the Contents tab. The gap is a little wider than the gutter, so once a
   print is snapped into place no sliver of the one before shows at the left edge. From 700px: a wrapping grid, every print in view.
   The set-down (js/the-birder.js writes --set 0..1 on each li): the print is held a little above the shelf on a
   slight tilt and set down flat as it comes up. Only the print moves; its name stays still. Reduced motion and no
   JS: --set is 1, nothing moved, nothing hidden. */
#prints { --print: #fdfaf2; }
.sale { margin-top: .4rem; }
.sale strong { font-weight: 500; color: var(--name); }
.strip { list-style: none; margin: 1.8rem calc(-1 * (var(--gutter) + 26px)) 0 calc(-1 * var(--gutter)); padding: 1.4rem calc(var(--gutter) + 38px) 1rem var(--gutter); display: flex; gap: calc(var(--gutter) + 4px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--soft) transparent; }
.strip:focus-visible { outline: 3px solid var(--name); outline-offset: -3px; }
.strip li { flex: none; width: min(72vw, 320px); scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img { display: block; width: 100%; height: auto; padding: 5px; background: var(--print); box-shadow: 0 2px 3px rgba(0, 0, 0, .5), 0 14px 30px rgba(0, 0, 0, .55); transform-origin: 50% 100%; }
html.js:not(.still) .strip img { transform: translateY(calc((1 - var(--set, 1)) * -1.1rem)) rotate(calc((1 - var(--set, 1)) * -1.6deg)); }
.strip figcaption { font-family: var(--cap); font-size: 1.6rem; line-height: 1; letter-spacing: .04em; color: var(--paper); margin-top: .75rem; }
.shelfnav { display: flex; gap: .8rem; margin-top: 1.1rem; }
.shelfnav .btn[disabled] { opacity: .35; cursor: default; background: var(--paper); color: var(--ground); }
html:not(.js) .shelfnav { display: none; }
@media (min-width: 700px) {
  .strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6rem 1.6rem; margin: 2.2rem 0 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .strip li { width: auto; }
  .strip img { padding: 6px; }
  .shelfnav { display: none; }
}
@media (min-width: 1100px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem 1.9rem; } }

/* ---------- reviews ---------- */
.revs { display: grid; gap: 1.6rem; }
.revs .quote { margin-top: 0; }
@media (min-width: 860px) { .revs { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- close ---------- */
/* the blackbird from the hero, settled on the end of "Read The Birder" (js/the-birder.js brings it in) */
.perched { display: flex; align-items: flex-end; gap: .35rem; margin: 0 0 1.4rem; }
.perched h2 { margin: 0; min-width: 0; }
.alight { flex: none; width: 2.6rem; aspect-ratio: 220 / 246; margin-bottom: .1em; background: var(--paper); -webkit-mask: url(../img/the-birder/bird.webp) center / contain no-repeat; mask: url(../img/the-birder/bird.webp) center / contain no-repeat; }
.close .nextprev { margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
