/* ═══════════════════════════════════════════════════════
   로디디자인 리뉴얼 — "종이 위의 스튜디오"
   design-system.md 토큰 구현
   ═══════════════════════════════════════════════════════ */

/* 디스플레이 서체 로컬 서브셋 — 페이지에 쓰인 300 글리프만 (~17KB), preload로 LCP 재페인트 방지 */
@font-face {
  font-family: "Paperlogy Subset";
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/paperlogy-700-sub.woff2") format("woff2");
}
@font-face {
  font-family: "Paperlogy Subset";
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/paperlogy-800-sub.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-italic-sub.woff2") format("woff2");
}

:root {
  /* 컬러 */
  --paper: #FAF7F0;
  --paper-warm: #FFF2D6;
  --chip-warm: #FFEAC3; /* 뱃지 전용 크림 — 배경과 구분되되 차분하게 (accent-deep 대비 4.7:1) */
  --surface: #FFFFFF;
  --ink: #1A1713;
  --ink-soft: #6E675C;
  --line: #E7E0D2;
  --accent: #ED582B;
  --accent-deep: #B93B14; /* 크림(#FFF2D6) 위 대비 5.1:1 (WCAG AA) */
  --accent-tint: #FDEBE3;
  --kakao: #FAE100;

  /* 타이포 */
  --font-display: "Paperlogy Subset", "Paperlogy", "Pretendard Variable", sans-serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --fs-display: clamp(2.875rem, 8.5vw, 6.75rem);
  --fs-title: clamp(2rem, 5vw, 3.5rem);
  --fs-heading: clamp(1.375rem, 2.6vw, 1.875rem);
  --fs-body-lg: clamp(1.0625rem, 1.5vw, 1.1875rem);
  --fs-body: 1rem;
  --fs-caption: 0.875rem;
  --fs-overline: 0.75rem;

  /* 모션 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-micro: 180ms;
  --dur-base: 420ms;
  --dur-reveal: 750ms;
  --dur-hero: 900ms;

  /* 레이아웃 */
  --container: 1200px;
  --margin: clamp(20px, 5vw, 48px);
  --sec-pad: clamp(96px, 13vw, 176px);
  --header-h: 68px;
}

/* ── 리셋 ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

/* 종이 그레인 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
address { font-style: normal; }
mark { background: none; color: inherit; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 12px 12px;
  transition: top var(--dur-micro);
}
.skip-link:focus { top: 0; }

/* ── 헤더 ─────────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}
.brand__mark { display: inline-flex; }
.brand__mark img { height: 26px; width: auto; display: block; }
.nav { display: none; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  transition: color var(--dur-micro), background var(--dur-micro);
}
.nav a:hover { color: var(--ink); background: var(--accent-tint); }
.header__actions { display: flex; align-items: center; gap: 12px; }

.hamburger {
  display: grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out);
}
body.menu-open .hamburger span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .hamburger span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav { display: flex; }
  .hamburger { display: none; }
}

/* ── 모바일 오버레이 메뉴 ─────────────── */
.menu[hidden] { display: none; } /* author display:flex가 UA [hidden]을 이기는 문제 방지 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 가로 모드 등 짧은 뷰포트에서 스크롤 허용 */
  padding: var(--header-h) var(--margin) 48px;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), visibility 0s var(--dur-base);
}
/* margin:auto 페어로 안전한 세로 센터링 (공간 부족 시 자동 해제 → 스크롤) */
.menu nav { margin-top: auto; }
.menu__foot { margin-bottom: auto; }
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.menu nav { display: grid; gap: 4px; }
.menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  letter-spacing: -0.03em;
  transform: translateY(24px);
  opacity: 0;
  transition: transform var(--dur-reveal) var(--ease-out), opacity var(--dur-reveal) var(--ease-out);
}
.menu.is-open nav a {
  transform: none;
  opacity: 1;
  transition-delay: calc(var(--i) * 60ms + 80ms);
}
.menu nav a i {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-deep);
}
.menu__foot {
  margin-top: 48px;
  color: var(--ink-soft);
  font-size: var(--fs-caption);
}
body.menu-open { overflow: hidden; }

