/* =====================================================================
   MICEKING core.css — 디자인 시스템 + 공통 레이아웃 (2026-10-23)
   계약: docs/components.md  ·  모션 초기상태는 html.js 아래에서만 숨김
   ===================================================================== */

/* ---------- 1. 토큰 ---------- */
:root {
  --ink: #0B0B0D;
  --ink-2: #151518;
  --paper: #F4F1EA;
  --paper-2: #EAE5DA;
  --white: #FFFFFF;
  --purple: #652D91;              /* 브랜드 주 액센트(로고 왕관 색) */
  --purple-lt: #B48AE0;           /* 어두운 배경 위 글자·선 */
  --purple-deep: #2A1240;
  --purple-hover: #7A3BAE;
  --gold: #C8A15A;                /* 보조: 왕관 광채용 헤어라인·작은 점만 */
  --gold-2: #E3C68C;
  --mute: #8A877F;
  --line: rgba(127, 127, 127, .22);

  /* 글꼴 = BGS 사이트와 동일: Pretendard Variable 하나 (2026-10-23 PM 확정)
     --font-serif / --font-en 은 옛 계약 호환용 별칭이다(세리프·이탤릭 폐기). */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-serif: var(--font-sans);
  --font-en: var(--font-sans);

  --fs-display: clamp(40px, 6.6vw, 96px);   /* 홈 히어로 .h-display */
  --fs-hero: clamp(36px, 4.8vw, 68px);      /* 하위 페이지 히어로 .h-hero */
  --fs-h2: clamp(30px, 4vw, 48px);
  --fs-h3: clamp(20px, calc(.6vw + 15px), 24px);
  --fs-hero-sub: clamp(16px, 1.45vw, 20px);
  --fs-lead: clamp(17px, calc(.2vw + 15px), 18px);
  --fs-body: 16px;
  --fs-small: 15px;
  --fs-micro: 13px;                         /* 대문자 라벨·각주 전용 */

  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(80px, 10vw, 152px);
  --header-h: 76px;
  --radius: 2px;                            /* 사진·카드(에디토리얼 직각감) */
  --radius-ui: 12px;                        /* UI 패널 */
  --radius-lg: var(--radius-ui);
  --em-grad: linear-gradient(100deg, #B48AE0, #8E5CC8 55%, #652D91);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  /* 현재 테마(섹션이 덮어씀) */
  --bg: var(--ink);
  --fg: var(--paper);
  --fg-mute: rgba(244, 241, 234, .62);
  --accent: var(--purple-lt);
  --surface: rgba(255, 255, 255, .03);
}

[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --fg-mute: rgba(244, 241, 234, .62);
  --accent: var(--purple-lt);
  --surface: rgba(255, 255, 255, .035);
  --line: rgba(244, 241, 234, .14);
}
[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-mute: rgba(11, 11, 13, .62);
  --accent: var(--purple);
  --surface: rgba(11, 11, 13, .035);
  --line: rgba(11, 11, 13, .14);
}
[data-theme="white"] {
  --bg: var(--white);
  --fg: var(--ink);
  --fg-mute: rgba(11, 11, 13, .62);
  --accent: var(--purple);
  --surface: rgba(11, 11, 13, .03);
  --line: rgba(11, 11, 13, .12);
}

/* ---------- 2. 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
  color-scheme: dark;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: -0.005em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html.js:not(.rm):not(.preload):not(.pt-in) body { animation: mk-enter .6s var(--ease-out) both; }
@keyframes mk-enter { from { opacity: 0; } }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
em, i, cite, address, dfn, var { font-style: normal; }   /* 이탤릭 금지: 강조는 색·굵기로 */
p { line-height: 1.7; text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: var(--purple); color: var(--white); }
[hidden] { display: none !important; }

/* 포커스 링 */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 1000;
  padding: 10px 16px; background: var(--purple); color: var(--white);
  font-size: 15px; font-weight: 600; border-radius: var(--radius);
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* Lenis 필수 규칙 */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- 3. 레이아웃 ---------- */
/* 리빌 대기 중(left/right 40px)·패럴랙스 요소가 가로 넘침을 만들지 않게. clip 은 스크롤 컨테이너를 만들지 않아 핀·sticky 에 영향 없음 */
main { overflow-x: clip; }
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(960px + var(--gutter) * 2); }
.container--wide { max-width: none; }

