:root {
  --ink: #fff9ee;
  --soft: rgba(255, 249, 238, 0.74);
  --line: rgba(255, 249, 238, 0.22);
  --night: #050605;
  --gold: #c8aa73;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--night);
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.is-loading .catalog-shell {
  transform: scale(1.015);
  filter: blur(10px);
}

body.is-ready .catalog-shell {
  transform: scale(1);
  filter: blur(0);
  transition: transform 1800ms cubic-bezier(0.18, 0.72, 0.16, 1), filter 1800ms ease;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  max-width: 100%;
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-weight: 400;
  line-height: 1.06;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: screen;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 8px 10px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  gap: 18px;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(200, 170, 115, 0.13), transparent 26%),
    linear-gradient(180deg, rgba(5, 6, 5, 0.96), rgba(5, 6, 5, 0.9));
  color: var(--ink);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 1500ms ease, visibility 1500ms ease;
}

.loader::before {
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  border: 1px solid rgba(200, 170, 115, 0.16);
  border-radius: 48% 52% 46% 54% / 52% 46% 54% 48%;
  content: "";
  position: absolute;
  animation: loaderBreath 2400ms ease-in-out infinite alternate;
}

.loader-brandmark {
  display: flex;
  gap: 20px;
  align-items: center;
  color: var(--ink);
  opacity: 0.12;
  transform: translateY(18px) scale(0.96);
  animation: loaderFloat 2400ms 260ms cubic-bezier(0.18, 0.72, 0.16, 1) forwards;
}

.loader-brandmark img {
  display: block;
  width: clamp(86px, 11vw, 138px);
  height: auto;
  filter: invert(1) brightness(1.08);
}

.loader-brandmark span,
.brand span {
  display: grid;
  gap: 4px;
  line-height: 1;
}

.loader-brandmark strong,
.brand strong {
  font-size: clamp(12px, 1.5vw, 18px);
  font-weight: 400;
  letter-spacing: 0.18em;
}

.loader-brandmark em,
.brand em {
  font-style: normal;
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0.14em;
}

.loader p {
  margin: 0;
  color: rgba(255, 249, 238, 0.62);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  animation: loaderFloat 2400ms 720ms cubic-bezier(0.18, 0.72, 0.16, 1) forwards;
}

body.is-ready .loader {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.catalog-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.catalog-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px clamp(18px, 4vw, 60px);
  pointer-events: none;
}