/* ── 공통: 버튼 ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: background var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro);
}
.btn:active { transform: scale(0.98); }
.btn__arrow { transition: transform var(--dur-micro) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); }

.btn--ghost { border: 1px solid var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.btn--kakao { background: var(--kakao); color: var(--ink); }
.btn--kakao:hover { filter: brightness(0.94); transform: translateY(-2px); }

.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 0.875rem; } /* 터치 타깃 44px 유지 */
.btn--block { width: 100%; }

/* ── 공통: 칩/뱃지 ────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--fs-overline);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chip--warm {
  background: var(--chip-warm);
  border: 1px solid #F0DCAE; /* 웜 탠 헤어라인 — 엣지만 살짝 정의 */
  color: var(--accent-deep);
  letter-spacing: 0.02em;
  font-size: var(--fs-caption);
}
.chip--warm b { font-weight: 800; }

/* ── 공통: 섹션 헤더 ──────────────────── */
.section { padding-block: calc(var(--sec-pad) / 2); }

.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.sec-head__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent-deep); /* 라이트 배경 위 4.5:1 확보 */
}
.section--contact .sec-head__num { color: var(--accent); } /* 잉크 배경에선 원색이 AA 통과 */
.sec-head__over {
  font-size: var(--fs-overline);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.sec-head__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-title);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.sec-head__lead {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: var(--fs-body-lg);
}

/* ── 스크롤 리빌 ──────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ═══ HERO ═════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; width: 100%; }

.hero__badge {
  margin-bottom: 24px;
  background: var(--chip-warm);
  border: 1px solid #F0DCAE;
  color: var(--accent-deep);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line__inner {
  display: block;
  transform: translateY(112%);
  transition: transform var(--dur-hero) var(--ease-out);
}
.line:nth-child(2) .line__inner { transition-delay: 120ms; }
body.is-loaded .line__inner { transform: none; }

.u-underline { position: relative; font-style: normal; white-space: nowrap; }
.u-underline__svg {
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.22em;
  color: var(--accent);
  overflow: visible;
}
.u-underline__svg path {
  stroke-dasharray: 230;
  stroke-dashoffset: 230;
  transition: stroke-dashoffset 900ms var(--ease-inout) 1000ms;
}
body.is-loaded .u-underline__svg path { stroke-dashoffset: 0; }

.hero__eng {
  margin-top: clamp(20px, 3vw, 32px);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.125rem, 2.4vw, 1.625rem);
  color: var(--ink-soft);
}
.hero__eng span { color: var(--accent); font-style: normal; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 44px);
}

/* 히어로 뒤 리빌 (배지·영문·CTA·칩) — 짧고 타이트하게 (LCP 보호)
   .hero__eng 는 LCP 요소이므로 opacity 없이 transform만 사용 (첫 페인트에 LCP 확정) */
.hero__badge, .hero__cta, .hero__chips {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 380ms var(--ease-out),
              transform 380ms var(--ease-out);
}
.hero__eng {
  transform: translateY(16px);
  transition: transform 380ms var(--ease-out) 160ms;
}
body.is-loaded :is(.hero__badge, .hero__cta, .hero__chips) {
  opacity: 1;
  transform: none;
}
body.is-loaded .hero__eng { transform: none; }
body.is-loaded .hero__badge { transition-delay: 40ms; }
body.is-loaded .hero__cta { transition-delay: 240ms; }
body.is-loaded .hero__chips { transition-delay: 320ms; }

/* 히어로 장식 — 로고 스마일 모티프 */
.hero__smile {
  position: absolute;
  z-index: 1;
  right: max(-80px, -6vw);
  bottom: clamp(24px, 6vh, 72px);
  width: clamp(240px, 42vw, 560px);
  color: var(--accent);
  opacity: 0.92;
}
.hero__smile-arc {
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  transition: stroke-dashoffset 1400ms var(--ease-inout) 700ms;
}
body.is-loaded .hero__smile-arc { stroke-dashoffset: 0; }

