/* ============================================================
   Seoul Labs — Shared Component Styles
   헤더 / 푸터 / 모달 공통 CSS
   ============================================================ */

/* ============================================================
   DESIGN TOKENS (공통 변수 — 모든 페이지에서 동일하게 적용)
   ============================================================ */
:root {
  --c-navy-950: #080F1A;
  --c-navy-900: #0B1829;
  --c-navy-800: #0D1F3C;
  --c-navy-700: #1A3560;
  --c-blue-600: #1E4F8A;
  --c-blue-500: #2660AD;
  --c-blue-400: #4178BB;
  --c-blue-100: #CCDFF2;
  --c-blue-50:  #EBF3FB;
  --c-slate-50:  #F8FAFC;
  --c-slate-100: #F1F5F9;
  --c-slate-200: #E2E8F0;
  --c-slate-300: #CBD5E1;
  --c-slate-400: #94A3B8;
  --c-slate-500: #64748B;
  --c-slate-600: #475569;
  --c-slate-700: #334155;
  --c-slate-800: #1E293B;
  --c-white: #FFFFFF;
  --font: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  --container: 1280px;
  --gutter: 24px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.12);
  --transition: .2s ease;
  --nav-h: 68px;
}

/* ============================================================
   SHARED BUTTONS (헤더·푸터에서 사용 — 모든 페이지 일관 적용)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
  cursor: pointer;
  border: none;
}
.btn-sm { padding: 9px 18px; font-size: 14px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.btn-primary { background: var(--c-blue-500); color: var(--c-white); }
.btn-primary:hover { background: var(--c-blue-600); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(38,96,173,.35); }
.btn-outline { background: transparent; color: var(--c-white); border: 1.5px solid rgba(255,255,255,.3); }
.btn-outline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }

/* ============================================================
   TAG BUTTON — 심머 애니메이션 공통 태그 컴포넌트
   AnimatedShinyText 기반 / 모든 pill 태그에 적용
   ============================================================ */
.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.tag-btn--sm { padding: 3px 10px; font-size: 11px; }
.tag-btn--xs { padding: 2px 8px; font-size: 11px; }
.tag-btn::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 64px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42) 50%, transparent);
  left: -84px;
  animation: tag-shimmer 3s cubic-bezier(.6,.6,0,1) infinite;
  pointer-events: none;
}
@keyframes tag-shimmer {
  0%,  20%  { left: -84px; }
  55%, 70%  { left: calc(100% + 20px); }
  90%, 100% { left: -84px; }
}

/* ============================================================
   NAVIGATION — 포인트 컬러 고정
   페이지별 :root 오버라이드와 무관하게 헤더/모바일메뉴는 항상 기본 서울랩스 컬러 유지
   ============================================================ */
#gnb,
#mobile-menu {
  --c-blue-600: #1E4F8A;
  --c-blue-500: #2660AD;
  --c-blue-400: #4178BB;
  --c-blue-50:  #EBF3FB;
  --c-blue-100: #CCDFF2;
}

#gnb {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
#gnb.scrolled {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-slate-200);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
/* 투명 헤더일 때 로고/링크 색상 유지 */
#gnb:not(.scrolled) .nav-brand-text { color: var(--c-navy-800); }
#gnb:not(.scrolled) .nav-link { color: var(--c-slate-700); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo { height: 32px; width: auto; object-fit: contain; }
.nav-brand-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-navy-800);
  letter-spacing: -.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-slate-700);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--c-navy-800); background: var(--c-slate-100); }
.nav-link svg { transition: transform var(--transition); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-white);
  border: 1px solid var(--c-slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--c-slate-700);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--c-blue-50); color: var(--c-blue-500); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--c-slate-100);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.lang-btn {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-slate-500);
  border-radius: 4px;
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--c-white);
  color: var(--c-navy-800);
  box-shadow: var(--shadow-sm);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-slate-700);
  border-radius: 2px;
  transition: transform 300ms cubic-bezier(0.4,0,0.2,1), opacity 200ms ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(0px, 7px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(0px, -7px); }

