/* ===== Tokens ===== */
:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --fg: #f2f2f0;
  --fg-2: #a6a6ab;
  --fg-3: #6b6b72;
  --line: rgba(255, 255, 255, .09);
  --accent: #5b7cff;
  --radius: 10px;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.7; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 6px; }

.eyebrow {
  margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
}

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 68px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad);
  transition: background .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(10, 10, 11, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; letter-spacing: 0; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 14px; font-weight: 500; }
.nav a { color: var(--fg-2); transition: color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }

/* ===== Hero ===== */
.hero { padding: clamp(140px, 22vh, 220px) var(--pad) clamp(40px, 6vw, 72px); max-width: var(--max); margin: 0 auto; }
.hero-title {
  margin: 0; font-size: clamp(48px, 10.5vw, 168px); line-height: .92; font-weight: 700; letter-spacing: -0.045em;
}
.hero-ko { display: block; margin-top: .35em; font-size: .22em; font-weight: 500; letter-spacing: 0; color: var(--fg-2); }
.hero-lead { margin: 28px 0 0; max-width: 34em; font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); line-height: 1.6; }

.reel { padding: 0 var(--pad); max-width: var(--max); margin: 0 auto; }
.reel .yt-fig { margin: 0; }
.reel-label { margin: 14px 0 0; font-size: 13px; color: var(--fg-3); letter-spacing: .08em; text-transform: uppercase; }