.hero__burst {
  position: absolute;
  z-index: 1;
  top: calc(var(--header-h) + 6vh);
  right: clamp(20px, 9vw, 140px);
  width: clamp(44px, 6vw, 84px);
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--dur-reveal) 1200ms;
}
body.is-loaded .hero__burst { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  body.is-loaded .hero__smile { animation: float 7s ease-in-out 2200ms infinite; }
  body.is-loaded .hero__burst { animation: spin 60s linear infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin { to { rotate: 360deg; } }

/* ── 티커 ─────────────────────────────── */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper);
}
.ticker__track {
  display: flex;
  align-items: center;
  height: 54px;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  animation: loop-x 40s linear infinite;
}
.ticker__track span { white-space: nowrap; padding-right: 0.6em; line-height: 1; }
.ticker__track i { font-style: normal; color: var(--accent); }
/* 한 유닛(--loop-w) 폭만큼만 이동 → 모든 유닛이 동일하므로 seamless.
   JS 미동작 시엔 기본값 50%로 폴백(2벌 복제 마크업 기준). */
@keyframes loop-x { to { transform: translateX(calc(-1 * var(--loop-w, 50%))); } }

/* ═══ 01 PORTFOLIO ═════════════════════ */
.works {
  display: grid;
  gap: clamp(40px, 6vw, 56px) 32px;
}
.work__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--plate, var(--surface));
  padding: 0;
}
.work__media img {
  width: 100%;
  mix-blend-mode: multiply; /* 목업 배경을 플레이트 톤에 자연스럽게 융화 */
  transition: transform var(--dur-base) var(--ease-out);
}
.work__veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent-tint) 88%, transparent);
  clip-path: inset(100% 0 0 0);
  transition: clip-path var(--dur-base) var(--ease-inout);
}
@media (hover: hover) and (pointer: fine) {
  .work__media:hover img, .work__media:focus-visible img { transform: scale(1.06); }
  .work__media:hover .work__veil, .work__media:focus-visible .work__veil { clip-path: inset(0 0 0 0); }
}
.work__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.work__cap b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-heading);
  letter-spacing: -0.02em;
}
.work__cap span {
  flex-shrink: 0;
  font-size: var(--fs-overline);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

@media (min-width: 768px) {
  .works { grid-template-columns: 1fr 1fr; padding-bottom: 72px; }
  .work:nth-child(even) { margin-top: 72px; } /* 에디토리얼 오프셋 (레이아웃이므로 reduced-motion에도 유지) */
}

/* ═══ 02 PRICING ═══════════════════════ */
.plans {
  display: grid;
  gap: 24px;
  align-items: start;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgb(26 23 19 / 0.08);
}
.plan__fig {
  margin: -12px -12px 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #EAEEF9;
}
.plan__eng {
  font-size: var(--fs-overline);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
}
.plan__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-heading);
  letter-spacing: -0.02em;
}
.plan__price {
  margin: 10px 0 18px;
  color: var(--ink-soft);
}
.plan__price b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.plan__list {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.plan__list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.plan__list li::before {
  content: "✓";
  font-weight: 800;
  color: var(--accent);
}
.plan .btn { margin-top: auto; }

.plan--featured { border: 1.5px solid var(--accent); }
.plan__badge {
  position: absolute;
  top: -16px;
  left: 24px;
  z-index: 2;
  box-shadow: 0 4px 12px rgb(237 88 43 / 0.18);
}

@media (min-width: 1024px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan--featured { transform: translateY(-12px); }
  .plan--featured:hover { transform: translateY(-18px); }
}

/* ═══ 03 GUARANTEE (크림 밴드) ══════════ */
.section--band {
  margin-inline: clamp(8px, 1.5vw, 20px);
  border-radius: 32px;
  background: var(--paper-warm);
}
.guarantee {
  display: grid;
  gap: 40px;
  align-items: center;
}
.guarantee .sec-head { margin-bottom: 28px; }
.guarantee__q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-heading);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.guarantee__body {
  font-size: var(--fs-body-lg);
  color: #574F41;
  margin-bottom: 28px;
}
.hl {
  font-weight: 800;
  color: var(--accent-deep);
  box-shadow: inset 0 -0.45em 0 var(--accent-tint);
}
.guarantee__fig {
  max-width: 380px;
  margin-inline: auto;
}
.guarantee__fig img {
  border-radius: 28px;
  box-shadow: 0 24px 56px rgb(201 65 26 / 0.14);
}
@media (prefers-reduced-motion: no-preference) {
  .guarantee__fig img { animation: float 6s ease-in-out infinite; }
}
@media (min-width: 900px) {
  .guarantee { grid-template-columns: 1.2fr 0.8fr; }
}

