/* 바탕 규칙 — rem 기준·리셋·body·링크·포커스. 기준: docs/design-system.md, docs/rem-convention.md
 *
 * html 을 10px 로 두어 px → rem 을 눈으로 계산한다(1.4rem = 14px).
 * 500px 이하에서는 기준값이 화면 폭에 따라 조금씩 커진다.
 * body 에 1.5rem 을 명시하는 이유: 지정하지 않은 요소가 10px 로 상속되지 않게. */
html {
  font-size: 10px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 500px) {
  html { font-size: calc(10px + 0.0266 * (100vw - 375px)); }
}

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

body,
h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

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

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* 팝업이 열려 있으면 뒤 화면 스크롤을 막는다 */
body.is-locked { overflow: hidden; }

/* hidden 속성은 display 를 준 클래스보다 앞선다 */
[hidden] { display: none !important; }

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

a { color: var(--c-brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }

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

button { cursor: pointer; }
button:disabled { cursor: default; }

:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}

/* 화면에는 안 보이고 읽기 프로그램에만 읽힌다 */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
