/* ==========================================================================
   00. FOUNDATION & HEADER — 색상, 글꼴, 공통 너비 / 원본 레퍼런스 기준
   흰 바탕의 간결한 탐색 UI와 반응형 콘텐츠 그리드.
   ========================================================================== */
@font-face { font-family: "Pretendard"; src: url('assets/pretendard.woff2') format('woff2'); font-weight: 45 920; font-style: normal; font-display: swap; }
:root { --navy: #090d2a; --blue: #295cff; --ink: #191b20; --muted: #696d77; --line: #e1e3e8; --content-width: 1360px; --gutter: clamp(24px, 3.125vw, 80px); --header-height: 80px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
html.lenis { scroll-behavior: auto; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Pretendard", "Malgun Gothic", sans-serif; line-height: 1.6; word-break: keep-all; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid #4f80ff; outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: #fff; color: #111; }
.skip-link:focus { top: 12px; }
.eyebrow { font-size: clamp(.75rem, .65rem + .3vw, .9375rem); font-weight: 600; letter-spacing: .06em; }
.site-header { height: var(--header-height); padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: fixed; inset: 0 0 auto; z-index: 30; color: var(--ink); background: #fff; border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 1; white-space: nowrap; }
.brand-title { font-size: clamp(1rem, .8rem + .25vw, 1.25rem); font-weight: 600; letter-spacing: -.04em; }
.portfolio-toolbar { display: flex; flex: 0 1 auto; min-width: 0; }
.portfolio-toolbar-inner { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.portfolio-toolbar-inner::-webkit-scrollbar { display: none; }
.portfolio-toolbar button { padding: 10px 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.5; white-space: nowrap; transition: color .2s, border-color .2s; }
.portfolio-toolbar button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.portfolio-toolbar button:hover { color: var(--ink); }

/* ==========================================================================
   01. HERO — 21:9 배너와 좌우 미리보기 / 슬라이드별 문구 등장
   ========================================================================== */
.hero { position: relative; padding-top: calc(var(--header-height) + 20px); color: #fff; background: #fff; overflow: hidden; }
.hero-slides { width: 100%; height: auto; margin-inline: auto; overflow: visible; touch-action: pan-y; cursor: grab; user-select: none; }
.hero-slides:active { cursor: grabbing; }
.hero-slides > .swiper-wrapper { display: flex; align-items: stretch; height: auto; }
.hero-slide { position: relative; flex-shrink: 0; width: min(84vw, 1360px); height: auto; aspect-ratio: 21 / 9; border-radius: 16px; overflow: hidden; background: var(--navy); isolation: isolate; }
.hero-slide::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(4,9,25,.16), transparent 65%); }
.hero-image, .hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image, .hero-image img { object-fit: cover; object-position: center; pointer-events: none; -webkit-user-drag: none; }
.hero-copy { position: absolute; z-index: 2; left: 6%; top: 50%; width: 56%; transform: translateY(-50%); }
.hero-copy .eyebrow { margin-bottom: 18px; font-size: clamp(.625rem, .5rem + .4vw, .8125rem); line-height: 1.4; font-weight: 600; letter-spacing: .12em; color: #c8d3eb; }
.hero-copy h1, .hero-copy h2 { font-size: clamp(1.75rem, 3.05vw, 3.25rem); line-height: 1.35; letter-spacing: -.045em; font-weight: 650; }
.hero-description { margin-top: 22px; color: #e0e5ed; font-size: clamp(.875rem, .55rem + .55vw, 1.125rem); line-height: 1.65; font-weight: 400; }
.hero-copy > * { opacity: 0; transform: translateY(24px); transition: none; }
.hero-slide.is-revealed .hero-copy > * { opacity: 1; transform: translateY(0); transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1); }
.hero-slide.is-revealed .hero-copy > :nth-child(1) { transition-delay: .08s; }
.hero-slide.is-revealed .hero-copy > :nth-child(2) { transition-delay: .16s; }
.hero-slide.is-revealed .hero-copy > :nth-child(3) { transition-delay: .24s; }
.hero-controls { position: absolute; z-index: 5; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; }
.hero-prev, .hero-next { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 20px; transition: background .2s; }
.hero-prev:hover, .hero-next:hover { background: rgba(255,255,255,.14); }
.hero-prev svg, .hero-next svg { width: 20px; height: 20px; }
.hero-pagination.swiper-pagination { position: static; display: flex; align-items: center; width: auto; gap: 0; transform: none; }
.hero-pagination .swiper-pagination-bullet { position: relative; width: 32px; height: 44px; margin: 0; padding: 0; background: transparent; opacity: 1; }
.hero-pagination .swiper-pagination-bullet::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.5); transform: translate(-50%, -50%); transition: width .25s, background .25s; }
.hero-pagination .swiper-pagination-bullet-active::after { width: 22px; background: #fff; }
.hero-controls button:focus-visible { outline-color: #fff; outline-offset: -3px; }

/* ==========================================================================
   02. PORTFOLIO — 최대 1360px 중앙 정렬 / 확장 가능한 기본 텍스트 탭
   cqi는 이 본문 너비를 기준으로 계산합니다. FHD·QHD에서 본문이
   최대 폭에 도달하면 글자·카드·간격도 함께 멈춰 비례를 유지합니다.
   rem 최소/최대값으로 가독성과 브라우저 글자 확대를 보장합니다.
   ========================================================================== */
.portfolio { width: min(var(--content-width), calc(100% - var(--gutter) * 2)); margin-inline: auto; padding: 28px 0 0; container-type: inline-size; scroll-margin-top: 0; }
.section-heading { margin-bottom: 28px; }
.section-heading .eyebrow { color: var(--muted); margin-bottom: 10px; }
.section-heading h2 { font-size: clamp(1.75rem, 1.25rem + 1.5cqi, 2.5rem); line-height: 1.35; letter-spacing: -.04em; }
.category-tabs { display: flex; align-items: stretch; gap: 32px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.category-tab { flex: 0 0 auto; position: relative; padding: 16px 2px; border-bottom: 2px solid transparent; background: transparent; color: #7b7e86; font-size: 18px; font-weight: 500; line-height: 1.45; white-space: nowrap; transition: color .2s, border-color .2s; }
.category-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.category-tab:hover { color: var(--ink); }

/* ==========================================================================
   03. WORKS — 기본 3열·16:9 / 숏폼 4열·9:16 / 우수 사례 배지
   ========================================================================== */
.works { margin-top: 36px; scroll-margin-top: 40px; }
.works .section-heading { margin-bottom: 30px; }
.works-layout { display: flex; align-items: flex-start; gap: clamp(24px, 3cqi, 40px); }
/* 낮은 화면에서는 카테고리 영역만 스크롤합니다. */
.quick-nav { flex: 0 0 160px; display: flex; flex-direction: column; height: calc(100dvh - var(--header-height) - 48px); position: sticky; top: calc(var(--header-height) + 24px); align-self: flex-start; }
.quick-nav-intro { flex-shrink: 0; padding-bottom: 24px; }
.quick-hook { font-size: clamp(1.125rem, .95rem + .35cqi, 1.375rem); font-weight: 700; line-height: 1.5; letter-spacing: -.035em; }
#quick-links { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
#quick-links a { display: block; padding: 12px 0; font-size: clamp(1rem, .75rem + .4cqi, 1.125rem); line-height: 1.4; color: #777b85; transition: font-size .2s, color .2s; }
#quick-links a[aria-current="location"] { font-size: clamp(1.125rem, .875rem + .5cqi, 1.25rem); font-weight: 700; color: var(--blue); }
#quick-links a[aria-current="location"]::before { content: ""; display: inline-block; width: 5px; height: 5px; background: currentColor; margin: 0 9px 5px 0; }
/* 마지막 여백도 목록 안에 포함해, 끝 구간에서 사이드바가 먼저 밀리지 않게 합니다. */
.works-content { flex: 1; min-width: 0; padding-bottom: clamp(80px, 6vw, 120px); }
.work-group { margin-bottom: clamp(64px, 7cqi, 96px); scroll-margin-top: 35px; }
.work-group:last-child { margin-bottom: 0; }
.work-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; border-top: 1px solid #24262a; padding-top: 20px; margin-bottom: 26px; }
.work-group-heading h3 { display: flex; align-items: center; gap: 8px; font-size: clamp(1.375rem, 1rem + .8cqi, 1.75rem); letter-spacing: -.025em; }
.category-icon { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }
.work-group-heading p { color: var(--muted); font-size: clamp(.8125rem, .65rem + .3cqi, .9375rem); }
.work-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.work-card { min-width: 0; padding: 0; border: 0; background: #fff; text-align: left; display: flex; flex-direction: column; align-items: stretch; }
.work-image { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #eceef2; overflow: hidden; }
.work-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.work-card:hover .work-image > img, .work-card:focus-visible .work-image > img { transform: scale(1.04); }
.work-card[data-video] .work-image { background: #12151b; }
.work-card[data-video] .work-image > img { object-fit: contain; }
.work-action { position: absolute; bottom: 12px; right: 12px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: rgba(0,0,0,.7); font-size: 13px; }
.work-action svg, .work-kind svg { width: 16px; height: 16px; flex-shrink: 0; }
.good-case-badge { display: inline-flex; align-items: center; flex-shrink: 0; padding: 4px 7px; border-radius: 4px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; white-space: nowrap; }
.work-caption { display: block; padding: 14px 0; }
.work-brand { display: flex; align-items: center; gap: 6px; font-size: clamp(.75rem, .65rem + .25cqi, .875rem); color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
.work-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: clamp(1rem, .75rem + .55cqi, 1.25rem); line-height: 1.5; font-weight: 600; }
.work-title-text { min-width: 0; overflow-wrap: anywhere; }
.work-subtitle { display: block; margin-top: 6px; font-size: clamp(.875rem, .75rem + .3cqi, 1rem); line-height: 1.65; color: #565c68; }
.work-kind { display: flex; align-items: center; gap: 5px; font-size: clamp(.8125rem, .65rem + .25cqi, .875rem); color: var(--muted); margin-top: 10px; }
.work-card:not([data-video]) .work-kind svg { transition: transform .25s; }
.work-card:not([data-video]):hover .work-kind svg, .work-card:not([data-video]):focus-visible .work-kind svg { transform: translateX(4px); }

/* 숏폼은 세로 원본에 맞춰 PC 4열 / 태블릿·모바일 2열로 표시합니다.
   공식 YouTube 아이콘은 이미지 위 왼쪽 하단의 작은 배지로 띄웁니다. */
.work-group--shortform .work-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.work-group--shortform .work-card .work-image { aspect-ratio: 9 / 16; background: #eceef2; }
.work-group--shortform .work-card .work-image > img { object-fit: cover; }
.work-platform { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; justify-content: center; width: 52px; height: 46px; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.15); pointer-events: none; animation: platform-float 3s ease-in-out infinite; }
.work-platform img { width: 48px; height: auto; }
@keyframes platform-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
/* ==========================================================================
   05. FOOTER — 콘텐츠 무단 이용 방지 안내
   ========================================================================== */
.site-footer { padding: 48px var(--gutter); color: #aaa; background: #0c0c0c; }
.footer-notice { max-width: var(--content-width); margin-inline: auto; font-size: 1rem; line-height: 1.7; text-align: center; }
.back-top { position: fixed; right: 30px; bottom: 30px; width: 46px; height: 46px; z-index: 25; border: 1px solid #ddd; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; font-size: 25px; opacity: 0; visibility: hidden; transition: opacity .2s; }
.back-top.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   08. DIALOGS — 대홍기획 원본 900px / top 100px / radius 50px / 300ms
   ========================================================================== */
dialog { color: var(--ink); border: 0; }
dialog::backdrop { background: rgba(0,0,0,.25); }
.video-dialog { width: 100%; max-width: none; height: calc(100dvh - 100px); max-height: calc(100dvh - 100px); margin: 100px 0 0; padding: 55px 30px 70px; border-radius: 50px 50px 0 0; overflow-y: auto; transform: translateY(105%); opacity: 0; transition: transform .3s ease, opacity .3s; }
.video-dialog.is-open { transform: translateY(0); opacity: 1; }
.video-dialog-inner { max-width: 60%; margin: 0 auto; position: relative; }
.dialog-close { position: absolute; top: -15px; right: -10px; width: 48px; height: 48px; background: transparent; font-size: 54px; font-weight: 300; line-height: 1; }
.video-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 32px; padding-right: 65px; }
.video-dialog h2 { margin: 0; font-size: 30px; letter-spacing: -.025em; line-height: 1.45; }
.video-brand { margin: 0; font-size: 16px; color: var(--muted); }
.video-frame { aspect-ratio: 16 / 9; border-radius: 30px; overflow: hidden; background: #0b0b0c; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-frame video { width: 100%; height: 100%; display: block; object-fit: contain; }
.video-frame.is-portrait { width: min(100%, calc(65dvh * var(--video-ratio))); margin-inline: auto; }
.video-meta { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; font-size: 14px; color: var(--muted); }

/* ==========================================================================
   09. RESPONSIVE & REDUCED MOTION — 태블릿 → 모바일 순서
   ========================================================================== */
@media (max-width: 1200px) {
  .works-layout { gap: 24px; }
  .quick-nav { flex-basis: 140px; }
  .work-group-heading { display: block; }
  .work-group-heading p { margin-top: 8px; }
}
@media (max-width: 1024px) {
  .work-list, .work-group--shortform .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-copy .eyebrow { margin-bottom: 12px; }
  .hero-description { margin-top: 16px; }
}
@media (max-width: 760px) {
  :root { --header-height: 68px; --gutter: 24px; }
  .site-header { gap: 16px; }
  .portfolio-toolbar-inner { gap: 18px; }
  .portfolio-toolbar button { padding: 9px 0; font-size: 13px; }
  .hero { padding-top: calc(var(--header-height) + 12px); }
  .hero-slide { width: calc(100% - 56px); aspect-ratio: 4 / 3; max-height: 390px; border-radius: 12px; }
  .hero-slide::after { background: linear-gradient(90deg, rgba(4,9,25,.72), rgba(4,9,25,.32) 68%, rgba(4,9,25,.1)); }
  .hero-image, .hero-image img { object-position: 60% center; }
  .hero-video { object-position: center bottom; }
  .hero-copy { left: 24px; top: calc(50% - 16px); width: calc(100% - 48px); }
  .eyebrow { font-size: 12px; }
  .hero-copy .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .hero-copy h1, .hero-copy h2 { font-size: clamp(1.375rem, 4.9vw, 2.125rem); line-height: 1.4; }
  .hero-description { max-width: 310px; font-size: clamp(.75rem, 2.6vw, .9375rem); line-height: 1.65; margin-top: 16px; }
  .hero-controls { bottom: 4px; gap: 4px; }
  .portfolio { padding-top: 24px; }
  .category-tabs { gap: 26px; }
  .category-tab { padding: 13px 0; font-size: 16px; }
  .works { margin-top: 30px; }
  .works .section-heading { margin-bottom: 24px; }
  .works-layout { display: block; }
  .quick-nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; height: auto; position: sticky; top: var(--header-height); background: #fff; z-index: 10; margin: 0 calc(-1 * var(--gutter)) 26px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); }
  .quick-nav-intro { flex: 1; min-width: 0; padding-bottom: 0; }
  .quick-hook { font-size: 13px; line-height: 1.45; }
  .quick-hook br { display: none; }
  #quick-links { order: 1; flex: 0 0 100%; display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden; }
  #quick-links a { flex: 0 0 auto; white-space: nowrap; font-size: clamp(.875rem, .75rem + .5cqi, 1rem); padding: 7px 0; }
  #quick-links a[aria-current="location"] { font-size: clamp(1rem, .875rem + .5cqi, 1.125rem); }
  #quick-links a[aria-current="location"]::before { display: none; }
  .work-group { margin-bottom: 56px; scroll-margin-top: 16px; }
  .work-group-heading { padding-top: 18px; margin-bottom: 20px; }
  .work-list { gap: 24px 12px; }
  .work-caption { padding: 10px 0; }
  .work-title { font-size: 15px; }
  .work-subtitle { font-size: 12px; }
  .work-brand, .work-kind { font-size: 11px; }
  .good-case-badge { padding: 3px 6px; }
  .work-action { width: 28px; height: 28px; right: 8px; bottom: 8px; }
  .work-platform { left: 8px; bottom: 8px; }
  .works-content { padding-bottom: 75px; }
  .site-footer { padding-block: 40px; }
  .back-top { right: 20px; bottom: 20px; width: 42px; height: 42px; }
  .video-dialog { margin-top: 70px; height: calc(100dvh - 70px); max-height: calc(100dvh - 70px); padding: 38px 20px 35px; border-radius: 26px 26px 0 0; }
  .video-dialog-inner { max-width: 100%; }
  .video-heading { gap: 6px 10px; margin-bottom: 24px; padding-right: 40px; }
  .video-dialog h2 { font-size: 24px; }
  .video-brand { font-size: 14px; }
  .dialog-close { right: -6px; top: -20px; font-size: 44px; }
  .video-frame { border-radius: 16px; }
  .video-meta { flex-direction: column; gap: 10px; margin-top: 28px; font-size: 13px; }
}
@media (max-width: 380px) {
  :root { --gutter: 20px; }
  .hero-copy { left: 20px; width: calc(100% - 40px); }
  .hero-copy h1, .hero-copy h2 { font-size: 21px; }
  .hero-description { margin-top: 12px; }
  .portfolio-toolbar-inner { gap: 14px; }
  .work-list { grid-template-columns: minmax(0, 1fr); }
  .work-group--shortform .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}