/* ==========================================================================
   NEXA — 엔케이4D인권전략센터 웹사이트
   디자인 컨셉: "보이지 않는 연결" — 짙은 네이비 바탕 위에 금빛/적색 점과 선으로
   이루어진 네트워크가 이어지는 이미지로, 국제기구·공식 기관에 준하는 신뢰감과
   격식을 표현한다. 금색(연결의 빛)과 적색(정체성의 색)을 함께 쓴다.
   ========================================================================== */

:root {
  --ink: #0b1220;          /* 배경 (짙은 네이비) */
  --ink-2: #0f1b30;
  --ink-3: #14213d;
  --line: rgba(255, 255, 255, 0.08);
  --paper: #f6f4ee;
  --paper-2: #ece8dd;
  --ink-text: #1c2333;
  --muted: #8b95ab;
  --muted-2: #5b6478;
  --gold: #c9a25c;         /* 주 포인트 — 연결의 빛 */
  --gold-soft: rgba(201, 162, 92, 0.16);
  --crimson: #a5342a;      /* 보조 포인트 — 정체성의 색 */
  --crimson-soft: rgba(165, 52, 42, 0.14);
  --crimson-2: #c24a3c;
  --white: #ffffff;

  --font-kr: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  --font-en: "Fraunces", Georgia, serif;

  --maxw: 1140px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-kr);
  background: var(--paper);
  color: var(--ink-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
section { position: relative; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow { font-size: 12.5px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; }
.eyebrow--dark { color: var(--gold); }
.eyebrow--light { color: #9a7b3f; }

.en { font-family: var(--font-en); font-style: italic; color: var(--muted-2); font-weight: 400; }

/* ---------- 언어 전환 ---------- */
/* 기본값(:root)은 한국어 노출. html[data-lang="en"] 이면 영문만 노출 */

.lang-en { display: none; }
html[data-lang="en"] .lang-ko { display: none; }
html[data-lang="en"] .lang-en { display: inherit; }
html[data-lang="en"] span.lang-en,
html[data-lang="en"] em.lang-en { display: inline; }
html[data-lang="en"] p.lang-en,
html[data-lang="en"] div.lang-en,
html[data-lang="en"] blockquote.lang-en { display: block; }
html[data-lang="en"] .en { font-style: normal; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  cursor: pointer;
}

.lang-toggle button.is-active { background: var(--gold); color: var(--ink); }

/* ---------- 헤더 / 내비게이션 ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0;
  transition: background 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 18, 32, 0.9); backdrop-filter: blur(10px); padding: 11px 0; border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); font-weight: 700; font-size: 20px; letter-spacing: 0.04em; }
.brand small { display: block; font-weight: 400; font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); margin-top: 2px; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }

.nav-right { display: flex; align-items: center; gap: 30px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { color: #d7dbe6; font-size: 14.5px; font-weight: 500; position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--white); }
.main-nav a.cta { color: var(--ink); background: var(--gold); padding: 9px 18px; border-radius: 999px; font-weight: 600; }
.main-nav a.cta:hover { background: #d9b573; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--white); display: block; }

/* ---------- 히어로 ---------- */

.hero {
  min-height: 92vh; display: flex; align-items: center;
  background: radial-gradient(120% 90% at 78% 12%, #16233f 0%, var(--ink) 55%, #070b14 100%);
  color: var(--white); padding: 140px 0 90px; overflow: hidden;
}

.hero-seal {
  position: absolute;
  right: -120px; top: -120px;
  width: 560px; height: 560px;
  opacity: 0.05;
  pointer-events: none;
}

.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.16; margin: 18px 0 22px; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.hero h1 .accent { color: var(--gold); }
.hero p.lead { font-size: 17.5px; line-height: 1.8; color: #c7cede; max-width: 560px; margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: #d9b573; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: var(--white); }

.hero-network { position: relative; height: 420px; }
.hero-network svg { width: 100%; height: 100%; }
.hero-network .node { fill: var(--gold); filter: drop-shadow(0 0 6px rgba(201,162,92,0.65)); }
.hero-network .node.crimson { fill: var(--crimson-2); filter: drop-shadow(0 0 6px rgba(194,74,60,0.6)); }
.hero-network .edge { stroke: rgba(201, 162, 92, 0.35); stroke-width: 1; stroke-dasharray: 4 6; animation: dash 26s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -400; } }
.hero-network .pulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.28); } }

.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 2; }
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0%,100% { opacity: 0.2; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hero-network .edge, .hero-network .pulse, .scroll-cue .line { animation: none; }
}