.brand,
.catalog-status {
  pointer-events: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.brand img {
  display: block;
  width: clamp(52px, 5.4vw, 78px);
  height: auto;
  filter: invert(1) brightness(1.08);
}

.catalog-status {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.catalog-status i {
  width: 54px;
  height: 1px;
  background: var(--line);
}

.book,
.spread {
  width: 100%;
  height: 100%;
}

.spread {
  position: relative;
  perspective: 1800px;
}

.catalog-page {
  position: absolute;
  inset: clamp(10px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid rgba(255, 249, 238, 0.14);
  background: #111;
  box-shadow: 0 34px 130px rgba(0, 0, 0, 0.56);
  opacity: 0;
  pointer-events: none;
  transform: translateX(8%) rotateY(-10deg) scale(0.985);
  transform-origin: right center;
  transition:
    opacity 520ms ease,
    transform 900ms cubic-bezier(0.16, 0.78, 0.18, 1),
    filter 900ms cubic-bezier(0.16, 0.78, 0.18, 1);
}

.catalog-page::before,
.catalog-page::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  content: "";
}

.catalog-page::before {
  background:
    radial-gradient(70% 88% at 100% 50%, rgba(255, 249, 238, 0.22), transparent 31%),
    linear-gradient(90deg, transparent 76%, rgba(0, 0, 0, 0.46));
  mix-blend-mode: screen;
  transform: translateX(10%);
}

.catalog-page::after {
  background:
    linear-gradient(90deg, rgba(255, 249, 238, 0.08), transparent 18%),
    radial-gradient(46% 82% at 0% 50%, rgba(0, 0, 0, 0.7), transparent 42%);
  transform: translateX(-12%);
}

.catalog-page.is-active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotateY(0) scale(1);
}

.catalog-page.is-leaving-next {
  opacity: 0;
  filter: brightness(0.72);
  transform: translateX(-18%) rotateY(24deg) skewY(-0.6deg) scale(0.975);
  transform-origin: left center;
}

.catalog-page.is-leaving-prev {
  opacity: 0;
  filter: brightness(0.72);
  transform: translateX(18%) rotateY(-24deg) skewY(0.6deg) scale(0.975);
  transform-origin: right center;
}

.catalog-page.is-leaving-next::after,
.catalog-page.is-leaving-prev::before {
  animation: pagePeel 900ms cubic-bezier(0.16, 0.78, 0.18, 1);
}

.catalog-page img,
.page-shade {
  position: absolute;
  inset: 0;
}

.catalog-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.page-shade {
  background:
    linear-gradient(90deg, rgba(3, 4, 3, 0.82), rgba(3, 4, 3, 0.42) 48%, rgba(3, 4, 3, 0.12)),
    linear-gradient(0deg, rgba(3, 4, 3, 0.82), rgba(3, 4, 3, 0.08) 56%, rgba(3, 4, 3, 0.48));
}

.page-shade.light {
  background:
    linear-gradient(90deg, rgba(3, 4, 3, 0.74), rgba(3, 4, 3, 0.32) 54%, rgba(3, 4, 3, 0.08)),
    linear-gradient(0deg, rgba(3, 4, 3, 0.78), rgba(3, 4, 3, 0.05) 58%, rgba(3, 4, 3, 0.18));
}

.page-copy {
  position: absolute;
  z-index: 2;
  width: min(780px, calc(100% - 40px));
}

.cover-copy {
  left: clamp(24px, 7vw, 104px);
  bottom: clamp(70px, 10vh, 132px);
}

.chapter-copy {
  left: clamp(24px, 7vw, 104px);
  bottom: clamp(70px, 10vh, 120px);
}

.chapter-copy.align-right {
  right: clamp(24px, 7vw, 104px);
  left: auto;
  max-width: 760px;
}

.label {
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 30px;
  font-size: clamp(25px, 4.25vw, 59px);
  line-height: 1.18;
}

h2 {
  margin-bottom: 30px;
  font-size: clamp(25px, 3.8vw, 52px);
  line-height: 1.18;
}

.page-copy p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 2.08;
}

