:root {
  --green: #00f51f;
  --black: #050505;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --display-font: "Instrument Sans", Arial, Helvetica, sans-serif;
  --display-size: 30pt;
  --display-line: 45pt;
  --detail-size: clamp(18px, 1.55vw, 30px);
  --detail-line: 1.28;
  --detail-pad-x: clamp(34px, 4.2vw, 68px);
  --detail-gap: 5.4vw;
  --detail-image-width: 29.95vw;
  --detail-image-height: clamp(146px, 13.4vw, 258px);
  --detail-image-ratio: 1.48 / 1;
  --explore-size: clamp(26px, 2.1vw, 42px);
  --explore-line: 1.28;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: var(--green);
  color: var(--black);
  font-family: var(--display-font);
  font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 300;
}

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

.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--green);
  color: var(--black);
  cursor: pointer;
  transition: background-color 1.8s var(--ease), color 1.8s var(--ease);
}

body.detail-started .stage {
  background: #082f0a;
  color: #fff;
}

.tagline {
  position: absolute;
  top: clamp(16px, 2.3vw, 44px);
  left: 50%;
  z-index: 6;
  width: max-content;
  max-width: calc(100vw - 40px);
  margin: 0;
  font-size: var(--display-size);
  font-weight: 300;
  line-height: var(--display-line);
  letter-spacing: 0;
  text-align: center;
  transform: translateX(-50%);
}

body.intro-started .tagline {
  display: none;
}

.brand {
  position: absolute;
  top: clamp(14px, 2.05vw, 39px);
  left: 0;
  z-index: 7;
  width: 100%;
  height: clamp(56px, 7vw, 124px);
  pointer-events: none;
}

.brand-word {
  position: absolute;
  top: 0;
  margin: 0;
  font-size: var(--display-size);
  font-weight: 300;
  line-height: var(--display-line);
  letter-spacing: 0;
  opacity: 0;
}

.brand-word--seoul {
  left: 50%;
  transform: translateX(-104%);
}

.brand-word--archive {
  right: 50%;
  transform: translateX(104%);
}

body.intro-started .brand-word--seoul {
  animation: seoul-split 2.83s linear forwards;
}

body.intro-started .brand-word--archive {
  animation: archive-split 2.83s linear forwards;
}

body.detail-started .brand,
body.detail-started .topics {
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.topics {
  position: absolute;
  top: clamp(21px, 2.4vw, 44px);
  left: 50%;
  z-index: 5;
  display: flex;
  width: min(860px, 68vw);
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: translateX(-50%);
}

.topic {
  display: block;
  max-width: 100%;
  font-size: var(--display-size);
  font-weight: 300;
  line-height: var(--display-line);
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(28px);
}

.topic + .topic {
  margin-top: -12pt;
}

body.intro-started .topic {
  animation: topic-enter 1.58s var(--ease) forwards;
}

body.intro-started .topic--vending {
  animation-delay: 6.8s;
}

body.intro-started .topic--street {
  animation-delay: 7.03s;
}

body.intro-started .topic--hof {
  animation-delay: 7.27s;
}

.detail-copy {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--detail-gap);
  padding: clamp(34px, 4.1vw, 68px) var(--detail-pad-x) 0;
  color: inherit;
  font-family: var(--display-font);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s linear;
}

body.detail-started .detail-copy {
  opacity: 1;
}

.detail-column {
  position: relative;
  min-width: 0;
}

.detail-title,
.detail-index,
.detail-description {
  margin: 0;
  font-size: var(--detail-size);
  font-weight: 300;
  line-height: var(--detail-line);
  letter-spacing: 0;
  white-space: pre-line;
}

.detail-title {
  font-weight: 300;
}

.detail-description {
  white-space: normal;
}

.detail-body {
  position: absolute;
  top: 24.2vh;
  left: 0;
  width: 100%;
}

.detail-index {
  margin-bottom: clamp(34px, 3.15vw, 62px);
}

.image-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

body.detail-started .image-field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--detail-gap);
  align-items: start;
  padding: 0 var(--detail-pad-x);
  pointer-events: auto;
}

