/* ==========================================================================
   Issue Insight 카드뉴스 아카이브 — 전역 스타일
   design_handoff_issue_insight_site/design-tokens 를 정본으로 삼아 옮긴 값.
   외부 CDN을 호출하지 않는다 (PRD 7.3 상속). 폰트는 ./fonts/ 에서 self-host.
   ========================================================================== */

/* ── 폰트 (self-host) ───────────────────────────────────────────────────────
   fonts/ 폴더가 비어 있으면 아래 @font-face는 조용히 실패하고
   font-family 스택의 시스템 폰트로 폴백한다. 파일을 넣으면 자동 적용된다.
   → node scripts/fetch-fonts.mjs 로 내려받을 수 있다.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/PretendardVariable.woff2") format("woff2-variations");
}

:root {
  /* 서체 — 전 요소 프리텐다드 하나로 통일 */
  --font-sans: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo",
    "Noto Sans KR", "맑은 고딕", "Malgun Gothic", -apple-system, "Segoe UI", sans-serif;

  /* 색 — 광주연구원 디자인시스템에서 이 사이트가 실제로 쓰는 값만 */
  --navy-700: #163359; /* 제호 · 섹션 룰 · CTA 배경 */
  --blue-900: #1b2e52; /* 제목 · 라벨 · 인물명 · 링크 */
  --blue-600: #375ca6; /* 인용문 · 번호 · 강조 */
  --blue-100: #e2e8f4; /* 구분선 · 푸터 배경 */
  --blue-50:  #f1f4fa; /* 페이지 배경 */
  --gray-0:   #ffffff; /* 지면 */
  --gray-600: #595959; /* 보조 텍스트 (AA 확보선) */
  --ph:       #a0a0a0; /* 사진 자리표시자 */

  --ink:      rgba(0, 0, 0, 0.8);
  --ink-mute: rgba(0, 0, 0, 0.65);
  --ink-soft: rgba(0, 0, 0, 0.6);
  --ink-dim:  rgba(0, 0, 0, 0.35);

  /* 형태 */
  --r-card: 16px;
  --r-photo: 12px;
  --r-cta: 14px;

  /* 컨테이너 */
  --w-narrow: 1080px; /* 단일 열 페이지 */
  --w-wide: 1240px;   /* 헤더 · 푸터 · 상세 2열 */
  --pad-x: 32px;

  --header-h: 74px;

  /* 모션 — 값은 여기 하나로 관리한다 */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── 리셋 ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--blue-50);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: -0.015em;
  /* 가로 스크롤 금지 (핸드오프 Interactions) */
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { font-weight: 700; color: var(--navy-700); margin: 0; letter-spacing: -0.025em; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }

a {
  color: var(--blue-900);
  text-decoration: none;
  transition: color 0.16s ease;
}
a:hover { color: var(--blue-600); }

/* 평소 색이 이미 --blue-600 이라 색 변화로는 호버가 보이지 않는 링크들 */
.sec-head__aside:hover,
.issue-index__more:hover,
.person__link:hover,
.issue-nav__mid:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 포커스 링은 유지한다 (접근성) */
:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    /* 이동·확대만 제거한다. 색·불투명도 전환은 어지럼을 유발하지 않으므로 남긴다. */
    transition-property: color, background-color, border-color, outline-color, opacity !important;
    transform: none !important;
  }
}