.section {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--fg);
}
.section--tight { padding-block: clamp(64px, 8vw, 120px); }
/* 핀 섹션 뒤 이음새: 핀이 풀린 뒤 빈 띠가 화면 40% 를 넘지 않게 */
.invert + .section, .pin-spacer:has(> .invert) + .section { padding-top: clamp(32px, 3vw, 48px); }
.section:has(> .hscroll), .section:has(> .pin-spacer > .hscroll) { padding-bottom: calc(var(--section-y) * .5); }
.invert > .container { padding-top: 6vh; }
html.is-touch .invert { min-height: 0; }   /* 터치: 핀 없음 → 섹션 높이를 내용에 맞춤 */
html.is-touch .invert > .container { padding-top: 0; }   /* 조립 글자를 살짝 아래로 → 핀 해제 뒤 아래 빈 띠 축소 */
/* 같은 테마 섹션이 이어지면 위 여백을 줄여 빈 띠를 없앤다 */
.section[data-theme="dark"] + .section[data-theme="dark"]:not(.section--flush),
.section[data-theme="light"] + .section[data-theme="light"]:not(.section--flush),
.section[data-theme="white"] + .section[data-theme="white"]:not(.section--flush) { padding-top: calc(var(--section-y) * .6); }
.section--flush { padding-block: 0; }
.section--screen { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.section--screen > .container { width: 100%; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(20px, 2.4vw, 40px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); align-items: start; }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--center { align-items: center; }

.stack > * + * { margin-top: var(--stack, 1.2em); }
.stack-lg > * + * { margin-top: clamp(32px, 4vw, 64px); }
.row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.row--between { justify-content: space-between; }

/* ---------- 4. 타이포 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }
.eyebrow--plain::before { display: none; }
.eyebrow--gold { color: var(--gold); }
.hairline-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); border: 0; }
.dot-gold { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; }

/* 제목 위계 (BGS 수치) — 홈 히어로 .h-display > 하위 히어로 .h-hero > .h2 > .h3 */
.h-display {
  font-family: var(--font-sans);
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 900;
}
.h-hero {
  font-family: var(--font-sans);
  font-size: var(--fs-hero);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 900;
}
.h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.h2--sans, .h-display--sans { font-family: var(--font-sans); }
.h3 { font-size: var(--fs-h3); line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.h-display, .h-hero, .h2, .h3 { text-wrap: balance; }
/* 강조 <em>: 기울임 대신 보라 그라데이션(어두운 배경) / 단색(밝은 배경) */
em {
  font-style: normal;
  background: var(--em-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
[data-theme="light"] em, [data-theme="white"] em { background: none; -webkit-text-fill-color: currentColor; color: var(--purple); }
.h-en { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--fg-mute); max-width: 40em; text-wrap: pretty; }
html[lang="en"] .lead { max-width: 36em; }
.hero-sub, :is(.hero, [class*="-hero"]) .lead { font-size: var(--fs-hero-sub); line-height: 1.7; }
.small { font-size: var(--fs-small); line-height: 1.6; }
.muted { color: var(--fg-mute); }
.text-gold, .accent { color: var(--accent); }
.serif { font-family: var(--font-serif); }
.en-italic { font-family: var(--font-sans); font-weight: 600; }   /* 옛 클래스 호환: 이탤릭 없음 */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.measure { max-width: 38em; }
.prose { max-width: 40em; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.center .lead, .center .measure { margin-inline: auto; }

.quote { font-family: var(--font-sans); font-size: clamp(24px, 2.8vw, 40px); line-height: 1.4; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.quote__en { display: block; margin-top: .6em; font-family: var(--font-sans); font-weight: 500; font-size: max(14px, .55em); color: var(--accent); letter-spacing: -0.01em; }
.quote__src { display: block; margin-top: 1.4em; font-family: var(--font-sans); font-size: var(--fs-small); color: var(--fg-mute); letter-spacing: .02em; }

.prose p + p { margin-top: 1em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }

/* ---------- 5. 버튼·태그 ---------- */
.btn {
  --btn-bg: var(--purple);
  --btn-fg: var(--white);
  --btn-hover: var(--purple-hover);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em; line-height: 1;
  white-space: nowrap;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-hover);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .55s var(--ease-out);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn__arrow { width: 16px; height: 16px; flex: none; transition: transform .45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-hover: var(--fg);
  border-color: color-mix(in srgb, var(--fg) 40%, transparent);
}
.btn--ghost:hover { color: var(--bg); border-color: var(--fg); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 1024px) { .btn--sm { min-height: 44px; } }
.btn--lg { min-height: 64px; padding: 0 38px; font-size: 18px; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--fg);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 4px; position: relative;
  transition: background-size .5s var(--ease-out);
}
.link-arrow::after { content: ""; position: absolute; inset: -10px -6px; }   /* 터치 영역 44px */
.link-arrow:hover { background-size: 100% 1px; }

.tag {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; position: relative;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--fg-mute); white-space: nowrap;
  transition: color .3s, border-color .3s, background-color .3s;
}
.tag--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
button.tag::before { content: ""; position: absolute; inset: -4px 0; }   /* 히트 영역 44px */
button.tag:hover { color: var(--fg); border-color: var(--fg); }
button.tag[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- 6. 헤더 ---------- */
.site-header {
  --hfg: var(--paper);
  --hbg: rgba(11, 11, 13, .72);
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  color: var(--hfg);
  transition: transform .5s var(--ease-out), color .4s var(--ease-io);
}
.site-header[data-on="light"], .site-header[data-on="white"] { --hfg: var(--ink); --hbg: rgba(244, 241, 234, .78); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--hbg);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--hfg) 10%, transparent);
  opacity: 0; transition: opacity .4s var(--ease-io), background-color .4s var(--ease-io);
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter);
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; flex: none; }
.logo__crown {
  width: 34px; height: 21px; flex: none;
  background: var(--logo-c, var(--white));
  -webkit-mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat;
  mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat;
  transition: background-color .4s var(--ease-io);
}
.logo__word { font-family: var(--font-sans); font-size: 22px; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.logo__word b { font-weight: 800; color: var(--logo-c, var(--purple-lt)); transition: color .4s var(--ease-io); }
.site-header, .site-footer { --logo-c: var(--purple-lt); }
.site-header .logo__crown, .site-footer .logo__crown { background: var(--white); }
.site-header[data-on="light"], .site-header[data-on="white"] { --logo-c: var(--purple); }
.site-header[data-on="light"] .logo__crown, .site-header[data-on="white"] .logo__crown { background: var(--purple); }

.gnav ul { display: flex; gap: clamp(18px, 2.2vw, 40px); list-style: none; margin: 0; padding: 0; }
.logo { position: relative; }
.logo::after { content: ""; position: absolute; inset: -12px -6px; }   /* 터치 영역 */
.gnav a {
  position: relative; display: inline-block; padding: 8px 0;
  font-size: 15px; font-weight: 500; opacity: .82;
  transition: opacity .3s;
}
.gnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.gnav a:hover, .gnav a[aria-current="page"] { opacity: 1; }
.gnav a:hover::after, .gnav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.gnav a[aria-current="page"]::after { background: var(--gold); }  /* 골드 헤어라인(보조) */

.site-header__tools { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
}
.lang__opt { opacity: .62; transition: opacity .3s; }
.lang__opt.is-on { opacity: 1; }
.lang__sep { width: 1px; height: 11px; background: currentColor; opacity: .35; }
.lang:hover .lang__opt { opacity: 1; }


.burger {
  display: none;
  width: 44px; height: 44px; border-radius: 50%;
  position: relative; color: inherit;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor;
  transition: transform .45s var(--ease-out), opacity .3s;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- 7. 풀스크린 메뉴 ---------- */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease-io), visibility 0s linear .5s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease-io), visibility 0s; }
