*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --paper: #fff;
  --ink: #0f0f0f;
  --key: #c9120b;
  --on-key: #ffffff;
  --key-cool: #c9120b;
  --key-warm: #c9120b;
  --accent: #c9120b;

  --bg: #e8e8e8;
  --fg: #000;
  --muted: #8a8a8a;
  --gap: 120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hover: #c9120b;
  --line: #000;
  --line-w: 1.5px;
  --header-h: 40px;
  --side: 24px;
  --col-gap: 16px;

  --fs-xl: min(42px, 8vw);
  --fs-l: min(17px, 4.2vw);
  --fs-m: min(15px, 4vw);
  --fs-s: min(14px, 3vw);
}

.is-mono {
  --bg: var(--paper);
  --fg: var(--ink);
  --line: var(--ink);
}

.is-bg-red {
  --paper: #c9120b;
  --bg: #c9120b;
  --ink: #ffffff;
  --fg: #ffffff;
  --line: #ffffff;
  --key: #ffffff;
  --on-key: #c9120b;
  --hover: #ffffff;
}

.is-bg-cool {
  --paper: #d0ddde;
  --bg: #d0ddde;
  --ink: #0f0f0f;
  --fg: #0f0f0f;
  --line: #0f0f0f;
  --key: #0f0f0f;
  --on-key: #d0ddde;
  --hover: #0f0f0f;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: pretendard, "Apple SD Gothic Neo", "Noto Sans KR", Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

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

.loader__video {
  width: min(100%, 420px);
  height: min(100%, 747px);
  object-fit: cover;
}

body.is-loading {
  overflow: hidden;
}

#webgl,
.world,
.map {
  position: fixed;
  inset: 0;
}

#webgl {
  z-index: 1;
}

.world {
  z-index: 2;
  pointer-events: none;
}

.map {
  z-index: 3;
  cursor: grab;
}

body.is-pointer .map {
  cursor: default;
}

body.is-over-image .map {
  cursor: default;
}

body.is-dragging .map {
  cursor: grabbing;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  height: var(--header-h);
  padding: 0 var(--side);
  align-items: center;
  background: var(--bg);
  font-size: var(--fs-l);
  line-height: 1;
}

html:not(.is-page) .header {
  background: var(--paper);
}

body.is-menu-open .header {
  background: var(--paper);
}

.header__toggle {
  grid-column: -2 / -1;
  justify-self: end;
  max-width: 100%;
  line-height: inherit;
  text-align: right;
}

.menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0 var(--side);
  background: var(--bg);
}

.menu[hidden] {
  display: none;
}

.row--menu {
  display: block;
  color: var(--ink);
  font-weight: 500;
  text-transform: uppercase;
}

.row--menu[aria-current="page"] {
  color: var(--ink);
}

.row--menu:active,
.header__link:active,
.header__brand:active {
  color: var(--accent);
}

@media (min-width: 901px) {
  .header {
    display: flex;
    justify-content: space-between;
  }

  .header__toggle {
    display: none;
  }

  .menu,
  .menu[hidden],
  .menu .list {
    display: contents;
  }

  .menu .row--menu {
    display: block;
    padding: 0;
    border-bottom: 0;
    font-size: inherit;
    line-height: 1.4;
  }

  .menu .row--menu:hover,
  .menu .row--menu:active {
    background: none;
    color: var(--accent);
    box-shadow: none;
  }
}

.hover-label {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 15;
  padding-top: 6px;
  color: var(--fg);
  font-size: var(--fs-s);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
}

.hover-label.is-on {
  visibility: visible;
}

.header__brand,
.header__link {
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  text-transform: uppercase;
}

.header__brand {
  color: var(--ink);
}

.header__link:hover,
.header__brand:hover {
  color: var(--accent);
}

.is-page,
.is-page body {
  height: auto;
  min-height: 100%;
  overflow: auto;
  touch-action: auto;
  overscroll-behavior: auto;
}

.is-page body {
  overflow: visible;
}

* {
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}

.page {
  padding: var(--header-h) var(--side) 80px;
}

.list {
  list-style: none;
  border-top: var(--line-w) solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: baseline;
  padding: 7px 0 6px;
  border-bottom: var(--line-w) solid var(--line);
  font-size: var(--fs-l);
  line-height: 1.35;
}

.row__cell {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 64px;
  padding: 24px 0;
  list-style: none;
  font-size: var(--fs-s);
  font-weight: 600;
  line-height: 1.3;
  word-break: keep-all;
}

.card {
  min-width: 0;
  cursor: pointer;
}

.card__thumb {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 12px;
  object-fit: contain;
  background: var(--key-cool);
}

.card__name {
  display: block;
}

