/* ==========================================================================
   UNDOMEDIA 홈페이지 스타일
   순서: 기본값 → 공통 → 헤더 → 메인(첫 화면·WHY·작업·클라이언트·문의) → 푸터
        → WORKS 페이지 → CONTACT 페이지 → 화면 크기별 조정
   ========================================================================== */

/* ---------- 기본값: 색·글꼴·여백 ---------- */
:root {
  --navy: #002855;   /* 로고의 짙은 남색 */
  --ink: #061a33;    /* 어두운 화면 바탕 */
  --blue: #1f6cb4;   /* 버튼·강조 */
  --sky: #69b7eb;    /* 어두운 바탕 위 강조 */
  --paper: #fff;
  --mist: #f3f6f9;   /* 옅은 회색 바탕 */
  --line: #d9e1e9;
  --muted: #5f7286;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --gutter: clamp(22px, 5vw, 88px);  /* 화면 좌우 여백 */
  --header: 64px;
  --bar: 4px;                        /* 메인 하단 구간 표시줄 두께 */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--paper);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul, blockquote, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
::selection { background: #a9d6f5; color: var(--navy); }

/* ---------- 공통 ---------- */
.wrap {
  width: 100%;
  max-width: 1520px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -80px; left: 16px; z-index: 100;
  padding: 10px 18px; background: #fff; color: var(--navy); border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* 메인의 각 구간은 헤더 아래 한 화면을 채웁니다. */
.screen {
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header));
  padding-block: clamp(36px, 7vh, 96px);
}
.screen > .wrap { min-width: 0; }

html:has(.home) { scroll-snap-type: y proximity; }
.home .screen { scroll-snap-align: start; }
/* 창이 충분히 크면 마지막 화면이 푸터까지 함께 한 화면에 들어옵니다. 작으면 조금 더 내려 푸터를 봅니다.
   (--footer-h 는 app.js 가 푸터 높이를 재서 넣습니다) */
@media (min-width: 761px) {
  .home .closing { min-height: calc(100svh - var(--header) - var(--footer-h, 170px)); }
}
.home .site-footer { scroll-snap-align: end; }

/* 한 번 스크롤에 한 화면씩 넘어가고, 다음 화면이 앞 화면 위로 겹쳐 올라옵니다.
   마우스·트랙패드를 쓰는 넓은 창에서 모든 화면이 창 안에 들어올 때만 app.js 가 .paged 를 붙입니다. */
html.paged { scroll-snap-type: none; scroll-behavior: auto; }
.paged .hero, .paged .screen, .paged .closing { position: sticky; top: var(--header); }
.paged .hero { top: 0; }
.paged .screen, .paged .closing { box-shadow: 0 -22px 44px rgb(0 18 44 / .16); }
/* 겹쳐 올라오는 화면은 바탕이 비치지 않아야 합니다. */
.paged .about { background: var(--paper); }

