/* ===================================================================
   common.css — 디자인 토큰 + 레이아웃 + 타이포그래피 + 헤더/푸터
   노원 JUMP 단체 홈페이지 퍼블리싱

   ★ 브랜드 컬러/폰트 값은 운영 사이트의 assets/css/tokens.css 와
     동일한 값을 사용합니다. (이식 시 토큰만 교체하면 그대로 붙습니다)
     운영 원본: --pink #e92285 / --blue #037ab8 / --yellow #f7b924
   =================================================================== */

/* ===================================================================
   1. 디자인 토큰
   =================================================================== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid var(--color-focus, var(--blue));
  outline-offset: 2px;
  border-radius: 2px;
}

:root {
  /* tokens.css 별칭 — 브랜드 색은 tokens 한 곳만 */
  --color-primary:        var(--blue);
  --color-secondary:      var(--pink);
  --color-accent:         var(--yellow);
  --color-accent-deep:    var(--yellow-deep);

  /* ---- 중립 ---- */
  --color-background:     #ffffff;
  --color-surface:        #f6f5f1;   /* 운영: --bg-soft */
  --color-surface-2:      #ebebe6;
  --color-dark:           #171428;   /* 운영: --dark    */
  --color-dark-2:         #241f3d;
  --color-text:           #0b0b0e;   /* 운영: --ink     */
  --color-text-2:         #3a3a40;
  --color-text-muted:     #71717a;   /* 운영: --mute    */
  --color-border:         rgba(20, 20, 30, .10);
  --color-border-strong:  rgba(20, 20, 30, .16);
  --color-focus:          #037ab8;

  /* ---- 존(Zone) 컬러 — 운영 tokens.css 동일 ---- */
  --z-ride:   #efbc44;
  --z-adv:    #5eade3;
  --z-surv:   #8b2afa;
  --z-arcade: #98c35a;
  --z-kids:   #eccecc;
  --z-food:   #fefe3f;
  --z-rc:     #3b4ad9;

  /* ---- 폰트 ---- */
  --font-family:  'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic',
                  'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --font-display: 'Archivo Black', 'Pretendard', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* ---- 타이포 스케일 (clamp 로 반응형 자동 축소) ---- */
  --fs-hero:  clamp(2.25rem, 1.30rem + 4.2vw, 4.5rem);
  --fs-h2:    clamp(1.75rem, 1.20rem + 2.4vw, 3rem);
  --fs-h3:    clamp(1.15rem, 1.02rem + 0.6vw, 1.5rem);
  --fs-lead:  clamp(1rem,    0.95rem + 0.4vw, 1.175rem);
  --fs-body:  1rem;
  --fs-sm:    0.9375rem;
  --fs-xs:    0.8125rem;
  --fs-mono:  0.75rem;

  /* ---- 라운드 ---- */
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-pill: 999px;
  /* 테마별로 덮어쓰는 카드 라운드 (themes.css 참고) */
  --radius-card: var(--radius-md);

  /* ---- 그림자 ---- */
  --shadow-sm: 0 1px 3px rgba(16, 16, 30, .06),
               0 1px 2px rgba(16, 16, 30, .04);
  --shadow-md: 0 6px 20px rgba(16, 16, 30, .08),
               0 2px 6px  rgba(16, 16, 30, .04);
  --shadow-lg: 0 18px 48px rgba(16, 16, 30, .12),
               0 4px 12px  rgba(16, 16, 30, .06);

  /* ---- 레이아웃 ---- */
  --container-width: 1240px;
  --container-wide:  1480px;
  --container-pad:   24px;
  --section-gap:     clamp(64px, 4vw + 40px, 112px);

  /* ---- 모션 ---- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  .25s;

  /* ---- 테마 기본값 (themes.css 에서 대상별로 덮어씀) ---- */
  --theme-accent:      var(--color-primary);
  --theme-accent-2:    var(--color-accent);
  --theme-accent-ink:  #ffffff;      /* accent 배경 위 글자색 */
  --theme-tint:        #eef6fb;      /* accent 의 아주 옅은 배경 */
  --theme-hero-overlay: linear-gradient(180deg,
                          rgba(11,11,14,.30) 0%,
                          rgba(11,11,14,.62) 55%,
                          rgba(11,11,14,.88) 100%);
}

/* ===================================================================
   2. 베이스
   =================================================================== */
body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: 1.7;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* 한글은 어절 단위로 줄바꿈해야 합니다.
     keep-all 이 없으면 "처음 만나 / 는 큰 놀이터" 처럼 단어 중간이 끊깁니다.
     긴 영문/URL 이 넘칠 때만 break-word 로 예외 처리. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 고정 헤더에 가리지 않도록 앵커 위치 보정 */
[id] { scroll-margin-top: 96px; }

::selection {
  background: var(--theme-accent);
  color: var(--theme-accent-ink);
}

/* ===================================================================
   3. 레이아웃 유틸
   =================================================================== */
.wrap {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.wrap--narrow { max-width: 820px; }

.section {
  padding-block: var(--section-gap);
}
.section--soft { background: var(--color-surface); }
.section--dark {
  background: var(--color-dark);
  color: #fff;
}

/* 그리드
   ※ .grid--4 는 현재 페이지에서 미사용이지만 2/3/4열 유틸 세트를 완성해
     둡니다. 콘텐츠 추가 시 바로 쓸 수 있습니다. */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===================================================================
   4. 타이포그래피
   =================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--theme-accent);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: .55;
}
.section--dark .eyebrow,
.on-dark .eyebrow { color: rgba(255, 255, 255, .82); }

.section-head { margin-bottom: clamp(32px, 3vw, 56px); }
.section-head--center {
  text-align: center;
  margin-inline: auto;
  max-width: 760px;
}
.section-head--center .eyebrow { justify-content: center; }