.menu__list { display: grid; gap: 4px; }
.menu__list a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid rgba(244, 241, 234, .1);
  font-family: var(--font-sans); font-size: clamp(28px, 7vw, 48px); line-height: 1.2; font-weight: 800; letter-spacing: -0.035em;
  transform: translateY(24px); opacity: 0;
  transition: transform .7s var(--ease-out), opacity .7s var(--ease-out), color .3s;
}
.menu__list a small { font-family: var(--font-sans); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.menu__list a[aria-current="page"] { color: var(--purple-lt); }
.menu.is-open .menu__list a { transform: none; opacity: 1; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: .04s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: .08s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: .12s; }
.menu.is-open .menu__list li:nth-child(5) a { transition-delay: .16s; }
.menu.is-open .menu__list li:nth-child(6) a { transition-delay: .2s; }
.menu__foot { margin-top: 40px; display: grid; gap: 18px; font-size: 15px; color: var(--mute); }
.menu__foot a { color: var(--paper); }
html.menu-open { overflow: hidden; }

/* ---------- 8. 프리로더·페이지 전환 ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 20px;
  background: var(--ink); color: var(--paper);
  pointer-events: none;
}
html.preload .preloader { display: flex; animation: mk-pl-fallback .5s 1.6s forwards; }
.preloader__crown { width: 96px; height: 59px; background: var(--white); -webkit-mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat; mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat; }
.preloader__word { font-family: var(--font-sans); font-size: 24px; letter-spacing: .3em; font-weight: 800; padding-left: .3em; }
.preloader__bar { width: 120px; height: 1px; background: rgba(244, 241, 234, .15); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple-lt), var(--gold)); transform-origin: left; animation: mk-pl-bar 1.1s var(--ease-io) forwards; }
.preloader.is-done { opacity: 0; transition: opacity .5s var(--ease-io); }
@keyframes mk-pl-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mk-pl-fallback { to { opacity: 0; visibility: hidden; } }
/* 페이지 전환 커버: 나갈 때 아래→위로 덮고(왕관), 들어올 때 위로 빠진다 */
.pt-cover {
  position: fixed; inset: 0; z-index: 998; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  clip-path: inset(100% 0 0 0);
}
.pt-cover__crown { width: 72px; height: 44px; background: var(--white); opacity: 0; -webkit-mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat; mask: url("../img/brand/crown-mark-white.png") center / contain no-repeat; transition: opacity .3s .15s; }
.pt-cover.is-on { clip-path: inset(0 0 0 0); transition: clip-path .45s cubic-bezier(.65, 0, .35, 1); }
.pt-cover.is-on .pt-cover__crown, html.pt-in .pt-cover__crown { opacity: 1; }
html.js.pt-in .pt-cover { clip-path: inset(0 0 0 0); }
.pt-cover.is-out { clip-path: inset(0 0 100% 0); transition: clip-path .6s cubic-bezier(.65, 0, .35, 1); }
.pt-cover.is-out .pt-cover__crown { opacity: 0; transition: opacity .2s; }

/* ---------- 9. 푸터 ---------- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding: clamp(72px, 9vw, 128px) 0 36px;
  border-top: 1px solid rgba(244, 241, 234, .08);
}
.site-footer__top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: clamp(32px, 5vw, 80px); }
.site-footer__brand .logo__word { font-size: 34px; }
.site-footer__brand p { margin-top: 18px; color: var(--mute); font-size: 15px; max-width: 26em; }
.site-footer h2 { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--purple-lt); font-weight: 600; margin-bottom: 18px; }
.site-footer dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.site-footer dt { color: var(--mute); }
.site-footer dd a:hover, .site-footer__nav a:hover { color: var(--purple-lt); }
.site-footer__nav ul { display: grid; gap: 8px; font-size: 15px; }
.site-footer__nav a, .site-footer dd a { position: relative; }
.site-footer__nav a::after, .site-footer dd a::after { content: ""; position: absolute; inset: -12px -4px; }   /* 터치 영역 44px */
.site-footer__bottom {
  margin-top: clamp(48px, 6vw, 96px); padding-top: 24px;
  border-top: 1px solid rgba(244, 241, 234, .08);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--mute);
}