/* 스크린리더 전용 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.mono { font-variant-numeric: tabular-nums; }

/* ── 컨테이너 ────────────────────────────────────────────────────────────── */
.wrap      { max-width: var(--w-narrow); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.wrap-wide { max-width: var(--w-wide);   margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ── 전역 헤더 ──────────────────────────────────────────────────────────── */
.site-header {
  background: var(--gray-0);
  border-bottom: 1px solid var(--blue-100);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .brand:hover { opacity: 0.72; }
}
.brand__logo { height: 48px; width: auto; }

.gnb { display: flex; gap: 34px; font-size: 15px; font-weight: 500; }
.gnb a {
  color: var(--blue-900);
  padding: 26px 0 24px;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.gnb a[aria-current="page"] { border-bottom-color: var(--navy-700); }
@media (hover: hover) and (pointer: fine) {
  .gnb a:hover:not([aria-current="page"]) { border-bottom-color: var(--blue-100); }
}

@media (max-width: 720px) {
  :root { --pad-x: 20px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 14px; }
  .gnb { gap: 20px; font-size: 14px; width: 100%; }
  .gnb a { padding: 12px 0 10px; }
}

/* ── 전역 푸터 ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--blue-100); border-top: 1px solid rgba(27, 46, 82, 0.25); }
.site-footer__inner {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 24px; padding-top: 32px; padding-bottom: 32px;
  font-size: 14px; color: var(--blue-900);
}
.site-footer__copy { color: rgba(27, 46, 82, 0.6); }

/* ── 섹션 헤더 (제목 + 우측 캡션 + 하단 룰) ───────────────────────────────── */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--navy-700);
}
.sec-head h2 { font-size: 27px; }
.sec-head__aside { font-size: 14px; color: var(--blue-600); white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════════════
   홈
   ══════════════════════════════════════════════════════════════════════════ */
.hero { background: var(--gray-0); border-bottom: 1px solid var(--blue-100); }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}
/* no-preference 안에 두는 것이 핵심 — 감축 모션에서는 애니메이션 자체가
   선언되지 않아 콘텐츠가 처음부터 그냥 보인다. opacity:0 에 갇히지 않는다.
   fill-mode 는 backwards — forwards 로 두면 끝난 뒤에도 키프레임이
   transform 을 붙들어 .cta 의 :active scale 을 덮어쓴다. */
@media (prefers-reduced-motion: no-preference) {
  .hero__meta,
  .hero h1,
  .hero__lead,
  .hero .cta { animation: rise 300ms var(--ease-out) backwards; }

  .hero__meta { animation-delay: 0ms; }
  .hero h1    { animation-delay: 40ms; }
  .hero__lead { animation-delay: 80ms; }
  .hero .cta  { animation-delay: 120ms; }
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 1fr);
  gap: 64px; align-items: center;
  padding: 80px 0;
}
.hero__meta { font-size: 15px; color: var(--blue-600); }
.hero h1 { margin-top: 20px; font-size: 44px; line-height: 1.24; text-wrap: pretty; }
.hero__lead { margin-top: 24px; max-width: 44ch; font-size: 17px; line-height: 1.8; }
.hero__photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-card); }

.cta {
  display: inline-block; margin-top: 32px;
  padding: 14px 28px;
  background: var(--navy-700); color: var(--gray-0);
  border-radius: var(--r-cta);
  font-size: 16px; font-weight: 600;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.cta:hover { background: var(--blue-900); color: var(--gray-0); }
.cta:active { transform: scale(0.98); }

.home-list { padding-top: 80px; }
/* 번호 / 인물 / 핵심요지 */
.gist-row {
  display: grid; grid-template-columns: 48px 180px minmax(0, 1fr);
  gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--blue-100);
}
.gist-row__no   { font-size: 15px; color: var(--blue-600); }
.gist-row__name { font-size: 17px; font-weight: 600; color: var(--blue-900); }
.gist-row__gist { font-size: 16px; line-height: 1.7; }

/* 분야 진입구 — 홈에서 분야 페이지로 건너뛰는 자리 */
.home-topics { padding-top: 72px; }
.topic-row {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) 56px;
  gap: 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--blue-100);
}
.topic-row__name  { font-size: 17px; font-weight: 600; color: var(--blue-900); }
.topic-row__desc  { font-size: 15px; line-height: 1.7; color: var(--ink-mute); }
.topic-row__count { font-size: 14px; color: var(--blue-600); text-align: right; }

