/* === 가비아 마음결 (로고용) === */
@font-face {
  font-family: "GabiaMaeumgyeol";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2205@1.0/GabiaMaeumgyeol.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* === Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss03", "tnum";
}

/* === Tokens — Kinfolk 그대로 (neutral cool gray + 5월 남색) === */
:root {
  /* 5월 팔레트 — Kinfolk 사이트 hex 그대로 */
  --paper: #f4f4f4; /* Kinfolk 메인 base (neutral cool gray) */
  --paper-alt: #dcdbd4; /* 보조 섹션 — 명확한 구분 (cool olive 결) */
  --paper-accent: #dbded5; /* Kinfolk 패널 강조 (cool olive) */
  --ink: #1f1f1f;
  --ink-soft: #555555;
  --ink-faint: #8a8a8a;
  --ink-pale: #c8c6c0;
  --navy: #1b2a4e; /* 5월 accent — 깊은 남색 (로고 결) */
  --line: #d8d8d2;

  /* Typography — 로고만 가비아 마음결, 나머지 Pretendard */
  --font-display: "GabiaMaeumgyeol", "Nanum Myeongjo", serif;
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
}

/* === Body === */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  font-size: 14px;
  /* 한국어 어절 단위 줄넘김 (단어 중간에 끊기지 않음) */
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* === Section base === */
section,
footer {
  padding: clamp(40px, 7vh, 80px) clamp(24px, 5vw, 48px);
}

/* === 1→2 transition만 fixed transform — 나머지는 normal scroll 자연 흐름 === */

/* 모든 페이지 fixed top:0 — 자바스크립트가 transform translateY로 위치 제어 */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 95vh; /* fallback */
  height: 95dvh;
  overflow: hidden;
  z-index: 10;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: clamp(56px, 8vh, 80px);
  padding-bottom: clamp(12px, 2.5vh, 24px);
  background-color: var(--paper);
  /* 자바스크립트가 transform translateY 초깃값 적용 (페이지 1은 0) */
}

/* 페이지 1·2·3·4 동작 시간 확보
   페이지 4 fixed 라 body height 에 영향 X → scroll-spacer 자체가 body 전체 길이 결정
   페이지 1 only 90 + 페이지 1·2 겹침 5 + 페이지 2 풀 정지 15 + 페이지 2 only 90 + 페이지 2·3 겹침 5 + 페이지 3·4 transition 5 + 페이지 3·4 한 화면 채움 5 + viewport 100 = 305vh
   사용자 max scrollY 205vh 시점: 페이지 3 transform -5dvh, 페이지 4 transform 0 (페이지 3·4 한 화면 채움) */
.scroll-spacer {
  height: 305vh;
  height: 305dvh;
  pointer-events: none;
}

/* 기존 spacer 모두 제거 — scroll-spacer가 자리 차지 */
.hero-spacer,
.philosophy-spacer,
.works-intro-spacer {
  display: none;
}

/* 3페이지: normal scroll, 자연 흐름 (페이지 4 는 fixed transform 으로 변경됨) */
.works {
  position: relative;
  z-index: 1;
}

.philosophy {
  position: fixed;
  bottom: 0; /* 화면 아래쪽 정렬 — viewport 5~100dvh */
  left: 0;
  width: 100%;
  height: 95vh;
  height: 95dvh;
  overflow: hidden;
  padding: 0;
  background-color: var(--navy);
  z-index: 5;
  will-change: transform;
}

.philosophy-spacer {
  height: 95vh;
  height: 95dvh;
  pointer-events: none;
}

/* === 3페이지 Works carousel — 페이지 2와 같은 자리 (화면 아래쪽 95%) === */
.works-intro {
  position: fixed;
  bottom: 0; /* 페이지 2와 같이 화면 아래쪽 정렬 */
  left: 0;
  width: 100%;
  height: 95vh;
  height: 95dvh;
  overflow: hidden;
  background-color: #2a2f38;
  z-index: 3;
  will-change: transform;
}