/* ---------- 10. 카드 ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .4s var(--ease-out), transform .6s var(--ease-out);
}
a.card:hover, .card--hover:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
/* 실사진·생성 이미지 톤 맞춤 */
.card__media img, .media img, .rows__thumb, .cursor-img img { filter: saturate(.88) contrast(1.04); }
a.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: clamp(22px, 2.2vw, 32px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { font-size: 14px; color: var(--fg-mute); letter-spacing: .02em; }
.card__title { font-size: 22px; line-height: 1.35; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.card__text { font-size: 16px; color: var(--fg-mute); }
.card__foot { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.card__index { font-family: var(--font-sans); font-weight: 800; font-size: 15px; letter-spacing: .12em; color: var(--accent); }
.card--plain { background: none; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.card--plain .card__body { padding-inline: 0; }

/* ---------- 11. 표 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: 16px; min-width: 640px; }
.table th, .table td { padding: 18px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--fg-mute); text-transform: uppercase; border-bottom-color: color-mix(in srgb, var(--fg) 35%, transparent); }
.table td:first-child, .table th:first-child { padding-left: 0; }
.table tbody tr { transition: background-color .3s; }
.table tbody tr:hover { background: var(--surface); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.filter-bar__label { font-size: 13px; color: var(--fg-mute); margin-right: 6px; letter-spacing: .06em; }
.filter-empty { padding: 40px 0; color: var(--fg-mute); text-align: center; }
html.js [data-tags].is-filtered-in { animation: mk-fade-in .45s var(--ease-out); }
@keyframes mk-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 12. 폼 ---------- */
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: grid; gap: 8px; }
.field > label, .field__label { font-size: 14px; font-weight: 600; }
.field__req { color: var(--accent); margin-left: 2px; }
.field__hint { font-size: 14px; color: var(--fg-mute); }
.input, .select, .textarea,
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; line-height: 1.5;
  transition: border-color .3s, background-color .3s;
}
.field textarea, .textarea { min-height: 160px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--accent); background: transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple-lt) 30%, transparent); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field select option { color: var(--ink); }
.check { display: inline-flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--purple); flex: none; }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- 13. 컴포넌트(모션) 구조 ---------- */
/* split */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.sw-i { display: inline-block; will-change: transform; }
.sc { display: inline-block; }