.home-past { padding-top: 72px; padding-bottom: 96px; }
.past-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px; padding-top: 32px;
}
/* 경계는 테두리 하나만 — 그림자 없음 (DESIGN.md) */
.past-card {
  display: block; background: var(--gray-0);
  border: 1px solid var(--blue-100); border-radius: var(--r-card);
  padding: 28px 32px;
}
.past-card { transition: border-color 160ms ease, transform 140ms var(--ease-out); }
.past-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .past-card:hover { border-color: var(--blue-600); }
}
.past-card__vol   { font-size: 14px; color: var(--blue-600); }
.past-card__title { margin-top: 10px; font-size: 21px; font-weight: 700; color: var(--navy-700); letter-spacing: -0.02em; }
.past-card__meta  { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; padding: 56px 0; }
  .hero h1 { font-size: 34px; }
  .home-list { padding-top: 56px; }
  .gist-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 16px; }
  .gist-row__gist { grid-column: 2; }
  .home-topics { padding-top: 56px; }
  .topic-row { grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 16px; }
  .topic-row__desc { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   호별 상세 — 좌측 고정 인덱스 + 우측 본문 (B안)
   ══════════════════════════════════════════════════════════════════════════ */
.issue {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(320px, 1fr);
  gap: 56px; align-items: start;
}

.issue-index { position: sticky; top: calc(var(--header-h) + 32px); padding: 56px 0; }
.issue-index__vol  { font-size: 15px; color: var(--blue-600); }
.issue-index__span { margin-top: 16px; font-size: 14px; line-height: 1.7; color: var(--ink-mute); }
.issue-index__list { margin-top: 32px; border-top: 1px solid var(--navy-700); }
.issue-index__list li { border-bottom: 1px solid var(--blue-100); }
.issue-index__list a {
  display: grid; grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px; padding: 14px 0; align-items: baseline;
}
.issue-index__no    { font-size: 13px; color: var(--blue-600); }
.issue-index__name  { font-size: 15px; font-weight: 600; color: var(--blue-900); transition: color 160ms ease; }
.issue-index__list a:hover .issue-index__name { color: var(--blue-600); }
.issue-index__topic { display: block; margin-top: 4px; font-size: 13px; color: rgba(0, 0, 0, 0.55); }
.issue-index__more  { display: inline-block; margin-top: 28px; font-size: 14px; color: var(--blue-600); }

.issue-body { padding: 56px 0 96px; }

/* 카드 — 배경 박스 없이 가로 구분선으로 경계 */
.card {
  padding-bottom: 56px; margin-bottom: 56px;
  border-bottom: 1px solid var(--blue-100);
  /* sticky 헤더에 가리지 않도록 */
  scroll-margin-top: 106px;
}
.card__grid {
  display: grid; grid-template-columns: minmax(300px, 1fr) minmax(150px, 180px);
  gap: 32px; align-items: start;
}
.card__topics { font-size: 14px; color: var(--blue-600); }
.card__topics a { color: var(--blue-600); }
.card__topics a:hover { text-decoration: underline; }
.card__sep { color: rgba(0, 0, 0, 0.4); }
.card__title {
  display: block; margin-top: 12px;
  font-size: 28px; line-height: 1.35; letter-spacing: -0.025em;
  font-weight: 700; color: var(--blue-900);
}
.card__quote {
  margin: 24px 0 0; padding-left: 20px;
  border-left: 2px solid var(--blue-600);
  font-size: 22px; line-height: 1.6; letter-spacing: -0.02em;
  font-weight: 600; color: var(--blue-600);
}
.field { margin-top: 28px; }
.field__label { font-size: 15px; font-weight: 700; color: var(--blue-900); }
.field__text  { margin-top: 8px; font-size: 16px; line-height: 1.8; }
.field-pair {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.field-pair .field { margin-top: 0; }

.person__photo {
  width: 100%; aspect-ratio: 9 / 10;
  background: var(--ph); border-radius: var(--r-photo);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-0); font-size: 13px; text-align: center;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-photo); }