/* ---------- 공통 섹션 타이틀 ---------- */

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { max-width: 720px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 0; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.section-pad { padding: 108px 0; }

/* ---------- 소개 / 미션 ---------- */

.about { background: var(--paper); color: var(--ink-text); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 10px; }
.pillar { background: var(--white); border: 1px solid #e5e1d5; border-radius: 18px; padding: 34px 28px; position: relative; }
.pillar .num { font-family: var(--font-en); font-size: 42px; font-weight: 700; -webkit-text-stroke: 1px var(--gold); color: transparent; line-height: 1; margin-bottom: 18px; }
.pillar h3 { font-size: 19px; margin: 0 0 10px; font-weight: 700; }
.pillar p { font-size: 14.5px; line-height: 1.75; color: var(--muted-2); margin: 0; }
.pillar::after { content: ""; position: absolute; top: 40px; right: -13px; width: 26px; height: 1px; background: repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 8px); display: block; }
.pillar:last-child::after { display: none; }
.pillar:nth-child(2) .num { -webkit-text-stroke-color: var(--crimson-2); }

.mission-quote { margin-top: 64px; padding: 40px 44px; background: var(--ink); color: var(--white); border-radius: 20px; position: relative; overflow: hidden; }
.mission-quote::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 100% at 100% 0%, rgba(201,162,92,0.16), transparent), radial-gradient(50% 90% at 0% 100%, rgba(165,52,42,0.14), transparent); }
.mission-quote blockquote { margin: 0; font-size: 20px; line-height: 1.75; font-weight: 500; position: relative; z-index: 1; }
.flow { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.flow span.step { font-weight: 700; font-size: 14px; letter-spacing: 0.03em; padding: 8px 16px; border: 1px solid rgba(201,162,92,0.5); border-radius: 999px; color: var(--gold); }
.flow span.step.mid { border-color: rgba(194,74,60,0.55); color: var(--crimson-2); }
.flow span.arrow { color: var(--muted); font-size: 14px; }

/* ---------- 대표 환영메시지 ---------- */

.welcome {
  margin-top: 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  background: var(--white);
  border: 1px solid #e5e1d5;
  border-left: 4px solid var(--crimson);
  border-radius: 4px 18px 18px 4px;
  padding: 38px 40px;
}

.welcome-mark {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.welcome-mark svg { width: 26px; height: 26px; }

.welcome-eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #9a7b3f; font-weight: 700; margin-bottom: 10px; }
.welcome-body { font-size: 15.5px; line-height: 1.85; color: var(--ink-text); margin: 0 0 16px; }
.welcome-sign { font-size: 13.5px; font-weight: 700; color: var(--muted-2); }

/* ---------- 활동 / 사업 ---------- */

.activities { background: var(--ink-2); color: var(--white); }
.activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.activity-card { background: var(--ink-3); border: 1px solid var(--line); border-radius: 16px; padding: 30px; transition: border-color 0.25s ease, transform 0.25s ease; overflow: hidden; }
.activity-card:hover { border-color: rgba(201,162,92,0.45); transform: translateY(-3px); }
.activity-thumb { width: calc(100% + 60px); margin: -30px -30px 22px; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.activity-card .tag { display: inline-block; font-size: 11.5px; letter-spacing: 0.08em; color: var(--gold); background: var(--gold-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.activity-card:nth-child(odd) .tag { color: var(--crimson-2); background: var(--crimson-soft); }
.activity-card h3 { margin: 0 0 12px; font-size: 18.5px; font-weight: 700; }
.activity-card p { font-size: 14px; line-height: 1.75; color: #b7bfd1; margin: 0; }
.activity-card .meta { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.activities-empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 14px; display: none; }

/* ---------- 자료실 ---------- */

.resources { background: var(--paper); }
.resource-grid { display: grid; gap: 18px; }

.resource-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 24px; border: 1px solid #e2ddce; border-radius: 14px; background: var(--white);
}
.resource-row .rtitle { font-weight: 700; font-size: 15.5px; }
.resource-row .rdate { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.resource-row a.rlink { font-size: 13px; font-weight: 600; color: #9a7b3f; border: 1px solid #c9a25c88; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.resource-row a.rlink:hover { background: var(--gold-soft); }

.resource-video { border: 1px solid #e2ddce; border-radius: 16px; overflow: hidden; background: var(--white); }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.resource-video .rv-body { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.resource-video .rtitle { font-weight: 700; font-size: 15.5px; }
.resource-video .rdate { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.resource-video .badge { display: inline-block; font-size: 11px; letter-spacing: 0.06em; color: var(--crimson-2); background: var(--crimson-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }

.resource-doc { display: flex; align-items: center; gap: 20px; border: 1px solid #e2ddce; border-radius: 14px; background: var(--white); overflow: hidden; }
.resource-doc .doc-thumb { width: 160px; aspect-ratio: 16 / 10; object-fit: cover; flex-shrink: 0; }
.resource-doc .rd-body { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 18px 0; min-width: 0; }
.resource-doc .rtitle { font-weight: 700; font-size: 15.5px; }
.resource-doc .rdate { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.resource-doc a.rlink { font-size: 13px; font-weight: 600; color: #9a7b3f; border: 1px solid #c9a25c88; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.resource-doc a.rlink:hover { background: var(--gold-soft); }

.resources-empty { padding: 44px 4px; color: var(--muted-2); font-size: 14.5px; text-align: center; }

/* ---------- 협력 (구 후원) ---------- */

.support { background: linear-gradient(135deg, #101c33, #0b1220 60%); color: var(--white); text-align: center; }
.support .section-head { margin-left: auto; margin-right: auto; }
.support-box { max-width: 620px; margin: 0 auto; padding: 46px 40px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.03); }
.support-box p { font-size: 15.5px; line-height: 1.8; color: #c7cede; margin: 0 0 30px; }

/* ---------- 연락처 ---------- */

.contact { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-note { font-size: 15px; line-height: 1.8; color: var(--muted-2); max-width: 440px; }
.contact-card { background: var(--white); border: 1px solid #e5e1d5; border-radius: 18px; padding: 36px; }
.contact-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid #ece8dd; }
.contact-row:last-child { border-bottom: none; }
.contact-row .k { width: 88px; flex-shrink: 0; font-weight: 700; font-size: 13.5px; color: #9a7b3f; }
.contact-row .v { font-size: 15px; }
.contact-row .v a { font-weight: 600; }
.contact-row .v a:hover { color: #9a7b3f; }

/* ---------- 푸터 ---------- */

.site-footer { background: var(--ink); color: var(--muted); padding: 40px 0 30px; font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.site-footer .fbrand { color: #d7dbe6; font-weight: 700; }
.site-footer .fadmin { color: var(--muted); font-size: 12px; }
.site-footer .fadmin a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .fadmin a:hover { color: var(--gold); }

/* ---------- 반응형 ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-network { height: 280px; order: -1; }
  .pillars { grid-template-columns: 1fr; }
  .pillar::after { display: none; }
  .activity-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; }
  .resource-row, .resource-video .rv-body { flex-wrap: wrap; }
  .resource-doc { flex-direction: column; align-items: stretch; }
  .resource-doc .doc-thumb { width: 100%; aspect-ratio: 16 / 9; }
  .resource-doc .rd-body { padding: 16px 20px 20px; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .brand small { display: none; }
}

@media (max-width: 760px) {
  .nav-right { gap: 14px; }
  .main-nav { position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: rgba(9,14,26,0.98); flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 40px 36px; gap: 26px; transform: translateX(100%); transition: transform 0.35s ease; z-index: 99; }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 101; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section-pad { padding: 74px 0; }
  .mission-quote { padding: 30px 24px; }
  .welcome { padding: 28px 24px; }
}
