/* Peter Pan · Hundred Year Books · v4 (after docs/landing-research.md). Palette from the book: cloth, foil, paper. */
@font-face { font-family: "Cormorant"; src: url("fonts/Cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/Cormorant-Italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-Italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --night: #16224a;      /* the cloth */
  --deep: #0e1633;
  --gold: #e2b85c;       /* the foil */
  --brass: #86601a;      /* gold that reads on cream */
  --cream: #f4ede0;
  --paper: #faf6ee;
  --ink: #231f1c;
  --soft: #5d564c;
  --rule: rgba(35, 31, 28, .15);
  --display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --text: "EB Garamond", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4.5vw, 64px);
  --space: clamp(80px, 11vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 clamp(18px, .9vw + 14px, 20px)/1.6 var(--text); font-variant-numeric: oldstyle-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--paper); }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(32px, 3.8vw, 52px); }
h3 { font-size: clamp(24px, 2.2vw, 30px); }
.eyebrow, .imprint { font: 500 12.5px/1.4 var(--text); letter-spacing: .26em; text-transform: uppercase; font-variant-numeric: lining-nums; color: var(--brass); }
.eyebrow { margin-bottom: 18px; }
.note { font-size: 14.5px; font-style: italic; color: var(--soft); }
.copy { max-width: 34em; }
.copy p:not(.eyebrow) { margin-top: 18px; color: #3b352e; text-wrap: pretty; }

.btn { display: inline-block; padding: 16px 30px 15px; border: 1px solid var(--night); border-radius: 2px; background: var(--night); color: var(--paper); font: 500 14px/1.2 var(--text); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .2s; white-space: nowrap; -webkit-appearance: none; appearance: none; }
.btn:hover { background: #22336b; }
.btn.small { padding: 11px 20px 10px; font-size: 12.5px; }
.btn.soon, .btn.soon:hover { background: transparent; color: var(--night); cursor: default; }
.reserve .btn.soon, .reserve .btn.soon:hover { background: transparent; color: var(--gold); }
.quiet { font-style: italic; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.quiet:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---- top: gallery and the facts beside it ---------------------------------------------------- */
.top { display: grid; gap: 28px; padding: 0 0 56px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.gallery { min-width: 0; }
.stage img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9e1d2; }
.thumbs { display: flex; gap: 8px; padding: 10px var(--gutter) 0; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 auto; width: 76px; padding: 0; border: 1px solid transparent; border-radius: 2px; background: none; cursor: pointer; opacity: .78; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--night); opacity: 1; }
.thumb:hover { opacity: 1; }
.gallery .note { padding: 10px var(--gutter) 0; }
.buy { padding: 0 var(--gutter); }
.buy .imprint { margin-bottom: 14px; }
h1 { font-size: clamp(48px, 6vw, 84px); letter-spacing: .06em; text-transform: uppercase; color: var(--night); line-height: .98; }
.by { margin-top: 12px; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--soft); }
.line { margin-top: 22px; max-width: 26em; font: italic 400 clamp(21px, 1.6vw, 25px)/1.4 var(--display); color: #3b352e; }
.facts { margin-top: 24px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 16px; font-variant-numeric: lining-nums; }
.facts { column-gap: 1.4em; }
.facts li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 .55em .2em 0; background: var(--brass); transform: rotate(45deg); }
.status { margin-top: 18px; max-width: 28em; font-size: 16.5px; color: #3b352e; }
.status b { font-weight: 500; color: var(--ink); }
.actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
.actions .quiet { font-size: 17px; }
.price { margin-top: 18px; font-size: 22px; font-variant-numeric: lining-nums; }
@media (min-width: 960px) {
  .top { grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); gap: clamp(32px, 4vw, 72px); padding: clamp(24px, 3vw, 44px) var(--gutter) clamp(48px, 5vw, 80px); align-items: center; }
  .thumbs, .gallery .note { padding-inline: 0; }
  .buy { padding: 0; max-width: 32em; }
}

/* ---- the reserve bar ------------------------------------------------------------------------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--gutter); background: rgba(250, 246, 238, .97); border-top: 1px solid var(--rule); transform: translateY(110%); transition: transform .25s; }
.bar.on { transform: none; }
.bar p { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar p b { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: .04em; margin-right: .5em; }
.bar p span { color: var(--soft); font-style: italic; }
@media (max-width: 640px) { .bar p span { display: none; } }
@media (min-width: 960px) { .bar { top: 0; bottom: auto; transform: translateY(-110%); border-top: 0; border-bottom: 1px solid var(--rule); } .bar.on { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }

/* ---- the book in your hands ----------------------------------------------------------------- */
.hands { padding: var(--space) var(--gutter) 0; }
.hands .copy, .details .copy, .pictures .copy, .inside .copy { margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.wide, .pair { max-width: 1160px; margin-inline: auto; }
.wide img, .pair img { width: 100%; }
@media (max-width: 1199px) { .hands .wide { margin-inline: calc(-1 * var(--gutter)); } }
.pair { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 700px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figcaption, .spreadpic figcaption { margin-top: 12px; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }

/* ---- production ------------------------------------------------------------------------------ */
.details { padding: var(--space) var(--gutter) 0; }
.details dl { max-width: 900px; margin: 0 auto; display: grid; column-gap: 48px; }
.details dl > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 15px 0; border-top: 1px solid var(--rule); }
.details dt { font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); padding-top: .3em; }
.details dd { font-variant-numeric: lining-nums; font-size: 17.5px; }
.details .note { max-width: 900px; margin: 18px auto 0; text-align: center; }
@media (min-width: 900px) { .details dl { grid-template-columns: 1fr 1fr; } }

/* ---- pictures -------------------------------------------------------------------------------- */
.pictures { padding: var(--space) var(--gutter) 0; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.feature { max-width: 1160px; margin: 0 auto; display: grid; gap: 24px; align-items: center; }
.feature > .zoom { width: min(100%, 420px); justify-self: center; }
.feature > .zoom img { box-shadow: 0 1px 2px rgba(14, 22, 51, .18), 0 22px 50px -20px rgba(14, 22, 51, .45); }
@media (min-width: 900px) { .feature { grid-template-columns: 420px minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); } }
.grid { list-style: none; padding: 0; max-width: 1160px; margin: clamp(48px, 6vw, 80px) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px) clamp(14px, 2vw, 28px); align-items: start; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid .zoom { overflow: hidden; }
.grid .zoom img { width: 100%; transition: transform .4s; }
.grid .zoom:hover img { transform: scale(1.03); }
.grid p { margin-top: 12px; font-size: 16px; line-height: 1.4; }
.grid q { display: block; quotes: "\201C" "\201D"; font: italic 400 clamp(18px, 1.5vw, 21px)/1.3 var(--display); }
.grid span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .grid .zoom img { transition: none; } }

