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

:root {
  --paper: #f3eee4;
  --ink: #332820;
  --brown: #705744;
  --brown-deep: #3f3026;
  --muted: #8a7d72;
  --side: clamp(22px, 5vw, 72px);
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}

body {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "SUIT Variable", "SUIT", "Apple SD Gothic Neo", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

body.is-returning {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: none;
}

a {
  text-decoration: none;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--brown);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  transition: opacity 480ms ease, visibility 480ms ease;
}

.loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.webgl-stage {
  position: relative;
  height: 500svh;
  background: var(--paper);
}

.webgl-viewport {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

#webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.scene-overlays {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(48px, 7vh, 84px) var(--side);
  pointer-events: none;
}

.scene-item {
  opacity: 0;
  user-select: none;
  -webkit-user-select: none;
  will-change: opacity, transform;
}

.scene-item.is-selectable {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.brand-content {
  width: min(100%, 900px);
  min-height: min(720px, 78svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(18px, 3vh, 30px);
  color: var(--muted);
  font-size: clamp(0.62rem, 0.9vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  cursor: default;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.language-switch:focus-visible {
  outline: 1px solid rgba(112, 87, 68, 0.48);
  outline-offset: 7px;
  border-radius: 999px;
}

.language-code {
  min-width: 2.7em;
  opacity: 0.42;
  transition: color 220ms ease, opacity 220ms ease;
}

.language-code:first-child {
  text-align: right;
}

.language-code:last-child {
  text-align: left;
}

.language-code.is-active {
  color: var(--brown-deep);
  opacity: 1;
}

.language-track {
  position: relative;
  width: 38px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid rgba(112, 87, 68, 0.42);
  border-radius: 999px;
  background: rgba(112, 87, 68, 0.07);
}

.language-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brown);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(112, 87, 68, 0.08);
  transition:
    left 320ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease,
    box-shadow 220ms ease;
}

body.is-english .language-thumb {
  left: calc(100% - 13px);
}

body.is-language-changing .scene-item:not(.language-switch),
body.is-language-changing .essay-body {
  opacity: 0 !important;
  transition: opacity 260ms ease;
}

body.is-language-revealing .scene-item:not(.language-switch),
body.is-language-revealing .essay-body {
  transition: opacity 360ms ease;
}

.brand-emblem {
  position: relative;
  width: clamp(190px, 24vw, 310px);
  aspect-ratio: 1.5 / 1;
}

.brand-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  mix-blend-mode: normal;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  transition: opacity 620ms ease;
}

.brand-copy {
  width: min(100%, 560px);
  margin-top: clamp(34px, 5.5vh, 58px);
  transition: opacity 620ms ease;
}

.brand-wordmark {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  column-gap: clamp(10px, 1.5vw, 18px);
  font-size: clamp(1.65rem, 3.1vw, 2.55rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-tagline {
  width: 100%;
  margin-top: 9px;
  color: var(--muted);
  font-size: clamp(0.72rem, 1.15vw, 0.96rem);
  font-weight: 300;
  line-height: 1.75;
  text-align: center;
  word-break: keep-all;
}

.name-content {
  width: min(100%, 1080px);
}

.name-heading {
  display: flex;
  align-items: flex-end;
  gap: clamp(22px, 5vw, 72px);
}

.name-heading h2 {
  font-family: "Eulyoo 1945", "AppleMyungjo", "Nanum Myeongjo", "Batang", serif;
  font-size: clamp(4.2rem, 12vw, 9.4rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.name-korean {
  padding-bottom: 0.08em;
  color: var(--brown);
  font-size: clamp(1.2rem, 2.8vw, 2.15rem);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.name-definitions {
  display: grid;
  gap: 15px;
  margin-top: clamp(52px, 9vh, 94px);
  list-style: none;
}

.name-definitions li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: baseline;
  font-size: clamp(1rem, 2vw, 1.42rem);
  font-weight: 300;
  line-height: 1.7;
  word-break: keep-all;
}

.name-definitions li span {
  color: var(--muted);
  font-size: 0.72em;
}

.name-definitions i,
.character-notes i {
  font-style: normal;
}

.character-notes {
  display: flex;
  gap: clamp(22px, 4vw, 48px);
  margin-top: clamp(48px, 8vh, 82px);
  color: var(--muted);
  font-size: clamp(0.7rem, 1.1vw, 0.84rem);
}

.character-notes span {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.character-notes b {
  color: var(--brown);
  font-size: 1.45em;
  font-weight: 400;
}

.platform-grid {
  width: min(calc(100vw - var(--side) * 2), 1180px);
  height: min(72svh, 760px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(6px, 0.7vw, 9px);
}

.platform-link {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(63, 48, 38, 0.18);
  background: var(--paper-shade, #ded0c1);
  pointer-events: none;
  isolation: isolate;
}

.platform-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(25, 19, 15, 0.16);
  transition: background-color 260ms ease;
}

.platform-image {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  display: block;
  object-fit: cover;
  filter: blur(2.4px) brightness(0.68) saturate(0.72);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  transform: scale(1.025);
  transition:
    filter 420ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.platform-image-blog {
  object-position: left center;
}

.platform-image-youtube {
  object-position: left center;
}

.platform-image-instagram {
  object-position: 50% 48%;
}

.platform-image-email {
  top: 0;
  object-position: left top;
}

.platform-label {
  position: absolute;
  bottom: clamp(22px, 2.8vw, 40px);
  left: clamp(5px, 0.7vw, 10px);
  z-index: 2;
  color: var(--paper);
  font-size: clamp(2.5rem, 5.8vw, 5rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: 10px;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: sideways;
  text-shadow: 0 2px 12px rgba(25, 19, 15, 0.48);
  transform: rotate(180deg);
}

.platform-link[data-exit-y="1"] .platform-label {
  top: clamp(22px, 2.8vw, 40px);
  bottom: auto;
}

.platform-status {
  position: absolute;
  left: clamp(8px, 0.9vw, 13px);
  z-index: 2;
  color: rgba(243, 238, 228, 0.82);
  font-family: "SUIT Variable", "SUIT", "Apple SD Gothic Neo", sans-serif;
  font-size: clamp(1.56rem, 2.5vw, 2rem);
  font-style: normal;
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: 0.02em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.platform-status[hidden] {
  display: none;
}

.platform-link.is-interactive {
  pointer-events: auto;
}

.platform-link.is-unavailable.is-interactive {
  pointer-events: none;
}

.platform-link:hover,
.platform-link:focus-visible {
  outline: 1px solid var(--brown);
  outline-offset: -1px;
}

.platform-link:hover::after,
.platform-link:focus-visible::after {
  background: rgba(25, 19, 15, 0.08);
}

.platform-link:hover .platform-image,
.platform-link:focus-visible .platform-image {
  filter: blur(1.7px) brightness(0.75) saturate(0.8);
  transform: scale(1.055);
}

.alias-content {
  width: min(100%, 1180px);
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: clamp(64px, 11vh, 116px);
}

.alias-block {
  min-width: 0;
  overflow: visible;
}

.alias-block h2 {
  font-size: clamp(2.46rem, 6.6vw, 5.7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.alias-block p {
  width: 100%;
  margin-top: clamp(16px, 2.4vh, 26px);
  color: var(--brown);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.65;
  word-break: keep-all;
}

.essay-title-scene {
  justify-items: center;
}

.essay-scene-quote {
  width: min(100%, 1180px);
  text-align: center;
}

.essay-scene-title {
  color: var(--paper);
  font-family: "Eulyoo 1945", "AppleMyungjo", "Nanum Myeongjo", "Batang", serif;
  font-size: clamp(1.17rem, 4.8vw, 4.2rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0;
  word-break: keep-all;
}

.essay-scene-author {
  margin-top: clamp(12px, 1.8vh, 20px);
  color: rgba(243, 238, 228, 0.72);
  font-size: clamp(1.02rem, 1.72vw, 1.38rem);
  font-weight: 400;
  letter-spacing: 0.12em;
}

.webgl-fallback {
  position: absolute;
  inset: 0;
  z-index: 10;
  place-content: center;
  gap: 18px;
  padding: var(--side);
  background: var(--paper);
  text-align: center;
}

.webgl-fallback:not([hidden]) {
  display: grid;
}

.webgl-fallback p {
  font-size: 0.95rem;
  line-height: 1.8;
}

.webgl-fallback a {
  width: max-content;
  margin: 0 auto;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--brown);
  font-size: 0.78rem;
}

.essay-body {
  position: relative;
  z-index: 2;
  background: var(--paper);
}

.essay-inner {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(110px, 15vw, 190px) var(--side) 84px;
}

.essay-copy > p {
  margin-bottom: 34px;
  color: var(--ink);
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  font-weight: 400;
  line-height: 2.05;
  word-break: keep-all;
}

.essay-copy > h2 {
  margin: clamp(100px, 16vw, 164px) 0 38px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.4;
  word-break: keep-all;
}

.essay-copy[hidden] {
  display: none;
}

body.is-english .brand-tagline,
body.is-english .name-definitions li,
body.is-english .alias-block p,
body.is-english .essay-scene-title,
body.is-english .essay-copy > p,
body.is-english .essay-copy > h2 {
  word-break: normal;
}

body.is-english .name-korean {
  align-self: flex-end;
  padding-bottom: 0.65em;
  letter-spacing: 0.04em;
}

.return-wrap {
  display: flex;
  justify-content: center;
  padding: 72px 0 120px;
}

.return-home {
  padding: 10px 3px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.return-home:hover,
.return-home:focus-visible {
  color: var(--brown);
  border-color: var(--brown);
}

.essay-copy > p,
.essay-copy > h2,
.return-wrap {
  transition:
    opacity 580ms ease,
    transform 640ms cubic-bezier(0.55, 0, 1, 0.45);
}

.is-returning .essay-copy > p:nth-of-type(odd) {
  opacity: 0;
  transform: translate3d(-36vw, -12vh, 0);
}

.is-returning .essay-copy > p:nth-of-type(even) {
  opacity: 0;
  transform: translate3d(36vw, 12vh, 0);
}

.is-returning .essay-copy > h2 {
  opacity: 0;
  transform: translate3d(8vw, -28vh, 0);
}

.is-returning .return-wrap {
  opacity: 0;
  transform: translate3d(-32vw, 24vh, 0);
}

.site-footer {
  padding: 34px var(--side) 44px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .scene-overlay {
    padding: 54px 22px;
  }

  .brand-content {
    min-height: 82svh;
  }

  .brand-logo {
    width: 100%;
  }

  .brand-emblem {
    width: clamp(180px, 58vw, 230px);
  }

  .brand-copy {
    margin-top: 40px;
  }

  .brand-wordmark {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .brand-tagline {
    margin-top: 7px;
  }

  .name-heading {
    gap: 18px;
  }

  .name-content {
    width: calc(100vw - 44px);
  }

  .name-heading h2 {
    font-size: clamp(3.5rem, 20vw, 6.2rem);
  }

  .name-korean {
    font-size: clamp(1rem, 5.5vw, 1.45rem);
  }

  body.is-english .name-heading {
    gap: 10px;
  }

  body.is-english .name-heading h2 {
    font-size: clamp(3rem, 18vw, 5.6rem);
  }

  body.is-english .name-korean {
    font-size: clamp(0.9rem, 4.6vw, 1.25rem);
  }

  body.is-english .name-definitions li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    font-size: clamp(0.9rem, 4vw, 1.05rem);
    line-height: 1.55;
  }

  .name-definitions {
    margin-top: 60px;
  }

  .character-notes {
    margin-top: 54px;
  }

  .platform-grid {
    width: calc(100vw - 40px);
    height: 70svh;
    gap: 4px;
  }

  .platform-label {
    bottom: 14px;
    left: 4px;
    font-size: clamp(2rem, 8.2vw, 2.7rem);
    letter-spacing: 10px;
    transform: rotate(180deg);
  }

  .platform-link[data-exit-y="1"] .platform-label {
    top: 14px;
  }

  .alias-content {
    gap: clamp(74px, 11vh, 104px);
  }

  .alias-block h2 {
    font-size: clamp(2.39rem, 13.1vw, 4.47rem);
  }

  .alias-block p {
    margin-top: 14px;
  }

  .essay-scene-title {
    font-size: clamp(1.08rem, 4.8vw, 1.5rem);
  }

  .essay-inner {
    padding-top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading,
  .essay-copy > p,
  .essay-copy > h2,
  .return-wrap {
    transition-duration: 1ms !important;
  }
}
