/* 홈 전용 (짝: /js/home.js), 기능형 v9.
   첫 화면: 카트만두 실제 사진이 천천히 확대(22초), 제목 단어별 등장, 숫자 세기, 일시정지 버튼(실제로 멈춰요).
   아래: 정보 상자 3개 띠, 직종 사진 카드, 절차 표, 카트만두 사진 3장(하나 펼침, 7초마다 넘김). 움직임 줄이기면 모두 정지. */

/* ── 첫 화면 ── */
.kh { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: min(80svh, 720px); padding: 72px 0 132px; background: var(--navy); color: #fff; }
.kh-media { position: absolute; inset: 0; z-index: -2; }
.kh-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform-origin: 70% 40%; }
.kh::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(8, 14, 30, .92) 0%, rgba(8, 14, 30, .7) 42%, rgba(8, 14, 30, .25) 100%), linear-gradient(0deg, rgba(8, 14, 30, .7) 0%, transparent 40%); }
.kh-in { width: 100%; }
.kh-k { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--yellow); }
.kh h1 { max-width: 17ch; color: #fff; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.03; letter-spacing: -.04em; }
.kh-w { display: inline-block; }
.kh-l { display: block; }
.kh-lead { margin-top: 20px; max-width: 54ch; font-size: clamp(16.5px, 1.4vw, 19px); line-height: 1.65; color: rgba(255, 255, 255, .86); }
.kh-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.kh-cta .btn { min-height: 54px; }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-glass:hover { background: rgba(255, 255, 255, .18); color: #fff; border-color: #fff; }
.kh-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 18px 44px; margin: 34px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.kh-stats li { display: grid; gap: 4px; }
.kh-stats b { font: 800 clamp(30px, 3.6vw, 44px)/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kh-stats span { font-size: 14px; color: rgba(255, 255, 255, .72); }
.kh-pause { position: absolute; right: max(16px, calc((100% - 1200px) / 2 + 24px)); bottom: 84px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: var(--r-s); background: rgba(8, 14, 30, .35); color: #fff; cursor: pointer; }
.kh-pause:hover { background: #fff; color: var(--navy); }
.kh-pause svg { width: 18px; height: 18px; fill: currentColor; }
.kh-pause .i-play, .kh-pause[aria-pressed="true"] .i-pause { display: none; }
.kh-pause[aria-pressed="true"] .i-play { display: block; }
.kh-credit { position: absolute; right: 12px; bottom: 8px; z-index: 1; font-size: 11px; color: rgba(255, 255, 255, .55); }

@media (prefers-reduced-motion: no-preference) {
  .kh-media img { animation: kh-kb 22s ease-out both; }
  .kh-k, .kh-lead, .kh-cta, .kh-stats { animation: kh-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .kh-lead { animation-delay: .55s; }
  .kh-cta { animation-delay: .7s; }
  .kh-stats { animation-delay: .85s; }
  .kh-w { animation: kh-word .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 70ms + .1s); }
  .kh.paused .kh-media img { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .kh-pause { display: none; } }
@keyframes kh-kb { from { transform: scale(1.14); } to { transform: scale(1.02); } }
@keyframes kh-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes kh-word { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }

/* ── 첫 화면 아래 정보 상자 3개 ── */
.kband { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: -64px; }
.kband > div { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; box-shadow: 0 16px 40px rgba(11, 18, 34, .12); }
.kband .bh { margin: 0; padding: 10px 18px; background: var(--head); color: #fff; font: 700 13.5px/1.3 var(--sans); letter-spacing: 0; }
.kband .bh span { color: var(--yellow); }
.kband .kb-b { display: grid; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.kband .big { font: 800 28px/1.1 var(--display); color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kband p { font-size: 15px; line-height: 1.55; }
.kband ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.kband li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.kband li:last-child { border-bottom: 0; }
.kband li b { font-family: var(--display); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kband a.more { margin-top: auto; padding-top: 6px; font-size: 14.5px; font-weight: 800; text-decoration: none; }
.kband a.more:hover { text-decoration: underline; }
.kband .lic-mini { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; }
.kband .lic-mini img { width: 74px; height: 52px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; opacity: .6; filter: grayscale(.25); }

/* ── 직종 사진 카드 ── */
.jobs { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.jobs li { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.jobs figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.jobs img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.jobs li:hover img { transform: scale(1.04); }
.jobs .jb { display: grid; gap: 6px; padding: 16px 18px 18px; }
.jobs .tag { justify-self: start; padding: 2px 7px; border-radius: 3px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; }
.jobs h3 { font-size: 19px; }
.jobs p { font-size: 15px; line-height: 1.55; }
.bign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 28px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.bign > div { display: flex; flex-direction: column; padding: 20px 20px 18px 0; }
.bign > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.bign dd { margin: 0; font: 800 clamp(36px, 4.4vw, 54px)/1 var(--display); color: var(--ink); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.bign dt { order: 2; margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.bign small { order: 3; font-size: 13px; color: var(--muted); }
@media (max-width: 959px) { .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 절차 표 ── */
.ptbl th:first-child { width: 84px; white-space: nowrap; text-align: center; }
.ptbl td:first-child { width: 84px; text-align: center; font: 800 20px/1 var(--display); color: var(--blue); }
.ptbl h3 { font-size: 17px; margin-bottom: 4px; }
.ptbl td p { font-size: 15px; line-height: 1.6; }
.ptbl td.t { width: 150px; white-space: nowrap; font-weight: 700; color: var(--ink); }
.ptbl td.who { width: 150px; font-size: 14.5px; color: var(--muted); }
.ptbl-wrap { border-radius: var(--r) var(--r) 0 0; }
@media (max-width: 760px) {
  .ptbl { min-width: 0; }
  .ptbl thead { display: none; }
  .ptbl tr { display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; padding: 14px 14px; border-bottom: 1px solid var(--line); }
  .ptbl td { padding: 0; border: 0; }
  .ptbl td:first-child { grid-row: span 3; width: auto; text-align: left; padding-top: 2px; }
  .ptbl td.t, .ptbl td.who { width: auto; font-size: 14px; }
}

/* ── 카트만두 사진 3장: 하나 펼치고 7초마다 넘김 ── */
.kt-row { display: flex; gap: 10px; height: clamp(300px, 34vw, 440px); }
.kt-row figure { position: relative; flex: 1; min-width: 0; margin: 0; border-radius: var(--r); overflow: hidden; background: var(--paper-2); cursor: pointer;
  transition: flex-grow .8s cubic-bezier(.2, .7, .2, 1); }
.kt-row figure.on { flex-grow: 3.2; cursor: default; }
.kt-row img { width: 100%; height: 100%; object-fit: cover; }
.kt-row figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(0deg, rgba(8, 14, 30, .8), transparent); color: #fff; font-size: 14.5px; font-weight: 700; opacity: 0; transition: opacity .5s; }
.kt-row figure.on figcaption { opacity: 1; }
.kt-row figcaption small { display: block; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .7); }
.kt-ctl { display: flex; align-items: center; gap: 6px; }
.kt-count { margin-right: 8px; font: 700 14px/1 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.kt-count b { color: var(--ink); }
.kt-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--ink); cursor: pointer; }
.kt-btn:hover { border-color: var(--ink); }
.kt-btn svg { width: 18px; height: 18px; fill: currentColor; }
.kt-btn .i-play, .kt-btn[aria-pressed="true"] .i-pause { display: none; }
.kt-btn[aria-pressed="true"] .i-play { display: block; }
.kt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.kt-head .s-head { margin: 0; }
@media (prefers-reduced-motion: reduce) { .kt-row figure { transition: none; } }
@media (max-width: 700px) {
  .kt-row { height: auto; flex-direction: column; }
  .kt-row figure, .kt-row figure.on { flex: none; aspect-ratio: 16 / 10; }
  .kt-row figure:not(.on) { aspect-ratio: 16 / 4; }
}

/* ── 베오그라드 연락 담당 한 줄 ── */
.contact-line { display: grid; gap: 6px; padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r); background: #fff; font-size: 15.5px; }
.contact-line b { color: var(--ink); }

@media (max-width: 899px) {
  .kh { min-height: 0; padding: 56px 0 96px; }
  .kh-pause { bottom: 64px; }
  .kband { grid-template-columns: minmax(0, 1fr); margin-top: -44px; }
}
@media (max-width: 560px) {
  .kh-stats { gap: 16px 28px; }
  .bign { grid-template-columns: 1fr; }
  .bign > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .jobs { grid-template-columns: minmax(0, 1fr); }
  .jobs li { display: grid; grid-template-columns: 120px 1fr; }
  .jobs figure { aspect-ratio: auto; height: 100%; }
}

/* ── 권역 (2026-10-23): Srbija · Crna Gora · Republika Srpska (BiH) ── */
.kh-zones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.kh-zones span { padding: 4px 9px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); font-size: 13.5px; font-weight: 700; color: #fff; }
.kh-zones span:first-child { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
@media (prefers-reduced-motion: no-preference) { .kh-zones { animation: kh-rise .9s cubic-bezier(.2, .7, .2, 1) .62s both; } }
.ztbl tbody th { width: 190px; }
.ztbl td:last-child { width: 170px; font-weight: 700; }
