@font-face {
  font-family: "DM Mono Local";
  src: url("assets/fonts/dm-mono.woff2") format("woff2");
  font-display: swap;
}

:root {
  --book-red: #e3133b;
  --book-black: #050505;
  --book-white: #fff;
  --book-pad: clamp(18px, 3vw, 46px);
  --book-line: 1px solid var(--book-black);
  --book-ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--book-black); background: var(--book-white); font-family: "DM Mono Local", "Courier New", monospace; font-size: 14px; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.book-skip { position: fixed; top: 0; left: 0; z-index: 100; padding: 10px 14px; color: white; background: black; transform: translateY(-120%); }
.book-skip:focus { transform: none; }
.book-header { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 var(--book-pad); background: rgba(255,255,255,.96); border-bottom: var(--book-line); backdrop-filter: blur(8px); }
.book-header a { font-size: 13px; letter-spacing: .02em; }
.book-header a:last-child { padding: 8px 12px; color: var(--book-black); background: var(--book-red); border: 1px solid var(--book-black); }

.book-hero { min-height: calc(88svh - 60px); padding: clamp(58px, 8vw, 110px) var(--book-pad) 32px; border-bottom: var(--book-line); }
.book-hero h1 { display: grid; grid-template-columns: .45fr 1.2fr 1.35fr; align-items: end; margin: 0; font-size: clamp(72px, 10.8vw, 176px); font-weight: 400; letter-spacing: -.085em; line-height: .79; }
.book-hero h1 span:nth-child(1) { grid-column: 1; }
.book-hero h1 span:nth-child(2) { grid-column: 2; }
.book-hero h1 span:nth-child(3) { grid-column: 3; }
.book-hero h1 span:nth-child(4) { grid-column: 2 / 4; margin-top: .24em; text-align: center; }
.book-hero-meta { display: flex; justify-content: space-between; margin-top: clamp(40px, 7vw, 90px); padding: 0 8vw; }
.book-hero-meta p { margin: 0; }

.book-scenes { position: relative; background: var(--book-black); }
.book-scene { position: relative; height: 100svh; margin: 0; overflow: hidden; border-bottom: 1px solid #333; }
.book-scene img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); transition: transform 1.1s var(--book-ease); }
.book-scene.is-current img { transform: scale(1); }
.book-scene figcaption { position: absolute; top: 22px; right: var(--book-pad); padding: 7px 10px; color: var(--book-black); background: var(--book-red); border: 1px solid var(--book-black); font-size: 10px; }
.book-scenes-rail { position: absolute; top: 92px; left: 18px; z-index: 4; width: 30px; color: white; font-size: 9px; pointer-events: none; }
.book-scenes-rail i { display: block; width: 2px; height: 120px; margin: 9px 0; background: #555; transform-origin: top; }
.book-scenes-rail i::after { display: block; width: 100%; height: calc(var(--scene-progress, 0) * 100%); background: var(--book-red); content: ""; }

.book-purchase { display: grid; grid-template-columns: 1.25fr 1fr; margin: 0; padding: clamp(48px, 7vw, 110px) var(--book-pad); border-bottom: var(--book-line); }
.book-product-image { position: relative; margin: 0; border: var(--book-line); overflow: hidden; }
.book-product-image img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.book-product-image figcaption { position: absolute; right: 0; bottom: 0; padding: 7px 10px; background: var(--book-red); border-top: var(--book-line); border-left: var(--book-line); font-size: 9px; }
.book-buy-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); border-top: var(--book-line); border-right: var(--book-line); border-bottom: var(--book-line); }
.book-buy-panel > p:first-child { margin: 0 0 10px; font-size: 18px; }
.book-buy-panel h2 { margin: 0 0 30px; font-size: clamp(54px, 6vw, 92px); font-weight: 400; letter-spacing: -.07em; line-height: .9; }
.book-buy-note { max-width: 48ch; margin: 10px 0 26px; font-size: 9px; }
.book-button { display: flex; justify-content: space-between; align-items: center; min-height: 62px; padding: 16px 20px; border: var(--book-line); font-size: clamp(14px, 1.6vw, 22px); text-transform: uppercase; transition: transform .22s var(--book-ease), background .22s, color .22s; }
.book-button:hover, .book-button:focus-visible { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--book-black); }
.book-button-red { color: var(--book-black); background: var(--book-red); }
.book-button-outline { color: var(--book-black); background: var(--book-white); }

