/* ============================================================
   global.css
   React 프로젝트 전역 스타일
   - @font-face (Pretendard, Jalnan, JejuGothic)
   - CSS 변수 (색상, 간격, 폰트)
   - Reset
   - 공통 유틸리티 클래스
   ※ index.html 또는 main.jsx 에서 import './styles/global.css' 로 불러오세요.
============================================================ */

/* ── 폰트 ── */
@font-face {
  font-family: 'Pretendard';
  font-weight: 300;
  src: url('/fonts/Pretendard-Light.woff2') format('woff2'),
       url('/fonts/Pretendard-Light.woff')  format('woff');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 400;
  src: url('/fonts/Pretendard-Regular.woff2') format('woff2'),
       url('/fonts/Pretendard-Regular.woff')  format('woff');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 500;
  src: url('/fonts/Pretendard-Medium.woff2') format('woff2'),
       url('/fonts/Pretendard-Medium.woff')  format('woff');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 600;
  src: url('/fonts/Pretendard-SemiBold.woff2') format('woff2'),
       url('/fonts/Pretendard-SemiBold.woff')  format('woff');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 700;
  src: url('/fonts/Pretendard-Bold.woff2') format('woff2'),
       url('/fonts/Pretendard-Bold.woff')  format('woff');
}
@font-face {
  font-family: 'Pretendard';
  font-weight: 800;
  src: url('/fonts/Pretendard-ExtraBold.woff2') format('woff2'),
       url('/fonts/Pretendard-ExtraBold.woff')  format('woff');
}
@font-face {
  font-family: 'Jalnan';
  font-weight: 400;
  src: url('/fonts/Jalnan.woff2') format('woff2'),
       url('/fonts/Jalnan.woff')  format('woff');
}
@font-face {
  font-family: 'JejuGothic';
  font-weight: 400;
  src: url('/fonts/JejuGothic.woff2') format('woff2'),
       url('/fonts/JejuGothic.woff')  format('woff');
}

/* ── CSS 변수 ── */
:root {
  /* 브랜드 색상 */
  --color-primary:   #3A43AC;
  --color-primary-dark: #2c3490;
  --color-green:     #3cc3a2;
  --color-orange:    #e78d22;

  /* 텍스트 */
  --color-text:      #333333;
  --color-text-muted:#666666;
  --color-text-light:#999999;

  /* 배경 */
  --color-bg:        #ffffff;
  --color-bg-gray:   #f5f5f5;
  --color-border:    #e5e5e5;

  /* 폰트 */
  --font-base:       'Pretendard', sans-serif;
  --font-jalnan:     'Jalnan', sans-serif;
  --font-jeju:       'JejuGothic', sans-serif;

  /* 컨테이너 */
  --container-max:   1500px;
  --container-pad:   15px;

  /* 반응형 브레이크포인트 (참고용) */
  --bp-mobile: 768px;
  --bp-tablet: 1024px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-break: keep-all;
}
html, body {
  max-width: 100%;
  min-height: 100%;
  font-size: 16px;
}
body {
  font-family: var(--font-base);
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-print-color-adjust: exact;
}
ul, ol, li, dl, dt, dd { list-style: none; }
a { color: var(--color-text); text-decoration: none; }
img { border: 0; max-width: 100%; display: block; }
table { border-collapse: collapse; }
input, button, textarea, select { font-family: var(--font-base); font-size: 1em; }
input[type="submit"], button { cursor: pointer; }
input { border-radius: 0; margin: 0; padding: 0; }
fieldset { margin: 0; padding: 0; border: none; }
:focus-visible { outline: 3px dotted #ff0000; }

/* ── 공통 유틸리티 ── */
/* 스킵 네비게이션 */
#skip-nav {
  position: absolute;
  left: 0; top: -1000px;
  width: 100%; height: 0;
  z-index: 1000;
}
#skip-nav a {
  display: block; text-align: center; width: 100%;
  font-size: 0; line-height: 0;
}
#skip-nav a:focus {
  position: absolute;
  left: 0; top: 1000px;
  padding: 8px 0;
  height: 42px;
  background: #000;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  line-height: 1.5;
}

/* 스크린 리더 전용 */
.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;
}

/* 텍스트 말줄임 */
.text-ellipsis-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
