:root {
  --bg: #303536;
  --page: #272c2d;
  --ink: #e8e8e3;
  --muted: #8f9290;
  --line: rgba(255, 255, 255, .16);
  --header: 74px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
}
body,
.site-shell,
.site-shell * {
  user-select: none;
  -webkit-user-select: none;
}
button, a { color: inherit; }
button { font: inherit; }
button:focus-visible,
a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.site-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: var(--bg);
}

.brand {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3vw, 52px);
  mix-blend-mode: difference;
  pointer-events: none;
}
.brand button { pointer-events: auto; }
.brand__home {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}
.brand__latin,
.brand__asian { display: flex; gap: 1em; align-items: baseline; }
.brand__name { font-size: 12px; letter-spacing: .32em; }
.brand__role { color: #aaa; font-size: 10px; font-weight: 700; letter-spacing: .28em; }
.brand__asian {
  color: #a7aaa8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
  letter-spacing: .22em;
}
.header-actions { display: flex; gap: 26px; align-items: center; }
.language, .menu-toggle {
  border: 0;
  padding: 8px 0;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}
.language { color: #b4b6b4; font-size: 10px; letter-spacing: .25em; }
.menu-toggle { display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .26em; }
.menu-toggle--bottom {
  position: absolute;
  z-index: 30;
  left: clamp(20px, 3vw, 52px);
  bottom: 17px;
}
.menu-toggle--bottom[aria-expanded="true"] { z-index: 19; }
.menu-toggle i { display: block; width: 13px; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
.menu-toggle i + i { margin-left: -20px; transform: translateY(4px); }
.menu-toggle[aria-expanded="true"] i { transform: translateY(2px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i + i { transform: translateY(2px) rotate(-45deg); }

.viewer { position: absolute; inset: 0; background: var(--bg); }
.spread-stage {
  position: absolute;
  inset: clamp(76px, 8vh, 112px) clamp(24px, 4vw, 72px) clamp(68px, 8vh, 105px);
  display: grid;
  place-items: center;
}
.spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}
.page {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--page);
}
.page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  animation: reveal .65s var(--ease) both;
}
.page:first-child img { object-position: right center; }
.page:last-child img { object-position: left center; }
.page--empty { background: var(--bg); }
.cover-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 8vw, 145px);
  background: var(--bg);
}
.cover-copy__index { margin-bottom: 25px; color: var(--muted); font-size: 10px; letter-spacing: .28em; }
.cover-copy h1 {
  max-width: 520px;
  margin: 0;
  font-family: "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
  font-size: clamp(22px, 2.8vw, 46px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .13em;
}
.cover-copy p { max-width: 360px; margin: 28px 0 0; color: var(--muted); line-height: 1.65; }
.cover-copy .cover-copy__asian {
  margin: 12px 0 0;
  color: #aeb1af;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(16px, 1.45vw, 24px);
  letter-spacing: .16em;
}

.nav-zone {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 38%;
  border: 0;
  background: transparent;
}
.nav-zone--prev { left: 0; cursor: w-resize; }
.nav-zone--next { right: 0; cursor: e-resize; }
.nav-zone::after {
  position: absolute;
  top: 50%;
  color: rgba(255,255,255,.72);
  font-size: 20px;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .25s;
  pointer-events: none;
}
.nav-zone--prev::after { content: "←"; left: clamp(16px, 2vw, 34px); }
.nav-zone--next::after { content: "→"; right: clamp(16px, 2vw, 34px); }
.nav-zone:hover::after,
.nav-zone:focus-visible::after { opacity: 1; }
.progress {
  position: absolute;
  z-index: 8;
  right: clamp(20px, 3vw, 52px);
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b4b6b4;
  font-size: 9px;
  letter-spacing: .2em;
}
.progress__slider {
  --slider-progress: 0%;
  width: clamp(90px, 11vw, 170px);
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, #deded9 0 var(--slider-progress), var(--line) var(--slider-progress) 100%) center / 100% 1px no-repeat;
}
.progress__slider::-webkit-slider-thumb {
  width: 8px;
  height: 8px;
  border: 1px solid #deded9;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
}
.progress__slider::-moz-range-track { height: 1px; border: 0; background: transparent; }
.progress__slider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 1px solid #deded9;
  border-radius: 50%;
  background: var(--bg);
}
.hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  color: #9b9e9b;
  font-size: 9px;
  letter-spacing: .23em;
  text-transform: uppercase;
  transition: opacity .4s;
}
.hint.is-hidden { opacity: 0; }