.section-title {
  margin-top: 18px;
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--color-text);
  text-wrap: balance;
}
.section--dark .section-title,
.on-dark .section-title { color: #fff; }
.section-title .accent { color: var(--theme-accent); }
/* .pk / .bl / .yl — 운영 사이트 components.css 의 .sec-h2 .pk/.bl/.yl 과
   동일한 역할. 본 시안은 테마색을 쓰는 .accent 를 기본으로 사용하지만,
   운영 페이지 마크업을 그대로 옮겨 붙일 때를 대비해 남겨 둡니다. */
.section-title .pk { color: var(--color-secondary); }
.section-title .bl { color: var(--color-primary); }
.section-title .yl { color: var(--color-accent); }

.section-sub {
  margin-top: 16px;
  max-width: 62ch;
  font-size: var(--fs-lead);
  line-height: 1.75;
  color: var(--color-text-2);
  text-wrap: pretty;
}
.section-head--center .section-sub { margin-inline: auto; }
.section--dark .section-sub,
.on-dark .section-sub { color: rgba(255, 255, 255, .78); }

/* ===================================================================
   5. 헤더 / 네비게이션
   -------------------------------------------------------------------
   ※ 운영 사이트는 assets/js/embed.js 의 HEADER_TPL 로 헤더를 주입합니다.
     본 시안은 정적 검토를 위해 각 페이지에 마크업을 직접 넣었습니다.
     실제 이식 시 embed.js HEADER_TPL 로 옮기고, 아래 스타일의
     .site-header → .njhdr 로 클래스만 치환하면 됩니다.
     (HANDOFF-CHECKLIST.md 의 "헤더/푸터 이식" 항목 참고)
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
/* 로고 링크 — 이미지는 34px 이지만 터치 타깃은 44px 이상 확보 */
.site-header__brand {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 2px;
}
.site-header__brand img { height: 34px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 72px;
  padding-inline: 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-2);
  transition: color var(--dur) var(--ease);
}
.nav-item::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--theme-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-item:hover { color: var(--color-text); }
.nav-item.is-active { color: var(--theme-accent); font-weight: 700; }
.nav-item.is-active::after { transform: scaleX(1); }

.site-header__util { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-header__tel {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--color-text-muted);
}
.site-header__tel svg { width: 15px; height: 15px; flex: none; }
.site-header__util .btn { white-space: nowrap; }

/* 햄버거 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle__bar {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드로어 */
.mobile-nav {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 89;
  background: var(--color-background);
  padding: 8px var(--container-pad) 40px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  /* pointer-events 는 트랜지션 대상이 아니므로 즉시 전환됩니다.
     혹시 visibility 트랜지션이 지연되더라도 닫힌 드로어가 화면을
     가로막지 않도록 하는 안전장치입니다. */
  pointer-events: none;
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur);
}
.mobile-nav.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding-inline: 4px;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.0625rem;
  font-weight: 600;
}
.mobile-nav__link.is-active { color: var(--theme-accent); }
.mobile-nav__link .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--theme-accent);
  opacity: 0; flex: none;
}
.mobile-nav__link.is-active .dot { opacity: 1; }
.mobile-nav__cta { margin-top: 24px; }
.mobile-nav__meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: grid; gap: 8px;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
body.is-nav-open { overflow: hidden; }

/* ===================================================================
   6. 푸터
   ※ 운영 embed.js FOOTER_TPL 과 정보 구조를 맞췄습니다.
   =================================================================== */
.site-footer {
  background: #2a2b2f;
  color: rgba(255, 255, 255, .78);
  padding-block: 64px 28px;
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.site-footer__logo { height: 46px; width: auto; }
.site-footer__desc {
  margin-top: 18px;
  max-width: 380px;
  font-size: var(--fs-xs);
  line-height: 1.75;
  opacity: .68;
}
.site-footer__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  opacity: .55;
}
.site-footer__list {
  margin-top: 14px;
  display: grid; gap: 8px;
  font-size: var(--fs-xs);
  line-height: 1.6;
  opacity: .85;
}
.site-footer__bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  opacity: .55;
}

/* ===================================================================
   7. 반응형 — Tablet 1024 / Mobile 768 / Small 480
   =================================================================== */
@media (max-width: 1180px) {
  .nav-item { padding-inline: 10px; font-size: 0.875rem; }
  .site-header__tel { display: none; }
}

@media (max-width: 1024px) {
  :root { --container-pad: 20px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  /* 헤더 버튼 2개(제휴·대관 / 예약)가 메뉴 5개와 한 줄에 들어가도록 압축 */
  .site-header__row { gap: 18px; }
  .site-header__util .btn { min-height: 42px; padding: 9px 15px; font-size: .84rem; }
}

@media (max-width: 900px) {
  .nav-item { padding-inline: 7px; }
}

@media (max-width: 768px) {
  :root { --container-pad: 18px; --section-gap: 56px; }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header__util { margin-left: auto; }
  /* 헤더 CTA 는 하단 고정 CTA 바(.cta-bar)와 중복되므로 모바일에서 숨김.
     로고가 눌리지 않을 만큼 좁아지는 것도 함께 방지합니다.
     「제휴 및 대관」은 상단 메뉴(.site-nav) 항목이므로 모바일에서는
     다른 메뉴와 함께 드로어로 들어갑니다. */
  .site-header__util > .btn--primary { display: none; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  :root { --container-pad: 16px; --section-gap: 48px; }
  .site-header__brand img { height: 28px; }
}

/* ===================================================================
   8. 인쇄
   =================================================================== */
@media print {
  .site-header, .mobile-nav, .nav-toggle, .cta-bar { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding-block: 24px; }
}
