/* 홈 첫 화면 여정 — 핀으로 붙는 화면, 글자 층, 약속 카드, 단계 표시, 여정 위 투명 머리(안 A, Chris 2026-11-17), 움직임 줄이기 */
.journey { position: relative; }
.has-journey .journey { margin-top: calc(-1 * var(--head-h)); }
.journey-track { position: relative; height: 1600vh; } /* 1100vh → 1600vh: Chris 폰 확인(2026-11-17) "전체적으로 너무 빨리" → 1.5배 */
.journey-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #0B1220; }
#journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.j-layer { position: absolute; inset: 0; opacity: 0; color: #fff; pointer-events: none; }
.j-layer a { pointer-events: auto; }
#l-hero { opacity: 1; } /* 스크립트를 기다리지 않고 첫 화면 글자가 보이게(어두운 바탕 위) */
.j-label { display: block; letter-spacing: 0.14em; margin-bottom: var(--s2); }

/* 첫 화면 */
.j-hero-title { position: absolute; left: 48px; top: 22vh; max-width: 720px; }
.j-hero-side { position: absolute; right: 48px; bottom: 11vh; width: 400px; display: grid; gap: var(--s2); justify-items: start; }

/* 장면 글줄 */
.j-line { left: 48px; top: 20vh; right: auto; bottom: auto; max-width: 600px; }
.j-line .t-body { margin-top: var(--s3); max-width: 30em; }

/* 약속 카드 — 자기 바탕(흰 카드)이 있다 */
/* 카드는 장면 글 아래에서만 보인다 — 글에 닿기 전에 서서히 사라진다(Chris 폰 확인 2026-11-17, 카드가 글을 덮었다) */
.j-cards { -webkit-mask-image: linear-gradient(to bottom, transparent 46%, #000 56%); mask-image: linear-gradient(to bottom, transparent 46%, #000 56%); }
.j-cards-in { position: absolute; left: 48px; right: 48px; top: 0; height: 100%; }
.j-card { position: absolute; width: 31%; background: var(--surface); color: var(--ink); border-radius: var(--radius-card); padding: var(--s4); box-shadow: var(--shadow-hover); display: grid; gap: var(--s1); }
.j-card:nth-child(1) { left: 0; top: 30vh; }
.j-card:nth-child(2) { left: 34.5%; top: 40vh; }
.j-card:nth-child(3) { left: 69%; top: 50vh; }
.j-card b { font-size: 21px; line-height: 1.3; font-weight: 600; }
.j-card span { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* 단계 표시 — 꺼진 칸 바탕 0.62는 대비를 잰 값(2-2 시안) */
.j-steps-wrap { inset: auto 48px 48px auto; }
.j-steps { display: flex; gap: 10px; list-style: none; }
.j-step { width: 128px; padding: 12px 14px; border-radius: 16px; background: rgba(11, 18, 32, 0.62); color: #fff; transition: background-color .3s ease, color .3s ease; }
.j-step small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.j-step b { font-size: 17px; font-weight: 600; }
.j-step.on { background: var(--surface); color: var(--ink); }
.j-step.on small { color: var(--accent); }

@media (max-width: 734px) {
  .j-hero-title { left: 20px; right: 20px; top: 15vh; }
  .j-hero-side { left: 20px; right: 20px; width: auto; bottom: calc(73px + env(safe-area-inset-bottom) + 28px); }
  .j-hero-side .btn { display: none; } /* 휴대폰은 아래 상담 띠가 같은 일을 한다 */
  .j-line { left: 20px; right: 20px; top: 14vh; max-width: none; }
  .j-line .t-body { margin-top: var(--s2); }
  .j-cards-in { left: 20px; right: 20px; }
  .j-cards { -webkit-mask-image: linear-gradient(to bottom, transparent 42%, #000 52%); mask-image: linear-gradient(to bottom, transparent 42%, #000 52%); }
  .j-card { position: relative; width: 100%; left: 0 !important; top: 0 !important; margin-bottom: 12vh; padding: var(--s3); }
  /* --steps-bottom은 journey.js가 상담 띠의 실제 위치를 재서 넣는다(띠 바로 위 12px). 없으면 띠 높이만큼 올린 기본값 */
  .j-steps-wrap { inset: auto 20px var(--steps-bottom, calc(73px + env(safe-area-inset-bottom) + 12px)) 20px; }
  .j-steps { gap: 6px; }
  .j-step { flex: 1; width: auto; padding: 8px; border-radius: 12px; }
  .j-step small { font-size: 11px; }
  .j-step b { font-size: 14px; white-space: nowrap; }
}

/* 움직임 줄이기 — 카드는 움직이지 않고 아래쪽에 한 줄(휴대폰은 제목만) */
.journey.is-reduced .j-cards { -webkit-mask-image: none; mask-image: none; }
.journey.is-reduced .j-cards-in { transform: none !important; }
.journey.is-reduced .j-card { top: auto !important; bottom: 12vh; }
@media (max-width: 734px) {
  .journey.is-reduced .j-cards-in { top: auto; bottom: calc(var(--steps-bottom, calc(73px + env(safe-area-inset-bottom) + 12px)) + 60px); height: auto; }
  .journey.is-reduced .j-card { position: relative; bottom: auto; margin-bottom: 8px; padding: 12px 16px; }
  .journey.is-reduced .j-card span { display: none; }
}

/* 여정 위 투명 머리 — on-journey가 없으면 원래 밝은 머리(스크립트가 없을 때도 읽힌다) */
.logo .logo-white { display: none; }
.has-journey .site-head.on-journey { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.has-journey .site-head.on-journey .menu-item > a,
.has-journey .site-head.on-journey .menu-toggle,
.has-journey .site-head.on-journey .menu-btn { color: #fff; }
.has-journey .site-head.on-journey .menu-item > a:hover,
.has-journey .site-head.on-journey .menu-toggle:hover,
.has-journey .site-head.on-journey .menu-toggle[aria-expanded="true"] { color: #fff; opacity: 0.78; }
.has-journey .site-head.on-journey :focus-visible { outline-color: #fff; }
.has-journey .site-head.on-journey .logo-navy { display: none; }
.has-journey .site-head.on-journey .logo-white { display: block; }
/* 휴대폰 메뉴가 열리면 밝은 머리로 */
body.menu-open .site-head.on-journey { background: var(--bg); }
body.menu-open .site-head.on-journey .menu-btn { color: var(--ink); }
body.menu-open .site-head.on-journey .logo-navy { display: block; }
body.menu-open .site-head.on-journey .logo-white { display: none; }