.works-intro-spacer {
  height: 95vh;
  height: 95dvh;
  pointer-events: none;
}

/* 슬라이드 — 배경 이미지가 한 번에 하나만 보임 */
.works-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.works-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.works-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  filter: brightness(0.78);
}

.works-slide__bg.is-loaded {
  opacity: 1;
}

/* 좌하단 어두운 gradient — 우하단 흰 텍스트 가독성 */
.works-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top left,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: 3;
  pointer-events: none;
}

/* 우상단 PROJECT 라벨 */
.works-intro__page-label {
  position: absolute;
  top: clamp(20px, 3vh, 32px);
  right: clamp(24px, 5vw, 48px);
  z-index: 5;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.works-intro__page-label.is-visible {
  opacity: 1;
}

/* 카드 row — 슬라이드별 토글 (coverflow 결: 중앙 강조 + 양옆 작고 흐림) */
/* TODO: 임시 hide — 더 좋은 옵션 찾으면 display 룰만 제거 */
.works-slide__cards-wrap {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 70%; /* 화면 위에서 70% — 가운데보다 아래쪽 */
  transform: translateY(-50%);
  z-index: 4;
  pointer-events: none;
}

.works-slide__cards {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.works-intro.is-visible .works-slide__cards.is-active {
  opacity: 1;
  pointer-events: auto;
}

.works-slide__cards .cards-row {
  position: relative;
  display: block;
  overflow: visible;
  padding: 0;
  height: 0; /* 카드 absolute — wrap 가운데가 카드 가운데 */
}

.works-slide__cards .cards-row__card {
  position: absolute;
  left: 25%; /* 좌측 정렬 */
  top: 0;
  width: 330px;
  max-width: 330px;
  height: auto; /* 이미지 비율 그대로 (PNG 잘림 없음) */
  flex: none;
  aspect-ratio: auto;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0.35;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
}

.works-slide__cards .cards-row__card.is-center {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 3;
}

.works-slide__cards .cards-row__card img {
  width: 100%;
  height: auto;
  display: block;
}

/* 우하단 프로젝트 정보 */
.works-slide__meta-wrap {
  position: absolute;
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(32px, 6vh, 56px);
  z-index: 5;
  max-width: 440px;
  text-align: right;
  pointer-events: none;
}

.works-slide__meta {
  position: absolute;
  right: 0;
  bottom: 0;
  width: max-content;
  max-width: 440px;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: right;
}

.works-intro.is-visible .works-slide__meta.is-active {
  opacity: 1;
}

.works-slide__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

.works-slide__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 10px;
}

.works-slide__name-en {
  font-size: 0.5em;
  color: rgba(255, 255, 255, 0.75);
  margin-left: 10px;
  letter-spacing: 0.05em;
}

.works-slide__name-note {
  font-family: var(--font-sans);
  font-size: 0.38em;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 8px;
}

.works-slide__desc {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 15px);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 6px;
}

.works-slide__cta {
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* 좌우 화살표 — 강조 줄임 (배경·border 제거, 색 흐리게) */
.works-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  z-index: 6;
  opacity: 0; /* 페이지 3 풀 도달 전 hide */
  pointer-events: none;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.3s ease;
}

.works-intro.is-visible .works-carousel__arrow {
  opacity: 1;
  pointer-events: auto;
}

.works-carousel__arrow:hover {
  color: rgba(255, 255, 255, 0.9);
}

.works-carousel__arrow--prev {
  left: clamp(12px, 2vw, 24px);
}

.works-carousel__arrow--next {
  right: clamp(12px, 2vw, 24px);
}