dialog#viewer { max-width: min(94vw, 1100px); max-height: 94vh; padding: 0; border: 0; background: var(--paper); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
dialog#viewer::backdrop { background: rgba(14, 22, 51, .82); }
dialog#viewer img { max-height: calc(94vh - 70px); width: auto; margin: 0 auto; }
dialog#viewer p { padding: 14px 20px 18px; text-align: center; font: italic 400 19px/1.35 var(--display); }
dialog#viewer .close { position: absolute; top: 6px; right: 8px; width: 44px; height: 44px; border: 0; background: rgba(250, 246, 238, .9); font-size: 30px; line-height: 1; cursor: pointer; border-radius: 50%; }

/* ---- inside the pages ------------------------------------------------------------------------ */
.inside { margin-top: var(--space); padding: var(--space) var(--gutter); background: var(--deep); color: var(--cream); text-align: center; }
.inside .eyebrow { color: var(--gold); }
.inside .copy p:not(.eyebrow) { color: #cfc8b8; }
.lights { margin: 0 auto; display: inline-flex; gap: clamp(22px, 4vw, 44px); }
.lights button { padding: 8px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: #a9a595; font: 500 13px/1.4 var(--text); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; }
.lights button[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.lights button:hover { color: var(--cream); }
.inside :focus-visible { outline-color: var(--gold); }
.spreads { margin: 36px auto 0; max-width: 1040px; }
.spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.spread img { width: 100%; }
.spread::after { content: ""; position: absolute; inset: 0 45% 0 45%; pointer-events: none; background: linear-gradient(90deg, rgba(20, 16, 10, 0), rgba(20, 16, 10, .1) 38%, rgba(20, 16, 10, .3) 50%, rgba(20, 16, 10, .1) 62%, rgba(20, 16, 10, 0)); }
@media (max-width: 1139px) { .spreads { margin-inline: calc(-1 * var(--gutter) + 6px); } }
.inside .note { margin-top: 24px; color: #9c9788; }

/* ---- the text, to give ----------------------------------------------------------------------- */
.text { padding: var(--space) var(--gutter); display: grid; gap: clamp(56px, 7vw, 96px); }
.text > div { max-width: 30em; margin-inline: auto; }
.text h2 { font-size: clamp(30px, 3vw, 42px); }
.text p:not(.eyebrow) { margin-top: 18px; color: #3b352e; text-wrap: pretty; }
@media (min-width: 900px) { .text { grid-template-columns: 1fr 1fr; } .text > div { margin: 0; justify-self: center; } }

/* ---- reserve --------------------------------------------------------------------------------- */
.reserve { background: var(--night); color: var(--cream); padding: var(--space) var(--gutter); display: grid; gap: 48px; justify-items: center; }
.reserve .mark { width: min(100%, 460px); }
.reserve-body { width: 100%; max-width: 30em; }
.reserve .eyebrow { color: var(--gold); }
.reserve h2 { color: var(--gold); }
.next { margin-top: 22px; padding-left: 1.3em; color: #e6dfcd; }
.next li + li { margin-top: 6px; }
.next li::marker { color: var(--gold); font-variant-numeric: lining-nums; }
.terms { margin-top: 18px; }
.terms div { display: flex; gap: 14px; padding: 4px 0; }
.terms dt { min-width: 5em; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); padding-top: .35em; }
form { margin-top: 30px; }
label { display: block; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #cfc8b8; margin-bottom: 10px; }
.field { display: grid; gap: 12px; }
input[type=email] { width: 100%; min-width: 0; padding: 14px 16px; border: 1px solid rgba(246, 239, 223, .45); border-radius: 2px; background: transparent; color: var(--cream); font: 400 19px/1.3 var(--text); -webkit-appearance: none; appearance: none; }
input[type=email]::placeholder { color: rgba(246, 239, 223, .42); font-style: italic; }
input[type=email]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.reserve .btn { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.reserve .btn:hover { background: #edc977; }
.reserve :focus-visible { outline-color: var(--gold); }
.error { margin-top: 12px; font-size: 16px; font-style: italic; color: #f0c9a0; }
.thanks { margin-top: 30px; padding: 20px 0; border-top: 1px solid rgba(226, 184, 92, .5); border-bottom: 1px solid rgba(226, 184, 92, .5); font: italic 400 clamp(22px, 2.2vw, 28px)/1.35 var(--display); color: var(--gold); outline: none; }
.free { margin-top: 56px; padding-top: 36px; border-top: 1px solid rgba(246, 239, 223, .18); }
.free p { margin: 10px 0 14px; color: #cfc8b8; }
.free .quiet { color: var(--gold); }
@media (min-width: 560px) { .field { grid-template-columns: 1fr auto; } }
@media (min-width: 900px) {
  .reserve { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(48px, 7vw, 120px); }
  .reserve .mark { justify-self: end; }
  .reserve-body { justify-self: start; }
}

/* ---- questions ------------------------------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; padding: var(--space) var(--gutter); }
.faq h2 { margin-bottom: 24px; text-align: center; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { padding: 18px 36px 18px 0; cursor: pointer; list-style: none; position: relative; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; color: var(--brass); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 0 20px; color: #3b352e; }

/* ---- footer ---------------------------------------------------------------------------------- */
footer { background: var(--deep); color: #a9a595; padding: 52px var(--gutter) 88px; text-align: center; font-size: 16px; }
footer .imprint { color: var(--gold); margin-bottom: 12px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- v5: the 3D book on the night sky -------------------------------------------------------- */
.hero5 { padding: 0; gap: 0; background: var(--paper); }
.sky { position: relative; overflow: hidden; min-height: clamp(460px, 70vw, 640px); display: grid; place-items: center; background: var(--deep); }
.sky-art { position: absolute; inset: 0; }
.sky-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: brightness(.55) saturate(.85); }
.sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 22, 51, .35), rgba(14, 22, 51, .1) 40%, rgba(14, 22, 51, .55)); pointer-events: none; }
.sky-note { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; text-align: center; font-size: 13.5px; font-style: italic; color: rgba(244, 237, 224, .75); }
/* the book is built to scale from a 6 x 9 in page: boards 6.125 x 9.25 in and 0.1 in thick, a 0.6 in page block, 1/8 in squares and a
   spine rounded 0.22 of its depth. The script poses it and lights each face (--s-* darken, --h-* sheen, --g-* foil glint). */
.stagebook { --w: clamp(200px, 24vw, 310px); --h: calc(var(--w) * 1.5102); --t: calc(var(--w) * .01633); --pb: calc(var(--w) * .098);
  --d: calc(var(--pb) + 2 * var(--t)); --sq: calc(var(--w) * .0204);
  position: relative; z-index: 1; width: min(100%, calc(var(--w) * 2.3)); padding: 44px 0 60px; display: grid; place-items: center; }
.bk-scene { position: relative; width: var(--w); height: var(--h); perspective: calc(var(--w) * 7); pointer-events: none; }
.bk-scene span { position: absolute; display: block; }
.bk-pose { inset: 0; transform-style: preserve-3d;
  transform: scale(var(--s, 1)) rotateX(var(--rx, -14deg)) rotateY(var(--ry, 30deg)) translateX(var(--x, 0px)); }
.b-back, .b-block, .b-spine, .b-leaf, .b-cover { transform-style: preserve-3d; }
.book3d { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; border-radius: 18px; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.book3d:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }

/* every face hides its back; ::after darkens it away from the light, ::before is the cloth's sheen, .foil the gold catching the light */
.f { -webkit-backface-visibility: hidden; backface-visibility: hidden; background: #16224a url(img/b3-cloth.webp) 0 0 / calc(var(--w) * .26); }
.f::before, .f::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.f::after { z-index: 2; background: #05081a; opacity: var(--sh, .2); }
.f::before { z-index: 3; background: linear-gradient(var(--sa, 105deg), rgba(214, 222, 255, 0) 25%, rgba(214, 222, 255, .5) 50%, rgba(214, 222, 255, 0) 75%) var(--gx, 50%) 0 / 300% 100%; opacity: var(--hl, 0); }
.f .foil { inset: 0; z-index: 4; background: linear-gradient(105deg, rgba(255, 238, 180, 0) 30%, rgba(255, 244, 205, .95) 50%, rgba(255, 238, 180, 0) 70%) var(--gx, 50%) 0 / 300% 100%;
  -webkit-mask: url(img/b3-front-foil.webp) 0 0 / 100% 100%; mask: url(img/b3-front-foil.webp) 0 0 / 100% 100%; opacity: var(--gl, 0); }

/* back board: outside, inside (only its squares show past the pages) and three cloth edges */
.b-back { inset: 0; }
.bb-out { inset: 0; transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); --sh: var(--s-bo); }
.bb-in { inset: 0; transform: translateZ(calc(var(--pb) / -2)); --sh: var(--s-bi, .45); }
.bb-fore { left: calc(var(--w) - var(--t) / 2); top: 0; width: var(--t); height: 100%; transform: translateZ(calc((var(--pb) + var(--t)) / -2)) rotateY(90deg); --sh: var(--s-bf, .6); }
.bb-head, .bb-foot { left: 0; width: 100%; height: var(--t); }
.bb-head { top: calc(var(--t) / -2); transform: translateZ(calc((var(--pb) + var(--t)) / -2)) rotateX(90deg); --sh: var(--s-bh, .15); }
.bb-foot { top: calc(var(--h) - var(--t) / 2); transform: translateZ(calc((var(--pb) + var(--t)) / -2)) rotateX(-90deg); --sh: var(--s-bt, .6); }

/* the page block: the top leaf under the flyleaf is the title page; edges carry the edition's three paper colours, one line per leaf */
.b-block { left: 0; top: var(--sq); width: calc(var(--w) - var(--sq)); height: calc(var(--h) - 2 * var(--sq)); }
.bk-top { inset: 0; transform: translateZ(calc(var(--pb) / 2 - .5px)); background: #f4ecd9 url(img/b3-title.webp) 0 0 / 100% 100%; --sh: var(--s-top, .1); }
.bk-top::before, .lf-front::before, .lf-back::before, .bc-in::before { opacity: 1; background: linear-gradient(90deg, rgba(40, 25, 5, .55), rgba(40, 25, 5, .22) 3%, rgba(40, 25, 5, .06) 9%, rgba(255, 250, 235, .1) 18%, rgba(255, 250, 235, 0) 40%, rgba(40, 25, 5, 0) 85%, rgba(40, 25, 5, .1)); }
.bk-fore, .bk-head, .bk-foot { background: #e9dfc7; }
.bk-fore { left: calc(100% - var(--pb) / 2); top: 0; width: var(--pb); height: 100%; transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .13) 0 .5px, rgba(0, 0, 0, .16) .5px 1.1px, transparent 1.1px 1.6px), url(img/edge.png) 0 0 / 100% 100%; --sh: var(--s-ef, .5); }
.bk-head, .bk-foot { left: 0; width: 100%; height: var(--pb);
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .13) 0 .5px, rgba(0, 0, 0, .16) .5px 1.1px, transparent 1.1px 1.6px), url(img/b3-edge-v.png) 0 0 / 100% 100%; }
.bk-head { top: calc(var(--pb) / -2); transform: rotateX(90deg); --sh: var(--s-eh, .1); }
.bk-foot { top: calc(100% - var(--pb) / 2); transform: rotateX(-90deg) rotateZ(180deg); --sh: var(--s-et, .6); }
.bk-fore::before, .bk-head::before, .bk-foot::before { opacity: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 9%, rgba(0, 0, 0, 0) 91%, rgba(0, 0, 0, .3)); }
.bk-head::before, .bk-foot::before { background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0) 86%, rgba(0, 0, 0, .28)); }

/* the rounded spine: eight strips on an arc (radius .678 of the depth, centred .458 of it inside the hinge), each showing its slice of the
   flat spine; when the cover lies open the script squashes the arc under the gutter */
.b-spine { inset: 0; transform-origin: 0 50% calc(var(--d) / -2); transform: scaleZ(var(--sz, 1)); }
.sp { --fw: calc(var(--d) * .1403); left: calc(var(--d) * .4582 - var(--fw) / 2 - .4px); top: 0; width: calc(var(--fw) + .8px); height: 100%;
  transform: rotateY(calc(var(--a) - 90deg)) translateZ(calc(var(--d) * .6782));
  background: url(img/b3-spine.webp) calc(.4px - var(--k) * var(--fw)) 0 / calc(var(--fw) * 8) 100%; }
.sp .foil { -webkit-mask: url(img/b3-spine-foil.webp) calc(.4px - var(--k) * var(--fw)) 0 / calc(var(--fw) * 8) 100%; mask: url(img/b3-spine-foil.webp) calc(.4px - var(--k) * var(--fw)) 0 / calc(var(--fw) * 8) 100%; background-size: 100% 100%; background-image: linear-gradient(rgba(255, 244, 205, .9), rgba(255, 244, 205, .9)); }
.sp:nth-child(1) { --sh: var(--s-p0, .6); --gl: var(--g-p0); } .sp:nth-child(2) { --sh: var(--s-p1, .5); --gl: var(--g-p1); }
.sp:nth-child(3) { --sh: var(--s-p2, .4); --gl: var(--g-p2); } .sp:nth-child(4) { --sh: var(--s-p3, .3); --gl: var(--g-p3); }
.sp:nth-child(5) { --sh: var(--s-p4, .2); --gl: var(--g-p4); } .sp:nth-child(6) { --sh: var(--s-p5, .15); --gl: var(--g-p5); }
.sp:nth-child(7) { --sh: var(--s-p6, .12); --gl: var(--g-p6); } .sp:nth-child(8) { --sh: var(--s-p7, .12); --gl: var(--g-p7); }
/* the spine's ends: cloth turned in over the hollow, with the striped headband just inside */
.sp-head, .sp-foot { left: calc(var(--d) * -.22); width: calc(var(--d) * .22 + 1px); height: var(--d); border-radius: 100% 0 0 100% / 50% 0 0 50%;
  background: radial-gradient(ellipse 100% 50% at 100% 50%, #2a1d10 0 55%, transparent 56%), repeating-linear-gradient(180deg, #b48a3c 0 1.4px, #6e1f22 1.4px 2.8px) 0 0 / 100% 100%; }
.sp-head::before, .sp-foot::before { opacity: 1; border-radius: inherit; background: radial-gradient(ellipse 100% 50% at 100% 50%, transparent 80%, #16224a 81%); }
.sp-head { top: calc(var(--d) / -2); transform: rotateX(90deg); --sh: var(--s-eh, .1); }
.sp-foot { top: calc(var(--h) - var(--d) / 2); transform: rotateX(-90deg); --sh: var(--s-et, .6); }

/* the flyleaf: the right half of the map, and the frontispiece on its back */
.b-leaf { left: 0; top: var(--sq); width: calc(var(--w) - var(--sq)); height: calc(var(--h) - 2 * var(--sq)); transform-origin: left center;
  transform: translateZ(calc(var(--pb) / 2 + .5px)) rotateY(var(--l, 0deg)); }
.lf-front, .lf-back { inset: 0; }
.lf-front { background: #f1e6cc url(img/b3-leaf.webp) 0 0 / 100% 100%; --sh: var(--s-lf, .1); }
.lf-back { transform: rotateY(180deg); background: #f1e6cc url(img/b3-frontis.webp) 0 0 / 100% 100%; --sh: var(--s-lb, .1); }
.lf-back::before { transform: scaleX(-1); }

/* front board, hinged at the top of the page block: the cover, the map's left half inside with the cloth turned in round it, three edges */
.b-cover { inset: 0; transform-origin: left center; transform: translateZ(calc(var(--pb) / 2)) rotateY(var(--c, 0deg)); }
.bc-out { inset: 0; transform: translateZ(var(--t)); background: url(img/b3-front.webp) 0 0 / 100% 100%; --sh: var(--s-out, .12); --hl: var(--h-out); --gl: var(--g-out, .25); }
.bc-in { inset: 0; transform: rotateY(180deg); --sh: var(--s-in, .1);
  background: url(img/b3-paste.webp) right center / calc(100% - var(--sq)) calc(100% - 2 * var(--sq)) no-repeat, #16224a url(img/b3-cloth.webp) 0 0 / calc(var(--w) * .26); }
.bc-in::before { transform: scaleX(-1); }
.bc-fore { left: calc(var(--w) - var(--t) / 2); top: 0; width: var(--t); height: 100%; transform: translateZ(calc(var(--t) / 2)) rotateY(90deg); --sh: var(--s-cf, .6); }
.bc-head, .bc-foot { left: 0; width: 100%; height: var(--t); }
.bc-head { top: calc(var(--t) / -2); transform: translateZ(calc(var(--t) / 2)) rotateX(90deg); --sh: var(--s-ch, .1); }
.bc-foot { top: calc(var(--h) - var(--t) / 2); transform: translateZ(calc(var(--t) / 2)) rotateX(-90deg); --sh: var(--s-ct, .6); }

/* the shadow it casts on the ground, placed by the script under whatever pose it is in */
.bk-shadow { left: 0; top: 0; width: 100px; height: 20px; border-radius: 50%; transform-origin: 0 0;
  transform: translate(calc(var(--w) * -.05), calc(var(--h) + 6px)) scale(calc(var(--w) * .011), 1.2);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .9), rgba(0, 0, 0, .45) 50%, rgba(0, 0, 0, 0)); }
.hero5 .buy { padding: 36px var(--gutter) 52px; }
@media (min-width: 960px) {
  .hero5 { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: stretch; min-height: min(92vh, 860px); }
  .hero5 .sky { min-height: 0; }
  .hero5 .buy { align-self: center; padding: 56px clamp(40px, 5vw, 88px); }
}

/* ---- v5: look inside ------------------------------------------------------------------------- */
.flip { padding: var(--space) var(--gutter); background: #ece4d5; border-bottom: 1px solid var(--rule); }
.flip .copy { margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.flipbook { max-width: min(1040px, 100vh); margin: 0 auto; perspective: 2600px; outline: none; }
.flipbook:focus-visible { outline: 2px solid var(--brass); outline-offset: 8px; }
.fb-book { position: relative; width: 100%; aspect-ratio: 4 / 3; transition: transform .7s cubic-bezier(.2, .7, .2, 1); cursor: pointer; touch-action: pan-y; user-select: none; }
.fb-book.closed { transform: translateX(-25%); }
.fb-book.ended { transform: translateX(25%); }
.leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .6, .2, 1); }
.leaf.turned { transform: rotateY(-180deg); }
.leaf .f, .leaf .b { position: absolute; inset: 0; backface-visibility: hidden; background: #f3ead6; box-shadow: 0 10px 22px -14px rgba(14, 22, 51, .45); }
.leaf .b { transform: rotateY(180deg); }
.leaf img { width: 100%; height: 100%; object-fit: cover; }
.leaf .f::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 8%); pointer-events: none; }
.leaf .b::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 8%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .leaf, .fb-book { transition: none; } }
.fb-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 28px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); font-variant-numeric: lining-nums; }
.fb-btn { width: 48px; height: 48px; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); font-size: 20px; cursor: pointer; }
.fb-btn:disabled { opacity: .35; cursor: default; }
.fb-free { margin-top: 18px; text-align: center; }

/* ---- v5: the gallery in the book section ----------------------------------------------------- */
.hands .gallery { max-width: 1160px; margin: 0 auto; }
@media (max-width: 1199px) { .hands .stage { margin-inline: calc(-1 * var(--gutter)); } }
.hands .thumbs, .hands .gallery .note { padding-inline: 0; }

/* ---- v5: a picture across the full width ----------------------------------------------------- */
.artbreak { margin-top: var(--space); }
.artbreak img { width: 100%; max-height: 88vh; object-fit: cover; }
.artbreak p { padding: 18px var(--gutter) 0; text-align: center; }
.artbreak q { quotes: "\201C" "\201D"; font: italic 400 clamp(22px, 2.2vw, 30px)/1.3 var(--display); }
.artbreak span { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.artbreak + .inside { margin-top: clamp(48px, 6vw, 80px); }

/* ---- brand ------------------------------------------------------------------------------------ */
.brandmark { margin-bottom: 22px; }
.brandmark img { width: clamp(150px, 14vw, 190px); height: auto; }
.foot-mark { display: flex; justify-content: center; margin-bottom: 16px; }
.foot-mark img { width: 200px; height: auto; }

/* keep everything inside the phone's width: the hidden thumbnail labels need a positioned parent */
.thumb { position: relative; }
.bar { overflow: hidden; }
.bar p { flex: 1 1 0; }

/* ---- order ------------------------------------------------------------------------------------ */
.price-big { margin-top: 14px; font: 500 clamp(40px, 4vw, 54px)/1 var(--display); color: var(--cream); font-variant-numeric: lining-nums; }
.price-big span { display: block; margin-top: 8px; font: italic 400 17px/1.4 var(--text); color: #cfc8b8; }
.reserve .actions { margin-top: 26px; }
.note.on-dark { margin-top: 16px; color: #b9b3a3; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: rgba(226, 184, 92, .12); }
.price { font-family: var(--display); font-size: clamp(30px, 2.6vw, 38px); font-weight: 500; color: var(--night); }