/* marquee */
.marquee { overflow: hidden; position: relative; }
.marquee__track { display: flex; width: max-content; gap: var(--marquee-gap, 48px); padding-right: var(--marquee-gap, 48px); }
.marquee__track > * { flex: none; }
.marquee--fade { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__item { display: inline-flex; align-items: center; gap: var(--marquee-gap, 48px); font-family: var(--font-sans); font-size: clamp(26px, 3.6vw, 56px); font-weight: 800; letter-spacing: -0.035em; white-space: nowrap; }
.marquee__item::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* invert + assemble */
.invert { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; transition: none; }
.invert > .container { width: 100%; }
.assemble {
  display: flex; justify-content: center; align-items: baseline; flex-wrap: nowrap;
  font-family: var(--font-sans); font-weight: 900; font-size: clamp(54px, 10vw, 160px);
  line-height: .95; letter-spacing: -0.02em;
}
.assemble__p { display: inline-block; will-change: transform; }
/* KING 색: 반전 진행도(--inv 0→1)에 따라 연속 변화(뚝 바뀌지 않게) */
.assemble__p--accent { color: color-mix(in srgb, var(--purple) calc(var(--inv, 0) * 100%), var(--purple-lt)); }
.invert[data-theme-from="light"] .assemble__p--accent { color: color-mix(in srgb, var(--purple-lt) calc(var(--inv, 0) * 100%), var(--purple)); }
/* 정적(모션 축소·JS 없음): 반전 결과 테마로 고정해 다음 섹션과 이음새 일치 */
html.rm .invert[data-theme="dark"], html.no-js .invert[data-theme="dark"] { --bg: var(--paper); --fg: var(--ink); --fg-mute: rgba(11, 11, 13, .62); --accent: var(--purple); --line: rgba(11, 11, 13, .14); --inv: 1; }
.assemble-caption { text-align: center; margin-top: clamp(24px, 3vw, 48px); }

/* clip-expand */
.clip-expand { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); color: var(--fg); }
.clip-expand__media { position: absolute; inset: 0; overflow: hidden; }
.clip-expand__media img, .clip-expand__media video, .clip-expand__media .ph { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* 스크림: JS 가 --scrim 0.15→1 로 올린다(글자는 이미지가 다 열리고 스크림이 깔린 뒤에 등장) */
.clip-expand__media::after { content: ""; position: absolute; inset: 0; opacity: var(--scrim, 1);
  background:
    radial-gradient(70% 60% at 50% 50%, rgba(11, 11, 13, .55), rgba(11, 11, 13, .15) 70%),
    linear-gradient(180deg, rgba(11, 11, 13, .3), rgba(11, 11, 13, .78)); }
.clip-expand__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--paper); padding-inline: var(--gutter); text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.clip-expand__content .lead { max-width: 38em; color: rgba(244, 241, 234, .86); }
.clip-expand .h-display, .sequence .h-display { font-size: clamp(32px, 5.2vw, 76px); }
html.js:not(.rm) .clip-expand__content > * { opacity: 0; }