.archive-image {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  will-change: transform, opacity;
  transition: left 1.8s var(--ease), right 1.8s var(--ease),
    top 1.8s var(--ease), bottom 1.8s var(--ease),
    width 1.8s var(--ease), opacity 1.2s var(--ease),
    transform 1.8s var(--ease);
}

.archive-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-image--vending {
  left: 0;
  top: 24.1vh;
  width: min(44.6vw, 760px);
  aspect-ratio: 1.48 / 1;
  transform: translateX(-110%);
}

.archive-image--hof {
  right: 0;
  top: 0;
  width: min(39.7vw, 760px);
  aspect-ratio: 1.5 / 1;
  transform: translateX(110%);
}

.archive-image--street {
  right: 13.2vw;
  bottom: 0;
  width: min(43.4vw, 820px);
  aspect-ratio: 1.47 / 1;
  transform: translateY(112%);
}

body.intro-started .archive-image--vending {
  animation: vending-enter 2.08s var(--ease) 8.42s forwards;
}

body.intro-started .archive-image--hof {
  animation: hof-enter 2.08s var(--ease) 8.63s forwards;
}

body.intro-started .archive-image--street {
  animation: street-enter 2.08s var(--ease) 8.83s forwards;
}

body.detail-started .archive-image {
  animation: none !important;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  align-self: start;
  justify-self: start;
  width: var(--detail-image-width);
  height: auto;
  max-width: 100%;
  margin-top: 49.45vh;
  grid-row: 1;
  aspect-ratio: auto;
  opacity: 1;
  transform: translate(0, 0);
  cursor: pointer;
}

body.detail-started .archive-image img {
  height: auto;
  object-fit: contain;
}

body.detail-started .archive-image--vending {
  grid-column: 1;
  order: 1;
}

body.detail-started .archive-image--street {
  grid-column: 2;
  order: 2;
}

body.detail-started .archive-image--hof {
  grid-column: 3;
  order: 3;
}

body.book-open .detail-copy,
body.book-open .brand,
body.book-open .topics {
  opacity: 0;
  pointer-events: none;
}

body.book-open .archive-image {
  opacity: 0;
  pointer-events: none;
}

.book-view {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  color: #fff;
  background: #082f0a;
}

body.book-open .book-view {
  display: block;
}

.book-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 33.333vw;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(34px, 4.1vw, 68px) clamp(26px, 3.4vw, 66px)
    clamp(80px, 9vw, 150px);
  scrollbar-color: #082f0a var(--green);
}

.book-info::-webkit-scrollbar {
  width: 16px;
}

.book-info::-webkit-scrollbar-track {
  background: var(--green);
}

.book-info::-webkit-scrollbar-thumb {
  background: #082f0a;
}

.back-button {
  position: absolute;
  top: clamp(34px, 4.1vw, 68px);
  right: clamp(34px, 4.2vw, 68px);
  z-index: 30;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--display-font);
  font-size: var(--explore-size);
  font-weight: 300;
  line-height: var(--explore-line);
  letter-spacing: 0;
  cursor: pointer;
}

.book-info-inner {
  min-height: 135vh;
}

.book-title,
.book-index,
.book-description {
  margin: 0;
  font-family: var(--display-font);
  font-size: var(--explore-size);
  font-weight: 300;
  line-height: var(--explore-line);
  letter-spacing: 0;
}

.book-title {
  font-weight: 300;
}

.book-index {
  margin-top: clamp(18px, 1.9vw, 38px);
}

.book-description {
  margin-top: clamp(64px, 6.5vw, 126px);
}

.book-description p {
  margin: 0 0 clamp(28px, 2.6vw, 52px);
}

.book-selected-image {
  width: 100%;
  margin: clamp(22px, 2.5vw, 48px) 0 0;
  background: #fff;
}

.book-selected-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1.48 / 1;
  object-fit: cover;
}

.book-divider {
  position: absolute;
  top: 0;
  left: 33.333vw;
  z-index: 24;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.78);
}

