/* =====================================================
   reset.css - @font-face Pretendard + Base Reset
   ===================================================== */

/* ─── Pretendard Font Face ─── */
@font-face {
  font-family: 'Pretendard';
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Thin.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Thin.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-ExtraLight.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-ExtraLight.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Light.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Light.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Regular.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Medium.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Medium.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-SemiBold.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-SemiBold.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Bold.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Bold.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-ExtraBold.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-ExtraBold.woff') format('woff');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/woff2/Pretendard-Black.woff2') format('woff2'),
       url('/fonts/woff/Pretendard-Black.woff') format('woff');
}

/* ─── Box Sizing ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ─── Base Reset ─── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography Reset ─── */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

p {
  margin: 0 0 var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* ─── Link Reset ─── */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ─── List Reset ─── */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ─── Media Reset ─── */
img, svg, video {
  display: block;
  max-width: 100%;
}

/* ─── Form Reset ─── */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input, textarea, select {
  outline: none;
}

/* 키보드 포커스 가시화 — 마우스 클릭에는 나타나지 않고 Tab 이동에만 표시 */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.form-control:focus-visible {
  outline: none; /* .form-control은 자체 focus 스타일(테두리+섀도) 사용 */
}

/* 모션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Table Reset ─── */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* ─── HR ─── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ─── Selection ─── */
::selection {
  background-color: var(--color-primary-pale);
  color: var(--color-primary-dark);
}
