/* ==========================================================================
   base.css — reset + 전역 타이포. body 에 ss01 을 켜는 것이 이 파일의 핵심.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-ink); /* 본문은 순수 검정이 아닌 딥네이비 */
  font-family: var(--font-sans);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-thin);
  line-height: var(--lh-body);
  letter-spacing: 0;

  /* 전역 ss01 — DESIGN-stripe.md 의 "Apply ss01 globally on the body" */
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* 한글은 기본값(normal)이면 단어 중간에서 줄이 끊긴다.
     keep-all 로 어절 단위 줄바꿈을 강제하고, 긴 URL 등만 예외로 쪼갠다. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--fw-thin); /* 디스플레이는 항상 300 */
  color: var(--c-ink);
  /* 제목은 줄 길이를 고르게 — 마지막 줄에 한 어절만 남는 것을 막는다 */
  text-wrap: balance;
}

p {
  margin: 0;
  /* 마지막 줄에 한 어절만 떨어지는 것을 방지 */
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

strong,
b {
  font-weight: var(--fw-regular);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-hairline);
  margin: 0;
}

::selection {
  background: var(--c-primary-subdued);
  color: var(--c-primary-press);
}

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 숫자 · 금액 셀 — tnum. 브랜드의 금융 데이터 시그니처. */
.t-num,
time,
.tabular {
  font-size: var(--fs-body-tabular);
  letter-spacing: var(--ls-body-tabular);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