.page-copy .label {
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.chapter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.chapter-tags span {
  position: relative;
  padding: 10px 15px 9px;
  border: 1px solid rgba(200, 170, 115, 0.34);
  border-radius: 999px 780px 840px 700px / 680px 999px 640px 900px;
  background: rgba(5, 6, 5, 0.18);
  color: rgba(255, 249, 238, 0.84);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.chapter-tags span::before {
  position: absolute;
  inset: -4px -5px;
  z-index: -1;
  border: 1px solid rgba(200, 170, 115, 0.16);
  border-radius: 52% 48% 45% 55% / 46% 56% 44% 54%;
  content: "";
  transform: rotate(-2deg);
}

.chapter-list {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chapter-list li,
.note {
  border-left: 1px solid var(--gold);
  color: rgba(255, 249, 238, 0.82);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.chapter-list li {
  padding: 6px 0 6px 14px;
  text-transform: uppercase;
}

.note {
  max-width: 620px;
  margin-top: 28px;
  padding-left: 16px;
}

.wide-copy {
  width: min(880px, calc(100% - 40px));
}

.value-grid,
.film-grid {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 780px;
}

.film-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 780px;
}

.value-grid span,
.film-grid span,
.profile-frame {
  border: 1px solid rgba(255, 249, 238, 0.22);
  background: rgba(5, 6, 5, 0.26);
  backdrop-filter: blur(16px);
}

.value-grid span,
.film-grid span {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 18px 20px;
  align-content: center;
}

.value-grid strong,
.film-grid strong {
  color: var(--ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1;
}

.value-grid em,
.film-grid em {
  color: rgba(255, 249, 238, 0.68);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}

.profile-copy {
  left: clamp(24px, 7vw, 104px);
  bottom: clamp(68px, 9vh, 112px);
  width: min(720px, calc(100% - 40px));
}

.profile-copy.align-right {
  right: clamp(24px, 7vw, 104px);
  left: auto;
}

.profile-copy h2 span {
  color: rgba(255, 249, 238, 0.72);
  font-size: 0.56em;
}

.section-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.section-copy .label {
  margin-bottom: 24px;
}

.section-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(58px, 12vw, 168px);
  line-height: 0.9;
  text-transform: uppercase;
}

.section-page .page-shade {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 249, 238, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(3, 4, 3, 0.72), rgba(3, 4, 3, 0.5)),
    linear-gradient(90deg, rgba(3, 4, 3, 0.78), rgba(3, 4, 3, 0.18) 48%, rgba(3, 4, 3, 0.78));
}

.profile-frame {
  display: grid;
  width: min(420px, 100%);
  min-height: 112px;
  margin-top: 30px;
  place-items: center;
  color: rgba(255, 249, 238, 0.54);
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
}

.page-controls {
  position: fixed;
  right: clamp(16px, 4vw, 58px);
  bottom: clamp(16px, 4vw, 42px);
  z-index: 25;
  display: flex;
  gap: 18px;
  align-items: center;
}

.page-button,
.page-dots button {
  border: 1px solid var(--line);
  background: rgba(5, 6, 5, 0.28);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.page-button {
  min-width: 74px;
  height: 42px;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 220ms ease, border-color 220ms ease, opacity 220ms ease;
}

.page-button:hover,
.page-dots button:hover,
.page-dots button.is-active {
  color: var(--ink);
  border-color: rgba(255, 249, 238, 0.58);
}

.page-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-dots {
  display: flex;
  gap: 8px;
}

.page-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

@media (max-width: 760px) {
  .catalog-page {
    inset: 0;
    border: 0;
  }

  .catalog-header {
    padding: 18px 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 48px;
  }

  .brand strong {
    font-size: 9px;
  }

  .brand em {
    font-size: 13px;
  }

  .catalog-status i {
    width: 32px;
  }

  .page-copy,
  .chapter-copy.align-right,
  .profile-copy,
  .profile-copy.align-right {
    right: auto;
    left: 18px;
    bottom: 92px;
    width: calc(100% - 36px);
  }

  h1,
  h2 {
    font-size: clamp(25px, 7.2vw, 37px);
    line-height: 1.24;
  }

  .page-copy p {
    font-size: 13px;
    line-height: 1.95;
  }

  .chapter-tags {
    gap: 8px;
    margin-top: 24px;
  }

  .chapter-tags span {
    padding: 8px 10px;
    font-size: 10px;
  }

  .value-grid,
  .film-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px;
  }

  .value-grid span,
  .film-grid span {
    min-height: 66px;
    padding: 12px 14px;
  }

  .value-grid strong,
  .film-grid strong {
    font-size: 20px;
  }

  .profile-frame {
    min-height: 74px;
    margin-top: 18px;
  }

  .profile-copy h2 {
    font-size: clamp(25px, 6.8vw, 34px);
  }

  .section-copy h2 {
    font-size: clamp(54px, 18vw, 86px);
  }

  .page-controls {
    right: 14px;
    bottom: 16px;
    left: 14px;
    justify-content: space-between;
  }

  .page-button {
    min-width: 62px;
    height: 38px;
  }

  .page-dots {
    max-width: 150px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-dots button {
    width: 8px;
    height: 8px;
  }
}

@keyframes loaderFloat {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loaderBreath {
  from {
    opacity: 0.34;
    transform: scale(0.96) rotate(-4deg);
  }

  to {
    opacity: 0.72;
    transform: scale(1.04) rotate(3deg);
  }
}

@keyframes pagePeel {
  0% {
    opacity: 0;
    transform: translateX(0) scaleX(0.6);
  }

  35% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(0) scaleX(1.4);
  }
}
