/* ───────── 기본 토큰 ───────── */
:root {
  --bg: #ffffff;
  --surface: #f2f2f2;      /* 배치도 이미지 배경과 같은 회색 */
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #767676;
  --line: #e6e6e6;
  --accent: #2b59ff;
  --radius: 22px;
  --nav-h: 64px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 16px;
}
.eyebrow--light { color: rgba(255,255,255,.55); }
.h2 {
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.lead { margin-top: 20px; max-width: 560px; color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li {
  font-size: 13px; font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
}

/* ───────── 상단 진행 막대 · 내비 ───────── */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--pad);
}
/* 위쪽은 강하게, 아래로 갈수록 약해지는 블러 (배경색 없음) */
.nav__blur {
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--nav-h);
  pointer-events: none; z-index: -1;
}
.nav__blur i { position: absolute; inset: 0; }
.nav__blur i:nth-child(1) {
  backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.nav__blur i:nth-child(2) {
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 80%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 80%);
}
.nav__blur i:nth-child(3) {
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 25%, transparent 60%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 25%, transparent 60%);
}
.nav__blur i:nth-child(4) {
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 42%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 42%);
}
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: 15px; font-weight: 500; }
.nav__links a:not(.nav__cta) { color: var(--ink-2); transition: color .2s; }
.nav__links a:not(.nav__cta):hover { color: var(--accent); }
.nav__cta { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
@media (max-width: 640px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ───────── 1. 히어로 ───────── */
.hero { height: 230vh; position: relative; }
.hero__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero__text {
  position: absolute; z-index: 2;
  left: 0; right: 0; top: calc(var(--nav-h) + 6vh);
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  opacity: calc(1 - var(--p, 0) * 2.2);
  transform: translateY(calc(var(--p, 0) * -60px));
}
.hero__title {
  font-size: clamp(40px, 7.6vw, 104px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero__title em { font-style: normal; color: var(--accent); }
.hero__sub { margin-top: 20px; max-width: 520px; color: var(--ink-2); font-size: clamp(15px, 1.5vw, 18px); }

.hero__media {
  position: absolute; inset: 0;
  /* --p(0→1)에 따라 카드 → 전체 화면 */
  --t: calc(52% - 52% * var(--p, 0));
  clip-path: inset(var(--t) 0 0 0);
  will-change: clip-path;
}
.hero__inner {
  position: absolute; inset: 0;
  transform: scale(calc(1.18 - .18 * var(--p, 0)));
}
.hero__inner img { width: 100%; height: 100%; object-fit: cover; }
.hero__inner .hotspot { opacity: calc(var(--p, 0) * 3 - 1.4); }
.hero__cue {
  position: absolute; z-index: 2; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.9);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  opacity: calc(1 - var(--p, 0) * 4);
}
.hero__cue span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
@media (max-width: 640px) {
  .hero__media { --t: calc(58% - 58% * var(--p, 0)); }
  .hero__inner img { object-position: 50% 45%; }
}

/* ───────── 2. 소개 문장 ───────── */
.statement { height: 260vh; }
.statement__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  padding-top: var(--nav-h);
  display: flex; align-items: center;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
}
.statement__text {
  font-size: clamp(28px, 4.6vw, 60px);
  line-height: 1.28;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.statement__text .w { opacity: .14; transition: opacity .25s linear; }
.statement__text .w.on { opacity: 1; }

/* ───────── 3. 공간 스케일 ───────── */
.scale { padding-top: 12vh; background: var(--bg); }
.scale__body {
  max-width: var(--max); margin: 8vh auto 0; padding-inline: var(--pad);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px);
}
.scale__stage {
  grid-column: 2; grid-row: 1;
  position: sticky; top: calc(var(--nav-h) + 4vh);
  height: calc(100vh - var(--nav-h) - 8vh);
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.scale__frame {
  position: relative;
  aspect-ratio: 1200 / 802;
  background: var(--surface);
  margin-right: calc(-1 * max(var(--pad), (100vw - var(--max)) / 2 + var(--pad)));
  overflow: hidden;
}
.scale__frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(.94);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.scale__frame img.is-active { opacity: 1; transform: scale(1); }
.scale__meter { display: flex; align-items: center; gap: 18px; }
.scale__count { font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.scale__count b { font-size: 34px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; margin-right: 2px; }
.scale__bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.scale__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--sb, .1)); transition: transform .6s var(--ease); }

.scale__steps { grid-column: 1; grid-row: 1; padding-bottom: 30vh; }
.step {
  min-height: 78vh;
  display: flex; flex-direction: column; justify-content: center;
  opacity: .25; transition: opacity .4s var(--ease);
}
.step.is-active { opacity: 1; }
.step__no { font-size: 13px; font-weight: 700; color: var(--accent); }
.step h3 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.03em; line-height: 1.15; margin-top: 8px; }
.step__cap { font-weight: 600; color: var(--muted); margin-top: 6px !important; }
.step p:last-child { margin-top: 14px; color: var(--ink-2); max-width: 380px; }

