/* 크루 땅따먹기 소개 (/territory.php, 2026-11-06) — design.css 토큰 위에 이 페이지 전용만 */

/* ── 히어로 ── */
.terr-hero { padding-block: 72px 56px; background:
  radial-gradient(60% 80% at 85% 30%, rgba(198, 255, 52, .10), transparent 70%),
  radial-gradient(50% 70% at 10% 90%, rgba(124, 77, 255, .14), transparent 70%); }
.terr-hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.terr-new { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  background: var(--tint-strong); color: var(--primary); font-size: 14px; font-weight: 800; margin-bottom: 18px; }
.terr-hero h1 { font-size: 52px; line-height: 1.18; font-weight: 800; letter-spacing: -0.035em; }
.terr-lead { margin: 18px 0 28px; color: var(--text-2); font-size: 18px; line-height: 1.7; max-width: 36em; }
.terr-lead b { color: var(--text); }
.terr-hero-art { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 9 / 7;
  border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.terr-hero-art svg { display: block; width: 100%; height: 100%; }
.terr-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; border-radius: 99px;
  padding: 8px 14px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.terr-chip-a { left: 50%; top: 18px; transform: translateX(-50%); background: var(--primary); color: var(--on-primary);
  box-shadow: 0 8px 24px rgba(198, 255, 52, .3); }
.terr-chip-b { right: 14px; bottom: 14px; background: rgba(24, 24, 26, .9); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; }
.terr-chip-b b { color: var(--primary); margin-right: 4px; }

/* ── 히어로 실제 지도 배경 (territory-map.js, 2026-11-09) ──
   지도가 뜨면(map-ready) 글자 쪽을 어둡게 덮어 가독성을 지킨다. 지도가 없으면 위 그라데이션 그대로 */
.terr-hero[data-map-src] { position: relative; overflow: hidden; }
.terr-hero > .container { position: relative; z-index: 2; }
/* z-index 를 주지 않는다 — 쌓임 맥락이 생기면 안의 출처 표시가 덮개(::after) 아래로 갇힌다 */
.terr-hero-map { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.terr-map-box { width: 100%; height: 100%; }
/* 색은 territory-map.js 에서 레이어별로 직접 칠한다 (필터로 밝히면 육지·바다가 뒤집혀 보였다) */
.terr-hero.map-ready .terr-hero-map { opacity: 1; }
.terr-hero.map-ready::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(24,24,26,.95) 0%, rgba(24,24,26,.86) 30%, rgba(24,24,26,.2) 54%, rgba(24,24,26,0) 64%),
    linear-gradient(0deg, #18181A 0%, rgba(24,24,26,.7) 9%, rgba(24,24,26,0) 24%),
    linear-gradient(180deg, rgba(24,24,26,.6) 0%, rgba(24,24,26,0) 14%); }
/* 넓은 화면에서는 예시 카드를 처음부터 숨겨 둔다 — 보였다가 지도가 뜨며 걷히는 깜빡임이 있었다(11-09 운영).
   지도를 못 띄우면 JS 가 map-fallback 을 붙여 바로 보이고, JS 가 아예 실패해도 8초 뒤 CSS 만으로 나타난다 */
@media (min-width: 900px) {
  .terr-hero[data-map-src]:not(.map-fallback):not(.map-art) .terr-hero-art { opacity: 0; animation: terr-art-reveal .4s ease 8s forwards; }
}
@keyframes terr-art-reveal { to { opacity: 1; } }
/* 지도가 그림이 될 때(map-art) — 예시 칸 카드를 걷고 테두리·그림자 없이 칩만 (한국은 이 자리에 맞춰진다) */
/* 테두리·배경에 전환 효과를 두지 않는다 — 걷힐 때 0.6초 동안 테두리가 보였다 사라졌다(11-09) */
.terr-hero.map-art .terr-hero-art { background: transparent; border-color: transparent; box-shadow: none; overflow: visible; }
.terr-hero.map-art .terr-hero-art > svg,
.terr-hero.map-art .terr-hero-art > .terr-chip:not(.terr-map-stat) { display: none; }
.terr-map-stat { animation: terr-stat-in .6s ease both; }
/* 위 칩은 오른쪽 위(동해)로 — 가운데·왼쪽은 서울(점이 가장 많은 곳)을 가린다 */
.terr-chip-a.terr-map-stat { left: auto; right: 0; transform: none; animation-name: terr-stat-in-b; }
.terr-map-stat b { color: inherit; font-weight: 900; }
@keyframes terr-stat-in { from { opacity: 0; transform: translate(-50%, 6px); } }
.terr-chip-b.terr-map-stat { animation-name: terr-stat-in-b; }
@keyframes terr-stat-in-b { from { opacity: 0; transform: translateY(6px); } }
/* 지도 출처(OpenFreeMap · OpenStreetMap) — 약관상 보여야 한다. 덮개(z 1) 위로 */
.terr-hero-map .maplibregl-ctrl-bottom-right { z-index: 3; }
/* maplibre-gl.css 가 'Data from' 같은 맨 글자와 ⓘ 버튼을 검게 칠해 어두운 배경에 묻혔다 (11-09 운영 확인) */
.terr-hero .maplibregl-ctrl-attrib { background: rgba(24,24,26,.7) !important; color: var(--text-2) !important; }
.terr-hero .maplibregl-ctrl-attrib-inner,
.terr-hero .maplibregl-ctrl-attrib a { color: var(--text-2) !important; }
.terr-hero .maplibregl-ctrl-attrib-button { filter: invert(1); opacity: .6; }
.terr-map-note { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.terr-map-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); }

