/* ---------- tokens (Apple 시스템 컬러 기준) ---------- */
:root {   /* 블랙 단일 테마 (Apple 다크 시스템 컬러 기준) */
  --bg: #000000;
  --surface: #1c1c1e;
  --fg: #f5f5f7;
  --muted: #86868b;
  --line: #2c2c2e;
  --fill: #1c1c1e;
  --link: #2997ff;
  --overlay: rgba(40, 40, 44, .76);   /* 팝업 뒤: 검은 바탕은 회색으로 밝아지고 밝은 콘텐츠는 눌림 → 검은 팝업이 또렷하게 뜸 */
  --radius: 18px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.25, .1, .25, 1);      /* Apple 기본 */
  --ease-out: cubic-bezier(.32, .72, 0, 1);   /* iOS 시트 */
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--fg);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--pad);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; transform-origin: 50% 85%; animation: tilt 6.8s ease-in-out infinite; }
.lt { display: inline-flex; }
.lt span { display: inline-block; transform-origin: 50% 90%; animation: hop 3.4s var(--ease) infinite; animation-delay: calc(var(--i) * .09s); }
@keyframes tilt {
  0%, 100% { transform: rotate(0); }
  9% { transform: rotate(-11deg); } 22% { transform: rotate(-8deg); }
  41% { transform: rotate(9deg); } 58% { transform: rotate(-3deg); }
  68% { transform: rotate(-13deg); } 84% { transform: rotate(6deg); }
}
@keyframes hop {
  0%, 40%, 100% { transform: none; }
  10% { transform: translateY(-4px) rotate(calc(var(--r) * 1deg)); }
  22% { transform: translateY(0) rotate(calc(var(--r) * -.4deg)); }
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; white-space: nowrap; }
/* 메뉴: 밝게, 지금 보고 있는 섹션은 흰색 + 밑줄 */
.nav nav a { position: relative; padding: 4px 0; color: rgba(245, 245, 247, .62); transition: color .25s var(--ease); }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 1px;
  background: var(--fg); transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.nav nav a:hover, .nav nav a.active { color: var(--fg); }
.nav nav a.active::after { transform: scaleX(1); }