/* hscroll */
.hscroll { position: relative; overflow: hidden; }
/* 시작선 = .container 글자 시작선(넓은 화면에서도 제목과 같은 왼쪽 정렬) */
.hscroll { --hs-x: max(var(--gutter), calc((100% - var(--maxw)) / 2)); }
.hscroll__track { display: flex; gap: clamp(16px, 2vw, 32px); padding-inline: var(--hs-x); width: max-content; }
.hscroll__item { flex: none; width: clamp(280px, 34vw, 520px); }
.hscroll__item .card__media { background: var(--paper-2); }
.hscroll__progress { margin: 32px var(--hs-x) 0; height: 1px; background: var(--line); overflow: hidden; }
.hscroll__progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
html:not(.js) .hscroll, .hscroll.is-native { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
html:not(.js) .hscroll__item, .hscroll.is-native .hscroll__item { scroll-snap-align: start; }

/* cursor image */
.rows { border-top: 1px solid var(--line); }
.rows__item {
  position: relative; display: grid; grid-template-columns: minmax(90px, 2fr) minmax(0, 8fr); gap: 24px;
  padding: clamp(22px, 2.6vw, 36px) 0; border-bottom: 1px solid var(--line);
  transition: opacity .4s var(--ease-out);
}
.rows__year { font-family: var(--font-sans); font-size: clamp(28px, 3.2vw, 48px); line-height: 1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.rows__body { display: grid; gap: 6px; }
.rows__title { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
[data-cursor-image]:hover .rows__item { opacity: .45; }
[data-cursor-image] .rows__item:hover { opacity: 1; }
.cursor-img {
  position: fixed; left: 0; top: 0; z-index: 80;
  width: clamp(240px, 26vw, 420px); aspect-ratio: 16 / 10;
  border-radius: var(--radius); overflow: hidden;
  pointer-events: none; opacity: 0; visibility: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
  will-change: transform, opacity;
}
.cursor-img img { width: 100%; height: 100%; object-fit: cover; }
.rows__thumb { display: none; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); margin-top: 12px; }
.is-touch .rows__thumb { display: block; }

/* sequence — 줄마다 배경 이미지(data-bg) 교차 페이드, 마지막 줄은 핀 해제까지 유지 */
.sequence { position: relative; }
.sequence__item { padding-block: clamp(32px, 6vw, 80px); }
.sequence__key { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; }
.sequence__ko { font-family: var(--font-sans); font-size: clamp(20px, 1.8vw, 26px); font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.sequence__en { font-family: var(--font-sans); font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-mute); }
.sequence__sig { margin-top: 18px; font-size: 13px; font-weight: 800; letter-spacing: .3em; color: var(--fg-mute); }
.sequence__bgs { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sequence__bg { position: absolute; inset: 0; opacity: 0; }
.sequence__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.sequence__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 11, 13, .78), rgba(11, 11, 13, .5) 62%, rgba(11, 11, 13, .6)); }
.sequence__bg:first-child { opacity: 1; }
.sequence__nav { display: none; }
html.js .sequence.is-ready { height: 100vh; height: 100svh; display: grid; align-items: center; }
html.js .sequence.is-ready.container { max-width: none; padding-inline: 0; }
html.js .sequence.is-ready .sequence__stage { display: grid; position: relative; z-index: 1; width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
html.js .sequence.is-ready .sequence__item { grid-area: 1 / 1; padding-block: 0; }
html.js .sequence.is-ready .sequence__nav { display: flex; align-items: center; gap: 18px; position: absolute; z-index: 1; left: max(var(--gutter), calc((100% - var(--maxw)) / 2)); bottom: clamp(32px, 6vh, 56px); }
.sequence__count { font-size: 13px; font-weight: 800; letter-spacing: .2em; color: var(--fg-mute); font-variant-numeric: tabular-nums; min-width: 4.5em; }
.sequence__bars { display: flex; gap: 8px; }
.sequence__bars i { position: relative; width: 44px; height: 2px; background: var(--line); overflow: hidden; }
.sequence__bars i b { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* magnetic / tilt */
[data-magnetic] { will-change: transform; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* hero gl */
.hero-gl {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background:
    radial-gradient(60% 55% at 70% 40%, rgba(101, 45, 145, .42), transparent 70%),
    radial-gradient(40% 40% at 20% 75%, rgba(180, 138, 224, .14), transparent 70%),
    radial-gradient(12% 12% at 66% 36%, rgba(200, 161, 90, .14), transparent 70%),
    var(--ink);
}
/* GL 이 준비되는 동안 CSS 그라데이션(.hero 배경)을 보이다가 캔버스를 1.2s 페이드인 */
.hero:has(> .hero-gl) { background:
    radial-gradient(60% 55% at 70% 40%, rgba(101, 45, 145, .42), transparent 70%),
    radial-gradient(40% 40% at 20% 75%, rgba(180, 138, 224, .14), transparent 70%),
    var(--ink); }
.hero-gl.is-warming { opacity: 0; }
.hero-gl.is-live { background: var(--ink); opacity: 1; transition: opacity 1.2s var(--ease-io); }
.hero { position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(56px, 7vw, 112px); padding-top: calc(var(--header-h) + 48px); }
/* 히어로 키커: 이미지 위 대비 확보 */
:is(.hero, [class*="-hero"]) .eyebrow { color: var(--paper); opacity: .92; font-size: 14px; text-shadow: 0 1px 12px rgba(11, 11, 13, .6); }
.hero > .container { position: relative; z-index: 2; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: 1; background: linear-gradient(transparent, rgba(11, 11, 13, .75)); pointer-events: none; }
.hero__scroll { position: absolute; right: var(--gutter); bottom: clamp(64px, 9vw, 140px); z-index: 2; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--fg-mute); writing-mode: vertical-rl; }

/* counter */
.stat { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.stat__num { font-family: var(--font-sans); font-size: clamp(48px, 5.6vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums lining-nums; color: var(--fg); }
.stat__num [data-counter] { display: inline-block; text-align: left; }
/* 숫자 롤링(자리마다 0~9 세로 띠) */
.dg { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; line-height: 1; }
.dg__i { display: block; will-change: transform; }
.dg__i > span { display: block; height: 1em; }
.stat__label { font-size: 15px; color: var(--fg-mute); }

/* 이미지 자리(플레이스홀더) */
.ph { display: block; width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #1d1a14, #3a2f1c 50%, #0f0e0c); }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-1x1 { aspect-ratio: 1; }
.media { position: relative; overflow: hidden; border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 14. 유틸 ---------- */
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0 !important; } .mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: clamp(48px, 6vw, 96px); }
.mb-s { margin-bottom: 16px; } .mb-m { margin-bottom: 32px; } .mb-l { margin-bottom: clamp(48px, 6vw, 96px); }
.divider { height: 1px; background: var(--line); border: 0; }
.no-wrap { white-space: nowrap; }
.full-bleed { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.only-mobile { display: none; }
.cta-band { text-align: center; }
.cta-band .row { justify-content: center; margin-top: 36px; }

/* ---------- 15. 모션 초기상태 (html.js 일 때만) ---------- */
html.js [data-reveal] { opacity: 0; transform: translate3d(0, 40px, 0); }
html.js.is-touch [data-reveal]:not([data-reveal="fade"]):not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="scale"]) { transform: translate3d(0, 18px, 0); }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="left"] { transform: translate3d(-40px, 0, 0); }
html.js [data-reveal="right"] { transform: translate3d(40px, 0, 0); }
html.js [data-reveal="scale"] { transform: scale(.96); }
html.js [data-split]:not(.is-split) { opacity: 0; }
html.js [data-stagger] > * { opacity: 0; transform: translate3d(0, 32px, 0); }

/* JS 꺼졌거나 모션 축소 → 전부 보이기 */
html.rm [data-reveal], html.rm [data-split], html.rm [data-stagger] > * { opacity: 1 !important; transform: none !important; }

/* ---------- 16. 반응형 ---------- */
@media (max-width: 1024px) {
  /* 태블릿·모바일: 로고 줄(64px) + 메뉴 줄(44px), 메뉴는 항상 보임 */
  :root { --header-h: 108px; }
  .site-header__tools .btn { display: none; }
  .site-header__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 64px 44px; gap: 0 16px; }
  .site-header::before { opacity: 1; }
  .gnav { grid-column: 1 / -1; grid-row: 2; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; border-top: 1px solid color-mix(in srgb, var(--hfg) 10%, transparent); }
  .gnav::-webkit-scrollbar { display: none; }
  .gnav ul { list-style: none; margin: 0; padding: 0; height: 44px; align-items: center; justify-content: space-between; gap: 18px; white-space: nowrap; width: max-content; min-width: 100%; }
  .gnav a { font-size: 14px; font-weight: 600; padding: 11px 0; letter-spacing: -.01em; }
  .gnav li::marker { content: none; }
  .burger { display: inline-block; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split--rev { grid-template-columns: minmax(0, 1fr); }
  .site-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* 모바일: <br> 강제 줄바꿈을 풀고 balance 로 흐르게(한 어절 고아줄 방지) */
  [data-split] br { display: none; }
  .clip-expand__content { justify-content: flex-end; padding-bottom: 72px; }
  .clip-expand__content .lead { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .rows__item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hscroll__item { width: 78vw; }
  .cursor-img { display: none; }
  .hero__scroll { display: none; }
  .only-mobile { display: initial; }
  .only-desktop { display: none; }
  .table { font-size: 15px; }
}
@media (max-width: 420px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .logo__word { font-size: 19px; }
  .lang { display: none; }
  .menu .lang { display: inline-flex; }
  .btn { padding: 0 22px; }
}

/* ---------- 17. 모션 축소 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal], html.js [data-split], html.js [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  html.preload .preloader { display: none; }
}

/* 인쇄 */
@media print {
  .site-header, .menu, .preloader, .cursor-img, .hero-gl { display: none !important; }
  body, .section { background: #fff !important; color: #000 !important; }
}
