/* 전역 reset + Pretendard 폰트 로딩 + 기본 타이포그래피 (레이아웃·컴포넌트 금지) */

/* =========================================================
   Pretendard Variable — dynamic subset (WOFF2)
   ========================================================= */
@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/packages/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.woff2')
    format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   박스 모델 초기화
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================================================
   HTML / Body 기본값
   ========================================================= */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =========================================================
   미디어 요소
   ========================================================= */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* =========================================================
   폼 요소 폰트 상속
   ========================================================= */
input,
button,
textarea,
select {
  font: inherit;
}

/* =========================================================
   숫자 전용 — tabular-nums 전역 적용
   ========================================================= */
.number,
input[type='number'],
input[type='tel'],
.result-value,
.stat-value {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* =========================================================
   링크 기본값
   ========================================================= */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================================================
   리스트 초기화
   ========================================================= */
ul,
ol {
  list-style: none;
}

/* =========================================================
   제목 계층
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

/* =========================================================
   포커스 스타일 — 접근성
   ========================================================= */

/* 마우스 클릭 시 outline 제거 */
:focus:not(:focus-visible) {
  outline: none;
}

/* 키보드 탐색 시 명확한 포커스 링 표시 */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   버튼 초기화
   ========================================================= */
button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

/* =========================================================
   표 초기화
   ========================================================= */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* =========================================================
   구분선 초기화
   ========================================================= */
hr {
  border: none;
  border-top: 1px solid var(--color-border-default);
}

/* =========================================================
   모션 감소 접근성 (prefers-reduced-motion)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
