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

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

* { margin: 0; }

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

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-loose);
  color: var(--text-strong);
  background-color: var(--bg-default);
  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; }

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
a:hover { text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  word-break: keep-all;
  overflow-wrap: break-word;
}

figure { margin: 0; }
address { font-style: normal; }
strong, b { font-weight: var(--fw-bold); }

/* --- 접근성: 키보드 포커스 --- */
: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 {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-loose);
  color: var(--text-strong);
}

.article-body p {
  margin: 24px 0 8px;
}

.article-body h2,
.article-body h3 {
  color: var(--text-heading);
  line-height: var(--lh-loose);
  margin: 24px 0 4px;
}
.article-body h2 { font-size: 27px; }
.article-body h3 { font-size: 24px; }

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

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

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

.article-body figcaption {
  margin-top: 8px;
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

.article-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
  margin: 24px 0 8px;
  padding-left: 20px;
}
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body li + li { margin-top: 6px; }

.article-body 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);
}