/* 슬라이드 인디케이터 */
.works-carousel__dots {
  position: absolute;
  bottom: clamp(16px, 2vh, 24px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 6;
  opacity: 0; /* 페이지 3 풀 도달 전 hide */
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.works-intro.is-visible .works-carousel__dots {
  opacity: 1;
  pointer-events: auto;
}

.works-carousel__dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease;
}

.works-carousel__dot.is-active {
  background: rgba(255, 255, 255, 0.95);
}

/* 모바일 — 카드 사이즈 데스크탑보다 작게 */
@media (max-width: 720px) {
  .works-slide__cards .cards-row {
    padding: 0;
    height: 0;
  }

  .works-slide__cards .cards-row__card {
    left: 40%; /* 모바일은 살짝 왼쪽 */
    width: 220px;
    max-width: 220px;
    height: auto;
  }

  .works-carousel__arrow {
    width: 36px;
    height: 36px;
  }

  .works-carousel__arrow--prev {
    left: 8px;
  }

  .works-carousel__arrow--next {
    right: 8px;
  }
}

.works-intro__brand {
  position: absolute;
  top: clamp(20px, 3vh, 32px);
  left: clamp(24px, 5vw, 48px);
  z-index: 3;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.works-intro__brand.is-visible {
  opacity: 1;
}

.works-intro__brand .wordmark {
  color: #ffffff;
}

/* 헤딩 좌하단 */
.works-intro__overlay {
  position: absolute;
  left: clamp(24px, 5vw, 48px);
  bottom: clamp(32px, 6vh, 72px);
  max-width: 440px;
  text-align: left;
  z-index: 4;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 작품 카드 미리보기 — Works intro 메인 영역 (한 viewport에 들어가는 시각 임팩트) */
.works-intro__previews {
  position: absolute;
  top: clamp(72px, 11vh, 120px);
  bottom: clamp(140px, 22vh, 200px); /* 좌하단 헤딩 영역 위 */
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vh, 24px);
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.works-intro__previews.is-visible {
  opacity: 1;
}

.work-preview {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
}

.work-preview__cards {
  padding: 0 clamp(24px, 5vw, 48px);
}

/* preview 카드 — 더 작은 사이즈 (viewport 안에 stack 두 줄 들어가도록) */
.work-preview .cards-row__card {
  flex: 0 0 calc((100vw - clamp(24px, 5vw, 48px) * 2 - 16px * 3) / 4);
  max-width: 180px;
  aspect-ratio: 9 / 16;
}

.work-preview .cards-row__card img {
  height: 100%;
  object-fit: cover;
}

.work-preview__meta {
  padding: 0 clamp(24px, 5vw, 48px);
  text-align: right;
}

.work-preview__name {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 2px;
}

.work-preview__name-en {
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-left: 8px;
  letter-spacing: 0.05em;
}

.work-preview__name-note {
  font-family: var(--font-sans);
  font-size: 0.4em;
  color: var(--ink-faint);
  margin-left: 6px;
}

.work-preview__desc {
  font-family: var(--font-display);
  font-size: clamp(11px, 1.1vw, 13px);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* 모바일 — 카드 더 작게 + preview 영역 좁게 */
@media (max-width: 720px) {
  .works-intro__previews {
    top: clamp(60px, 9vh, 96px);
    bottom: clamp(110px, 18vh, 160px);
    gap: 12px;
  }

  .work-preview .cards-row__card {
    flex: 0 0 30vw;
    max-width: 140px;
  }

  .work-preview__cards {
    padding: 0 16px;
    gap: 12px;
  }

  .work-preview__meta {
    padding: 0 16px;
  }
}

.works-intro__overlay.is-visible {
  opacity: 1;
}

.works-intro__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.works-intro__heading {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 14px;
}

.works-intro__caption {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  line-height: 1.7;
}

.philosophy__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  filter: brightness(0.72); /* 전체 이미지 28% 어둡게 — 텍스트 가독성 + 편안한 결 */
}

.philosophy__bg.is-loaded {
  opacity: 1;
}

/* 좌하단 흰 글씨 가독성 위해 어두운 gradient */
.philosophy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: 2;
  pointer-events: none;
}

.philosophy__brand {
  position: absolute;
  top: clamp(20px, 3vh, 32px);
  left: clamp(24px, 5vw, 48px);
  z-index: 3;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.philosophy__brand.is-visible {
  opacity: 1;
}

.philosophy__brand .wordmark {
  color: #ffffff;
}

.philosophy__overlay {
  position: absolute;
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(32px, 6vh, 72px);
  z-index: 3;
  max-width: 440px;
  color: #ffffff;
  text-align: right;
  opacity: 0; /* Hero 다 사라진 후 JS가 .is-visible 추가 → 페이드인 */
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.philosophy__overlay.is-visible {
  opacity: 1;
}

.philosophy__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}

.philosophy__heading {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 14px;
}

.philosophy__caption {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 400;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.005em;
}

.philosophy__caption + .philosophy__caption {
  margin-top: 16px;
}

/* gradient 우하단으로 (텍스트 영역 추가 어두움) */
.philosophy::before {
  background: linear-gradient(
    to top left,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.works {
  padding: 0 0 clamp(24px, 4vh, 40px);
  background-color: var(--paper);
}

.footer {
  background-color: #0e0e0e; /* 거의 검정 */
}

/* break-image 사용 X */
.break-image {
  display: none;
}


.hero__brand {
  position: absolute;
  top: clamp(20px, 3vh, 32px);
  left: clamp(24px, 5vw, 48px);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--navy);
}

.wordmark-img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 4px;
}

.hero__title-block {
  text-align: center;
  margin-bottom: clamp(32px, 5vh, 56px);
}

.hero__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .hero__title {
    white-space: normal;
    font-size: 22px;
  }
}

/* === Carousel === */
.carousel {
  position: relative;
  width: min(540px, 80vw);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Philosophy cover carousel — 더 큼, 4:5 (Kinfolk magazine cover 결) */
.philosophy__cover .carousel {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.carousel__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel__stage img.is-active {
  opacity: 1;
}

.carousel__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--paper-alt);
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 24px;
  line-height: 1.6;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 0.2s ease, transform 0.2s ease;
}

.carousel__arrow:hover {
  color: var(--navy);
}

.carousel__arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel__arrow--prev {
  left: -48px;
}

.carousel__arrow--next {
  right: -48px;
}

.carousel__dots {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--ink-pale);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.carousel__dot.is-active {
  background-color: var(--navy);
}

/* === Break image (Kinfolk 풀 너비 사진 결) === */
.break-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(280px, 50vh, 520px);
  padding: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--paper-alt);
}

