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

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

/* hidden 속성은 브라우저 기본 스타일(`[hidden]{display:none}`)로 동작하는데,
   클래스에 display 를 지정하면 그게 이겨서 숨겨지지 않는다.
   실제로 위저드 2단계에서 모든 업종 그룹이 한꺼번에 노출된 적이 있다.
   앞으로 같은 실수를 막기 위해 전역에서 못박는다. */
[hidden] {
  display: none !important;
}

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-body); /* 본문은 400 — 300 은 한글에서 획이 흐려진다 */
  line-height: var(--lh-body);
  letter-spacing: 0;

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

  /* antialiased 는 획을 얇게 만든다. 라틴 300 에는 어울리지만 한글에서는
     선명도가 떨어져서 쓰지 않는다(기본 subpixel 렌더링 유지). */
  text-rendering: optimizeLegibility;

  /* 한글은 기본값(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;
  }
}