@media (max-width: 860px) {
  .scale__body { display: block; }
  .scale__frame { margin-inline: calc(-1 * var(--pad)); }
  .scale__meter { padding-top: 4px; }
  /* 상단 탭 뒤까지 흰 배경으로 덮어서 아래 글자가 비치지 않게 함 */
  .scale__stage {
    top: 0; height: auto; z-index: 3;
    background: var(--bg); padding: calc(var(--nav-h) + 8px) var(--pad) 14px;
    margin-inline: calc(-1 * var(--pad));
    gap: 12px;
  }
  /* 무대 아래로 올라오는 글자를 부드럽게 가림 */
  .scale__stage::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%;
    height: 28px; pointer-events: none;
    background: linear-gradient(to bottom, var(--bg), rgba(255,255,255,0));
  }
  .scale__count b { font-size: 26px; }
  .scale__steps { padding-bottom: 20vh; }
  .step { min-height: 50vh; }
  .scale__steps { padding-top: 10vh; }
}

/* ───────── 4. 작업 과정 (가로 스크롤) ───────── */
.process { height: 400vh; background: var(--surface); }
.process__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  padding-top: var(--nav-h);
  display: flex; flex-direction: column; justify-content: center; gap: 6vh;
}
.process__track {
  display: flex; gap: clamp(16px, 2vw, 28px);
  padding-inline: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  transform: translate3d(var(--tx, 0px), 0, 0);
  will-change: transform;
}
.panel {
  flex: 0 0 min(78vw, 440px);
  min-height: min(52vh, 420px);
  background: var(--bg);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column;
}
.panel__no { font-size: clamp(48px, 6vw, 80px); font-weight: 800; letter-spacing: -0.05em; color: var(--line); line-height: 1; }
.panel h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; margin-top: auto; padding-top: 32px; }
.panel p { margin-top: 12px; color: var(--ink-2); }
.panel .chips li { background: var(--surface); }
.process__dots { display: flex; gap: 8px; justify-content: center; }
.process__dots i { width: 8px; height: 8px; border-radius: 8px; background: #cfcfcf; transition: width .3s var(--ease), background .3s; }
.process__dots i.on { width: 24px; background: var(--ink); }

/* ───────── 5. 작업물 ───────── */
.works { padding-block: 18vh 8vh; }
.works > .wrap:first-child { margin-bottom: 8vh; }
.work { margin-bottom: 14vh; }
.work__media { position: relative; width: 100%; overflow: hidden; }
.work__media img {
  width: 100%;
  clip-path: inset(10% 0 10% 0);
  transform: scale(1.06);
  transition: clip-path 1.2s var(--ease), transform 1.4s var(--ease);
}
.work.is-in .work__media img { clip-path: inset(0 0 0 0); transform: scale(1); }
.work__media .hotspot { opacity: 0; transition: opacity .6s var(--ease) .9s; }
.work.is-in .work__media .hotspot { opacity: 1; }
.work__media--sheet { border-block: 1px solid var(--line); }

/* ───────── SMEET 제품 표시 ───────── */
.hotspot {
  position: absolute; left: 0; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  transform: translate(calc(var(--hx, -999px) - 6px), calc(var(--hy, -999px) - 50%));
  pointer-events: none;
}
.hotspot i {
  position: relative; flex: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px var(--accent);
}
.hotspot i::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.hotspot__label {
  display: flex; align-items: baseline; gap: 6px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(17,17,17,.82); color: #fff;
  line-height: 1.3; white-space: nowrap;
}
.hotspot__label b { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.hotspot__label small { font-size: 10px; font-weight: 500; opacity: .65; letter-spacing: 0.02em; }
@media (max-width: 640px) {
  .hotspot { gap: 6px; }
  .hotspot i { width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--accent); }
  .hotspot__label { padding: 3px 7px; }
  .hotspot__label b { font-size: 10px; }
  .hotspot__label small { font-size: 9px; }
}
.work__info {
  margin-top: 32px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(24px, 4vw, 64px);
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease) .2s, transform .8s var(--ease) .2s;
}
.work.is-in .work__info { opacity: 1; transform: none; }
.work__tag { grid-column: 1; font-size: 13px; font-weight: 600; color: var(--accent); }
.work__info h3 { grid-column: 1; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.03em; margin-top: 8px; }
.work__info p { grid-column: 2; grid-row: 1 / span 3; color: var(--ink-2); align-self: start; }
.work__info .chips { grid-column: 2; }
@media (max-width: 760px) {
  .work__info { display: block; }
  .work__info p { margin-top: 14px; }
}

