/* ============================================================
   BigBoss OS — 공식 웹사이트 스타일
   테마: 마피아/조직 — 진한 배경 + 골드 포인트 + 조직도 강조
   의존성 0: 웹폰트 없이 시스템 폰트 스택만 사용
   ============================================================ */

:root {
  --bg: #0c0b0a;
  --bg-elev: #15130f;
  --surface: #1b1813;
  --surface-2: #221e18;
  --border: #322c22;
  --border-gold: #5a4a1f;
  --text: #e9e3d6;
  --text-dim: #9a9384;
  --text-faint: #6c665a;
  --gold: #c9a227;
  --gold-bright: #e6c557;
  --blood: #8c2f2f;
  --serif: Georgia, "Times New Roman", "Noto Serif KR", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ── 언어 토글 ── */
.en { display: none; }
body.lang-en .ko { display: none; }
body.lang-en .en { display: inline; }

/* ── 네비게이션 ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(12, 11, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-os { color: var(--gold); }
.nav nav { display: flex; align-items: center; gap: 1.4rem; }
.nav nav a { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; }
.nav nav a:hover, .nav nav a.active { color: var(--text); }
.nav-gh {
  color: var(--gold) !important;
  border: 1px solid var(--border-gold);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
}
.nav-gh:hover { background: rgba(201, 162, 39, 0.1); }
#lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 0.32rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}
#lang-toggle:hover { color: var(--text); border-color: var(--border-gold); }

/* ── 공통 섹션 ── */
main { display: block; }
.section { padding: 5rem 1.5rem; border-top: 1px solid var(--border); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.section h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 1rem;
}
.lead {
  color: var(--text-dim);
  font-size: 1.06rem;
  max-width: 680px;
  margin-bottom: 2rem;
}

/* ── Hero ── */
.hero {
  padding: 7rem 1.5rem 6rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 162, 39, 0.08), transparent),
    var(--bg);
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.6rem;
}
.hero-title {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold-bright);
  margin: 1rem 0 1rem;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 600px;
  margin: 0 auto 2.2rem;
}
.hero-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ── 버튼 ── */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: transform 0.08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1505;
}
.btn-gold:hover { color: #1a1505; filter: brightness(1.08); }
.btn-ghost {
  border-color: var(--border-gold);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(201, 162, 39, 0.08); color: var(--text); }

/* ── 데이터 테이블 ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table td.num { text-align: right; color: var(--text-dim); font-family: var(--mono); font-size: 0.88rem; }
.data-table .hl { color: var(--gold-bright); font-weight: 600; }
.compare th.hl { color: var(--gold); }
.punch {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--blood);
  font-weight: 700;
}
.section-problem { background: var(--bg-elev); }

/* ── 조직도 ── */
.section-org { background: var(--bg-elev); }
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2rem 0 3rem;
}
.org-level {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 0.9rem 1.2rem;
  text-align: center;
}
.org-level-0 { border-left-color: var(--gold-bright); background: var(--surface-2); }
.org-level-4 { border-left-color: var(--text-faint); }
.org-name { font-weight: 700; font-size: 1.02rem; }
.org-role { color: var(--text-dim); font-size: 0.88rem; margin-top: 0.15rem; }
.org-arrow { color: var(--gold); font-size: 0.9rem; padding: 0.35rem 0; }

.family-heading {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  text-align: center;
}
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.family-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.3rem;
}
.family-card h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
}
.family-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ── C4I 파이프라인 ── */
.pipe-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}
.pipe-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pipe-n {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.pipe-name { font-weight: 700; font-size: 1rem; }
.pipe-d { color: var(--text-dim); font-size: 0.86rem; }

/* ── 핵심 기능 ── */
.section-features { background: var(--bg-elev); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}
.feature-card:hover { border-color: var(--border-gold); }
.feature-card h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}
.feature-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ── CTA 밴드 ── */
.cta-band {
  padding: 5rem 1.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(201, 162, 39, 0.1), transparent),
    var(--bg);
  border-top: 1px solid var(--border);
}
.cta-band .section-inner { display: flex; flex-direction: column; align-items: center; }
.cta-band h2 { font-family: var(--serif); font-size: 2.2rem; margin-bottom: 0.6rem; }
.cta-band h2::before { content: none; }

/* ── 푸터 ── */
.footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.footer-tag { color: var(--text-dim); font-size: 0.92rem; margin: 0.4rem 0 1.2rem; }
.footer-links { display: flex; gap: 1.4rem; justify-content: center; margin-bottom: 1rem; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-meta { color: var(--text-faint); font-size: 0.82rem; font-family: var(--mono); }

/* ── 문서 페이지 (Phase 2) ── */
.doc-layout { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 2.5rem; padding: 3rem 1.5rem; }
.doc-sidebar { flex: 0 0 220px; }
.doc-sidebar h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); margin: 1.4rem 0 0.5rem;
}
.doc-sidebar a { display: block; color: var(--text-dim); font-size: 0.9rem; padding: 0.25rem 0; }
.doc-sidebar a:hover, .doc-sidebar a.active { color: var(--gold); }
.doc-content { flex: 1 1 auto; min-width: 0; }
.doc-content h1 { font-family: var(--serif); font-size: 2.2rem; margin-bottom: 1rem; }
.doc-content h2 { font-family: var(--serif); font-size: 1.5rem; margin: 2rem 0 0.8rem; }
.doc-content h3 { font-size: 1.15rem; margin: 1.4rem 0 0.6rem; }
.doc-content h4 { font-size: 1rem; margin: 1.2rem 0 0.5rem; color: var(--gold-bright); }
.doc-content p { margin: 0.7rem 0; color: var(--text); }
.doc-content ul, .doc-content ol { margin: 0.7rem 0 0.7rem 1.3rem; }
.doc-content li { margin: 0.25rem 0; color: var(--text); }
.doc-content a { text-decoration: underline; }
.doc-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--text-dim);
  background: var(--surface);
}
.doc-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.doc-content code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
}
.doc-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.doc-content pre code { background: none; border: none; padding: 0; font-size: 0.84rem; }
.doc-content table {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem;
}
.doc-content th, .doc-content td {
  border: 1px solid var(--border); padding: 0.5rem 0.8rem; text-align: left;
}
.doc-content th { background: var(--surface); color: var(--text-faint); }

.doc-index-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem;
}
.doc-index-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.1rem 1.3rem;
}
.doc-index-card:hover { border-color: var(--border-gold); }
.doc-index-card .cat {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold);
}
.doc-index-card .doc-title { display: block; font-weight: 600; font-size: 1rem; margin-top: 0.2rem; color: var(--text); }

/* ── 반응형 ── */
@media (max-width: 720px) {
  .hero-title { font-size: 2.8rem; }
  .hero-tagline { font-size: 1.2rem; }
  .nav { padding: 0.8rem 1rem; }
  .nav nav { gap: 0.9rem; }
  .nav nav a:not(.nav-gh) { display: none; }
  .section { padding: 3.5rem 1.2rem; }
  .doc-layout { flex-direction: column; padding: 2rem 1.2rem; }
  .doc-sidebar { flex: none; }
}