/* 사진 대신 소속 기관 로고 — 자르지 않고 여백을 두어 가운데 놓는다 */
.person__photo--logo { background: var(--gray-0); border: 1px solid var(--blue-100); }
.person__photo--logo img { object-fit: contain; padding: 16%; box-sizing: border-box; }
.person__name   { margin-top: 14px; font-size: 18px; font-weight: 600; color: var(--blue-900); }
.person__role   { margin-top: 4px; font-size: 14px; color: var(--ink-mute); }
/* 출처를 '발언 원문' · '배경 뉴스' · 사진 순으로 세로로 쌓는다 — 링크 수와 상관없이 같은 모양 */
.person__links {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 12px; margin-top: 14px;
}
.person__group { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.person__label { font-size: 12px; font-weight: 700; color: var(--blue-900); }
.person__link   { font-size: 13px; color: var(--blue-600); }
.person__source { font-size: 13px; color: var(--gray-600); }
.person__source--tbd { color: var(--ink-dim); }
.person__link--off   { color: var(--ink-dim); }

/* 이번 호 요약 */
.recap {
  background: var(--gray-0); border: 1px solid var(--blue-900);
  border-radius: var(--r-card); padding: 8px 32px;
}
.recap__row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--blue-100);
}
.recap__row:last-child { border-bottom: 0; }
.recap__no { font-size: 15px; color: var(--blue-600); transition: color 160ms ease; }
.recap__row:hover .recap__no { color: var(--navy-700); }
.recap__text { font-size: 16px; line-height: 1.7; }

/* 호 이동 */
.issue-nav {
  margin-top: 56px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; border-top: 1px solid var(--blue-100);
}
.issue-nav__side { font-size: 16px; font-weight: 600; color: var(--blue-900); }
.issue-nav__mid  { font-size: 15px; color: var(--blue-600); }
.issue-nav__off  { font-size: 16px; color: var(--ink-dim); }

@media (max-width: 900px) {
  .issue { grid-template-columns: 1fr; gap: 0; }
  .issue-index { position: static; padding: 40px 0 0; }
  .issue-body { padding-top: 40px; }
  .card__grid { grid-template-columns: 1fr; gap: 24px; }
  /* 모바일에서는 인물이 먼저 — 누가 한 말인지 즉시 확인 (PRD 5.2 정보 위계).
     사진을 4행에 걸치게 해서 이름·직책·출처·원문이 오른쪽 한 열로 쌓이게 한다. */
  .card__person {
    order: -1;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    column-gap: 16px;
    align-content: start;
  }
  .card__person .person__photo { grid-row: 1 / span 3; align-self: start; }
  .card__person .person__name { margin-top: 0; }
  .card__title { font-size: 24px; }
  .card__quote { font-size: 19px; }
  .recap { padding: 8px 20px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   아카이브
   ══════════════════════════════════════════════════════════════════════════ */
.page-head { padding-top: 72px; }
.page-head h1 { font-size: 38px; line-height: 1.2; }
.page-head__lead { margin-top: 16px; font-size: 16px; line-height: 1.8; max-width: 60ch; }

.archive { margin-top: 48px; border-top: 1px solid var(--navy-700); padding-bottom: 96px; }
/* 행은 처음부터 조밀하게 — 20호까지 견뎌야 한다 */
.archive__row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 140px;
  gap: 32px; padding: 32px 0;
  border-bottom: 1px solid var(--blue-100); align-items: start;
}
.archive__vol   { font-size: 17px; color: var(--navy-700); }
.archive__date  { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.archive__title { font-size: 21px; font-weight: 700; color: var(--navy-700); letter-spacing: -0.02em; }
.archive__people{ margin-top: 12px; font-size: 15px; line-height: 1.9; color: rgba(0, 0, 0, 0.75); }
.archive__tags  { margin-top: 10px; font-size: 14px; color: var(--blue-600); }
.archive__go    { font-size: 15px; font-weight: 600; color: var(--blue-900); text-align: right; }
.archive__off   { font-size: 15px; color: var(--ink-dim); text-align: right; }

@media (max-width: 780px) {
  .archive__row { grid-template-columns: 1fr; gap: 12px; }
  .archive__go, .archive__off { text-align: left; }
}

/* ══════════════════════════════════════════════════════════════════════════
   분야별
   ══════════════════════════════════════════════════════════════════════════ */
/* pill chip 금지 — 텍스트 링크 + 밑줄 활성 표시 (DESIGN.md) */
.topic-tabs {
  margin-top: 40px; display: flex; gap: 28px; flex-wrap: wrap;
  padding-bottom: 0; border-bottom: 1px solid var(--navy-700);
  font-size: 16px; font-weight: 500;
}
.topic-tabs a {
  color: var(--blue-900); padding-bottom: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 160ms ease, border-color 160ms ease;
}
.topic-tabs a[aria-current="page"] { border-bottom-color: var(--navy-700); }
@media (hover: hover) and (pointer: fine) {
  .topic-tabs a:hover:not([aria-current="page"]) { border-bottom-color: var(--blue-100); }
}

.topic {
  margin-top: 48px; padding-bottom: 96px;
  display: grid; grid-template-columns: minmax(240px, 300px) minmax(320px, 1fr);
  gap: 56px; align-items: start;
}
.topic__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-card); background: var(--blue-100); }
.topic__name { margin-top: 24px; font-size: 27px; }
.topic__desc { margin-top: 12px; font-size: 15px; line-height: 1.8; color: rgba(0, 0, 0, 0.7); }
.topic__count { font-size: 15px; color: var(--blue-600); padding-bottom: 14px; border-bottom: 1px solid var(--navy-700); }
.topic__row {
  display: grid; grid-template-columns: 64px minmax(92px, 130px) minmax(0, 1fr);
  gap: 20px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--blue-100);
}
.topic__vol  { font-size: 14px; color: var(--blue-600); }
.topic__name-cell { font-size: 16px; font-weight: 600; color: var(--blue-900); }
.topic__gist { font-size: 15px; line-height: 1.7; }
.topic__empty { padding: 32px 0; font-size: 16px; line-height: 1.8; color: var(--ink-mute); }