/* ===== YouTube (click to load) ===== */
.yt-fig { margin: 0; }
.yt {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer;
  background: #000; border-radius: var(--radius); overflow: hidden;
}
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .92; }
.yt:hover img { transform: scale(1.02); opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .35); transition: transform .3s var(--ease), background .3s;
}
.yt-play::after { content: ""; position: absolute; left: 31px; top: 25px; border-style: solid; border-width: 13px 0 13px 20px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play { transform: scale(1.08); background: var(--accent); border-color: var(--accent); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-fig figcaption, .media figcaption { margin-top: 10px; font-size: 13px; color: var(--fg-2); line-height: 1.5; }

/* ===== Works ===== */
.works { padding: clamp(96px, 12vw, 160px) var(--pad) 40px; max-width: var(--max); margin: 0 auto; scroll-margin-top: 40px; }
.works-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: 40px; }
.works-head h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -0.04em; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 14px; color: var(--fg-2); transition: all .2s;
}
.chip sup { font-size: 10px; color: var(--fg-3); margin-left: 2px; }
.chip:hover { color: var(--fg); border-color: rgba(255, 255, 255, .25); }
.chip.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.is-active sup { color: var(--bg); opacity: .6; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.card[hidden] { display: none; }
.card a { display: block; }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.card a:hover .thumb img { transform: scale(1.045); }
.card-body { padding-top: 16px; }
.card-cat { margin: 0; font-size: 12px; color: var(--fg-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.card h3 { margin: 6px 0 4px; font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; }
.card-sum { margin: 0; font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.card a:hover h3 { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ===== Project ===== */
.project { max-width: 1240px; margin: 0 auto; padding: 132px var(--pad) 40px; }
.project-head { max-width: 920px; margin-bottom: clamp(40px, 6vw, 72px); }
.back { display: inline-block; margin-bottom: 40px; font-size: 14px; color: var(--fg-2); }
.back:hover { color: var(--fg); }
.project-head h1 { margin: 0; font-size: clamp(36px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; }
.project-sum { margin: 20px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: var(--fg-2); }

.project-body > * + * { margin-top: clamp(20px, 2.4vw, 32px); }
.project-body > .blk-text, .project-body > .blk-heading { margin-top: clamp(56px, 7vw, 96px); }
.project-body > .blk-text + *, .project-body > .blk-heading + * { margin-top: 28px; }
.project-body > :first-child { margin-top: 0; }

.blk-heading { max-width: 880px; margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -0.03em; font-weight: 600; }
.blk-text { max-width: 760px; }
.blk-text p { margin: 0; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.85; color: #d6d6d4; }
.blk-text p + p { margin-top: .4em; }

.blk-gallery { display: grid; gap: clamp(8px, 1.2vw, 16px); }
.blk-gallery.cols-1 { grid-template-columns: 1fr; }
.blk-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.blk-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.blk-gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.blk-gallery.narrow { max-width: 50%; }
.media { margin: 0; }
.media img, .media video { width: 100%; border-radius: 6px; background: var(--bg-2); }
.blk-gallery.cols-1 .media.portrait, .blk-gallery.narrow .media.portrait { width: min(100%, calc(84vh * var(--ar))); margin: 0 auto; }
.zoomable { cursor: zoom-in; }
.blk-link { margin: 12px 0 0; font-size: 14px; }
.blk-link a { color: var(--accent); }

.blk-yt { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.blk-yt.cols-2 { grid-template-columns: repeat(2, 1fr); }

.blk-process { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { position: relative; margin: 0; }
.step img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: #000; }
.step-no { position: absolute; left: 10px; top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); z-index: 1; }
.step figcaption { margin-top: 10px; font-size: 13px; color: var(--fg-2); }
.step:not(:last-child)::after {
  content: "→"; position: absolute; right: -12px; top: 42%; font-size: 14px; color: var(--fg-3); transform: translateX(50%);
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--line); padding-top: 32px; }
.pager a { display: block; font-size: clamp(17px, 2vw, 24px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; transition: color .2s; }
.pager a span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--fg-3); letter-spacing: .12em; text-transform: uppercase; }
.pager-next { text-align: right; }
.pager a:hover { color: var(--accent); }

/* ===== About ===== */
.about { max-width: var(--max); margin: 0 auto; padding: 150px var(--pad) 40px; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(48px, 8vw, 140px); }
.about h1 { margin: 0 0 32px; font-size: clamp(44px, 6vw, 88px); line-height: .95; letter-spacing: -0.045em; font-weight: 700; }
.about-lead { margin: 0 0 .6em; font-size: clamp(17px, 1.5vw, 20px); color: #d6d6d4; line-height: 1.7; }
.facts { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts span { width: 72px; flex: none; color: var(--fg-3); font-size: 13px; padding-top: 1px; }
.facts a:hover { color: var(--accent); }
.about-detail section + section { margin-top: 72px; }
.about-detail h2 { margin: 0 0 24px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); font-weight: 600; }
.career { list-style: none; margin: 0; padding: 0; }
.career li { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.career li:last-child { border-bottom: 1px solid var(--line); }
.career .period { color: var(--fg-2); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 4px; }
.career h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.career p { margin: 0; color: var(--fg-2); font-size: 15px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.plist li:last-child { border-bottom: 1px solid var(--line); }
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
.tool-group h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.tool-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tool-group li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--fg-2); }

/* ===== Footer ===== */
.site-footer { max-width: var(--max); margin: clamp(96px, 12vw, 180px) auto 0; padding: 0 var(--pad) 40px; }
.footer-cta { padding: 56px 0; border-top: 1px solid var(--line); }
.footer-mail { font-size: clamp(28px, 5.5vw, 80px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; transition: color .2s; }
.footer-mail:hover { color: var(--accent); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--fg-3); }

.notfound { max-width: var(--max); margin: 0 auto; padding: 200px var(--pad) 80px; }
.notfound h1 { margin: 0 0 24px; font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.03em; }
.notfound a { color: var(--accent); }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4vmin; background: rgba(0, 0, 0, .94); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; border-radius: 4px; }
.lb-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: #fff; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .blk-gallery.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .site-header { height: 60px; }
  .brand span { display: none; }
  .grid { grid-template-columns: 1fr; }
  .blk-gallery.cols-3, .blk-yt.cols-2 { grid-template-columns: 1fr; }
  .blk-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .blk-gallery.narrow { max-width: 100%; }
  .blk-process { padding: 16px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .career li { grid-template-columns: 1fr; gap: 6px; }
  .tools { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .yt-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .yt-play::after { left: 24px; top: 19px; border-width: 11px 0 11px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
