/*
  Homepage styles. base.css loads first and owns fonts, colour tokens, the header, footer, buttons,
  the region selector and the dialog; none of those are repeated here.

  Each selector is declared once per media context. Where a rule differs by screen size it is
  overridden by a later @media block, never by a duplicate rule further up the file.
  The few !important declarations are limited to reduced-motion resets and legacy fan-cover rules.
*/

:root {
  box-sizing: border-box;
  --wc: min(960px,calc(100vw - 80px));
}
html {
  scrollbar-gutter: stable;
  overflow-anchor: none;
  scroll-padding-top: var(--hdr,0px);
  scroll-behavior: smooth;
}
/* Stacking context for the cover ambience layer. */
body {
  isolation: isolate;
}
/* A softly blurred, vignetted echo of the hovered cover sits behind the page. */
#cover-ambience {
  position: fixed;
  inset: -18px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(8px);
  transform: scale(1.025);
  transition: opacity .45s ease;
  will-change: opacity;
}
#cover-ambience::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.58) 0%, rgba(0,0,0,.82) 48%, #11100e 100%);
}
#cover-ambience.is-visible {
  opacity: .52;
}
h1 {
  font: 500 clamp(40px,6vw,64px)/1.05 "Cormorant Garamond",Georgia,serif;
  margin: 24px 0 8px;
}

/* ---------- Hero ---------- */
.editorial-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 42px 12px 35px;
}
.hero-copy {
  width: 100%;
  max-width: 1000px;
}
.hero-title-slot {
  height: calc(clamp(30px,5.8vw,76px) * 1.12);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-copy h1 {
  font-weight: 500;
  font-size: clamp(30px,5.8vw,76px);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  justify-content: center;
  animation: gentle-enter .8s both .14s;
  gap: .18em;
}
.hero-white {
  color: #fff;
  flex: 0 0 auto;
}
/* The typing ornament is positioned without affecting heading geometry. */
.hero-accent {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--accent);
  margin: 0 .02em;
  transition: color .35s ease;
}
.hero-copy p {
  line-height: 1.65;
  color: #aaa;
  animation: gentle-enter .8s both .27s;
  max-width: 62ch;
  margin: 0 auto 16px;
  font-size: clamp(15px,1.7vw,18px);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  font: 600 13px "Hanken Grotesk",sans-serif;
  justify-content: center;
  animation: gentle-enter .8s both .39s;
  gap: 4px;
}
.hero-actions a {
  text-decoration: none;
}
.hero-secondary {
  border-bottom: 1px solid #555;
  padding: 9px 0;
  color: #eee;
  transition: color .25s,border-color .25s;
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.hero-secondary span {
  margin-left: 10px;
}
.hero-secondary:hover {
  color: #fb8000;
  border-color: #fb8000;
}
@media (min-width:900px) {
  .hero-title-slot { height: calc(clamp(24px,4vw,52px) * 1.12); }
  .hero-copy h1 {
    font-size: clamp(24px,4vw,52px);
  }
}
@media (max-width:620px) {
  .editorial-hero {
    padding: 32px 0 29px;
  }
  .hero-title-slot { height: calc(clamp(25px,6.3vw,39px) * 1.12); }
  .hero-copy h1 {
    font-size: clamp(25px,6.3vw,39px);
    letter-spacing: -.035em;
  }
  .hero-copy p {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 13px;
  }
}
@media (max-width:360px) {
  .hero-title-slot { height: calc(clamp(23px,6.15vw,28px) * 1.12); }
  .hero-copy h1 {
    font-size: clamp(23px,6.15vw,28px);
  }
}
/* Original line/dot/caret geometry for the between-only sequence. */
#opening-rule {
  position: absolute;
  left: 50%;
  top: calc(50% + 36px);
  width: min(260px,62vw);
  height: 2px;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  pointer-events: none;
}
#opening-rule i {
  display: block;
  width: 50%;
  height: 100%;
  background: #fb8000;
  transform-origin: center;
  will-change: transform;
}

/* ---------- Views and book wall ---------- */
.view {
  display: none;
}
.view.on {
  display: block;
}
html.no-js #books { display: block; }
#books {
  width: auto;
  margin: auto;
  max-width: 1100px;
  padding: 0 28px 78px;
}
#wall .label {
  margin: 22px 0 0;
  padding: 30px 0 17px;
  border-top: 1px solid var(--line);
  font: 600 12px/1 "Hanken Grotesk",sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  color: #ddd;
  animation: fade .8s ease .3s backwards;
}
#wall>.label:first-child {
  padding-top: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,180px));
  justify-content: center;
  gap: 13px;
}
@media (max-width:899px) {
  #books {
    padding: 0 5vw 65px;
  }
  .grid {
    gap: 11px;
  }
}
@media (max-width:620px) {
  #wall .label {
    padding-top: 24px;
  }
  .grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    justify-content: stretch;
    gap: 8px;
  }
}