.book-canvas {
  position: absolute;
  top: 0;
  right: 0;
  width: 66.667vw;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.book-canvas.is-dragging {
  cursor: grabbing;
}

.book-map {
  position: absolute;
  left: 0;
  top: 0;
  width: 2200px;
  height: 1600px;
  transform-origin: 0 0;
  will-change: transform;
}

.map-page {
  position: absolute;
  margin: 0;
  background: #fff;
  box-shadow: none;
}

.map-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-page--hero {
  left: 500px;
  top: 120px;
  width: 620px;
  aspect-ratio: 1.48 / 1;
}

.map-page--vending-a {
  left: 1070px;
  top: 560px;
  width: 360px;
  aspect-ratio: 1.33 / 1;
}

.map-page--vending-b {
  left: 1500px;
  top: 500px;
  width: 300px;
  aspect-ratio: 1.33 / 1;
}

.map-page--street-a {
  left: 100px;
  top: 120px;
  width: 330px;
  aspect-ratio: 1.48 / 1;
}

.map-page--street-b {
  left: 1190px;
  top: 120px;
  width: 360px;
  aspect-ratio: 1.48 / 1;
}

.map-page--street-c {
  left: 220px;
  top: 920px;
  width: 340px;
  aspect-ratio: 1.48 / 1;
}

.map-page--hof-a {
  left: 120px;
  top: 460px;
  width: 390px;
  aspect-ratio: 1.48 / 1;
}

.map-page--hof-b {
  left: 560px;
  top: 600px;
  width: 440px;
  aspect-ratio: 1.48 / 1;
}

.map-page--hof-c {
  left: 660px;
  top: 1010px;
  width: 360px;
  aspect-ratio: 1.48 / 1;
}

.about {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 3.4vw, 62px);
  z-index: 8;
  font-size: var(--display-size);
  font-weight: 300;
  line-height: var(--display-line);
  letter-spacing: 0;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: color 1.8s var(--ease);
}

body.intro-started .about {
  animation: about-enter 1.33s var(--ease) 7.42s forwards;
}

body.book-open .about {
  z-index: 32;
  color: #fff;
  opacity: 1;
  pointer-events: auto;
  animation: none;
  transform: translate(-50%, 0);
}

@keyframes tagline-exit {
  0% {
    opacity: 1;
    transform: translateX(-50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -26px);
  }
}

@keyframes seoul-split {
  0% {
    left: 50%;
    opacity: 1;
    transform: translateX(-104%);
  }
  100% {
    left: clamp(22px, 2.5vw, 52px);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes archive-split {
  0% {
    right: 50%;
    opacity: 1;
    transform: translateX(104%);
  }
  100% {
    right: clamp(22px, 2.5vw, 52px);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes topic-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vending-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hof-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes street-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes about-enter {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 760px) {
  :root {
    --detail-size: clamp(11px, 3vw, 18px);
    --detail-pad-x: 18px;
    --detail-gap: 14px;
    --detail-image-height: clamp(82px, 18vw, 146px);
  }

  .stage {
    min-height: 680px;
  }

  .tagline {
    top: 16px;
    font-size: var(--display-size);
    line-height: var(--display-line);
    white-space: normal;
  }

  .brand {
    top: 14px;
  }

  .brand-word {
    font-size: var(--display-size);
  }

  .topics {
    top: 53px;
    width: calc(100vw - 28px);
  }

  .topic {
    font-size: var(--display-size);
  }

  .archive-image--vending {
    top: 36%;
    width: 72vw;
  }

  .archive-image--hof {
    top: 25%;
    width: 68vw;
  }

  .archive-image--street {
    right: 0;
    bottom: 8%;
    width: 76vw;
  }

  .detail-body {
    top: 27vh;
  }

  .detail-index {
    margin-bottom: clamp(20px, 4vw, 34px);
  }

  body.detail-started .archive-image {
    width: 100%;
    margin-top: 58vh;
  }

  .about {
    bottom: 24px;
    font-size: var(--display-size);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
