/* ==========================================================================
   HAKUSHI — Base / Reset
   미니멀 리셋 + 타이포 기본값.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* scroll-snap-type 제거 — 자동으로 섹션이 화면에 붙는 동작이 오히려 거슬림. */
  /* 스크롤바 자리 항상 예약 — 라이트박스·모바일 메뉴 열 때 overflow:hidden으로
     스크롤바가 사라지며 콘텐츠·고정헤더가 가로로 밀리는 깜빡임 방지 */
  scrollbar-gutter: stable;
}

body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  /* kerning + 한글 break 정상 + Pretendard ss01 */
  font-feature-settings: "ss01", "kern", "calt";
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  /* 세리프 디스플레이용 — discretionary ligatures + old-style numbers */
  font-feature-settings: "kern", "dlig", "liga", "onum";
}

p {
  max-width: 60ch;
}

/* Selection */
::selection {
  background: var(--color-fg);
  color: var(--color-bg);
}

/* 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;
  }
}

/* Utility — visually hidden */
.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;
}

/* Skip to main content — 키보드 첫 탭에 노출 */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  background: var(--color-fg);
  color: var(--color-bg);
  padding: 12px 18px;
  font-size: var(--fs-body-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  transform: translateY(-110%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* Focus-visible — 키보드 사용자에게 명확한 포커스 링 */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--content {
  max-width: var(--container-content);
}

.container--narrow {
  max-width: var(--container-narrow);
}