/* One cover on the wall. */
.book {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 5/8;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  color: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  outline: none;
  outline-offset: -1px;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) backwards;
  animation-delay: calc(var(--i,0)*60ms);
  border-radius: 2px;
  box-shadow: none;
  transition: transform .38s cubic-bezier(.2,.75,.25,1),opacity .28s,box-shadow .38s;
}
.book img, .fc img, .pcv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.75,.25,1);
}
/* Touch devices: a tapped cover keeps :hover, so it gets a quieter version of the lift. */
.book:hover {
  box-shadow: 0 18px 35px #000a;
}
.book:hover img {
  transform: scale(1.035);
}
@media (hover:hover) {
  .book:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 28px #000;
  }
  .book:hover img {
    transform: scale(1.045);
  }
}
/* The selected-book frame keeps its own cover accent, independent of the title currently shown. */
.book::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  border: 2px solid var(--cover-accent,var(--accent));
}
@media (hover:hover) {
  .book:hover::after {
    opacity: 1;
  }
}
.book.on::after {
  opacity: 1;
}
.has .book:not(.on) {
  opacity: .5;
}
.book.ph, .fc.ph {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  overflow-wrap: anywhere;
}
.ph::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 34%;
  height: 2px;
  background: var(--ca,#fb8000);
  transform: rotate(-14deg);
  transform-origin: left;
}
.book.ph b {
  font: 500 clamp(15px,2vw,20px)/1 "Cormorant Garamond",Georgia,serif;
  position: relative;
}
.fc.ph b {
  display: none;
}
.latest {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: #fb8000;
  color: #000;
  font: 700 10px/1 "Hanken Grotesk",sans-serif;
  letter-spacing: .1em;
  padding: 7px 9px;
}