/* 딤 오버레이 — 헤더 아래부터 */
#mobile-menu-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.28);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
#mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* 파동 확장 패널 — clip-path circle */
#mobile-menu {
  display: none; /* JS가 open/close 타이밍 제어 */
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: 82%;
  bottom: 0;
  background: var(--c-white);
  z-index: 999;
  overflow-y: auto;
  padding: 24px;
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
  clip-path: circle(0% at calc(100% - 36px) 0px);
  transition: clip-path 480ms cubic-bezier(0.4,0,0.2,1);
}
#mobile-menu.open {
  clip-path: circle(160% at calc(100% - 36px) 0px);
}
.mobile-nav-section { margin-bottom: 24px; }
.mobile-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-slate-400);
  margin-bottom: 8px;
  padding: 0 8px;
}
.mobile-nav-link {
  display: block;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-slate-700);
  border-bottom: 1px solid var(--c-slate-100);
}
.mobile-nav-link:hover { color: var(--c-blue-500); }
.mobile-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }


/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--c-navy-950);
  color: rgba(255,255,255,.5);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* ── Footer background grid ── */
#footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8,15,26,.78);
  z-index: -1;
  pointer-events: none;
}
.footer-content { position: relative; z-index: 0; pointer-events: none; }
.footer-content a,
.footer-content button { pointer-events: auto; }
.footer-grid-container {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.footer-grid-wrap {
  position: absolute;
  left: 25%;
  top: -25%;
  transform: translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) translateZ(0);
  display: flex;
  pointer-events: auto;
  will-change: transform;
  z-index: 0;
}
.fgr {
  width: 64px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}
.fgc {
  width: 64px;
  height: 32px;
  border-right: 1px solid rgba(255,255,255,.05);
  border-top: 1px solid rgba(255,255,255,.05);
  position: relative;
  flex-shrink: 0;
  transition: background-color 1.8s ease;
}
.fgc.lit { transition: background-color 0s !important; }

.footer-main {
  padding: 64px 0 48px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}
.footer-brand { width: 280px; flex-shrink: 0; }
.footer-logo { height: 28px; object-fit: contain; margin-bottom: 16px; filter: brightness(10); }
.footer-brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-white);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.4); margin-bottom: 24px; }
.footer-brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-email-link { color: rgba(255,255,255,.3); transition: color .2s; }
.footer-email-link:hover { color: rgba(255,255,255,.65); }
.footer-legal-links { margin-top: 16px; display: flex; gap: 16px; }
.footer-legal-link { font-size: 11px; color: rgba(255,255,255,.3); transition: color .2s; }
.footer-legal-link:hover { color: rgba(255,255,255,.6); }
.footer-social { display: flex; gap: 10px; margin-top: 24px; }
.footer-social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  transition: var(--transition);
}
.footer-social-btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.2); color: var(--c-white); }

.footer-nav-grid {
  display: flex;
  gap: 120px;
  margin-left: auto;
  align-items: flex-start;
}
.footer-biz-info {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.footer-biz-info p {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  line-height: 1.6;
  margin: 0;
}
.footer-nav-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  margin-bottom: 14px;
}
.footer-nav-link {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.45);
  padding: 6px 0;
  line-height: 1.4;
  transition: color var(--transition);
}
.footer-nav-link:hover { color: var(--c-white); }
.footer-legal { font-size: 12px; color: rgba(255,255,255,.3); }


/* ============================================================
   LEGAL MODAL
   ============================================================ */