/* 제목(왼쪽)과 설명(오른쪽)을 나란히 */
.split-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 88px);
  align-items: end;
}
.split-lead h2 {
  font-size: clamp(25px, 3vw, 46px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -.04em;
}
.split-lead p {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- 헤더 ----------
   --hw: 흰 바탕의 진하기(0~1), --hi: 글자색이 남색으로 바뀌는 정도(0~1).
   메인에서는 스크롤에 따라 app.js 가 값을 바꿉니다. */
.site-header {
  --hw: 1;
  --hi: 1;
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 40px);
  height: var(--header);
  padding-inline: var(--gutter);
  color: color-mix(in srgb, var(--navy) calc(var(--hi) * 100%), #fff);
  background: rgb(255 255 255 / var(--hw));
  box-shadow: 0 1px 0 rgb(0 40 85 / calc(var(--hw) * .1));
}
.home .site-header { --hw: 0; --hi: 0; }
.site-header.menu-open { --hw: 1 !important; --hi: 1 !important; }

.brand { position: relative; display: block; width: 122px; margin-right: auto; }
.brand img { width: 100%; height: auto; }
.brand .logo-on-light { opacity: var(--hi); }
.brand .logo-on-dark { position: absolute; inset: 0; opacity: calc(1 - var(--hi)); }

.site-nav {
  display: flex;
  gap: clamp(18px, 2.6vw, 38px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .09em;
}
.site-nav a { position: relative; padding-block: 8px; }
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current]::after { transform: scaleX(1); }

.inquiry-link {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.inquiry-link:hover { background: var(--sky); color: var(--ink); }

.menu-toggle { display: none; width: 40px; height: 40px; margin-right: -8px; }
.menu-toggle span {
  display: block; width: 20px; height: 2px; margin: 5px auto;
  background: currentColor;
  transition: transform .25s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: absolute; top: var(--header); left: 0; right: 0;
  display: grid;
  padding: 8px var(--gutter) 20px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 24px 40px rgb(0 30 70 / .14);
}
.mobile-menu a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
}

/* ---------- 메인: 첫 화면 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img,
.hero-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media img { object-position: 50% 18%; filter: saturate(.3) contrast(1.05); }
/* 사진·영상 위에 남색을 덮어 글자가 잘 보이게 합니다. */
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgb(0 26 58 / .5), rgb(0 26 58 / .28) 34%, rgb(3 18 40 / .93)),
    linear-gradient(90deg, rgb(0 34 76 / .78), rgb(0 34 76 / .12) 72%);
}

.hero-body { padding-bottom: clamp(22px, 5vh, 56px); }