/* ---------- hero video ---------- */
.hero { padding: 0; }
.player { position: relative; width: min(100%, 80vh * 3 / 2); margin: 0 auto; background: #000; overflow: hidden; }
.player video { width: 100%; aspect-ratio: 3 / 2; cursor: pointer; }
.player-bar, .reel-cap {
  position: absolute; left: 0; right: 0; color: #fff;
  padding: 10px clamp(10px, 2vw, 18px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
}
.player-bar { bottom: 0; display: flex; align-items: center; gap: 12px; padding-top: 64px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.reel-cap { bottom: 44px; padding-block: 0; font-size: 13px; z-index: 1; }
.player.show :is(.player-bar, .reel-cap) { opacity: 1; }
.player.show .player-bar { pointer-events: auto; }
.pb-play, .pb-mute { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; }
.pb-play svg, .pb-mute svg { width: 18px; height: 18px; }
.pb-mute .i-sound, .player.unmuted .i-muted { display: none; }
.player.unmuted .i-sound { display: block; }
.pb-play .i-play, .player.paused .i-pause { display: none; }
.player.paused .i-play { display: block; }
.pb-time { font-size: 12px; font-variant-numeric: tabular-nums; }
.pb-seek { flex: 1; min-width: 0; accent-color: #fff; cursor: pointer; }

/* ---------- sections & cards ---------- */
.section { padding: 88px var(--pad); border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.section h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }

/* motto: 파티클 위 문구 — 흰 글자 + 진한 그림자로 어떤 배경에서도 또렷하게 */
.section.showreel { padding: 0; }
.space {   /* 폭은 화면 가득, 높이만 3:2 로 잘라냄 (큰 화면에선 화면 높이를 넘지 않게) */
  position: relative; display: grid; place-items: center; overflow: hidden; background: #000;
  width: 100%; aspect-ratio: 3 / 2; max-height: 92svh;
}
.space canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.space::after {   /* 글자 뒤를 어둡게 해서 문구가 또렷하게 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 26% at 50% 50%, rgba(0, 0, 0, .7), transparent 100%);
}
.space .motto {
  position: relative; z-index: 1; margin: 0; padding: 0 20px; text-align: center; color: #fff;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: clamp(44px, 11vw, 168px); font-weight: 900; line-height: .98; letter-spacing: -0.05em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .9), 0 4px 30px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .8);
}
/* 글자 하나하나가 흐림 속에서 제각각 맺히고, 다시 흩어짐 */
.motto .w { display: inline-block; white-space: nowrap; }
.motto .ch {
  display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.3em) scale(.85);
  transition: opacity .9s var(--ease), filter 1s var(--ease), transform 1.2s var(--ease-out);
  transition-delay: var(--d);
}
.motto.on .ch { opacity: 1; filter: blur(0); transform: none; }
.motto.off .ch { opacity: 0; filter: blur(12px); transform: translateY(-.2em) scale(1.08); transition-duration: .95s; }
.motto .inf {
  background: linear-gradient(90deg, #ff9500, #ff2d55, #af52de, #5e5ce6, #0a84ff, #64d2ff, #ff9500) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  animation: flow 5s linear infinite;
}
@keyframes flow { to { background-position: 300% 0; } }

/* Chair · Pattern 줄: 오른쪽 → 왼쪽으로 흐르는 사진 띠 */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(44px, 6vw, 72px); margin: 0 calc(var(--pad) * -1); }
.row-title { padding: 0 var(--pad); margin-bottom: 16px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.track { overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.track:active { cursor: grabbing; }
.belt { display: flex; gap: clamp(18px, 3vw, 36px); align-items: flex-start; width: max-content; will-change: transform; }
.tile { flex: none; width: clamp(160px, 44vw, 300px); padding: 0; text-align: left; }   /* 예전 2열 카드 크기 */
.tile .ph { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--fill) center / cover; }
.tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile-title { display: block; margin-top: 12px; font-size: clamp(15px, 1.4vw, 17px); font-weight: 600; }
.tile-cap { font-size: clamp(12px, 1vw, 13px); color: var(--muted); }
.tile-cap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.section.contact { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 44px; }
.contact-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; }
.contact-item { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); transition: color .2s var(--ease); }
.contact-item:hover { color: var(--fg); }
.contact-item svg { width: 18px; height: 18px; }

/* ---------- modal: iOS 시트처럼 — 배경만 어두워지고, 창은 불투명한 채로 아래에서 올라옴 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(48px, 9vh, 96px) clamp(24px, 9vw, 140px);
  visibility: hidden; transition: visibility 0s .35s;
}
.modal::before {   /* 반투명 배경 */
  content: ""; position: fixed; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity .3s var(--ease);
}
.modal.open { visibility: visible; transition: none; }
.modal.open::before { opacity: var(--dim, 1); }
.modal-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: clamp(24px, 4vw, 56px); border-radius: var(--radius);
  background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 80px rgba(0, 0, 0, .6);
  transform: translateY(100vh); transition: transform .35s var(--ease);
}
.modal.open .modal-inner { transform: none; transition: transform .5s var(--ease-out); }
.close {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: var(--fg); font-size: 18px; line-height: 1;
}
.gallery img { cursor: zoom-in; }

/* ---------- viewer: 사진 전체 화면 (좌우로 넘기기, 아래로 내려 닫기, 두 손가락 확대) ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #000;
  visibility: hidden; opacity: 0; transition: opacity .25s var(--ease), visibility 0s .25s;
  touch-action: pinch-zoom;
}
.viewer.open { visibility: visible; opacity: 1; transition: opacity .25s var(--ease); }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .3s var(--ease-out); }
.viewer .close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.viewer-count { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }
.modal h3 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; padding-right: 40px; }
.modal .caption { margin-top: 12px; font-weight: 600; text-transform: uppercase; }
.modal .meta { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.gallery { columns: 2 320px; column-gap: 24px; margin-top: 32px; }
.gallery figure { break-inside: avoid; margin-bottom: 24px; }
/* 사진 자리: 흐린 미리보기 위에 사진이 그대로 덮임 (애니메이션 없음) */
.gallery .ph { display: block; border-radius: 12px; overflow: hidden; background: var(--fill) center / cover; }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .section { padding: 72px var(--pad); }
}
@media (max-width: 720px) {
  .modal { padding: 64px 22px; }
  .modal-inner { padding: 60px 24px 32px; }
  .gallery { columns: 1; margin-top: 24px; }
  .gallery figure { margin-bottom: 20px; }
}
@media (max-width: 560px) {
  .nav { padding-top: 12px; padding-bottom: 12px; }            /* 로고 왼쪽, 메뉴 오른쪽 한 줄 */
  .logo { gap: 8px; font-size: 16px; }
  .logo-mark { width: 32px; height: 32px; }
  .nav nav { gap: clamp(10px, 3.5vw, 16px); font-size: clamp(13px, 3.6vw, 14px); }
  .section { padding: 56px var(--pad); }
  .section h2 { margin-bottom: 24px; }
}