.legal-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.legal-modal-overlay.open { display: flex; }
.legal-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  flex-shrink: 0;
}
.legal-modal-title { font-size: 17px; font-weight: 700; color: #0f1724; letter-spacing: -.02em; }
.legal-modal-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background .2s, color .2s;
}
.legal-modal-close:hover { background: rgba(0,0,0,.1); color: #0f1724; }
.legal-modal-body {
  overflow-y: auto;
  padding: 24px 28px 32px;
  flex: 1;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(0,0,0,.55);
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.15) transparent;
}
.legal-modal-body h2 { font-size: 13px; font-weight: 700; color: #0f1724; margin: 20px 0 6px; }
.legal-modal-body h2:first-child { margin-top: 0; }
.legal-modal-body p { margin: 0 0 4px; }
.legal-modal-body ul { padding-left: 18px; margin: 6px 0 12px; list-style: disc; }
.legal-modal-body li { font-size: 13px; color: rgba(0,0,0,.55); line-height: 1.8; margin: 0 0 2px; }
.legal-modal-body .legal-date { font-size: 11px; color: rgba(0,0,0,.3); margin-bottom: 20px; }


/* ============================================================
   RESPONSIVE — NAV + FOOTER
   ============================================================ */
@media (max-width: 1100px) {
  .footer-nav-grid { gap: 60px; }
}

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-actions .btn-primary { display: none; }
  .nav-actions { margin-left: auto; gap: 0; }
  .hamburger { display: flex; margin-left: 8px; }
  .nav-inner { gap: 0; }

  .footer-main { flex-direction: column; gap: 48px; }
  .footer-brand { width: 100%; }
  .footer-nav-grid { flex-wrap: wrap; gap: 40px; margin-left: 0; }
}

@media (max-width: 600px) {
  .footer-nav-grid { gap: 24px; }
}

/* ============================================================
   FAB — 상단으로 이동 버튼 (우하단 고정)
   ============================================================ */
.fab-top {
  position: fixed;
  bottom: 64px;
  right: 64px;
  width: 52px;
  height: 52px;
  background: transparent;
  color: #2660AD;
  border: 1.5px solid #2660AD;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, bottom .3s ease, color .2s, border-color .2s;
  pointer-events: none;
  z-index: 490;
  will-change: transform, opacity;
}
.fab-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.fab-top.near-footer {
  bottom: 120px;
}
.fab-top:hover {
  color: #1E4F8A;
  border-color: #1E4F8A;
}
.fab-top svg {
  width: 24px;
  height: 24px;
}
@media (max-width: 768px) {
  .fab-top {
    width: 52px;
    height: 52px;
    bottom: 48px;
    right: 40px;
  }
  .fab-top svg {
    width: 24px;
    height: 24px;
  }
}

/* ============================================================
   WAVE DIVIDER — 섹션 구분선 (인터랙티브 웨이브)
   ============================================================ */
.wave-divider {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  cursor: none;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}
.wave-divider svg path {
  fill: none;
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 1.5px;
  stroke-linecap: round;
  transition: stroke .3s;
}
.wave-divider:hover svg path {
  stroke: rgba(38, 96, 173, 0.25);
}
@media (max-width: 768px) {
  .wave-divider { display: none; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  position: fixed;
  right: 0;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 990;
}

#sidebar-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;        /* 아이콘이 좌측 방향으로 커짐 */
  width: calc(44px + 12px);
  overflow: visible;
  list-style: none;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,0,0,0.08);
  border-right: none;           /* 우측 테두리 없음 */
  border-radius: 14px 0 0 14px; /* 좌측만 둥글게 */
  padding: 6px;
  gap: 4px;
  box-shadow: -3px 0 16px rgba(0,0,0,0.07);
}

.sb-icon {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.sb-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(160deg,#ffffff 0%,#f2f2f3 100%);
  padding: 6px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,1) inset, 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
}

.sb-icon a.sb-transparent {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 3px;
}

.sb-icon a img,
.sb-icon a svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 툴팁 */
#sb-tip {
  position: fixed;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: #111;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 991;
}

#sb-tip.visible { opacity: 1; }

.sb-scale-80 { transform: scale(0.8); }
.sb-scale-90 { transform: scale(0.9); }
.sb-xphere-net { transform: scale(0.8); filter: brightness(0) saturate(100%) invert(27%) sepia(78%) saturate(540%) hue-rotate(186deg) brightness(95%) contrast(97%); }
.sb-multiply-90 { mix-blend-mode: multiply; transform: scale(0.9); }
.sb-pad { padding: 2px !important; }
.sb-newsroom-bg { padding: 2px !important; }

/* 모바일 숨김 */
@media (max-width: 900px) {
  #sidebar { display: none; }
}