.book-manifesto { display: grid; grid-template-columns: 1.35fr .75fr; gap: clamp(30px, 6vw, 96px); min-height: 110svh; padding: clamp(70px, 9vw, 140px) var(--book-pad); border-bottom: var(--book-line); }
.book-manifesto-copy h2 { max-width: 16ch; margin: 0 0 56px; padding-bottom: 18px; border-bottom: var(--book-line); font-size: clamp(36px, 4.2vw, 68px); font-weight: 400; letter-spacing: -.06em; line-height: .92; }
.book-manifesto-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.book-manifesto-columns p { margin: 0 0 28px; text-transform: uppercase; }
.book-object-wrap { position: relative; min-height: 720px; perspective: 1500px; }
.book-object-wrap > p { position: sticky; top: calc(82vh - 40px); margin: 0; text-align: right; font-size: 9px; }
.book-object { --book-ry: -22deg; --book-rx: 8deg; position: sticky; top: 120px; width: min(330px, 27vw); aspect-ratio: 722 / 1024; margin: 0 auto; transform: rotateX(var(--book-rx)) rotateY(var(--book-ry)); transform-style: preserve-3d; transition: transform .14s linear; }
.book-object-front, .book-object-pages, .book-object-spine { position: absolute; backface-visibility: hidden; }
.book-object-front { inset: 0; z-index: 2; background: white; box-shadow: 20px 28px 34px rgba(0,0,0,.22); transform: translateZ(22px); }
.book-object-front img { width: 100%; height: 100%; object-fit: cover; }
.book-object-pages { inset: 2% -18px 2% 10px; z-index: 1; background: repeating-linear-gradient(90deg, #eee 0 1px, #fff 1px 3px); transform: translateZ(2px); }
.book-object-spine { top: 0; left: -22px; width: 44px; height: 100%; display: grid; place-items: center; overflow: hidden; color: white; background: #111; transform: rotateY(-90deg) translateZ(0); transform-origin: right center; }
.book-object-spine span { width: 88vh; font-size: 9px; letter-spacing: .05em; transform: rotate(-90deg); white-space: nowrap; }

.book-wallpapers { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(30px, 5vw, 80px); min-height: 92svh; padding: clamp(70px, 9vw, 140px) var(--book-pad); border-bottom: var(--book-line); }
.book-wallpapers > * { min-width: 0; }
.book-wallpapers h2 { margin: 0 0 48px; font-size: clamp(68px, 7vw, 112px); font-weight: 400; letter-spacing: -.08em; line-height: .75; white-space: nowrap; }
.book-wallpapers-copy > p { margin: 0 0 44px; font-size: clamp(20px, 2.4vw, 34px); line-height: 1; }
.book-wallpapers-image { width: 100%; aspect-ratio: 1000 / 624; margin: 0; overflow: hidden; }
.book-wallpapers-image img { width: 100%; height: 100%; object-fit: contain; }

.book-gallery { padding: 46px 0 64px; border-bottom: var(--book-line); overflow: hidden; }
.book-gallery-head { display: flex; justify-content: space-between; align-items: end; padding: 0 var(--book-pad) 26px; }
.book-gallery-head h2 { margin: 0; font-size: clamp(34px, 4vw, 62px); font-weight: 400; letter-spacing: -.06em; line-height: .88; }
.book-gallery-head p { margin: 0; font-size: 10px; }
.book-gallery-rail { display: flex; gap: 5px; padding: 0 var(--book-pad) 18px; overflow-x: auto; cursor: grab; scrollbar-color: var(--book-red) #ddd; scrollbar-width: thin; user-select: none; }
.book-gallery-rail.is-dragging { cursor: grabbing; }
.book-gallery-rail figure { flex: 0 0 clamp(230px, 28vw, 430px); aspect-ratio: 3 / 4; margin: 0; overflow: hidden; border: var(--book-line); }
.book-gallery-rail img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .6s var(--book-ease); }
.book-gallery-rail figure:hover img { transform: scale(1.025); }

.book-final-buy { display: grid; grid-template-columns: .8fr 1fr; gap: 30px; padding: clamp(54px, 8vw, 110px) var(--book-pad); border-bottom: var(--book-line); }
.book-final-buy > div:first-child { display: flex; flex-direction: column; justify-content: space-between; min-height: 230px; }
.book-final-buy > div:first-child p { margin: 0; font-size: clamp(30px, 4vw, 64px); line-height: .9; }
.book-final-buy strong { font-size: clamp(48px, 6vw, 90px); font-weight: 400; }
.book-final-buy figure { grid-row: span 2; margin: 0; border: var(--book-line); }
.book-final-buy figure img { width: 100%; height: 100%; object-fit: cover; }
.book-final-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book-footer { display: flex; justify-content: space-between; padding: 18px var(--book-pad); font-size: 9px; }
.reveal-book { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--book-ease), transform .7s var(--book-ease); }
.reveal-book.is-visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  :root { --book-pad: 16px; }
  .book-header { min-height: 54px; }
  .book-hero { min-height: calc(88svh - 54px); padding-top: 50px; }
  .book-hero h1 { display: block; font-size: clamp(66px, 20vw, 108px); line-height: .78; }
  .book-hero h1 span { display: block; }
  .book-hero h1 span:nth-child(4) { margin-top: 0; text-align: left; }
  .book-hero-meta { margin-top: 34px; padding: 0; }
  .book-scene { height: 78svh; }
  .book-scene figcaption { top: 14px; }
  .book-scenes-rail { display: none; }
  .book-purchase { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 52px; }
  .book-product-image img { min-height: 0; aspect-ratio: 16 / 10; }
  .book-buy-panel { padding: 22px 18px; border-top: 0; border-left: var(--book-line); }
  .book-buy-panel h2 { margin-bottom: 22px; }
  .book-button { min-height: 56px; font-size: 15px; }
  .book-manifesto { grid-template-columns: 1fr; min-height: 0; padding-top: 70px; }
  .book-manifesto-copy h2 { margin-bottom: 36px; }
  .book-manifesto-columns { grid-template-columns: 1fr; }
  .book-manifesto-columns p { margin-bottom: 24px; font-size: 12px; }
  .book-object-wrap { min-height: 560px; }
  .book-object { top: 100px; width: min(68vw, 310px); }
  .book-object-wrap > p { top: auto; margin-top: 70px; }
  .book-wallpapers { grid-template-columns: 1fr; min-height: 0; padding-top: 70px; padding-bottom: 70px; }
  .book-wallpapers h2 { max-width: 100%; margin-bottom: 36px; font-size: min(16.5vw, 72px); }
  .book-wallpapers-copy > p { margin-bottom: 28px; font-size: 22px; }
  .book-wallpapers-image { grid-row: 1; }
  .book-gallery { padding-top: 34px; }
  .book-gallery-rail figure { flex-basis: 72vw; }
  .book-final-buy { grid-template-columns: 1fr; }
  .book-final-buy > div:first-child { min-height: 180px; }
  .book-final-buy figure { grid-row: auto; }
  .book-final-actions { grid-template-columns: 1fr; }
  .book-footer { flex-wrap: wrap; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal-book { opacity: 1; transform: none; }
  .book-object { transform: rotateX(7deg) rotateY(-18deg); }
}
