@font-face {
  font-family: 'Signifier';
  src: url('../fonts/signifier/signifier-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Figma 🧩 Components / variables 기준 토큰 */
:root {
  --color-ink: #101010;          /* text/primary */
  --color-ink-muted: rgba(16, 16, 16, 0.3);  /* text/secondary */
  --color-ink-hover: rgba(16, 16, 16, 0.7);  /* action/text/fg-hover */
  --color-bg: #ffffff;           /* bg/default */
  --color-subtle: #eeeeee;       /* bg/subtle, border/default */
  --color-muted: #d9d9d9;        /* bg/muted */

  --font-serif: 'Signifier', Georgia, 'Times New Roman', serif;
  --font-sans: 'Haffer', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Jayhan', var(--font-sans);

  --nav-height: 80px;
  --gutter: 80px;
  --content-max: 1760px; /* 1920 스크린 기준 — 이보다 넓은 화면에서는 중앙 정렬 */
}

@media (max-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--nav-height); /* .nav가 fixed라 문서 흐름에서 빠지는 만큼 상단 여백 보정 */
}

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

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

@font-face {
  font-family: 'Jayhan';
  src: url('../fonts/jayhan/Jayhan-Sans.woff2') format('woff2-variations');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* Text styles — Figma v2 텍스트 스타일과 1:1 */
.t-display,
.t-display-m,
.t-heading,
.t-heading-m,
.t-title,
.t-title-m {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
}

.t-display   { font-size: 64px; line-height: 68px; letter-spacing: -0.025em; }
.t-display-m { font-size: 32px; line-height: 36px; letter-spacing: -0.015em; }
.t-heading   { font-size: 48px; line-height: 52px; letter-spacing: -0.02em; }
.t-heading-m { font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.t-title     { font-size: 24px; line-height: 28px; letter-spacing: -0.01em; }
.t-title-m   { font-size: 20px; line-height: 24px; letter-spacing: -0.005em; }

.t-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.t-label-l {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.t-caption {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.01em;
}

/* Text button (Button / Variant=Text) */
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-ink);
  cursor: pointer;
  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--color-ink-hover);
}

.text-button--large {
  gap: 8px;
  min-height: 48px;
}

.text-button svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.text-button--large svg {
  width: 13px;
  height: 13px;
}

/* Tag — 랜딩 카드 라벨과 같은 회색 텍스트 */
.tag {
  color: var(--color-ink-muted);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;

  width: 100%;
  max-width: var(--content-max);
  height: var(--nav-height);
  padding: 24px var(--gutter);
  background: var(--color-bg);
  border: 1px solid transparent;
  border-radius: 1000px;

  transition:
    top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 스크롤하면 둥근 플로팅 필(pill) 형태로 축소 — Nav / State=Scrolled */
.nav.is-scrolled {
  top: 16px;
  width: min(840px, calc(100% - 48px));
  height: 66px;
  padding: 16px 32px;
  border-color: var(--color-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .nav {
    transition: none;
  }
}

.nav__logo img {
  height: 27px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--color-ink-hover);
}

/* Hero — 첫 화면을 꽉 채움 (Wolff Olins 방식): 높이 = 화면 높이 − Nav, 영상은 cover로 잘라 채움.
   svh = 모바일 주소창을 뺀 실제 보이는 높이. 미지원 브라우저는 vh로 대체 */
.hero {
  width: 100%;
  height: calc(100vh - var(--nav-height));
  height: calc(100svh - var(--nav-height));
  min-height: 320px;
  background: #000;
  overflow: hidden;
}

.hero__video,
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Intro */
.intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 160px var(--gutter) 120px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.intro__content {
  grid-column: span 9;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.intro__sub {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.intro__paragraph {
  margin: 0;
}

@media (max-width: 768px) {
  .intro {
    padding: 64px var(--gutter);
  }

  .intro__content {
    grid-column: 1 / -1;
    gap: 24px;
  }

  .intro__statement {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

/* Selected work */
.works {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  scroll-margin-top: calc(var(--nav-height) + 24px); /* 고정 Nav에 앵커 이동한 제목이 가리지 않도록 */
}

@media (max-width: 768px) {
  .works {
    padding: 0 var(--gutter) 64px;
    gap: 32px;
  }

  .works__headline {
    font-size: 28px;
    line-height: 32px;
    letter-spacing: -0.01em;
  }
}

.work-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.work-row--pair > .work-card {
  flex: 1 0 0;
  min-width: 0;
}

.work-row--wide {
  flex-direction: column;
}

@media (max-width: 768px) {
  .work-row--pair {
    flex-direction: column;
    gap: 32px;
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.work-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-muted);
}

.work-card--wide .work-card__image {
  aspect-ratio: 16 / 9;
}

/* 모바일 시안은 모든 카드가 16:9 단일 컬럼 */
@media (max-width: 768px) {
  .work-card__image {
    aspect-ratio: 16 / 9;
  }
}

.work-card__image img,
.work-card__image video,
.library-card__image img,
.library-card__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.work-card:hover .work-card__image img,
.work-card:hover .work-card__image video,
.library-card:hover .library-card__image img,
.library-card:hover .library-card__image video {
  transform: scale(1.02);
}

.work-card__meta,
.library-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-card__labels,
.library-card__labels {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.label--muted {
  color: var(--color-ink-muted);
}

@media (max-width: 768px) {
  .work-card__title,
  .library-card__title {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.005em;
  }
}

/* Work Library */
.work-library {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 80px var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.work-library__tabs {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.work-library__tab {
  color: var(--color-ink-muted);
  transition: color 0.2s ease;
}

.work-library__tab:hover {
  color: var(--color-ink-hover);
}

.work-library__tab--active,
.work-library__tab--active:hover {
  color: var(--color-ink);
}

.work-library__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

@media (max-width: 900px) {
  .work-library__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .work-library {
    padding: 40px var(--gutter) 64px;
    gap: 32px;
  }

  .work-library__tabs {
    gap: 16px;
  }

  .work-library__tab {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.005em;
  }

  .work-library__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.library-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-muted);
}

/* Footer */
.footer {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px var(--gutter);
}

.footer__wordmark img {
  width: 100%;
  height: auto;
}

.footer__wordmark-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 12vw, 140px);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__social {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.footer__copyright {
  color: var(--color-ink-muted);
  margin: 0;
}

.footer__br {
  display: none;
}

/* 모바일: 링크(세로) → 워드마크 → 카피라이트(2줄), 가운데 정렬 */
@media (max-width: 768px) {
  .footer {
    align-items: center;
    gap: 40px;
    text-align: center;
  }

  .footer__row {
    display: contents;
  }

  .footer__social {
    order: 1;
    flex-direction: column;
    gap: 16px;
  }

  .footer__wordmark {
    order: 2;
    width: 100%;
  }

  .footer__copyright {
    order: 3;
  }

  .footer__br {
    display: inline;
  }
}

/* Work detail */
.work-detail-hero {
  width: 100%;
  aspect-ratio: 9 / 5;
  background: var(--color-muted);
  overflow: hidden;
}

.work-detail-hero img,
.work-detail-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-detail {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 80px var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.work-detail__intro {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.work-detail__heading,
.work-detail__summary {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-detail__summary {
  align-items: flex-start;
}

.work-detail__tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.work-detail__description {
  margin: 0;
  white-space: pre-line;
}

.work-detail__more {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.work-detail__summary.is-expanded .work-detail__more {
  display: flex;
}

.work-detail__readmore svg {
  transition: transform 0.2s ease;
}

.work-detail__summary.is-expanded .work-detail__readmore svg {
  transform: rotate(-90deg);
}

@media (max-width: 768px) {
  .work-detail {
    padding: 40px var(--gutter) 64px;
    gap: 40px;
  }

  .work-detail__intro {
    flex-direction: column;
    gap: 24px;
  }

  .work-detail__title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

.work-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.gallery-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .work-detail__gallery,
  .gallery-row {
    gap: 16px;
  }

  .gallery-row {
    flex-direction: column;
  }
}

.gallery-image {
  width: 100%;
  overflow: hidden;
  background: var(--color-muted);
}

.gallery-image--wide {
  aspect-ratio: 16 / 9;
}

.gallery-image--square {
  aspect-ratio: 1 / 1;
  flex: 1 0 0;
  min-width: 0;
}

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

.work-detail__back {
  align-self: flex-start;
}

/* About — 12컬럼 그리드: 프로필 1–4, 목록 6–12 (5번 컬럼은 여백) */
.about {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
  padding: 80px var(--gutter) 120px;
}

.about__profile {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 80px); /* Work 페이지 탭과 같은 높이(Nav + 상단 패딩)에서 고정 */
}

.about__identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about__bio p {
  margin: 0;
}

.about__content {
  grid-column: 6 / span 7;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.about-section__headline {
  margin: 0;
}

.about-section__items {
  display: flex;
  flex-direction: column;
}

/* List Item — 시안 비율(302 : 411)대로 함께 줄어들도록 */
.about-row {
  display: grid;
  grid-template-columns: minmax(0, 302fr) minmax(0, 411fr);
  gap: 24px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--color-subtle);
}

.about-row__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-row__label {
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.005em;
  margin: 0;
}

.about-row__period {
  color: var(--color-ink-muted);
  margin: 0;
}

.about-row__description {
  margin: 0;
}

/* 태블릿: 프로필 1–5, 목록 7–12로 조정 — 이름(64px)이 좁은 컬럼에서 줄바꿈되지 않도록 */
@media (max-width: 1200px) {
  .about__profile {
    grid-column: 1 / span 5;
  }

  .about__content {
    grid-column: 7 / span 6;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .about {
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding: 40px var(--gutter) 64px;
  }

  .about__profile {
    position: static;
    width: 100%;
    gap: 16px;
  }

  .about__identity {
    gap: 4px;
  }

  .about__content {
    width: 100%;
  }

  .about__name {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }

  .about__role,
  .about__bio {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.005em;
  }
}

/* Error */
.error-page {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: 480px;
  padding: 80px var(--gutter) 120px;
}

@media (max-width: 768px) {
  .error-page {
    min-height: 320px;
    padding: 40px var(--gutter) 64px;
  }

  .error-page__title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

/* Vimeo 플레이어 — <video object-fit: cover> 와 같은 방식으로 영역을 꽉 채운다 (site/snippets/video.php) */
:has(> .vimeo-cover) { position: relative; }
.vimeo-cover { position: absolute; inset: 0; overflow: hidden; container-type: size; pointer-events: none; }
.vimeo-cover iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: max(100cqw, calc(100cqh * var(--ar)));
  height: max(100cqh, calc(100cqw / var(--ar)));
  transform: translate(-50%, -50%);
}