/* ═══ 04 REVIEWS (마퀴) ═════════════════ */
.section--full { overflow: hidden; }
.marquee { display: grid; gap: 16px; }
.marquee__row { overflow: hidden; }
.marquee__track {
  display: flex;
  width: max-content;
  animation: loop-x 44s linear infinite;
}
.marquee__row--reverse .marquee__track { animation-direction: reverse; }
.marquee__row:hover .marquee__track,
.marquee__row:focus-within .marquee__track,
.marquee.is-paused .marquee__track { animation-play-state: paused; }

/* 마퀴 일시정지 토글 (WCAG 2.2.2 — 5초 이상 자동 움직임의 정지 수단) */
.marquee-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--ink-soft);
  transition: color var(--dur-micro), border-color var(--dur-micro);
}
.marquee-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.marquee__group {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}
.review {
  width: min(320px, 78vw);
  flex-shrink: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review__stars {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: var(--fs-caption);
}
.review p:not(.review__stars) { font-size: 0.9375rem; }
.review time {
  margin-top: auto;
  font-size: var(--fs-caption);
  color: var(--ink-soft);
}

/* ═══ 05 PROCESS ═══════════════════════ */
.steps {
  display: grid;
  gap: 32px;
}
.step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 96px 1fr; /* 모바일: 아이콘 왼쪽, 텍스트 오른쪽 (레일이 텍스트를 관통하지 않도록) */
  column-gap: 24px;
  row-gap: 4px;
  align-items: center;
}
/* 스텝별 커넥터 — 아이콘 중심에서 다음 스텝 아이콘까지 (컨테이너 기준 계산의 돌출 문제 제거) */
.step:not(:last-child)::before,
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 47px;
  top: 96px;
  bottom: -32px; /* 그리드 gap을 건너 다음 아이콘 상단까지 */
  width: 2px;
}
.step:not(:last-child)::before { background: var(--line); }
.step:not(:last-child)::after {
  background: var(--accent);
  transform: scaleY(var(--fill, 0));
  transform-origin: top;
}
.step__icon {
  grid-row: 1 / 3;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--paper-warm); /* 화이트 3D 아이콘 대비 확보 */
  border: 1px solid var(--line);
  transition: transform var(--dur-base) var(--ease-bounce),
              border-color var(--dur-base),
              box-shadow var(--dur-base);
  transform: scale(0.6);
  opacity: 0;
}
.step__icon img {
  max-width: 58%;
  max-height: 58%;
  width: auto;
  mix-blend-mode: multiply; /* 아이콘에 구워진 흰 배경을 크림 원에 융화 */
}
.step__num {
  align-self: end;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--ink-soft);
  transition: color var(--dur-base);
}
.step__name {
  align-self: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.step.is-active .step__icon {
  transform: none;
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgb(237 88 43 / 0.12);
}
.step.is-active .step__num { color: var(--accent-deep); }

/* 데스크톱: 가로 커넥터 */
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .step {
    grid-template-columns: none;
    row-gap: 8px;
    align-items: start;
  }
  .step__icon { grid-row: auto; }
  .step__num, .step__name { align-self: auto; }
  .step:not(:last-child)::before,
  .step:not(:last-child)::after {
    left: 96px;
    top: 47px;
    bottom: auto;
    width: calc(100% - 96px + 24px); /* 아이콘 오른쪽 끝 → 다음 컬럼 아이콘까지 (gap 포함) */
    height: 2px;
  }
  .step:not(:last-child)::after {
    transform: scaleX(var(--fill, 0));
    transform-origin: left;
  }
}

/* ═══ 06 CONTACT (잉크 밴드) ════════════ */
.section--contact {
  background: var(--ink);
  color: var(--paper);
}
.section--contact .sec-head__over { color: rgb(250 247 240 / 0.55); }
.section--contact .sec-head__title { color: var(--paper); }
.contact {
  display: grid;
  gap: 48px;
  align-items: center;
}
.contact__em {
  font-style: normal;
  color: var(--accent);
}
.contact__sub {
  font-size: var(--fs-body-lg);
  color: rgb(250 247 240 / 0.72);
  margin-bottom: 32px;
}
.contact__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.section--contact .btn--ghost {
  border-color: rgb(250 247 240 / 0.4);
  color: var(--paper);
}
.section--contact .btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.contact__fig {
  max-width: 420px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 40px);
  background: var(--paper-warm);
  border-radius: 28px;
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 1.15fr 0.85fr; }
}