.hero-title { display: inline-grid; max-width: 100%; }
/* '폭넓은': 글자 사이를 넓게 띄웁니다. 간격은 --wide-gap 숫자로 조절합니다(클수록 넓어짐). */
.hero-wide {
  --wide-gap: .62em;
  display: flex;
  gap: var(--wide-gap);
  margin-bottom: .75em;
  font-size: clamp(15px, 1.7vw, 25px);
  font-weight: 300;
  line-height: 1.3;
}
.hero-wide i { font-style: normal; }
.hero-wide .gap { width: .1em; }
/* '깊이 있는': 굵고 촘촘하게 */
.hero-deep {
  font-size: clamp(42px, 7.4vw, 116px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.05em;
}
.hero-deep span { display: block; }

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: clamp(18px, 3.6vh, 40px);
}
.hero-lead {
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.8;
  color: rgb(255 255 255 / .84);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 7px 22px 7px 7px;
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .25s, color .25s, border-color .25s;
}
.hero-cta-icon {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
}
.hero-cta:hover { background: #fff; border-color: #fff; color: var(--navy); }
.hero-cta:hover .hero-cta-icon { background: var(--blue); color: #fff; }

/* 첫 화면 아래: 다섯 가지 제작 분야를 화면 너비에 걸쳐 놓습니다. */
.hero-spectrum {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 6px 18px;
  padding-block: 16px calc(18px + var(--bar));
  font-size: 13px;
  font-weight: 500;
}
.hero-spectrum::before {
  content: "";
  position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: rgb(255 255 255 / .28);
}
.hero-spectrum a { color: rgb(255 255 255 / .72); transition: color .2s; }
.hero-spectrum a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }

.video-toggle {
  position: absolute; right: var(--gutter); top: calc(var(--header) + 14px);
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 50%;
  color: #fff;
}
.video-toggle:hover { background: #fff; color: var(--navy); }

/* 첫 화면이 열릴 때 한 번: 윗줄은 넓게 펼쳐지고 아랫줄은 떠오릅니다. */
@media (prefers-reduced-motion: no-preference) {
  .hero-wide { animation: hero-spread 1.7s var(--ease) .1s both; }
  .hero-deep span { animation: hero-rise 1s var(--ease) both; }
  .hero-deep span:nth-child(1) { animation-delay: .35s; }
  .hero-deep span:nth-child(2) { animation-delay: .5s; }
  .hero-foot, .hero-spectrum { animation: hero-fade 1s ease 1s both; }
}
@keyframes hero-spread { from { gap: .1em; opacity: 0; } to { gap: var(--wide-gap); opacity: 1; } }
@keyframes hero-rise { from { transform: translateY(.35em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hero-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 메인: 하단 구간 표시줄 (영상 플레이어의 챕터 바처럼) ---------- */
.chapters {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  height: var(--bar);
  background: var(--ink);
  transition: height .25s var(--ease);
}
.chapters::before { content: ""; position: absolute; inset: -6px 0 0; }
.chapters ol { position: relative; display: flex; gap: 3px; height: 100%; }
.chapters li { flex: 1 1 0; min-width: 0; }
.chapters a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  background: rgb(255 255 255 / .2);
}
.chapter-fill {
  position: absolute; inset: 0;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  background: color-mix(in srgb, var(--sky) calc(var(--i, 0) * 25%), var(--blue));
}
.chapter-name {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
  color: #fff;
  opacity: 0;
  transition: opacity .2s;
}
.chapter-time {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
@media (hover: hover) {
  .chapters:hover, .chapters:focus-within { height: 28px; }
  .chapters:hover .chapter-name, .chapters:focus-within .chapter-name,
  .chapters:hover .chapter-time, .chapters:focus-within .chapter-time { opacity: 1; }
}

/* ---------- 메인: WHY UNDOMEDIA ---------- */
.about-question {
  margin-bottom: clamp(18px, 4vh, 44px);
  font-size: clamp(32px, 6.3vw, 98px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--blue);
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 52px);
  margin-top: clamp(30px, 7vh, 84px);
}
.principles li { padding-top: 18px; border-top: 1px solid var(--navy); }
.principle-word { font-size: 13px; font-weight: 600; color: var(--blue); }
.principles h3 {
  margin: 10px 0 8px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.4;
}
.principles li > p:last-child { font-size: 14px; line-height: 1.8; color: var(--muted); }

/* ---------- 메인: 대표 작업 (세 문장 + 흐르는 영상) ---------- */
.works { overflow: hidden; color: #fff; background: var(--ink); }
.works-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(26px, 4vw, 68px);
  align-items: center;
}
.works-copy { min-width: 0; }
.works-subject {
  margin-bottom: clamp(12px, 2.4vh, 26px);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 500;
  color: rgb(255 255 255 / .62);
}
.story-tabs { display: flex; flex-direction: column; gap: clamp(4px, 1.2vh, 12px); }
.story-tab {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  color: rgb(255 255 255 / .3);
  transition: color .25s;
}
.story-tab:hover { color: rgb(255 255 255 / .7); }
.story-tab[aria-selected="true"] { color: #fff; }
.story-sentence {
  display: block;
  font-size: clamp(22px, 2.75vw, 46px);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  max-height: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--sky);
  opacity: 0;
  transition: max-height .3s var(--ease), opacity .3s, margin .3s var(--ease);
}
.story-tab[aria-selected="true"] .story-tags { max-height: 48px; margin: 4px 0 8px; opacity: 1; }

.outline-link {
  display: inline-block;
  margin-top: clamp(22px, 4.5vh, 46px);
  padding: 11px 24px;
  border: 1px solid rgb(255 255 255 / .45);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .25s, color .25s, border-color .25s;
}
.outline-link:hover { background: #fff; border-color: #fff; color: var(--ink); }

.story-panel { min-width: 0; }
.film-window {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin-right: calc(var(--gutter) * -1);  /* 영상 목록이 화면 오른쪽 끝까지 이어집니다. */
}
.film-window::-webkit-scrollbar { display: none; }
.film-track { position: relative; display: flex; gap: clamp(12px, 1.4vw, 20px); }
.film-card { position: relative; flex: 0 0 clamp(250px, 66%, 640px); min-width: 0; }
.film-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #0b223c;
}
.film-media > img { width: 100%; height: 100%; object-fit: cover; }
.film-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-play {
  position: absolute; inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(12px, 1.4vw, 18px);
  color: #fff;
}
.film-play > span {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgb(255 255 255 / .65);
  border-radius: 50%;
  background: rgb(0 30 66 / .4);
  backdrop-filter: blur(4px);
  transition: background .2s, transform .2s var(--ease), border-color .2s;
}
.film-play:hover > span { background: var(--blue); border-color: var(--blue); transform: scale(1.08); }
.film-stop {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}
.film-meta { padding-top: 14px; }
.film-client { font-size: 12px; color: rgb(255 255 255 / .6); }
.film-title {
  margin-top: 2px;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.025em;
}
.film-role { margin-top: 4px; font-size: 12px; color: var(--sky); }

.film-controls { display: flex; align-items: center; gap: 12px; margin-top: clamp(16px, 3vh, 30px); }
.film-controls button {
  display: grid; place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border: 1px solid rgb(255 255 255 / .32);
  border-radius: 50%;
  color: #fff;
  transition: background .2s, color .2s, border-color .2s;
}
.film-controls button:hover { background: #fff; border-color: #fff; color: var(--ink); }
.film-controls input { flex: 1; min-width: 0; height: 2px; accent-color: var(--sky); cursor: pointer; }
.film-status { margin-top: 10px; font-size: 12px; color: rgb(255 255 255 / .5); }

/* ---------- 메인: 마지막 화면 (프로젝트 문의 + 그 아래 고객 로고, 같은 바탕색) ---------- */
.closing { display: flex; flex-direction: column; min-height: calc(100svh - var(--header)); background: var(--mist); }
.home .closing { scroll-snap-align: start; }

/* 고객 로고: 세 줄이 천천히 흐릅니다. 마우스를 올리면 그 줄이 멈추고 로고에 색이 입혀집니다. */
/* 로고 위(제목과 로고 사이)와 로고 아래의 여유 공간입니다. 숫자를 키우면 더 넓어집니다. */
.clients { padding-bottom: clamp(24px, 3.8vh, 60px); }
.clients-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 32px; }
.clients-head h2 { font-size: clamp(19px, 2vw, 30px); font-weight: 700; line-height: 1.4; letter-spacing: -.04em; }
.clients-head p { font-size: 13px; color: var(--muted); }
.client-rows {
  margin-top: clamp(18px, 3.4vh, 44px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.client-row { overflow: hidden; }
.client-track { position: relative; display: flex; width: max-content; animation: client-flow 70s linear infinite; }
.client-row:nth-child(2) .client-track { animation-direction: reverse; animation-duration: 84s; }
.client-row:nth-child(3) .client-track { animation-duration: 77s; }
.client-row:hover .client-track { animation-play-state: paused; }
.client-copy { display: flex; }
.client-logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  height: clamp(44px, 5vh, 64px);
  padding-inline: clamp(16px, 2vw, 30px);
}
.client-logo img {
  width: auto; height: auto;
  max-width: 150px;
  max-height: clamp(24px, 3.9vh, 36px);
  filter: grayscale(1);
  opacity: .55;
  transition: filter 1.1s ease, opacity 1.1s ease;
}
.client-logo:hover img { filter: none; opacity: 1; transition-duration: .12s; }
/* 같은 로고 묶음을 세 번 이어 붙였으므로 한 묶음 너비만큼 움직이면 처음과 똑같이 이어집니다.
   (--loop 는 app.js 가 로고를 다 불러온 뒤 실제 한 묶음 너비를 재서 넣습니다) */
@keyframes client-flow { to { transform: translateX(var(--loop, -33.3333%)); } }

/* ---------- 메인: 프로젝트 문의 (촬영 슬레이트) ---------- */
.start { flex: 1; display: flex; align-items: center; padding-block: clamp(14px, 1.8vh, 56px) clamp(8px, 1vh, 44px); }
.start > .wrap { min-width: 0; }
.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  gap: clamp(28px, 6vw, 110px);
  align-items: center;
}
.start h2 {
  font-size: clamp(25px, 3.2vw, 50px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -.045em;
}
.start-lead { margin-top: clamp(10px, 2vh, 20px); font-size: clamp(14px, 1.1vw, 16px); color: var(--muted); }
.start-contacts { display: grid; gap: 4px; margin-top: clamp(14px, 3vh, 34px); }
.start-contacts div { display: flex; align-items: baseline; gap: 16px; }
.start-contacts dt { width: 34px; font-size: 13px; color: var(--muted); }
.start-contacts a { font-size: clamp(16px, 1.4vw, 20px); font-weight: 600; }
.start-contacts a:hover { color: var(--blue); }

.slate {
  position: relative;
  width: 100%;
  padding-top: clamp(32px, 4.4vh, 52px);
  filter: drop-shadow(0 22px 32px rgb(0 30 70 / .28));
}
.slate-clap {
  height: 32px;
  margin-bottom: 3px;
  border-radius: 3px;
  background: repeating-linear-gradient(-58deg, #fff 0 24px, var(--ink) 24px 48px);
  transform: rotate(-6deg);
  transform-origin: 0 100%;
  transition: transform .4s var(--ease);
}
.slate:hover .slate-clap, .slate:focus-within .slate-clap { transform: rotate(-11deg); }
.slate.is-clapped .slate-clap { transform: rotate(0); transition-duration: .1s; }
.slate-board { padding: clamp(16px, 1.4vw, 24px); border-radius: 0 0 4px 4px; color: #fff; background: var(--ink); }
.slate-head { padding-bottom: 8px; font-size: 11px; letter-spacing: .14em; color: rgb(255 255 255 / .6); }
.slate-line { display: block; padding: 6px 0 6px; border-top: 1px solid rgb(255 255 255 / .18); cursor: text; }
.slate-line > span { display: block; font-size: 11px; color: rgb(255 255 255 / .6); }
.slate-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slate-pair .slate-line + .slate-line { padding-left: 16px; border-left: 1px solid rgb(255 255 255 / .18); }
.slate-line input, .slate-line textarea {
  display: block;
  width: 100%;
  padding: 2px 0 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}
.slate-line textarea { font-size: 14px; font-weight: 500; resize: none; }
.slate-line input:focus, .slate-line textarea:focus { outline: none; }
.slate-line input::placeholder, .slate-line textarea::placeholder { font-weight: 400; color: rgb(255 255 255 / .4); }
.slate-line:focus-within { box-shadow: inset 0 -2px 0 var(--sky); }
.slate-button {
  width: 100%;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 3px;
  background: var(--blue);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: background .2s, color .2s;
}
.slate-button:hover { background: var(--sky); color: var(--ink); }

/* ---------- 공통 푸터 ---------- */
.site-footer {
  padding-block: clamp(14px, 2.2vh, 32px) calc(12px + var(--bar));
  font-size: 13px;
  line-height: 1.6;
  color: rgb(255 255 255 / .8);
  background: var(--ink);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 18px clamp(20px, 4vw, 64px);
  align-items: start;
}
.footer-brand img { width: 132px; height: auto; }
.footer-brand p { margin-top: 10px; font-size: 12px; color: rgb(255 255 255 / .6); }
.footer-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; }
.footer-info div { display: contents; }
.footer-info dt { color: rgb(255 255 255 / .5); }
.footer-info dd { color: #fff; }
.footer-info a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(10px, 2vh, 22px);
  padding-top: 10px;
  border-top: 1px solid rgb(255 255 255 / .14);
  font-size: 12px;
  color: rgb(255 255 255 / .5);
}
.to-top:hover { color: #fff; }
/* 인스타그램: 원 안의 아이콘 + 아이디 (아이콘 파일이 없으면 @ 표시) */
.footer-insta { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; color: #fff; }
.insta-icon {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  font-size: 15px; font-weight: 700; line-height: 1;
  color: var(--ink);
  transition: background .2s;
}
.insta-icon::before { content: "@"; }
.insta-icon:has(img[src])::before { display: none; }
.insta-icon img { width: 17px; height: 17px; object-fit: contain; }
.insta-icon img:not([src]) { display: none; }
.footer-insta:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-insta:hover .insta-icon { background: var(--sky); }
/* 메인에서는 맨 아래 구간 표시줄과 겹치지 않도록 푸터 아래를 조금 더 띄웁니다. */
.home .site-footer { padding-bottom: calc(24px + var(--bar)); }

/* ---------- WORKS 페이지 ---------- */
.inner main { padding-top: var(--header); }
.works-main { min-height: calc(100svh - 140px); }

.page-head { padding-block: clamp(34px, 7vh, 76px) clamp(20px, 4vh, 36px); text-align: center; }
.page-head h1 {
  font-size: clamp(28px, 3.7vw, 56px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.045em;
}
.page-head p { margin-top: 10px; font-size: 15px; color: var(--muted); }

.work-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.work-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.work-tab:hover { border-color: var(--navy); color: var(--navy); }
.work-tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.work-tab .count { margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .6; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4.4vh, 46px) clamp(14px, 1.8vw, 28px);
  padding-block: clamp(24px, 4.4vh, 44px) clamp(56px, 10vh, 120px);
}
.work-card { display: block; width: 100%; padding: 0; text-align: left; }
.work-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--mist);
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.work-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  background: rgb(0 30 66 / .38);
  opacity: 0;
  transition: opacity .25s;
}
.work-play span {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blue);
}
.work-card:hover .work-thumb img, .work-card:focus-visible .work-thumb img { transform: scale(1.04); }
.work-card:hover .work-play, .work-card:focus-visible .work-play { opacity: 1; }
.work-client { display: block; margin-top: 14px; font-size: 12px; color: var(--muted); }
.work-title {
  display: block;
  margin-top: 2px;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.025em;
}
/* '전체' 탭: 최신 영상 → 보일 듯 말 듯한 구분선 → 전체 영상 */
.work-heading { padding-top: clamp(22px, 4vh, 40px); font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.work-heading-all { border-top: 1px solid rgb(0 40 85 / .08); }
.work-latest .work-grid { padding-block: 14px clamp(30px, 5.4vh, 56px); }
.work-latest:not([hidden]) + .work-grid { padding-top: 14px; }
/* 탭을 바꾸면 목록이 차례로 나타납니다. */
@media (prefers-reduced-motion: no-preference) {
  .work-card { animation: card-in .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 45ms); }
}
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }

/* 영상 팝업 */
.work-dialog {
  width: min(1320px, calc(100vw - 56px));
  max-width: none;
  max-height: calc(100svh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 30px 120px rgb(0 0 0 / .45);
}
.work-dialog::backdrop { background: rgb(3 14 30 / .8); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .work-dialog[open] { animation: dialog-in .3s var(--ease); }
  .work-dialog[open]::backdrop { animation: hero-fade .3s ease; }
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.work-dialog-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 26%, 340px); }
/* 영상 칸은 최소 16:9, 오른쪽 정보가 더 길면 그 높이에 맞춰 검은 바탕이 늘어납니다. */
.work-dialog-screen { position: relative; background: #000; }
.work-dialog-screen::before { content: ""; display: block; padding-top: 56.25%; }
.work-dialog-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-dialog-info {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
  padding: clamp(20px, 2.2vw, 34px);
  padding-top: clamp(48px, 4vw, 56px);
}
.dialog-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--blue); }
.dialog-client { margin-top: 2px; font-size: 14px; font-weight: 500; }
.work-dialog-info h2 { font-size: clamp(19px, 1.7vw, 25px); font-weight: 700; line-height: 1.35; letter-spacing: -.035em; }
.dialog-note { padding-top: clamp(12px, 1.6vw, 18px); border-top: 1px solid var(--line); }
.dialog-note p { margin-top: 4px; font-size: 14px; line-height: 1.75; color: var(--muted); white-space: pre-line; }
.dialog-actions { margin-top: auto; }
.dialog-inquiry {
  display: block;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  transition: background .2s;
}
.dialog-inquiry:hover { background: var(--navy); }
.dialog-steps { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dialog-steps button { padding: 4px 2px; }
.dialog-steps button:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.work-dialog-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--mist);
  transition: background .2s, color .2s;
}
.work-dialog-close:hover { background: var(--navy); color: #fff; }

/* ---------- CONTACT 페이지 ---------- */
.contact-page { display: flex; flex-direction: column; min-height: 100svh; background: var(--mist); }
.contact-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(12px, 1.8vh, 40px);
}
.inner .contact-main { padding-top: calc(var(--header) + clamp(12px, 1.8vh, 40px)); }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(22px, 4vw, 72px);
  align-items: center;
}
.company { min-width: 0; }
.company h1 img { width: clamp(170px, 19vw, 270px); height: auto; }
.company-motto {
  margin-top: clamp(10px, 2vh, 20px);
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.035em;
}
.company-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px 20px;
  margin-top: clamp(14px, 2.6vh, 26px);
  padding-top: clamp(14px, 2.2vh, 22px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}
.company-details dt { margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.company-details dd { font-weight: 500; }
.company-details a { white-space: nowrap; }
.company-details a:hover { color: var(--blue); }

.reviews { margin-top: clamp(16px, 3vh, 32px); }
.reviews-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.reviews h2 { font-size: 13px; font-weight: 600; color: var(--blue); }
.reviews-head p { font-size: clamp(15px, 1.4vw, 20px); font-weight: 700; letter-spacing: -.03em; line-height: 1.4; }
.reviews-toggle {
  display: grid; place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}
.reviews-toggle:hover { border-color: var(--navy); }
.review-example-note { margin-top: 4px; font-size: 12px; color: var(--muted); }
.review-carousel {
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  /* 양쪽 끝이 모두 서서히 사라집니다. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.review-carousel::-webkit-scrollbar { display: none; }
.review-track { position: relative; display: flex; gap: 12px; }
.review-card {
  flex: 0 0 clamp(210px, 60%, 300px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.review-card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.review-example-badge { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; }
.review-card h3 { margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.review-card blockquote { margin-top: 6px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.review-author { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.review-author span { color: var(--muted); }

.inquiry {
  min-width: 0;
  padding: clamp(16px, 2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: calc(var(--header) + 16px);
}
.inquiry-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.inquiry-head h2 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; letter-spacing: -.035em; }
.inquiry-head p { font-size: 13px; color: var(--muted); }
.honeypot { position: absolute; left: -9999px; }

.form-part { min-width: 0; margin-top: clamp(12px, 2vh, 22px); border: 0; }
.form-part > legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  padding-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}
.form-part > legend small { font-size: 12px; font-weight: 400; color: var(--muted); }
.badge { padding: 1px 7px; border-radius: 4px; background: var(--mist); font-size: 11px; font-weight: 600; color: var(--muted); }
.badge-required { background: var(--navy); color: #fff; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.field { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .field textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
  transition: border-color .2s, background .2s;
}
.field textarea { min-height: 62px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa9b8; }
.field input:focus, .field textarea:focus { border-color: var(--blue); background: #fff; outline: none; }

.chip-group { margin-bottom: 8px; border: 0; }
.chip-group legend { float: left; width: 68px; padding-top: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 68px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chips span {
  display: block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  transition: background .15s, color .15s, border-color .15s;
}
.chips label:hover span { border-color: var(--navy); }
.chips input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }

.inquiry-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(10px, 1.6vh, 18px); }
.form-status { font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-status[data-state="success"] { color: #0b7a4b; }
.form-status[data-state="error"] { color: #b3261e; }
.form-status[data-state="pending"] { color: #946100; }
.inquiry-send {
  flex-shrink: 0;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--navy);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: background .2s, opacity .2s;
}
.inquiry-send:hover { background: var(--blue); }
.inquiry-send:disabled { opacity: .6; }

/* ==========================================================================
   화면 크기별 조정
   ========================================================================== */

/* 넓은 모니터 */
@media (min-width: 1500px) {
  .film-card { flex-basis: clamp(250px, 58%, 640px); }
}

/* 화면 절반 정도의 창 (약 760~1000px) */
@media (max-width: 1000px) {
  .chip-group legend { float: none; width: auto; padding: 0 0 6px; }
  .chips { margin-left: 0; }
  .footer-main { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); }
  .works-layout { grid-template-columns: minmax(0, 4.4fr) minmax(0, 7fr); }
  .film-card { flex-basis: 86%; }
  .story-sentence { font-size: clamp(22px, 3.1vw, 30px); }
}

/* 세로가 낮은 창에서는 한 화면에 들어오도록 조금 더 줄입니다. */
@media (min-width: 761px) and (max-height: 760px) {
  .principles { margin-top: 26px; }
  .slate { padding-top: 32px; }
  .slate-line { padding: 6px 0 8px; }
  .client-logo { height: 42px; }
  .field input, .field textarea { padding-block: 7px; }
  .field textarea { min-height: 54px; }
}

/* 휴대폰 */
@media (max-width: 760px) {
  :root { --header: 56px; }
  html:has(.home) { scroll-snap-type: none; }
  .screen { min-height: 0; padding-block: 64px; }

  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .brand { width: 112px; }
  .inquiry-link { padding: 7px 14px; font-size: 12px; }

  .split-lead { grid-template-columns: 1fr; gap: 14px; }

  .hero { min-height: 520px; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-lead br { display: none; }
  .hero-spectrum { flex-wrap: wrap; justify-content: flex-start; font-size: 12px; }

  .principles { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; }

  .works-layout { grid-template-columns: 1fr; gap: 30px; }
  .story-sentence { font-size: clamp(22px, 6.6vw, 30px); white-space: normal; }
  .film-card { flex-basis: 84%; }

  .closing { min-height: 0; }
  .clients { padding-top: 48px; }
  .start { padding-block: 40px 56px; }
  .client-logo { height: 50px; padding-inline: 16px; }
  .client-logo img { max-width: 120px; max-height: 28px; filter: none; opacity: .9; }

  .start-layout { grid-template-columns: 1fr; gap: 28px; }
  .slate { max-width: 420px; }

  .footer-main { grid-template-columns: 1fr; }

  .work-tabs { flex-wrap: nowrap; justify-content: flex-start; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .work-tabs::-webkit-scrollbar { display: none; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .work-dialog { width: calc(100vw - 24px); max-height: calc(100svh - 24px); border-radius: 8px; }
  .work-dialog-layout { grid-template-columns: 1fr; }
  .work-dialog-info { padding-top: 20px; }
  .work-dialog-close { color: #fff; background: rgb(0 0 0 / .55); }

  .contact-main { align-items: flex-start; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .inquiry { order: -1; }
  /* 아이폰은 16px 미만 입력칸을 누르면 화면을 확대하므로 16px로 맞춥니다. */
  .field input, .field textarea, .slate-line textarea { font-size: 16px; }
  .inquiry-submit { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .company-details { grid-template-columns: 1fr; }
  .company-details a { white-space: normal; }
}

/* 터치 화면: 마우스가 없으므로 로고를 색 그대로 보여줍니다. */
@media (hover: none) {
  .client-logo img { filter: none; opacity: .9; }
  .work-play { display: none; }
}

/* 움직임 줄이기를 켠 사용자를 위해 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .client-track { width: auto; flex-wrap: wrap; justify-content: center; animation: none; }
  .client-copy { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
