/* 랜딩 레이아웃 — 배경영상, 헤더, 히어로(카피+지구본+카드), 지역 패널, 푸터 */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.5;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 72% 38%, rgba(10, 20, 40, 0.15) 0%, rgba(4, 6, 11, 0.82) 62%),
    linear-gradient(180deg, rgba(4, 6, 11, 0.86) 0%, rgba(4, 6, 11, 0.62) 40%, rgba(4, 6, 11, 0.94) 100%);
}

/* ── 헤더 ─────────────────────────────── */
.hd {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(4, 6, 11, 0.9) 0%, rgba(4, 6, 11, 0) 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 좌상단 도메인 로고 — 우팀장 지시로 150% 키움(40 -> 60) */
.brand-logo {
  height: 60px;
  width: auto;
}

.brand-sub {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--cyan);
}

.langs {
  display: flex;
  align-items: center;
}

/* 언어 드롭다운 — 평소엔 현재 국기 하나만, 누르면 아래로 펼친다 */
.lang-dd {
  position: relative;
}

.lang-cur {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(7, 12, 22, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 5px 9px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang-cur:hover,
.lang-dd.open .lang-cur {
  border-color: var(--cyan);
}

.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  transition: transform 0.2s;
}

.lang-dd.open .lang-caret {
  transform: rotate(180deg);
}

/* 국기 원본 비율이 제각각이라 상자를 고정하고 잘라 맞춘다 */
.fl-img {
  display: block;
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 108px;
  padding: 5px;
  background: rgba(7, 12, 22, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 60;
}

.lang-dd.open .lang-list {
  display: block;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-item:hover {
  background: rgba(63, 216, 255, 0.08);
  color: var(--text);
}

.lang-item.on {
  color: var(--cyan);
}

/* ── 히어로 ───────────────────────────── */
/* 첫 화면 = 카피 + 지구본(윗줄) + 만든 사람 한 마디(아랫줄).
   아랫줄이 스크롤 없이 읽혀야 해서 높이를 100vh 로 묶고 행을 둘로 나눈다. */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 46%) 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 88px 28px 26px 56px;
  gap: 12px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  /* 넓혀두면 제목이 한 줄 덜 접혀서 첫 화면에 마지막 카피까지 들어온다 */
  max-width: 620px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--cyan);
  margin-bottom: 18px;
}

.tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.28;
  margin-bottom: 20px;
}

.tagline .t2 {
  color: var(--cyan);
}

.hero-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  gap: 12px;
}

.cta {
  border-radius: var(--r-md);
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cta.main {
  background: var(--cyan);
  border: 1px solid var(--cyan);
  color: #03202c;
}

.cta.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.cta.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* 스토어 배지 — CTA 아래 한 줄. 배포 전이라 눌러도 가지 않는다(우팀장 확인 후 링크 연결) */
.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 22px;
  margin-top: 22px;
}

/* 배지 + 그 아래 배포일. 배지마다 날짜가 다르다(크롬 8/15, 모바일 9/1) */
.store-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-badge {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
  opacity: 0.9;
  transition: opacity 0.25s, transform 0.25s;
}

.store-badge:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.store-badge img {
  height: 46px;
  width: auto;
}

.store-note {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

/* ── 지구본 ───────────────────────────── */
.globe-wrap {
  position: relative;
  height: min(78vh, 760px);
  min-height: 480px;
}

#globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* 가로로 끌면 지구본이 돌고, 세로 제스처는 페이지 스크롤로 넘긴다 */
  touch-action: pan-y;
  cursor: grab;
}

#globe:active {
  cursor: grabbing;
}

/* 도시 칩 — 지구본 투영 좌표에 붙어 다닌다 */
.chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.chip {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(7, 12, 22, 0.88);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  /* 칩은 매 프레임 transform 이 갱신되므로 위치엔 트랜지션을 걸지 않는다(끌리면 지구본과 어긋난다) */
  transition: opacity 0.25s;
  will-change: transform, opacity;
}

.chip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(7, 12, 22, 0.88);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.chip.user {
  border-color: rgba(63, 216, 255, 0.5);
  color: var(--cyan);
}

.chip.off {
  opacity: 0;
}

/* 검증 카드는 지구본 위 우하단에 뜬다(레퍼런스 사진 배치) */
.vc-slot {
  position: absolute;
  right: 8px;
  bottom: 0;
  z-index: 3;
}

/* ── 만든 사람 (반전 카피) ─────────────────
   앞줄을 크게 읽히게 두고 마지막 한 줄에서 뒤집는다.
   뒷줄을 키우면 농담이 먼저 보여서 반전이 죽는다 — 작고 담담해야 한다. */
/* 히어로 하단 띠. 두 칸을 가로질러 깔린다(왼쪽 카피 라인에 맞춰 왼쪽 정렬). */
.origin {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  align-self: end;
  padding: 0;
  /* 지구본과 검증카드 위로 글이 지나가므로, 카드가 겹치는 오른쪽은 비워둔다 */
  max-width: min(72ch, 62%);
}