.break-image--empty {
  display: none;
}

/* Philosophy 풀 너비 + overlay 결 (Kinfolk Home Tour 결) */

/* === Cards row — Kinfolk Inside Issue 결 (4 column grid + 5번째 살짝 보임) === */
.cards-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 24px clamp(24px, 5vw, 64px) 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cards-row::-webkit-scrollbar {
  display: none;
}

.cards-row__card {
  flex: 0 0 calc((100vw - clamp(24px, 5vw, 64px) * 2 - 24px * 3) / 4);
  max-width: 380px;
  background-color: transparent;
  overflow: hidden;
  opacity: 1;
  transform: none;
}

.cards-row__card img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.cards-row__card img.is-loaded {
  opacity: 1;
}

/* 누비 등 work__cards 는 세로 비율 (스크린샷 결, 9:16 고정) */
.work__cards {
  padding: 12px clamp(24px, 5vw, 64px);
}

.work__cards .cards-row__card {
  flex: 0 0 calc((100vw - clamp(24px, 5vw, 64px) * 2 - 24px * 3) / 4);
  max-width: 240px;
  aspect-ratio: 9 / 16;
}

.work__cards .cards-row__card img {
  height: 100%;
  object-fit: cover;
}

/* 좁은 화면 */
@media (max-width: 720px) {
  .cards-row__card,
  .work__cards .cards-row__card {
    flex: 0 0 70vw;
    max-width: 320px;
  }
}

