:root {
  --ink: #231815;
  --dk: #1c1512;
  --orange: #ea5514;
  --paper: #f2f0ed;
  --sans:
    "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --disp: "Poppins", "Noto Sans KR", system-ui, sans-serif;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --px: clamp(20px, 3vw, 44px);

  --tile-dim: 0.5;
  --intro-dur: 3.2s;
  --intro-scale: 1.5;
  --intro-blur: 16px;
  --tile-in-dur: 1.1s;
  --tile-stagger: 110ms;
  --headline-delay: 2.2s;
  --headline-dur: 1.2s;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --gap-x: 22px;
  --gap-y: 16px;
  --enter-x: 100%;
  --enter-y: 480px;
  --enter-rot: 26deg;
  --enter-dur: 1.4s;
  --enter-ease: cubic-bezier(0.165, 0.84, 0.44, 1);
  --hover-dur: 0.3s;
  --hover-scale: 0.98;
  --hover-blur: 5px;
  --hover-veil: 0.3;
  --hover-ease: cubic-bezier(0.175, 0.885, 0.327, 1.41);
  --soft-ease: cubic-bezier(0.25, 1, 0.5, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.mono {
  font: 400 clamp(12px, 1vw, 14px)/1.7 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wrap {
  margin: 0 auto;
  padding: 0 60px;
}

/* ───── 1) HERO ───── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--dk);
  color: var(--paper);
  isolation: isolate;
}
.field {
  position: absolute;
  inset: 0;
  z-index: 0;
  animation: field-in var(--intro-dur) var(--ease-expo) backwards;
}
.tile {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: var(--ar);
  z-index: var(--z);
  overflow: hidden;
  background: #000;
  animation:
    tile-in var(--tile-in-dur) var(--ease-expo)
      calc(0.4s + var(--i) * var(--tile-stagger)) backwards,
    drift var(--t) ease-in-out infinite alternate;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1) brightness(var(--b, var(--tile-dim)));
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 60% 45% at 50% 50%,
    rgba(28, 21, 18, 0.6),
    transparent 75%
  );
}
.hero__inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.4vh, 36px);
  padding: 0 var(--px);
  text-align: center;
  pointer-events: none;
}
.hero__logo {
  width: clamp(120px, 12vw, 180px);
  aspect-ratio: 240 / 96;
  fill: currentColor;
  animation: rise 1s var(--ease-expo) calc(var(--headline-delay) - 0.2s)
    backwards;
}
.hero__title {
  font: 600 clamp(32px, 5.4vw, 78px)/1.2 var(--disp);
  letter-spacing: -0.02em;
}
.ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.ln > span {
  display: block;
  animation: line-up var(--headline-dur) var(--ease-expo)
    calc(var(--headline-delay) + var(--n, 0) * 0.12s) backwards;
}
.ln:nth-child(2) > span {
  --n: 1;
}
.hero__sub {
  color: rgba(242, 240, 237, 0.7);
  animation: rise 1s var(--ease-expo) calc(var(--headline-delay) + 0.3s)
    backwards;
}
.hero__side {
  position: absolute;
  z-index: 2;
  top: 12vh;
  letter-spacing: 0.3em;
  color: rgba(242, 240, 237, 0.6);
  writing-mode: vertical-rl;
  animation: fade 1.2s ease var(--headline-delay) backwards;
}
.hero__side--l {
  left: var(--px);
  transform: rotate(180deg);
}
.hero__side--r {
  right: var(--px);
}
.hero__cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(14px, 3vh, 32px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  letter-spacing: 0.2em;
  color: rgba(242, 240, 237, 0.7);
  animation: fade 1.2s ease calc(var(--headline-delay) + 0.4s) backwards;
}
.hero__cue:hover {
  color: var(--orange);
}
.hero__cue svg {
  animation: nudge 2.4s ease-in-out infinite;
}

@keyframes field-in {
  from {
    transform: scale(var(--intro-scale));
    filter: blur(var(--intro-blur));
  }
}
@keyframes tile-in {
  from {
    opacity: 0;
    scale: 0.82;
  }
}
@keyframes drift {
  to {
    transform: translate(var(--dx), var(--dy));
  }
}
@keyframes line-up {
  from {
    transform: translateY(105%);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes nudge {
  50% {
    transform: translateY(6px);
  }
}

/* ───── 2) WORKS ───── */
.works {
  padding: clamp(72px, 10vw, 150px) 0 clamp(96px, 13vw, 208px);
  overflow: hidden;
}
.works__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: clamp(40px, 6vw, 90px);
}
.works__head .mono {
  color: var(--orange);
}
.works__title {
  font: 600 clamp(44px, 9vw, 150px)/0.98 var(--disp);
  letter-spacing: -0.03em;
}
.works__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-y) var(--gap-x);
}
.visual {
  position: relative;
  display: block;
  aspect-ratio: 1800 / 1273;
  border-radius: 6px;
  overflow: hidden;
  transition: transform var(--hover-dur) var(--hover-ease);
}
.visual__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--hover-dur) var(--soft-ease);
}
.visual__veil {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--hover-dur) var(--soft-ease);
}
.visual__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--hover-dur) var(--soft-ease);
}
.pill {
  background: var(--orange);
  color: #fff;
  border-radius: 99px;
  padding: 8px 16px;
  line-height: 1;
}
.item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
}
.item__text h3 {
  font: 600 clamp(16px, 1.4vw, 24px)/1.35 var(--sans);
}
.item__text .mono {
  color: rgba(35, 24, 21, 0.6);
}
@media (hover: hover) {
  .visual:hover,
  .visual:focus-visible {
    transform: scale(var(--hover-scale));
  }
  .visual:hover .visual__bg,
  .visual:focus-visible .visual__bg {
    filter: blur(var(--hover-blur));
  }
  .visual:hover .visual__veil,
  .visual:focus-visible .visual__veil {
    opacity: var(--hover-veil);
  }
  .visual:hover .visual__hover,
  .visual:focus-visible .visual__hover {
    opacity: 1;
  }
}
.js .item__in {
  display: block;
  opacity: 0;
  transform: translate(calc(var(--enter-x) * -1), var(--enter-y))
    rotate(calc(var(--enter-rot) * -1));
  transition:
    transform var(--enter-dur) var(--enter-ease),
    opacity var(--enter-dur) var(--enter-ease);
}
.js .item.from-r .item__in {
  transform: translate(var(--enter-x), var(--enter-y)) rotate(var(--enter-rot));
}
.js .item.is-in .item__in {
  opacity: 1;
  transform: none;
}
.works__list.no-t .item__in {
  transition: none;
}

