@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;700;900&display=swap');

:root {
  color-scheme: dark;
  --ink: #090806;
  --old-gold: #8e6a38;
  --warm-white: #d8cfba;
  --hairline: rgba(210, 194, 162, .19);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body {
  overflow: hidden;
  background: var(--ink);
  color: var(--warm-white);
  font-family: 'Noto Serif SC', 'Songti SC', serif;
}
button { font: inherit; }

.installation {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 540px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 45%, rgba(104, 65, 28, .16), transparent 42%),
    radial-gradient(ellipse at 18% 48%, rgba(63, 14, 13, .2), transparent 36%),
    linear-gradient(128deg, #100d09 0%, #080806 54%, #0b0c08 100%);
}

.installation::before {
  content: '';
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.title-block {
  position: absolute;
  z-index: 8;
  top: clamp(24px, 4vw, 48px);
  left: clamp(22px, 4.5vw, 68px);
  padding-top: calc(9px * 1.2 + 10px);
  pointer-events: none;
}
.title-block h1 {
  margin: 0;
  color: rgba(222, 210, 187, .88);
  font-size: clamp(20px, 2.2vw, 31px);
  font-weight: 300;
  letter-spacing: .24em;
}

.stage {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.stage.is-dragging { cursor: grabbing; }
#sculptureCanvas { display: block; width: 100%; height: 100%; }
#FrontOriginalLayer {
  position: absolute;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.48), transparent 18%, transparent 81%, rgba(0,0,0,.43)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,.48) 100%);
}
.loading, .gesture-hint {
  position: absolute;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(190, 176, 151, .55);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .28em;
  transition: opacity .8s ease;
  pointer-events: none;
}
.loading { top: 50%; }
.loading.is-hidden { opacity: 0; }
.gesture-hint { bottom: 96px; white-space: nowrap; opacity: .7; }
.gesture-hint.is-hidden { opacity: 0; }
.film-wayfinding{position:absolute;inset:20% 4% 20%;pointer-events:none;font-size:9px;letter-spacing:.2em;color:#baa98b}
.film-wayfinding span{position:absolute;opacity:.35;transition:opacity .7s ease}
.film-wayfinding .hint-up{top:0;left:50%;transform:translateX(-50%)}
.film-wayfinding .hint-down{bottom:0;left:50%;transform:translateX(-50%)}
.film-wayfinding .hint-left{left:0;top:50%;writing-mode:vertical-rl}
.film-wayfinding .hint-right{right:0;top:50%;writing-mode:vertical-rl}
.film-wayfinding.is-quiet span{opacity:.025}.film-wayfinding.is-quiet .near{opacity:.28}

.controls {
  position: absolute;
  z-index: 9;
  right: clamp(22px, 4.5vw, 68px);
  bottom: clamp(22px, 4vw, 44px);
  left: clamp(22px, 4.5vw, 68px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  pointer-events: none;
}
.view-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: auto; }
.view-nav-row { display: flex; gap: clamp(5px, .8vw, 12px); }
.view-button {
  position: relative;
  min-width: 68px;
  max-width: 188px;
  height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(210, 194, 162, .10);
  border-radius: 0;
  background: rgba(9, 8, 6, .42);
  color: #827b6d;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .17em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.view-button::after {
  content: '';
  position: absolute;
  right: 9px;
  bottom: 6px;
  left: 9px;
  height: 1px;
  background: var(--old-gold);
  transform: scaleX(0);
  transition: transform .35s ease;
}
.view-button:hover, .view-button:focus-visible { color: var(--warm-white); border-color: rgba(171, 135, 77, .48); outline: none; }
.view-button.is-active { color: #d5cab5; background: rgba(78, 48, 25, .16); border-color: rgba(171, 135, 77, .4); }
.view-button.is-active::after { transform: scaleX(1); }
.view-button-narrative {
  min-width: 56px;
  max-width: 190px;
  height: 26px;
  padding: 0 10px;
  color: rgba(130, 123, 109, .72);
  font-size: 8px;
}

blockquote {
  max-width: min(520px, 48vw);
  margin: 0 0 2px;
  color: rgba(196, 163, 103, .76);
  font-size: clamp(18px, 1.7vw, 22px);
  font-style: normal;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .11em;
  text-align: right;
  text-wrap: balance;
  font-synthesis-weight: none;
  filter: contrast(1.08);
  -webkit-mask-image: radial-gradient(circle at 20% 35%, rgba(0,0,0,.82) 0 1px, #000 1.5px), linear-gradient(#000, #000);
  -webkit-mask-size: 5px 5px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(circle at 20% 35%, rgba(0,0,0,.82) 0 1px, #000 1.5px), linear-gradient(#000, #000);
  mask-size: 5px 5px, 100% 100%;
  mask-composite: intersect;
}

.film-cursor {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity .18s ease, filter .45s ease;
}
.film-cursor.is-visible { opacity: .72; }
.film-cursor::after {
  content: '';
  position: absolute;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  opacity: 0;
  background: rgba(230, 218, 197, .28);
  clip-path: polygon(50% 0, 57% 9%, 51% 6%, 51% 18%, 49% 18%, 49% 6%, 43% 9%, 50% 0,
    100% 50%, 91% 57%, 94% 51%, 82% 51%, 82% 49%, 94% 49%, 91% 43%, 100% 50%,
    50% 100%, 43% 91%, 49% 94%, 49% 82%, 51% 82%, 51% 94%, 57% 91%, 50% 100%,
    0 50%, 9% 43%, 6% 49%, 18% 49%, 18% 51%, 6% 51%, 9% 57%, 0 50%);
}
.film-cursor.drag-hint-visible::after { opacity: 1; }
@media (pointer: coarse) { .film-cursor { display: none; } }
.film-cursor.is-figure { filter: brightness(1.28); }
.film-cursor::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 230, 201, .18), rgba(218, 196, 156, .055) 32%, transparent 70%);
  transition: transform .45s ease, opacity .45s ease;
}
.film-cursor.is-figure::before { transform: translate(-50%, -50%) scale(1.18); opacity: .95; }
.film-cursor span,
.film-cursor span::before,
.film-cursor span::after {
  position: absolute;
  display: block;
  content: '';
  transform: translate(-50%, -50%);
  background: #eee2cb;
}
.film-cursor span {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(239, 222, 190, .7), 0 0 8px rgba(202, 164, 105, .26);
}
.film-cursor span::before {
  top: 50%;
  left: 50%;
  width: 10px;
  height: .6px;
  background: linear-gradient(90deg, transparent, rgba(239, 226, 201, .82), transparent);
}
.film-cursor span::after {
  top: 50%;
  left: 50%;
  width: .6px;
  height: 10px;
  background: linear-gradient(180deg, transparent, rgba(239, 226, 201, .82), transparent);
}

@media (pointer: fine) {
  html, body, button, .stage, .stage.is-dragging { cursor: none; }
}

@media (max-width: 700px) {
  .installation { min-height: 480px; }
  .controls { right: 18px; bottom: 18px; left: 18px; flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .view-nav { display: flex; }
  .view-nav-row { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .view-button { min-width: 0; padding: 0 5px; font-size: 8px; }
  blockquote { max-width: none; font-size: clamp(14px, 4vw, 16px); }
  .gesture-hint { bottom: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  .loading, .gesture-hint, .view-button, .view-button::after, .film-cursor, .film-cursor::before { transition-duration: .01ms; }
}