/* ---------- Selected-book panel (under the covers on phones and tablets; .sp inside the stage on desktop) ---------- */
.detail {
  grid-column: 1/-1;
  background: var(--card);
  border: 1px solid #333;
  border-top: 3px solid var(--accent);
  padding: 28px;
  transition: border-color .3s;
  scroll-margin-top: calc(var(--hdr,0px) + 12px);
}
.detail[hidden] {
  display: none;
}
.detail:not(.sp) {
  animation: drop .3s ease-out;
}
@media (max-width:620px) {
  .detail {
    padding: 20px 15px;
  }
}
.inner {
  max-width: 760px;
  margin: 0 auto;
}
.detail h3 {
  font: 500 clamp(34px,4vw,49px)/1 "Cormorant Garamond",Georgia,serif;
  margin: 0;
}
.detail em {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  margin-top: 4px;
}
.tag {
  font: italic 500 23px/1.3 "Cormorant Garamond",Georgia,serif;
  margin: 12px 0 0;
}
.syn {
  margin: 14px 0;
}
.phead {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.ptxt {
  min-width: 0;
  flex: 1;
}
.pcover {
  display: none;
}
.pcv {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
}
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  position: relative;
  margin: -4px 0 16px;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 "Hanken Grotesk",sans-serif;
  padding: 8px 11px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .3s,color .3s,border-color .3s;
}
.chip.sep {
  margin-left: 12px;
}
.chip.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
/* Share button, next to the buy buttons. */
.share {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--book-share-accent, var(--accent));
  color: var(--book-share-ink, var(--accent-ink));
  cursor: pointer;
  transition: opacity .2s, background-color .16s ease;
  transform-origin: center;
}
.share svg {
  transition: opacity .12s ease;
}
.share.is-hollow {
  background: transparent;
}
.share.is-animating {
  animation: share-morph 1.08s cubic-bezier(.2,.75,.25,1) both;
  pointer-events: none;
}
.share.is-animating svg {
  opacity: 0;
}
.share.is-animating::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--book-share-accent);
  font: 600 27px/1 system-ui,sans-serif;
  opacity: 0;
  animation: share-check 1.08s ease both;
}
.share:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.share-note {
  align-self: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Desktop book stage: covers gathered on the left, synopsis on the right ---------- */
#stage {
  position: fixed;
  top: var(--hh,0px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s,visibility .25s,background .4s;
  background: #000;
}
#stage:focus {
  outline: none;
}
#stage.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.st-in {
  display: flex;
  align-items: center;
  gap: 40px;
  width: var(--wc);
  margin: 0 auto;
}
.fan {
  position: relative;
  flex: none;
  width: calc(214px*var(--s,1));
}
.fc {
  position: absolute;
  left: 0;
  width: calc(140px*var(--s,1));
  height: calc(224px*var(--s,1));
  overflow: hidden;
  background: #111;
  color: #fff;
  cursor: pointer;
  transform-origin: 0 0;
  box-shadow: 0 -3px 8px -4px rgba(0,0,0,.6);
  border: 1px solid #333;
  transition: transform .48s cubic-bezier(.16,1,.3,1),box-shadow .42s ease,filter .35s ease;
}
.fc.on {
  transform: translateX(calc(10px*var(--s,1)));
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.8);
  filter: brightness(1.12);
}
.fc.on::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent);
  pointer-events: none;
}
.fc.up {
  z-index: 60 !important;
  box-shadow: 0 18px 36px -12px rgba(0,0,0,.65);
  transform: translate3d(calc(20px*var(--s,1)),-3px,0) scale(1.16) rotate(-1.2deg);
}
.fc .latest {
  top: calc(32px*var(--s,1));
}
.spine {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(32px*var(--s,1));
  line-height: calc(32px*var(--s,1));
  padding: 0 8px;
  font: 600 12px "Hanken Grotesk",sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  background: linear-gradient(90deg,rgba(0,0,0,.72),rgba(0,0,0,.3));
  text-shadow: 0 1px 3px #000;
}
.flabel {
  position: absolute;
  left: 0;
  font: 600 10px/1 "Hanken Grotesk",sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sp {
  flex: 1;
  min-width: 0;
  max-height: calc(100vh - var(--hh,0px) - 40px);
  overflow: auto;
}
.sp .inner {
  max-width: none;
}
.sp .syn {
  font-size: 16.5px;
  line-height: 1.65;
}
.sp .chips {
  display: none;
}
.sp .phead {
  position: relative;
  align-items: center;
  gap: 0;
  transition: gap .48s cubic-bezier(.2,.8,.2,1);
}
.sp .phead.revealed {
  gap: 22px;
}
.sp .phead .ptxt {
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.sp .pcover {
  display: block;
  flex: none;
  aspect-ratio: 5/8;
  overflow: hidden;
  width: 0;
  opacity: 0;
  flex-basis: 0;
  background: var(--card);
  transform: translateX(-14px) scale(.92);
  transition: width .5s cubic-bezier(.2,.8,.2,1),flex-basis .5s cubic-bezier(.2,.8,.2,1),transform .5s cubic-bezier(.2,.8,.2,1);
  box-shadow: none;
}
.sp .phead.revealed .pcover {
  width: 112px;
  flex-basis: 112px;
  opacity: 0;
  transform: none;
  box-shadow: none;
}
.sp .phead.revealed.arrived .pcover {
  opacity: 1;
  box-shadow: 0 12px 28px -14px rgba(0,0,0,.9);
}

/* ---------- Motion ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gentle-enter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes share-morph { 0%,100% { border-radius:0; transform:scale(1) rotate(0); } 18%,32% { border-radius:50%; transform:scale(.92) rotate(0); } 42% { border-radius:50%; transform:scale(.72) rotate(0); } 76% { border-radius:50%; transform:scale(.72) rotate(360deg); } 88% { border-radius:0; transform:scale(.9) rotate(360deg); } }
@keyframes share-check { 0%,28% { opacity:0; transform:scale(.35) rotate(-35deg); } 39% { opacity:1; transform:scale(1.08) rotate(0); } 48%,72% { opacity:1; transform:scale(1) rotate(0); } 84% { opacity:1; transform:scale(.9) rotate(360deg); } 100% { opacity:0; transform:scale(.45) rotate(360deg); } }
@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .share.is-animating, .share.is-animating::after {
    animation-duration: .01ms;
  }
}

/* Per-card colours and entrance delays are classes, not inline style attributes. Written by tools/make_book_pages.py from assets/books.js; do not edit between the markers. */
/* BEGIN generated:card-colours */
.book--broken-winged-flight{--cover-accent:#ff7043;--ca:#ff7043}
.book--i-0{--i:0}
.book--evince-embers{--cover-accent:#b5595a;--ca:#b5595a}
.book--i-1{--i:1}
.book--cut-grass{--cover-accent:#b84fe0;--ca:#b84fe0}
.book--i-2{--i:2}
.book--kernward{--cover-accent:#fb8000;--ca:#fb8000}
.book--i-3{--i:3}
.book--fraying-ropes{--cover-accent:#74cc66;--ca:#74cc66}
.book--i-4{--i:4}
.book--bohemian-divide{--cover-accent:#ff3d00;--ca:#ff3d00}
.book--i-5{--i:5}
.book--grievous-exigence{--cover-accent:#ff7400;--ca:#ff7400}
.book--i-6{--i:6}
.book--nexus-string{--cover-accent:#f2b277;--ca:#f2b277}
.book--i-7{--i:7}
.book--awry-flux{--cover-accent:#1fa6d1;--ca:#1fa6d1}
.book--i-8{--i:8}
/* END generated:card-colours */