.og-lead {
  font-family: var(--font-display);
  font-weight: 700;
  /* 첫 화면 안에 들어가야 해서 히어로 제목보다 한 급 작게 잡는다 */
  font-size: clamp(19px, 2.1vw, 29px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.og-punch {
  /* 앞줄과 붙으면 농담이 같이 읽혀서 반전이 죽는다. 한 박자 띄운다. */
  margin-top: 12px;
  color: var(--muted);
  font-weight: 300;
  font-size: clamp(13px, 1.25vw, 16px);
  letter-spacing: 0.02em;
}

/* 노트북 화면(세로 900 안팎)에서도 마지막 한 줄까지 첫 화면에 들어와야 한다.
   글자 크기는 그대로 두고 사이 여백만 조인다. */
@media (max-height: 900px) {
  .hero {
    padding-top: 72px;
    padding-bottom: 12px;
  }

  .kicker {
    margin-bottom: 10px;
  }

  .tagline {
    /* 4줄짜리 제목이라 줄간격 한 뼘이 화면 한 줄을 좌우한다 */
    line-height: 1.18;
    margin-bottom: 8px;
  }

  .hero-sub {
    margin-bottom: 12px;
  }

  .store-row {
    margin-top: 10px;
  }

  .og-lead {
    font-size: clamp(17px, 1.8vw, 25px);
  }

  .og-punch {
    margin-top: 6px;
  }
}

/* 더 짧은 화면(세로 640 이하)은 어떻게 조여도 안 들어간다. 높이 묶기를 풀어 흐르게 둔다. */
@media (max-height: 640px) {
  .hero {
    min-height: auto;
    padding-bottom: 30px;
  }
}

@media (max-width: 1000px) {
  .hero {
    min-height: auto;
  }

  .origin {
    max-width: none;
    padding: 28px 0 4px;
  }
}

/* ── 지역/벤더 패널 ───────────────────── */
.regions {
  position: relative;
  z-index: 2;
  padding: 26px 56px 60px;
}

.regions-head {
  margin-bottom: 18px;
}

.regions-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 6px;
}

.regions-head p {
  color: var(--muted);
  font-size: 13px;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.region {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.region .rg-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.region .rg-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  min-height: 3em;
  margin-bottom: 12px;
}

.region.on {
  border-color: var(--amber);
  box-shadow: 0 0 22px rgba(255, 176, 84, 0.14) inset, 0 0 14px rgba(255, 176, 84, 0.1);
}

.region.on .rg-name {
  color: var(--amber);
}

.rg-vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rg-v {
  display: flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(4, 8, 16, 0.6);
  filter: grayscale(1) brightness(0.75);
  transition: filter 0.35s, border-color 0.35s;
}

.rg-v img {
  height: 16px;
  width: auto;
}

.rg-v span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan-dim);
}

.region.on .rg-v {
  filter: none;
  border-color: var(--line-soft);
}

.rg-v.lit {
  filter: none;
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(255, 176, 84, 0.22);
}

/* ── 사용방법(실제 화면) ──────────────────
   그림이 주인공이라 카드는 테두리만 두고 배경을 비운다. */
.howto {
  position: relative;
  z-index: 2;
  padding: 20px 56px 40px;
}

.howto h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 18px;
}

.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.howto-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}

/* 캡처는 세로 길이가 제각각이라 상자를 고정하고 윗부분을 보여준다 */
.howto-item img {
  display: block;
  width: 100%;
  height: 232px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
}

.howto-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 16px;
}

.ht-no {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.ht-t {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.ht-d {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ── 작동 방식 ────────────────────────── */
.how {
  position: relative;
  z-index: 2;
  padding: 30px 56px 70px;
}

.how h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 18px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.how-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}

.how-item .no {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

.how-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.how-item p {
  color: var(--muted);
  font-size: 13px;
}

/* ── 푸터 ─────────────────────────────── */
.ft {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 22px 56px 30px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* 촬영용 압축 모드 */
body.flat .hero {
  min-height: 760px;
}

/* ── 반응형 ───────────────────────────── */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 96px 20px 20px;
  }

  .globe-wrap {
    height: 62vw;
    min-height: 360px;
  }

  .vc-slot {
    right: 0;
  }

  .region-grid,
  .how-grid,
  .howto-grid {
    grid-template-columns: 1fr 1fr;
  }

  .regions,
  .how,
  .howto,
  .ft {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 560px) {
  .region-grid,
  .how-grid,
  .howto-grid {
    grid-template-columns: 1fr;
  }

  /* 좁은 화면에서는 캡처를 더 낮게 잘라 스크롤이 길어지지 않게 한다 */
  .howto-item img {
    height: 196px;
  }

  /* 배지 둘이 한 줄에 안 들어가면 세로로 쌓는다 */
  .store-row {
    gap: 14px;
  }

  .store-badge img {
    height: 42px;
  }

  .vc-slot {
    transform: scale(0.82);
    transform-origin: bottom right;
  }
}