.card__intro {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__place {
  margin-top: 1.3em;
}


@media (max-width: 1200px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.row[hidden],
.card[hidden],
.search__empty[hidden] {
  display: none;
}

.archive-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 8px 0 12px;
  background: var(--bg);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
}

.filters__btn {
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-s);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.filters__btn.is-on {
  background: var(--key);
  color: var(--paper);
  padding: 1px 6px;
}

.search {
  display: block;
  width: 100%;
  padding: 7px 0 6px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: max(16px, var(--fs-l));
  line-height: 1.35;
  appearance: none;
}

.search::placeholder {
  color: var(--ink);
}

.search::-webkit-search-cancel-button {
  display: none;
}

.search__empty {
  padding: 7px 0 6px;
  color: var(--hover);
  font-size: var(--fs-l);
}

.pager__arrow {
  position: fixed;
  top: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -12px;
  color: var(--fg);
}

.pager__arrow--prev {
  left: 16px;
}

.pager__arrow--next {
  right: 16px;
}

.pager__arrow:hover {
  color: var(--key);
}

.pager__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.row--menu:hover {
  background: none;
  color: var(--accent);
  box-shadow: none;
}

.row--people .row__cell:nth-child(-n + 2) {
  grid-column: span 2;
}

.row--people .row__cell {
  white-space: pre-line;
}

.row--people.is-heading {
  padding-top: 28px;
}

.section + .section {
  margin-top: 72px;
}

.section__title {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 6px;
  background: var(--key);
  color: var(--paper);
  font-size: var(--fs-l);
  font-weight: inherit;
  line-height: 1.35;
  text-transform: uppercase;
}

.intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  column-gap: var(--col-gap);
  padding-top: 24px;
  border-top: var(--line-w) solid var(--line);
}

.intro__poster {
  display: block;
  width: 100%;
  height: auto;
}

.intro__text {
  font-size: var(--fs-l);
  line-height: 1.75;
  white-space: pre-line;
  word-break: keep-all;
}

.page__error {
  padding-top: 24px;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 4.8fr) minmax(0, 8fr);
  column-gap: 48px;
  align-items: start;
  padding-top: 12px;
  font-size: var(--fs-l);
  line-height: 1.75;
  word-break: keep-all;
}

.detail__col {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  display: grid;
  align-content: start;
  row-gap: 1.65em;
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow-y: auto;
}

.detail__meta {
  row-gap: 0;
}

.detail__meta > * + * {
  margin-top: 12px;
  padding-top: 12px;
  border-top: var(--line-w) solid var(--line);
}

.detail__title {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.detail__name {
  padding: 0 3px;
  background: #0f0f0f;
  color: #ffffff;
}

.detail__item,
.detail__para {
  white-space: pre-line;
}

a.detail__item:hover,
a.detail__para:hover {
  color: var(--key);
}

.detail__text {
  padding-left: 8px;
}

.detail__figure + .detail__figure {
  margin-top: 72px;
}

.detail__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.detail__caption {
  margin-top: 6px;
  color: var(--ink);
  font-size: var(--fs-s);
  line-height: 1.5;
  white-space: pre-line;
}

.item {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  will-change: transform;
}

.item.is-brand {
  background: #f4efe6;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-webgl .item:not(.is-brand) img {
  transition: filter 0.45s var(--ease), transform 0.45s var(--ease);
}

.no-webgl .item:not(.is-brand):hover img {
  filter: contrast(0.94) sepia(0.16) brightness(1.04);
  transform-origin: top right;
  transform: perspective(900px) rotateY(-28deg);
}

.item__brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: #111;
}

.item__brand-name {
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1.15;
  word-break: keep-all;
}

.item__brand-copy {
  max-width: 240px;
  font-size: var(--fs-s);
  line-height: 1.55;
  color: #333;
}

.info {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.info.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.overlay-open .header {
  opacity: 0;
  pointer-events: none;
}

.info[hidden],
.lightbox[hidden] {
  display: none;
}

.info__panel {
  position: relative;
  width: min(420px, 100%);
  height: 100%;
  padding: 88px 36px 36px;
  background: #111;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
}

.info.is-open .info__panel {
  transform: translateX(0);
}

.info__close,
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  padding: 8px;
  font-size: var(--fs-s);
}

.info__eyebrow {
  margin-bottom: 10px;
  font-size: var(--fs-s);
  color: var(--muted);
}

.info__title {
  margin-bottom: 24px;
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.info__body {
  max-width: 30ch;
  font-size: var(--fs-m);
  line-height: 1.7;
  color: #c8c8c8;
  word-break: keep-all;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 72px 24px 40px;
}

.lightbox__figure {
  max-width: min(920px, 100%);
  max-height: 100%;
}

.lightbox__figure img {
  max-height: calc(100vh - 160px);
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox__caption {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: var(--fs-s);
}

.zoom-readout {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 25;
  margin: 0;
  padding: 0;
  background: none;
  color: var(--fg);
  font-size: var(--fs-s);
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 900px) {
  :root {
    --gap: 64px;
    --side: 10px;
    --col-gap: 10px;
  }

  .header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header__toggle {
    grid-column: auto;
  }

  html:has(body.is-menu-open) {
    overflow: hidden;
  }

  .menu {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    height: calc(100dvh - var(--header-h));
  }

  .menu .list {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .menu li {
    display: flex;
    flex: 1 1 0;
  }

  .row--menu {
    flex: 1;
  }

  .row--menu[aria-current="page"] {
    background: none;
    color: var(--ink);
    box-shadow: none;
  }

  .row--menu:hover,
  .row--menu:active {
    background: none;
    color: var(--accent);
    box-shadow: none;
  }

  .intro__poster {
    order: -1;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: 80px;
  }

  .row--people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row--people .row__cell:nth-child(-n + 2) {
    grid-column: auto;
  }

  .intro,
  .detail {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .detail__col {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .detail {
    row-gap: 40px;
  }

  .detail__text {
    order: 2;
    padding-left: 0;
    margin-top: 16px;
  }

  .detail__images {
    order: 1;
  }

  .pager__arrow {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }

}