@media (max-width: 860px) {
  .topic { grid-template-columns: 1fr; gap: 32px; }
  .topic__row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px 16px; }
  .topic__gist { grid-column: 2; }
}

/* ══════════════════════════════════════════════════════════════════════════
   소개
   ══════════════════════════════════════════════════════════════════════════ */
.about {
  margin-top: 48px; padding-bottom: 96px;
  display: grid; grid-template-columns: minmax(320px, 1fr) minmax(280px, 360px);
  gap: 64px; align-items: start;
}
.about__col { display: flex; flex-direction: column; gap: 40px; }
.about h2 { font-size: 24px; }
.about__text { margin-top: 12px; font-size: 17px; line-height: 1.85; }
.about__steps { margin-top: 16px; padding-left: 22px; font-size: 16px; line-height: 1.9; text-wrap: pretty; }
.about__topics { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.8; }
.about__topic-name { font-weight: 600; color: var(--blue-900); }

.about__aside {
  background: var(--gray-0); border: 1px solid var(--blue-100);
  border-radius: var(--r-card); padding: 32px;
}
.about__label { font-size: 15px; font-weight: 700; color: var(--blue-900); }
.about__label + div { margin-top: 10px; font-size: 16px; line-height: 1.8; }
.about__label:not(:first-child) { margin-top: 28px; }
.about__tbd { color: rgba(0, 0, 0, 0.55); }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .page-head h1 { font-size: 30px; }
}

/* 404 — 버튼과 보조 링크 */
.nf-links {
  margin-top: 28px; padding-bottom: 96px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
}
.nf-links .cta { margin-top: 0; }
.nf-links__alt { font-size: 15px; color: var(--blue-600); }

/* ── 터치 영역 44×44 확보 (접근성) ───────────────────────────────────────── */
@media (pointer: coarse) {
  .gnb a, .issue-index__list a, .recap__row, .topic-tabs a { min-height: 44px; }
}