/* ───────── 6. 숫자 ───────── */
.facts { border-block: 1px solid var(--line); padding-block: 8vh; }
.facts__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact__num { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; }
.fact__num b { font-variant-numeric: tabular-nums; }
.fact__label { color: var(--muted); font-size: 15px; font-weight: 500; }
@media (max-width: 760px) { .facts__grid { grid-template-columns: 1fr; gap: 36px; } }

/* ───────── 7. 도구 ───────── */
.tools { padding-block: 18vh 10vh; }
.tools__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); margin-top: 7vh; }
.tool-group { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.tool-group h3 { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 18px; }
.tool-group li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-block: 14px; border-top: 1px solid #e2e2e2;
}
.tool-group li span { font-size: clamp(19px, 1.8vw, 22px); font-weight: 700; letter-spacing: -0.02em; }
.tool-group li small { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .tools__grid { grid-template-columns: 1fr; } }

/* ───────── 8. 소개 ───────── */
.about { padding-block: 10vh 18vh; }
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); }
.timeline > div { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding-block: 22px; border-top: 1px solid var(--line); }
.timeline > div:last-child { border-bottom: 1px solid var(--line); }
.timeline dt { font-size: 14px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.timeline dd { font-size: clamp(16px, 1.6vw, 19px); font-weight: 500; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* ───────── 9. 연락 ───────── */
.contact { background: var(--ink); color: #fff; padding-block: 20vh; }
.contact__title { font-size: clamp(40px, 7vw, 96px); line-height: 1.06; letter-spacing: -0.045em; font-weight: 800; }
.contact__mail {
  display: inline-flex; gap: 12px; align-items: center;
  margin-top: 48px;
  font-size: clamp(18px, 2.2vw, 28px); font-weight: 600;
  padding-bottom: 6px; border-bottom: 2px solid rgba(255,255,255,.3);
  transition: border-color .25s, gap .25s var(--ease);
  word-break: break-all;
}
.contact__mail:hover { border-color: var(--accent); gap: 20px; }

.footer {
  display: flex; justify-content: space-between;
  padding-block: 28px 40px; font-size: 14px; color: var(--muted);
}

/* ───────── 공통 등장 효과 ───────── */
[data-reveal]:not(.work) { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in:not(.work) { opacity: 1; transform: none; }

/* ───────── 움직임 줄이기 설정 존중 ───────── */
@media (prefers-reduced-motion: reduce) {
  .hero, .statement, .process { height: auto; }
  .hero__sticky, .statement__sticky, .process__sticky { position: relative; height: auto; }
  .hero__sticky { padding-top: calc(var(--nav-h) + 6vh); }
  .hero__text { position: relative; top: 0; opacity: 1; transform: none; }
  .hero__media { position: relative; clip-path: none; margin-top: 6vh; aspect-ratio: 16 / 9; }
  .hero__inner { transform: none; }
  .hero__inner .hotspot { opacity: 1; }
  .hero__cue { display: none; }
  .statement__sticky { padding-block: 18vh; }
  .statement__text .w { opacity: 1; }
  .process__sticky { padding-block: 14vh; }
  .process__track { overflow-x: auto; transform: none; padding-bottom: 12px; }
  .process__dots { display: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal], .work__info, .work__media img, .work__media .hotspot { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
