/* Books page: typographic opener with a fan of the real covers, the sticky volume stage, coming books, novels. */

.bk-open { position: relative; padding: calc(var(--head-h) + 46px) 0 40px; min-height: 76vh; background: var(--ink); overflow: clip; display: flex; flex-direction: column; justify-content: center; }
.bk-open::before { content: ''; position: absolute; inset: 0; background: url('../img/loft-floor.jpg') center / cover; opacity: .55; }
.bk-open::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 90% at 78% 45%, rgba(246,226,26,.08), transparent 60%), linear-gradient(90deg, rgba(13,24,33,.9), rgba(13,24,33,.35)); }
.bk-open > .container { position: relative; z-index: 1; }
.bk-open__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 4vw, 70px); align-items: center; }
.bk-open .h1 { font-size: clamp(2.5rem, 4.8vw, 4.9rem); margin-bottom: 22px; }
.bk-open .lede { color: #C9D5DB; }

.fan { position: relative; height: min(56vh, 500px); min-height: 330px; perspective: 1600px; }
.fan__book { position: absolute; left: 50%; bottom: 4%; width: min(46%, 230px); transform-origin: 50% 120%; border-radius: 2px 3px 3px 2px; overflow: hidden; box-shadow: 0 26px 50px rgba(0,0,0,.55); --rot: calc((var(--i) - 2) * 11deg); --x: calc((var(--i) - 2) * 22%); transform: translateX(-50%) translateX(var(--x)) rotate(var(--rot)); transition: transform .8s var(--ease); }
.fan__book::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(255,255,255,.1) 6%, transparent 12%); }
.fan__book img { width: 100%; aspect-ratio: 900 / 1271; object-fit: cover; }
.fan:hover .fan__book { --rot: calc((var(--i) - 2) * 15deg); --x: calc((var(--i) - 2) * 34%); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(26px, 4vh, 44px); border-top: 1px solid var(--line-dark); }
.facts li { padding: 18px 20px 4px 0; border-right: 1px solid var(--line-dark); margin-right: 20px; }
.facts li:last-child { border-right: 0; }
.facts b { display: block; font-family: var(--f-stencil); font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.05; color: var(--yellow); letter-spacing: .02em; }
.facts span { display: block; margin-top: 6px; font-size: .95rem; color: var(--on-dark-2); line-height: 1.4; }

/* volume by volume: sticky cover stage beside the list */
.vols { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.vols__sticky { position: sticky; top: calc(var(--head-h) + 30px); height: calc(100vh - var(--head-h) - 60px); max-height: 720px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.vols__covers { position: relative; width: min(100%, calc((100vh - var(--head-h) - 160px) * .708), 400px); aspect-ratio: 900 / 1271; perspective: 1800px; }
.vols__cover { position: absolute; inset: 0; border-radius: 3px 4px 4px 3px; overflow: hidden; box-shadow: 0 30px 60px rgba(13,24,33,.35), 0 2px 0 rgba(13,24,33,.2); opacity: 0; transform: rotateY(-30deg) translateX(-12%) scale(.92); transform-origin: 0% 50%; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.vols__cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.32), rgba(255,255,255,.14) 5%, transparent 11%); }
.vols__cover.is-on { opacity: 1; transform: none; }
.vols__cover.is-past { opacity: 0; transform: rotateY(25deg) translateX(10%) scale(.94); }
.vols__cover img { width: 100%; height: 100%; object-fit: cover; }
.vols__dots { display: flex; gap: 10px; margin-top: 22px; }
.vols__dots i { width: 26px; height: 3px; background: rgba(19,32,42,.2); transition: background .4s, width .4s var(--ease); }
.vols__dots i.is-on { background: var(--green); width: 46px; }
.vol { min-height: min(78vh, 640px); display: flex; flex-direction: column; justify-content: center; padding: 30px 0; border-top: 1px solid var(--line-light); }
.vol:first-child { border-top: 0; }
.vol__cover-sm { display: none; }
.vol__label { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; color: var(--on-light-2); }
.vol__label b { font-size: 1.5rem; color: var(--redlead); letter-spacing: .04em; }
.vol__title { font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.12; margin-bottom: 16px; }
.vol__text { font-size: 1.08rem; color: var(--on-light); }
.vol__note { display: block; padding: 10px 14px; border-left: 3px solid var(--green); background: rgba(0,96,53,.08); border-radius: var(--r); color: var(--on-light); }
.vol__isbn { font-size: .95rem; color: var(--on-light-2); }
.vol__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
@media (max-width: 900px) {
  .bk-open__grid { grid-template-columns: 1fr; }
  .fan { height: 300px; min-height: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(2) { border-right: 0; }
  .vols { grid-template-columns: 1fr; }
  .vols__stage { display: none; }
  .vol { min-height: 0; display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
  .vol__cover-sm { display: block; border-radius: 2px; overflow: hidden; box-shadow: 0 12px 24px rgba(13,24,33,.25); }
  .vol__cover-sm img { width: 100%; aspect-ratio: 900 / 1271; object-fit: cover; }
}
@media (max-width: 520px) { .vol { grid-template-columns: 1fr; } .vol__cover-sm { width: 140px; } }

/* coming next */
.next { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); perspective: 1400px; }
.next__card { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px; border-radius: var(--r); background: rgba(233,238,240,.04); border: 1px solid var(--line-dark); transform-style: preserve-3d; transition: border-color .3s; }
.next__card:hover { border-color: rgba(246,226,26,.45); }
.next__cover { border-radius: 2px; overflow: hidden; box-shadow: 0 16px 30px rgba(0,0,0,.45); align-self: start; transform: translateZ(30px); }
.next__cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; background: #fff; }
.next__body .h3 { margin-bottom: 10px; color: var(--on-dark); }
.next__body p { color: var(--on-dark-2); font-size: 1rem; }
.next__small { margin-top: 18px; font-size: .92rem; color: var(--on-dark-2); }
@media (max-width: 1000px) { .next { grid-template-columns: 1fr; } }

/* novels */
.novels__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.novels__covers { position: relative; height: min(60vh, 460px); }
.novels__c { position: absolute; width: 52%; border-radius: 2px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.novels__c img { width: 100%; height: auto; }
.novels__c--1 { left: 4%; top: 6%; transform: rotate(-6deg); z-index: 2; }
.novels__c--2 { left: 34%; top: 14%; width: 62%; transform: rotate(5deg); }
@media (max-width: 900px) { .novels__grid { grid-template-columns: 1fr; } .novels__covers { height: 340px; max-width: 460px; } }

/* closing call */
.bk-cta { min-height: 64vh; display: flex; align-items: center; }
.bk-cta__bg { position: absolute; inset: -10% 0; }
.bk-cta__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.5) contrast(1.1); }
.bk-cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,24,33,.95), rgba(13,24,33,.55) 60%, rgba(13,24,33,.3)); }
.bk-cta__in { position: relative; z-index: 2; }
.bk-cta__in .h2 { margin-bottom: 18px; }
.js:not(.no-anim) .fan__book { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js:not(.no-anim) .fan__book { opacity: 1; } }
.vols__stage { align-self: stretch; }
.novels .h2 { margin-bottom: 20px; }
.vol__buy .textlink { display: inline-flex; align-items: center; min-height: 44px; }
