/* ==========================================================================
   리셋 + 폰트 + 기본 타이포
   ========================================================================== */

/* --- 웹폰트 ---------------------------------------------------------------
   Pretendard 는 jsDelivr CDN 의 가변 다이나믹 서브셋으로 불러온다.
   각 HTML 의 <head> 에 link 로 선언되어 있으며, 페이지에 실제 쓰인 글자
   조각만 내려받으므로 서버 트래픽이 발생하지 않고 로딩도 가볍다.
   CDN 장애 시에는 tokens.css 의 대체 글꼴로 자연히 넘어간다.
   ----------------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  word-break: keep-all;      /* 한글 단어 단위 줄바꿈 */
  overflow-wrap: break-word;
}

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

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

button { cursor: pointer; }

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

/* --- 헤딩 --------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { text-wrap: pretty; }

strong { font-weight: 700; color: var(--ink-900); }

/* --- 링크 --------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

a:hover { color: var(--pink-800); }

/* --- 포커스 (제거 금지) -------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* 하이픈이 들어간 번호(사업자등록번호 등)가 중간에서 끊기지 않게 */
.nowrap { white-space: nowrap; }

/* --- 브랜드 워드마크 ------------------------------------------------------
   CI 의 색 분할 표기(한국 / 실 / 버 / 아트 / 케어).
   브랜드 원색은 밝아서 흰 배경 위 대비가 2:1 수준밖에 안 나온다.
   그래서 어두운 배경(푸터)에서만 원색을 쓰고, 밝은 배경에서는
   같은 계열의 진한 단계를 쓴다. 헤더는 17px 로 작아 먹색으로 통일한다.
   -------------------------------------------------------------------- */
.wm-ink   { color: var(--ink-900); }
.wm-white { color: #fff; }

/* 어두운 배경 위 - CI 원색 그대로 (푸터 기준 7.9 - 8.4:1) */
.footer .wm-green { color: var(--brand-green); }
.footer .wm-pink  { color: var(--brand-pink); }
.footer .wm-blue  { color: var(--brand-blue); }

/* 밝은 배경 위 - 같은 계열 진한 단계 */
.wm-green { color: var(--green-900); }
.wm-pink  { color: var(--pink-700); }
.wm-blue  { color: var(--blue-800); }

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 999;
  padding: var(--space-3) var(--space-5);
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--r-pill);
  transition: top var(--dur-fast) ease;
}

.skip-link:focus {
  top: var(--space-4);
  color: #fff;
}

/* --- 모션 축소 요청 존중 ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