.tabs-container {
  position: relative;
}
.tabs-container::after {
  content: '';
  position: absolute;
  right: -21px;
  top: 0;
  height: 100%;
  width: 30px;
  background: linear-gradient(to right, rgba(242, 240, 237, 0), rgba(242, 240, 237, 1));
  pointer-events: none;
  z-index: 10;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.tabs button {
  flex: none;
  background: none;
  border: 1px solid rgba(35, 24, 21, 0.2);
  color: var(--ink);
  padding: clamp(10px, 1vw, 12px) clamp(13px, 1vw, 16px);
  font: 500 clamp(12px, 1vw, 14px)/1 var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.3s;
}
.tabs button:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.tabs button[aria-selected="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.item[hidden] {
  display: none;
}
.js [data-reveal] {
  opacity: 0;
  transform: translateY(3rem);
  transition:
    transform 1.5s var(--enter-ease),
    opacity 1.5s var(--enter-ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 991px) {
  .hero__side {
    display: none;
  }
}
@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }
  .hero {
    --intro-scale: 1.25;
  }
  .tile {
    left: var(--mx);
    top: var(--my);
    width: var(--mw);
  }
  .hero__cue {
    letter-spacing: 0.1em;
  }
  .works__list {
    grid-template-columns: 1fr;
    gap: var(--gap-x);
  }
  .js .item__in {
    --enter-y: 240px;
  }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -20px;
    padding-inline: 20px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .field,
  .tile,
  .hero__logo,
  .ln > span,
  .hero__sub,
  .hero__side,
  .hero__cue,
  .hero__cue svg {
    animation: none;
  }
  .js .item__in,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .visual,
  .visual__bg,
  .visual__veil,
  .visual__hover {
    transition: none;
  }
}