.menu-panel {
  position: absolute;
  z-index: 20;
  inset: auto 0 0;
  min-height: 185px;
  padding: 34px clamp(20px, 3vw, 52px) 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  background: rgba(12, 15, 15, .94);
  backdrop-filter: blur(14px);
  transform: translateY(102%);
  transition: transform .55s var(--ease);
}
.menu-panel.is-open { transform: translateY(0); }
.menu-panel__books { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.book-link, .contact-link {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.book-link { display: grid; gap: 8px; }
.book-link small { color: #737674; font-size: 8px; letter-spacing: .25em; }
.book-link__title { display: grid; gap: 5px; }
.book-link__title strong {
  font-family: "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
  font-size: clamp(11px, 1.15vw, 16px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: .11em;
}
.book-link__title em {
  color: #888b89;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
  font-style: normal;
  letter-spacing: .14em;
}
.book-link.is-active { border-top-color: var(--ink); }
.contact-link { width: 170px; display: flex; justify-content: space-between; text-transform: uppercase; font-size: 10px; letter-spacing: .2em; }

.contact-panel {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 75px);
  background: rgba(21, 25, 25, .97);
  visibility: hidden;
  opacity: 0;
  transition: opacity .45s var(--ease), visibility .45s;
}
.contact-panel.is-open { visibility: visible; opacity: 1; }
.close {
  position: absolute;
  top: 25px;
  right: clamp(20px, 3vw, 52px);
  border: 0;
  background: transparent;
  font-size: 28px;
  font-weight: 200;
  cursor: pointer;
}
.eyebrow { margin: auto 0 35px; color: var(--muted); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; }
.contact-panel__content {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(25px, 4vw, 70px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact-block { min-width: 0; }
.contact-block small { display: block; margin-bottom: 13px; color: var(--muted); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; }
.contact-block a, .contact-block p { margin: 0; font-size: clamp(14px, 1.45vw, 21px); line-height: 1.4; text-decoration: none; }
.contact-block a {
  user-select: text;
  -webkit-user-select: text;
}
.contact-rep { margin-top: auto; color: var(--muted); font-size: 10px; }

.custom-cursor { display: none; }

@media (pointer: fine) {
  .site-shell,
  .site-shell * { cursor: none !important; }
  .contact-block a { cursor: text !important; }
  .nav-zone::after { display: none; }
  .custom-cursor {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    transition: width .22s var(--ease), height .22s var(--ease), border-color .22s, background .22s, opacity .18s;
    will-change: transform;
  }
  .custom-cursor.is-visible { opacity: 1; }
  .custom-cursor.is-left,
  .custom-cursor.is-right {
    width: 48px;
    height: 48px;
    border-color: rgba(255, 255, 255, .78);
    background: rgba(20, 24, 24, .12);
  }
  .custom-cursor span { transform: translateY(-1px); }
}

.loader {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .6s, visibility .6s;
}
.loader span { width: 42px; height: 1px; background: var(--line); overflow: hidden; }
.loader span::after { content: ""; display: block; width: 50%; height: 100%; background: #fff; animation: load 1s infinite alternate var(--ease); }
.loader.is-done { opacity: 0; visibility: hidden; }

@keyframes load { to { transform: translateX(100%); } }
@keyframes reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 720px) {
  :root { --header: 64px; }
  .brand__role { display: none; }
  .brand__name { font-size: 10px; letter-spacing: .25em; }
  .header-actions { gap: 17px; }
  .menu-toggle--bottom { left: 20px; bottom: 20px; }
  .spread-stage {
    inset: var(--header) 0 58px;
  }
  .spread {
    width: 100%;
    height: 100%;
    grid-template-columns: 100%;
    gap: 0;
  }
  .page img { object-position: center; }
  .page:nth-child(2) { display: none; }
  .cover-copy { padding: 26px; justify-content: flex-end; padding-bottom: 110px; }
  .cover-copy h1 { font-size: 35px; }
  .nav-zone { width: 30%; }
  .nav-zone::after { display: none; }
  .hint { display: none; }
  .menu-panel { min-height: 100%; align-items: stretch; flex-direction: column; justify-content: flex-end; }
  .menu-panel__books { display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; }
  .contact-link { width: 100%; }
  .contact-panel__content { grid-template-columns: 1fr; gap: 28px; max-height: 65vh; overflow: auto; }
  .contact-panel { padding-top: 80px; }
  .contact-rep { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