/* ── 3단계 ── */
.terr-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.terr-steps li { padding: 24px; }
.terr-step-no { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 16px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border-radius: 0; }
.terr-steps h3, .terr-map-card h3, .terr-feature h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.terr-steps p, .terr-map-card p, .terr-feature p { color: var(--text-2); line-height: 1.65; }
.terr-steps b, .terr-feature b { color: var(--text); }

/* ── 세 가지 지도 ── */
.terr-map-card { padding: 0; overflow: hidden; }
.terr-map-art { aspect-ratio: 2 / 1; border-bottom: 1px solid var(--border); }
.terr-map-art svg { display: block; width: 100%; height: 100%; }
.terr-map-card h3 { display: flex; align-items: center; gap: 8px; margin: 20px 20px 8px; }
.terr-map-card h3 i { color: var(--primary); }
.terr-map-card p { margin: 0 20px 22px; }

/* ── 기능 4칸 ── */
.terr-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.terr-feature { padding: 24px; }
.terr-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--tint); color: var(--primary); font-size: 22px; margin-bottom: 16px; }

/* ── 공정하게 ── */
.terr-fair { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: center; padding: 36px; }
.terr-fair h2 { font-size: 28px; line-height: 1.35; font-weight: 800; letter-spacing: -0.03em; }
.terr-fair ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.terr-fair li { display: flex; gap: 10px; color: var(--text-2); line-height: 1.6; }
.terr-fair li i { color: var(--primary); font-size: 20px; flex: none; }
.terr-fair li b { color: var(--text); }

/* ── 자주 묻는 질문 ── */
.terr-faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.terr-faq { display: grid; gap: 10px; }
.terr-faq-side { padding: 0; overflow: hidden; position: sticky; top: 96px; }
.terr-faq-side-art { aspect-ratio: 5 / 2; border-bottom: 1px solid var(--border); }
.terr-faq-side-art svg { display: block; width: 100%; height: 100%; }
.terr-faq-side h3 { font-size: 19px; font-weight: 800; margin: 20px 20px 8px; }
.terr-faq-side p { margin: 0 20px; color: var(--text-2); line-height: 1.65; }
.terr-faq-btn { display: flex; margin: 18px 20px 0; }
.terr-faq-links { display: grid; margin: 12px 20px 20px; border-top: 1px solid var(--border); }
.terr-faq-links a { display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border); }
.terr-faq-links a:last-child { border-bottom: 0; }
.terr-faq-links a:hover { color: var(--text); }
.terr-faq-links i { color: var(--primary); font-size: 18px; }
.terr-faq details { padding: 0; }
.terr-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px;
  font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.terr-faq summary::-webkit-details-marker { display: none; }
.terr-faq summary i { color: var(--text-2); font-size: 22px; transition: transform .2s; }
.terr-faq details[open] summary i { transform: rotate(180deg); }
.terr-faq details p { padding: 0 20px 20px; color: var(--text-2); line-height: 1.7; }

/* ── 다운로드 ── */
.terr-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px;
  border-radius: var(--radius); background: linear-gradient(115deg, #1B2A10, #2A2148); border: 1px solid var(--border); }
.terr-cta h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.terr-cta p { margin-top: 10px; color: var(--text-2); line-height: 1.6; max-width: 34em; }

@media (max-width: 1024px) {
  .terr-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .terr-features { grid-template-columns: repeat(2, 1fr); }
  .terr-fair { grid-template-columns: 1fr; }
  .terr-cta { flex-direction: column; align-items: flex-start; }
  .terr-faq-wrap { grid-template-columns: 1fr; }
  .terr-faq-side { position: static; }
}
@media (max-width: 768px) {
  .terr-hero { padding-block: 40px 32px; }
  .terr-hero h1 { font-size: 36px; }
  .terr-lead { font-size: 16px; }
  .terr-steps, .terr-features { grid-template-columns: 1fr; }
  .terr-fair, .terr-cta { padding: 24px; }
  .terr-cta h2 { font-size: 24px; }
  .terr-chip { font-size: 12px; padding: 6px 11px; }
}