/* === 3. 작품 목록 === */
.works {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.works__header {
  text-align: center;
  margin-bottom: clamp(32px, 5vh, 48px);
}

.works__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.works__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.5;
}

.work {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-bottom: clamp(48px, 7vh, 80px);
}

.work:last-child {
  margin-bottom: 0;
}

.work__header {
  padding: 0 clamp(24px, 5vw, 64px);
  margin-top: clamp(16px, 2.5vh, 24px);
  margin-bottom: 0;
  text-align: right;
}

.work__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.work__name {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 12px;
}

.work__name-en {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.5em;
  color: var(--ink-soft);
  margin-left: 10px;
  letter-spacing: 0.05em;
}

.work__name-note {
  font-family: var(--font-sans);
  font-size: 0.38em;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin-left: 8px;
  vertical-align: middle;
}

.work__desc {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.7vw, 17px);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  line-height: 1.6;
  margin-bottom: 6px;
}

.work__cta {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.works__coming {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: clamp(16px, 3vh, 32px);
}

/* === 4. Footer === */
/* === Footer (페이지 4) — 화면 5% 차지. 페이지 3 사라진 뒤 viewport 95~100dvh 자리 === */
.footer {
  position: fixed;
  top: 95vh; /* fallback */
  top: 95dvh;
  left: 0;
  width: 100%;
  background-color: #0e0e0e; /* 거의 검정 */
  text-align: center;
  height: 5vh; /* fallback */
  height: 5dvh;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display); /* 가비아 마음결 */
  z-index: 4;
  will-change: transform;
}

.footer__inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer__link {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: -0.005em;
  color: rgba(244, 244, 244, 0.88);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer__link:hover {
  border-bottom-color: rgba(244, 244, 244, 0.6);
  color: #ffffff;
}

.footer__sep {
  color: rgba(244, 244, 244, 0.35);
  font-size: 12px;
}

.footer__legal {
  font-size: 10.5px;
  color: rgba(244, 244, 244, 0.55);
}

/* === Mobile === */
@media (max-width: 720px) {
  section,
  footer {
    padding: 56px 20px;
  }

  /* footer 모바일 — 좁은 화면에 한 줄로 들어가도록 폰트·간격 줄임 */
  .footer__inner {
    gap: 6px;
  }
  .footer__link,
  .footer__sep {
    font-size: 11px;
  }
  .footer__legal {
    font-size: 9.5px;
  }

  .hero {
    /* 95vh + 95dvh fallback 활성화 (위에서 정의됨) — min-height 제거 */
    min-height: 0;
    /* 모바일은 컨텐츠 위쪽 정렬 — 로고와 제목 사이 간격 적정화 */
    justify-content: flex-start;
    padding-top: 80px; /* brand 20px + 텍스트 위 여유 */
    padding-bottom: 16px;
  }

  .hero__title-block {
    margin-bottom: clamp(20px, 3dvh, 32px);
  }

  .hero__brand,
  .philosophy__brand,
  .works-intro__brand {
    top: 20px;
    left: 20px;
  }

  .wordmark {
    font-size: 24px;
  }

  .carousel__arrow--prev {
    left: -4px;
  }

  .carousel__arrow--next {
    right: -4px;
  }

  .philosophy__line br,
  .work__desc br {
    display: none;
  }
}

/* === Hero 초기 fade-in (페이지 로드 시) === */
@media (prefers-reduced-motion: no-preference) {
  .hero__brand,
  .hero__title-block,
  .hero .carousel {
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeIn 1.2s ease forwards;
  }

  .hero__brand {
    animation-delay: 0.3s;
  }
  .hero__title-block {
    animation-delay: 0.5s;
  }
  .hero .carousel {
    animation-delay: 0.7s;
  }

  @keyframes heroFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* === Fade-in on scroll — Philosophy, Works, Footer 콘텐츠 등장 시 === */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