/* ── 푸터 ─────────────────────────────── */
.footer { padding: 64px 0 40px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.footer__mark { height: 24px; width: auto; }
.footer__logo span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-left: 6px;
}
.footer address {
  font-size: var(--fs-caption);
  color: var(--ink-soft);
  line-height: 1.9;
}
.footer address a:hover { color: var(--accent-deep); text-decoration: underline; }
.footer__copy {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* ── 플로팅 카카오 CTA ────────────────── */
.fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--kakao);
  color: var(--ink);
  box-shadow: 0 8px 24px rgb(26 23 19 / 0.22);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro);
}
.fab:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgb(26 23 19 / 0.28); }
.fab svg { flex-shrink: 0; }
.fab__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: max-width var(--dur-base) var(--ease-out), padding var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .fab:hover .fab__label, .fab:focus-visible .fab__label {
    max-width: 140px;
    padding-left: 10px;
  }
}

/* ── 라이트박스 ───────────────────────── */
.lightbox {
  margin: auto; /* 전역 리셋이 지운 dialog 기본 중앙정렬 복원 */
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 900px);
  max-height: 92vh;
  overflow: hidden; /* 라운드 코너 클리핑 — 실제 스크롤은 내부에서 */
  border-radius: 20px;
}
.lightbox::backdrop {
  background: rgb(26 23 19 / 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox__scroll {
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: 20px;
}
.lightbox__scroll img {
  display: block;
  width: 100%;
  height: auto; /* 전체 페이지 실제 비율 — 세로 스크롤로 확인 */
}
.lightbox__close {
  z-index: 2;
  position: absolute;
  top: 12px; /* 이미지 위 내부 배치 — 낮은 뷰포트에서도 항상 화면 안 */
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 12px rgb(26 23 19 / 0.25);
}

/* ── 커스텀 커서 ──────────────────────── */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: width var(--dur-micro) var(--ease-out),
                height var(--dur-micro) var(--ease-out),
                opacity var(--dur-base);
    will-change: transform;
  }
  body.cursor-on .cursor { opacity: 0.85; }
  .cursor.is-big {
    width: 44px;
    height: 44px;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    border: 1.5px solid var(--accent);
  }
}

/* ═══ prefers-reduced-motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important; /* 스태거 딜레이 잔존 방지 */
  }
  [data-reveal],
  .hero__badge, .hero__eng, .hero__cta, .hero__chips,
  .line__inner, .step__icon {
    opacity: 1 !important;
    transform: none !important;
  }
  .u-underline__svg path, .hero__smile-arc { stroke-dashoffset: 0 !important; }
  .hero__burst { opacity: 1 !important; }
  .ticker__track { animation: none !important; }
  .marquee__row { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .marquee__track { animation: none !important; width: auto; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .step:not(:last-child)::after { transform: none !important; }
  .step .step__icon { transform: none; opacity: 1; }
  .cursor { display: none !important; }
}

/* ═══ 터치 기기 sticky hover 방지 ══════ */
@media (hover: none) {
  .btn:hover { transform: none; }
  .btn--primary:hover { background: var(--ink); }
  .btn--ghost:hover { background: transparent; color: inherit; }
  .btn--kakao:hover { filter: none; }
  .section--contact .btn--ghost:hover { background: transparent; color: var(--paper); }
  .plan:hover { transform: none; box-shadow: none; }
  .plan--featured:hover { transform: none; }
  .fab:hover { transform: none; box-shadow: 0 8px 24px rgb(26 23 19 / 0.22); }
  .nav a:hover { background: none; color: var(--ink-soft); }
}
@media (hover: none) and (min-width: 1024px) {
  .plan--featured:hover { transform: translateY(-12px); } /* 데스크톱 기본 오프셋 유지 */
}

/* ═══ 초소형 뷰포트(≤360px) 헤더 보정 ══ */
@media (max-width: 360px) {
  .header__inner { gap: 10px; }
  .header__actions { gap: 6px; }
  .header .btn--sm { padding-inline: 14px; }
}
