@font-face {
  font-family: MiSans;
  src: url("https://unmadebox.com/fonts/v1/MiSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MiSans Latin";
  src: url("https://unmadebox.com/fonts/v1/MiSansLatin-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #f1e8de;
  --quiet: #c4af9f;
  --line: #67483e;
  --green: #c7ef38;
  font-family: MiSans, system-ui, sans-serif;
  color: var(--paper);
  background: #0a0707;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
a { color: inherit; text-underline-offset: 4px; }
button { color: inherit; cursor: pointer; font: inherit; }
p, h1, h2 { margin: 0; }
.gallery {
  --x: 0;
  --y: 0;
  position: relative;
  display: grid;
  isolation: isolate;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100svh;
  overflow: hidden;
}
.gallery::before, .gallery::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.gallery::before {
  z-index: -2;
  inset: -2%;
  background: #0a0707 url("/assets/gallery.webp") center / cover no-repeat;
  transform: translate(calc(var(--x) * -19px), calc(var(--y) * -12px)) scale(1.02);
  transition: transform .55s ease-out, filter .65s ease;
}
.gallery::after {
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at calc(35% + var(--x) * 13%) 83%, #b9232140, transparent 52%);
  animation: warm-floor 7s ease-in-out infinite alternate;
}
.gallery[data-scene]::before { filter: brightness(.65); transform: scale(1.08); }
.masthead, .floor-controls { display: flex; align-items: center; justify-content: space-between; padding-inline: clamp(18px, 2.8vw, 46px); z-index: 2; }
.masthead { padding-block: clamp(10px, 2.4vh, 25px); }
.wordmark { display: inline-block; font-family: "MiSans Latin", MiSans, sans-serif; font-weight: 900; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.masthead .wordmark { font-size: clamp(20px, 1.75vw, 28px); }
.wordmark span { color: var(--green); font-size: 1.25em; line-height: .7; margin-inline: .08em; }
.masthead nav { display: flex; gap: clamp(18px, 3vw, 54px); }
.masthead button, .wall-links button, .listen-link, .cabinet button { border: 0; background: none; }
.masthead button, .wall-links button { padding: 8px 0; }
.masthead button:hover, .wall-links button:hover { color: var(--green); }

.installation { display: grid; grid-template-columns: 68.7% 31.3%; align-items: center; padding-bottom: 5svh; }
.artwork {
  width: min(75%, 57svh, 770px);
  position: relative;
  justify-self: center;
  transform: translate(calc(var(--x) * 17px), calc(var(--y) * 13px));
  transition: transform .55s ease-out;
}
.artwork::before, .artwork::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 3px);
  width: 1px;
  height: 90svh;
  z-index: -1;
  background: linear-gradient(90deg, #51443a, #aa9480);
}
.artwork::before { left: 8%; }
.artwork::after { right: 8%; }
.artwork button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: 0 14px 58px #000b;
  transform-origin: top center;
  animation: hang-in 1.35s cubic-bezier(.18,.76,.24,1) both;
  transition: box-shadow .4s;
}
.artwork button:hover, .artwork button:focus-visible { box-shadow: 0 18px 80px #ba2b2355; }
.artwork img { display: block; width: 100%; height: auto; }
.art-hint {
  position: absolute; inset: auto 10px 10px auto; display: grid; place-items: center;
  width: 32px; height: 32px; background: #140b0ddd; border: 1px solid #f1e8de70;
  border-radius: 50%; opacity: 0; transform: translateY(5px); transition: opacity .25s, transform .25s;
}
.artwork button:is(:hover,:focus-visible) .art-hint { opacity: 1; transform: none; }
.wall {
  justify-self: end;
  width: min(82%, 280px);
  margin-right: clamp(18px, 5vw, 91px);
  perspective: 540px;
}
.wall-label {
  transform: rotateY(calc(29deg + var(--x) * 5deg)) rotateZ(-5deg) skewY(-2deg);
  transform-origin: left center;
  text-shadow: 0 1px 10px #000;
  transition: transform .55s ease-out;
  animation: wall-light 1.3s .22s both;
}
.wall-label h1 { font-size: clamp(48px, 5.1vw, 82px); font-weight: 400; line-height: 1.15; letter-spacing: .13em; margin: 12px 0; }
.wall-label p { color: var(--quiet); line-height: 1.55; }
.wall-links { display: grid; justify-items: start; border-top: 1px solid #b1988580; width: fit-content; padding-top: 9px; margin-top: 18px; }
.floor-controls { display: grid; grid-template-columns: 1fr auto 1fr; padding-block: 4px clamp(8px, 2vh, 22px); }
.listen-link { grid-column: 2; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #a27c686f; border-radius: 3px; background: #140b0d80; }
.listen-link:hover { border-color: #d69a82; color: var(--green); }
.listen-disc { position: relative; border-radius: 50%; width: 21px; height: 21px; background: repeating-radial-gradient(circle, #d3b29b 0 1px, #211415 1px 4px); transition: transform .6s; }
.listen-disc::after { content: ""; position: absolute; width: 1px; height: 9px; background: var(--green); inset: 2px auto auto 9px; }
.listen-link:hover .listen-disc, .gallery[data-scene="listen"] .listen-disc { transform: rotate(145deg); }
.font-credit { grid-column: 3; justify-self: end; color: #c4af9f; opacity: .8; font-size: .6875rem; text-decoration: none; }

.cabinet {
  width: min(630px, calc(100% - 28px));
  max-height: calc(100svh - 30px);
  margin: auto;
  padding: 0;
  color: var(--paper);
  background: #191010;
  border: 1px solid #866353;
  box-shadow: 0 30px 120px #000d;
  overflow: hidden;
}
.cabinet[open] { display: flex; flex-direction: column; animation: cabinet-in .38s cubic-bezier(.2,.73,.24,1) both; }
.cabinet::backdrop { background: #0805079e; backdrop-filter: blur(5px); }
.cabinet-top { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 5px; padding: 9px clamp(10px, 2.4vw, 24px); border-bottom: 1px solid var(--line); }
.cabinet-top nav { display: flex; gap: clamp(4px, 2vw, 17px); }
.cabinet-top button { min-height: 40px; padding: 6px 8px; }
.cabinet-top button[aria-pressed="true"], .cabinet-top button:hover { color: var(--green); }
.close { font-size: 27px; min-width: 40px; line-height: 1; }
.cabinet-body { overflow: auto; overscroll-behavior: contain; padding: clamp(16px, 3vw, 32px); }
.cabinet-body > :not([hidden]) { animation: view-in .3s ease-out both; }
.cabinet[data-view="cover"] { width: min(73svh, 640px, calc(100% - 28px)); }
.detail-art { width: 100%; height: auto; display: block; }
.release { color: var(--quiet); font-size: .875rem; }
.notes h2 { margin: 10px 0 16px; line-height: 1.35; font-size: clamp(24px, 3vw, 34px); }
.notes > p:not(.release), .label > p:not(.release) { line-height: 1.75; color: var(--quiet); margin-top: 12px; }
.tracks ol { list-style: none; margin: 13px 0 0; padding: 0; counter-reset: track; border-top: 1px solid var(--line); }
.tracks li { counter-increment: track; }
.tracks li a { display: grid; grid-template-columns: 2rem 1fr auto auto; align-items: center; min-height: 44px; gap: 8px; padding-inline: 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.tracks li a::before { content: counter(track, decimal-leading-zero); }
.tracks li a::after { content: "▷"; margin-inline: 5px; }
.tracks li a::before, time { color: var(--quiet); font-size: .85rem; font-variant-numeric: tabular-nums; }
.tracks a:hover { background: #351713; color: var(--green); }
#netease-link, .label a { display: inline-block; margin-top: 10px; }
#player iframe { display: block; width: 100%; border: 0; margin-top: 14px; background: white; }
.label h2 { font-size: clamp(32px, 5vw, 54px); margin-top: 8px; }
@keyframes hang-in { from { transform: translateY(-14px) rotate(-2.2deg); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes warm-floor { from { opacity: .36; } to { opacity: .7; } }
@keyframes wall-light { from { opacity: .35; } to { opacity: 1; } }
@keyframes cabinet-in { from { transform: translateY(20px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes view-in { from { transform: translateY(7px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 680px) and (orientation: portrait) {
  .installation { grid-template-columns: 1fr; align-content: center; gap: 10px; padding: 10px 15px 3px; }
  .artwork { width: min(70vw, 42svh, 355px); }
  .wall { justify-self: end; width: auto; margin-right: clamp(15px, 8vw, 60px); }
  .wall-label { transform: rotateY(21deg) rotateZ(-4deg); }
  .wall-label > .wordmark { display: none; }
  .wall-label h1 { font-size: clamp(32px, 7svh, 48px); margin: 3px 0; }
  .wall-links { display: flex; gap: 15px; margin-top: 5px; padding-top: 1px; }
  .floor-controls { grid-template-columns: auto 1fr; gap: 5px; }
  .listen-link { grid-column: 1; }
  .font-credit { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.playback-note { margin-top: 12px; color: var(--quiet); font-size: .875rem; }
