/* ==========================================================================
   02-base.css — 리셋 & 전역 기본 스타일
   ========================================================================== */

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

* { margin: 0;}

/* html 기준 폰트 크기는 GP 타이포그래피의 'HTML' 요소가 담당한다.
   (전체 타입 스케일이 rem 으로 비례 조절됨) */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;}

body {
  /* 폰트 패밀리/크기/굵기/행간/글자색/배경색은 GeneratePress 타이포그래피와
     글로벌 컬러(사용자 정의 > 타이포그래피 / 색상)가 담당한다. 여기 다시
     정의하지 않는다. 폰트 교체는 외모 > 폰트 라이브러리에서. */
  word-break: keep-all;        /* 한글 단어 단위 줄바꿈 */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;}

img, svg, video { display: block; max-width: 100%; height: auto;}
img { border-style: none;}

input, button, textarea, select { font: inherit; color: inherit; margin: 0;}
button { cursor: pointer; background: none; border: none; padding: 0;}
button:disabled { cursor: not-allowed; opacity: 0.5;}

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

/* 링크 색상/밑줄은 GP가 담당한다. (사용자 정의 > 색상 > 본문 링크 색,
   underline_links 설정) — 컴포넌트 링크(.nav-link 등)는 각자 클래스로 덮는다. */
a {
  -webkit-tap-highlight-color: transparent;}

/* 제목 굵기/패밀리는 GP 타이포그래피 '모든 제목' 요소가 담당한다. */
h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  overflow-wrap: break-word;}

figure { margin: 0;}
address { font-style: normal;}

/* --- 접근성: 키보드 포커스 --- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);}

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

/* --- 상세페이지 본문 공통 타이포 (.article-body) ---
   WordPress 블록 에디터의 h2/h3/p/figure 가 그대로 대응되도록
   태그 셀렉터로만 제어 (인라인 스타일 없음) */
.article-body {
  /* 폰트 크기/행간/색상은 GP 타이포그래피 '본문' 요소와 색상 패널이 담당한다 */}

/* 아래 규칙들의 .editor-styles-wrapper 별칭 = 포스트 블록 에디터 캔버스.
   프론트의 .article-body 래퍼와 동일한 단락/헤딩/인용 여백을 에디터에서도
   그대로 보여 준다 (프론트엔드에는 해당 클래스가 없어 무효 — 단일 소스). */

.article-body p,
.editor-styles-wrapper p {
  margin: 24px 0 8px;}

.article-body h2,
.article-body h3,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3 {
  /* 크기/행간/색상은 GP 타이포그래피 '제목 2/3' 요소가 담당한다.
     색상은 글로벌 컬러 Contrast(--contrast)를 따른다 */
  margin: 24px 0 4px;}

.article-body h2:first-child,
.article-body h3:first-child,
.article-body > p:first-child,
.editor-styles-wrapper > :first-child { margin-top: 0;}

.article-body figure,
.editor-styles-wrapper figure {
  margin: 24px 0 8px;
  text-align: center;}

.article-body figure img,
.editor-styles-wrapper figure img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 0 auto;}

.article-body figcaption,
.editor-styles-wrapper figcaption {
  margin-top: 8px;
   color: var(--text-tertiary);}

.article-body a,
.editor-styles-wrapper .wp-block-post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;}

.article-body ul,
.article-body ol,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  margin: 24px 0 8px;
  padding-left: 20px;}
.article-body ul li,
.editor-styles-wrapper ul:not(.block-editor-block-list__layout) li { list-style: disc;}
.article-body ol li,
.editor-styles-wrapper ol:not(.block-editor-block-list__layout) li { list-style: decimal;}
.article-body li + li,
.editor-styles-wrapper li + li { margin-top: 6px;}

.article-body blockquote,
.editor-styles-wrapper blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 3px solid var(--border-medium);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-body);}
