@font-face {
  font-family: Cormorant;
  src: url('assets/cormorant-cyr.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Cormorant;
  src: url('assets/cormorant-latin.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('assets/manrope-cyr.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  src: url('assets/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #08090c;
  --cream: #f0e9d8;
  --muted: #aaa69e;
  --gold: #dfc18a;
  --line: #d7be8d2b;
  --serif: Cormorant, Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.18,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.wrap { width: min(1250px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: 1rem; left: 1rem; padding: .75em 1em; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 79px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 13px; font: 1.68rem/1 var(--serif); }
.wordmark-mark { display: grid; width: 26px; aspect-ratio: 1; place-items: center; border: 1px solid #a88d65; transform: rotate(45deg) scale(.83); color: var(--gold); }
.wordmark-mark span { transform: rotate(-45deg); font-size: 1.3rem; }
.head-link, .footer a { display: inline-flex; align-items: center; gap: 12px; font-size: .78rem; letter-spacing: .06em; color: var(--muted); }
.head-link span, .footer a span { color: var(--gold); }
.head-link:hover, .footer a:hover { color: var(--cream); }

.hero { position: relative; isolation: isolate; overflow: clip; scroll-margin-top: 10px; }
.hero-intro { position: relative; z-index: 2; padding-top: clamp(38px, 5.5vw, 80px); text-align: center; }
.eyebrow { margin: 0; color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .23em; text-transform: uppercase; }
.hero-intro .eyebrow { display: flex; justify-content: center; align-items: center; gap: 14px; }
.rule { width: clamp(17px, 3vw, 43px); height: 1px; background: var(--line); }
h1 { margin: .16em 0 0; font: 400 clamp(3.65rem, 8vw, 7.8rem)/.97 var(--serif); letter-spacing: -.052em; text-wrap: balance; }
h1 em { color: var(--gold); font-style: normal; white-space: nowrap; }
.intro-copy { margin: 17px auto 0; max-width: 34ch; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.scene { position: relative; isolation: isolate; min-height: 430px; }
.scene-atmosphere { position: absolute; inset: -80px 0 -18px; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at 50% 52%, #1b1429 0%, #0b0d1500 56%), radial-gradient(ellipse at 50% 105%, #3932252e 0%, #08090c00 54%); }
.scene-atmosphere::before, .scene-atmosphere::after { content: ''; position: absolute; left: 50%; translate: -50%; width: min(78%, 1040px); height: 36%; bottom: 9%; border: 1px solid #d6c09419; border-radius: 50%; transform: rotateX(49deg); }
.scene-atmosphere::after { width: min(89%, 1180px); height: 42%; bottom: 6%; border-color: #d6c0940e; }
.volumes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 10px 21px; }
.volume, .reader, .volume-pick {
  --tone: #7be4ae;
  --mist-rgb: 44, 210, 130;
  --metal: #daeadb;
  --leather: #173829;
  --leather-dark: #071b14;
  --pose-y: -20deg;
  --pose-z: -7deg;
  --cover-position: 0%;
  --float-delay: -2s;
  --float-duration: 6.8s;
}
[data-book="purple"] { --tone: #c698ff; --mist-rgb: 158, 74, 253; --metal: #e8dbf2; --leather: #39294a; --leather-dark: #1a1024; --pose-y: -10deg; --pose-z: 1deg; --cover-position: 50%; --float-delay: -4s; --float-duration: 7.2s; }
[data-book="gold"] { --tone: #f6c575; --mist-rgb: 244, 161, 46; --metal: #f6d298; --leather: #473421; --leather-dark: #20140a; --pose-y: 18deg; --pose-z: 7deg; --cover-position: 100%; --float-delay: -1.2s; --float-duration: 6.2s; }
.volume { position: relative; min-width: 0; margin-top: 23px; z-index: 1; }
.volume[data-book="purple"] { margin-top: 0; }
.volume:is(:hover, :focus-within) { z-index: 2; }
.volume[data-open] { z-index: 3; }
.volume-fx { position: absolute; inset: 0; pointer-events: none; transition: opacity 500ms; }
.scene[data-has-open-book] .volume:not([data-open]) .volume-fx { opacity: .42; }
.volume-aura { position: absolute; inset: 7% -9% 18%; opacity: .86; background: radial-gradient(ellipse at 50% 57%, rgba(var(--mist-rgb), .32) 0%, rgba(var(--mist-rgb), .075) 40%, transparent 69%); transition: opacity 550ms; }
.volume:is(:hover, [data-open], :focus-within) .volume-aura { opacity: 1.5; }
.mist { position: absolute; top: 56%; left: 5%; width: 90%; height: 24%; border-radius: 50%; background: radial-gradient(ellipse at 38% 48%, rgba(var(--mist-rgb), .36), transparent 60%), radial-gradient(ellipse at 69% 64%, rgba(var(--mist-rgb), .26), transparent 56%), radial-gradient(ellipse at 57% 34%, rgba(var(--mist-rgb), .29), transparent 51%); filter: blur(19px); animation: drift 9s var(--float-delay) ease-in-out infinite alternate; }
.mist-two { top: 45%; left: 0; width: 100%; height: 18%; opacity: .57; animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translate(-6%, 12%) rotate(-7deg) scale(1.05, .85); } to { transform: translate(10%, -29%) rotate(5deg) scale(.88, 1.22); } }
.pedestal { position: absolute; left: 50%; bottom: 23%; width: 64%; height: 12%; translate: -50%; border: 1px solid rgba(var(--mist-rgb), .23); border-top-color: transparent; border-radius: 50%; transform: rotateX(48deg); box-shadow: 0 12px 35px rgba(var(--mist-rgb), .11), inset 0 -9px 24px rgba(var(--mist-rgb), .12); }
.pedestal::after { content: ''; position: absolute; inset: 20% 12%; border-bottom: 1px solid rgba(var(--mist-rgb), .23); border-radius: 50%; }
.spark-field { position: absolute; inset: 4% 2% 21%; }
.spark { position: absolute; top: var(--spark-y); left: var(--spark-x); width: var(--spark-size); height: var(--spark-size); background: var(--tone); border-radius: 50%; box-shadow: 0 0 9px 2px rgba(var(--mist-rgb), .58); animation: sparkle var(--spark-duration) var(--spark-delay) ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: .16; transform: translate(0, 6px); } 50% { opacity: .78; transform: translate(7px, -13px); } }

.book-button { position: relative; display: grid; grid-template-rows: minmax(300px, 1fr) auto; width: 100%; padding: 0 0 12px; background: none; border: 0; border-radius: 10px; cursor: pointer; text-align: center; isolation: isolate; }
.book-window { position: relative; display: grid; place-items: center; height: clamp(300px, 31vw, 435px); perspective: 1000px; }
.book-float { position: relative; display: block; width: clamp(144px, 62%, 240px); aspect-ratio: 0.712; transform-style: preserve-3d; animation: float var(--float-duration) var(--float-delay) ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-8px); } }
.book-model { position: absolute; inset: 0; transform: rotateX(calc(9deg + var(--tilt-x, 0deg))) rotateY(calc(var(--pose-y) + var(--tilt-y, 0deg))) rotateZ(var(--pose-z)); transform-style: preserve-3d; transition: transform 780ms var(--ease); }
.volume:is(:hover, :focus-within):not([data-open]) .book-model { transform: translateY(-9px) translateZ(18px) rotateX(calc(5deg + var(--tilt-x, 0deg))) rotateY(calc(var(--pose-y) / 2 + var(--tilt-y, 0deg))) rotateZ(calc(var(--pose-z) * .7)); }
.volume[data-open] .book-model { transform: translateX(15%) translateY(-7px) translateZ(14px) rotateX(8deg) rotateY(-5deg) rotateZ(-2deg) scale(.91); }
.book-model > span { display: block; position: absolute; }
.book-back { inset: 0; transform: translateZ(-21px); border: 2px solid var(--leather); border-radius: 5px 7px 7px 5px; background: linear-gradient(90deg,var(--leather), var(--leather-dark)); box-shadow: 0 16px 40px #0008; }
.book-spine { width: 48px; top: 0; bottom: 0; left: 0; transform: rotateY(-90deg) translateX(-2px); transform-origin: left; border: 1px solid var(--leather); border-radius: 9px 5px 5px 9px; background: repeating-linear-gradient(180deg, transparent 0 11%, #c9a9794d 11.2% 12%, #09080777 12.1% 13.6%, transparent 14% 27%), linear-gradient(90deg, var(--leather-dark) 1%, var(--leather) 49%, var(--leather-dark) 96%); }
.paper-edge { background: repeating-linear-gradient(90deg, #fffefd45 0 .6px, #564b2c3f .9px 1.5px, #bfab8115 1.7px 2.7px), linear-gradient(90deg, #a58d6d, #e4cca3 31%, #f4deb8 71%, #998062); }
.paper-edge-right { width: 40px; top: 5px; bottom: 5px; right: 4px; transform: rotateY(90deg) translateX(20px); transform-origin: right; border-radius: 3px; }
.paper-edge-bottom, .paper-edge-top { left: 4px; right: 4px; height: 40px; background: repeating-linear-gradient(0deg, #fffefd45 0 .6px, #564b2c3f .9px 1.5px, #bfab8115 1.7px 2.7px), linear-gradient(90deg, #887754, #ead3a3 43%, #b69772); }
.paper-edge-bottom { bottom: 6px; transform-origin: bottom; transform: rotateX(-90deg) translateY(20px); }
.paper-edge-top { top: 6px; transform-origin: top; transform: rotateX(90deg) translateY(-20px); }
.title-page { inset: 5px; padding-top: 19%; transform: translateZ(20px); border: 1px solid #a88b66; border-radius: 1px 4px 4px 1px; box-shadow: inset 13px 0 22px #4b2e2640, inset 0 0 12px #704b2c56; color: #423429; background: radial-gradient(ellipse at 61% 35%, #f7e5c1, #d1b88c 100%); }
.title-page::after { content: ''; position: absolute; inset: 7%; border: 1px solid #82664542; border-inline-start-color: #82664529; pointer-events: none; }
.page-volume { display: block; margin-top: 7%; color: #695239; font-size: .56rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; }
.page-title { display: block; margin: 7% 4% 0; font: clamp(1.32rem, 2.6vw, 2.32rem)/1 var(--serif); }
.page-lines { display: block; width: 48%; height: 19%; margin: 10% auto 0; background: repeating-linear-gradient(180deg, #6e573b61 0 1px, transparent 1px 7px); }
.page-ornament { display: block; margin-top: 9%; color: #8e704b; font-size: 1.1rem; }
.cover-hinge { inset: 0; transform: translateZ(23px); transform-origin: left; transform-style: preserve-3d; transition: transform 1.02s var(--ease); }
[data-open] .cover-hinge { transform: translateZ(23px) rotateY(-132deg); }
.cover-hinge > span { position: absolute; inset: 0; border-radius: 4px 8px 8px 4px; backface-visibility: hidden; }
.cover-front { border: 1px solid var(--leather); background: linear-gradient(100deg,#0003,transparent 28%,#0003), radial-gradient(ellipse at 58% 47%, var(--leather), var(--leather-dark) 82%); box-shadow: inset 0 0 10px #e6dec138, inset 0 0 24px #0009, 0 10px 24px #0009; }
.cover-front::before { content: ''; position: absolute; inset: 0; background: url('assets/covers.webp') var(--cover-position) center / 300% 100% no-repeat; border-radius: inherit; }
.cover-front::after { content:''; position:absolute; inset:0; border-radius: inherit; background: linear-gradient(90deg,#0007,transparent 15% 87%,#fff3 99%,#0005),linear-gradient(180deg,#0002,transparent 68%,#0006); pointer-events: none; }
.emboss-frame { position: absolute; inset: 5.75%; border: 1px solid #dbcab345; border-radius: 4px; box-shadow: inset 0 0 0 3px #0b0d104c, inset 0 0 0 4px #dbcab326; }
.cover-title, .cover-volume { position: absolute; z-index: 1; left: 7%; right: 7%; color: var(--metal); text-shadow: 0 2px 3px #000, 0 0 13px #000; }
.cover-title { top: 20%; font: clamp(1.28rem, 2.35vw, 2.25rem)/1 var(--serif); }
.cover-volume { bottom: 17%; font-size: .63rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.cover-emblem { position: absolute; top: 51%; left: 50%; display: grid; place-items: center; width: 41%; aspect-ratio: 1; border: 1px solid #e6dec170; border-radius: 50%; transform: translate(-50%, -50%); color: var(--tone); text-shadow: 0 0 5px var(--tone), 0 0 18px rgba(var(--mist-rgb), .69); font-size: clamp(2.3rem, 4vw, 4rem); box-shadow: 0 0 40px rgba(var(--mist-rgb), .19); }
.volume:is(:hover,:focus-within,[data-open]) .cover-emblem { box-shadow: 0 0 45px rgba(var(--mist-rgb), .42); }
.cover-inside { display: grid; place-items: center; transform: rotateY(180deg); background: radial-gradient(ellipse, var(--leather), var(--leather-dark)); border: 2px solid var(--leather); box-shadow: inset 0 0 20px #000d; }
.cover-inside::before { content: ''; position: absolute; inset: 10%; border: 1px solid color-mix(in srgb, var(--metal) 37%, transparent); }
.inside-emblem { display: grid; place-items: center; width: 43%; aspect-ratio: 1; color: var(--metal); border-radius: 50%; border: 1px solid currentColor; opacity: .66; font-size: clamp(2.3rem, 4vw, 4rem); }
html.cover-art-ready .cover-emblem { font-size: 0; border-color: transparent; }
html.cover-art-ready .emboss-frame { opacity: .4; }
.book-label { display: grid; align-content: end; justify-items: center; }
.label-volume { color: var(--tone); font-size: .64rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.label-title { font: clamp(2rem, 3vw, 3.1rem)/1 var(--serif); margin: 2px 0 10px; }
.book-action { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .74rem; }
.book-action span, .book-button:hover .book-action, [data-open] .book-action { color: var(--tone); }
.volume-picker { display: none; }
.section-line { display: flex; align-items: center; gap: 14px; width: min(1250px,calc(100% - 96px)); margin: 4px auto; color: var(--gold); }
.section-line::before, .section-line::after { content:''; flex: 1; height: 1px; background: var(--line); }

.reader { display: grid; grid-template-columns: auto 1.1fr .9fr; gap: 32px; align-items: start; padding: 55px 0 62px; }
.reader-emblem { display: grid; place-items: center; width: 72px; aspect-ratio: 1; margin-top: 1px; border: 1px solid rgba(var(--mist-rgb), .31); border-radius: 100%; color: var(--tone); font: 2.6rem/1 var(--serif); background: radial-gradient(circle, rgba(var(--mist-rgb),.16), transparent 66%); }
.reader-main .eyebrow { color: var(--tone); }
.reader h2 { margin: .08em 0 .12em; font: clamp(2.8rem, 5vw, 4.75rem)/.96 var(--serif); }
.reader-main > p:last-child { max-width: 40ch; margin: 12px 0 0; line-height: 1.7; color: var(--muted); }
.reader-contents { border-left: 1px solid var(--line); padding-left: 30px; }
.reader-contents h3 { margin: 2px 0 10px; font-size: .84rem; }
.reader-contents ul { margin: 0; padding-left: 1.1rem; color: #d8d0bd; font-size: .85rem; line-height: 1.85; }
.reader-contents li::marker { color: var(--tone); }
.reader-note { margin: 11px 0 0; color: var(--muted); font-size: .76rem; }
.footer { display: flex; justify-content: space-between; align-items: center; min-height: 74px; border-top: 1px solid var(--line); color: #a49d8d; font: 1.16rem/1 var(--serif); }

@media (max-width: 880px) {
  .wrap, .section-line { width: calc(100% - 48px); }
  .book-window { height: clamp(270px, 40vw, 335px); }
  .book-button { grid-template-rows: 1fr auto; }
  .book-float { width: clamp(129px, 66%, 194px); }
  .reader { gap: 22px; }
}
@media (max-width: 640px) {
  .wrap, .section-line { width: calc(100% - 36px); }
  .topbar { min-height: 65px; }
  .wordmark { font-size: 1.42rem; gap: 8px; }
  .head-link { font-size: .72rem; gap: 7px; }
  .hero-intro { padding-top: 37px; }
  .hero-intro .eyebrow { font-size: .56rem; gap: 8px; letter-spacing: .16em; }
  h1 { font-size: clamp(3.25rem, 11vw, 4.95rem); }
  .intro-copy { margin-top: 14px; font-size: .87rem; }
  .scene { min-height: 0; }
  .scene-atmosphere::before, .scene-atmosphere::after { display: none; }
  .volumes { grid-template-columns: 1fr; padding: 0; }
  .volume, .volume[data-book="purple"] { margin: 0; }
  .volume:not([data-display]) { display: none; }
  .book-window { height: clamp(306px, 83vw, 345px); }
  .book-float { width: clamp(149px, 49vw, 191px); }
  .cover-title { font-size: clamp(1.35rem, 5.2vw, 1.78rem); }
  .page-title { font-size: clamp(1.42rem, 5.3vw, 1.91rem); }
  .volume[data-open] .book-model { transform: translateX(21%) translateY(-4px) translateZ(4px) rotateX(8deg) rotateY(-4deg) rotateZ(-1deg) scale(.83); }
  .volume-picker { display: flex; justify-content: center; gap: 6px; padding: 6px 8px 22px; }
  .volume-pick { border-radius: 50px; border: 1px solid var(--line); background: #110f13; min-height: 43px; padding-inline: 12px; color: var(--muted); cursor: pointer; font-size: .69rem; }
  .volume-pick[aria-pressed="true"] { border-color: rgba(var(--mist-rgb),.45); background: rgba(var(--mist-rgb),.12); color: var(--tone); }
  .reader { grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 23px; padding-block: 34px; }
  .reader-emblem { width: 47px; font-size: 1.9rem; }
  .reader-main > p:last-child { font-size: .89rem; }
  .reader-contents { grid-column: 2; padding-left: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .spark { opacity: .55; }
}
