/* base.css — 리셋·서체·링크·포커스. 부품 모양은 components.css */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-ko);
  color: var(--color-text-body);
  background: var(--color-surface);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea, [role="combobox"] { touch-action: manipulation; -webkit-tap-highlight-color: rgba(91, 56, 215, .15); }
h1, h2, h3 { text-wrap: balance; }
/* 고정 머리말 아래로 앵커가 숨지 않게 */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
main:focus { outline: none; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: var(--space-4);
  top: -100px;
  z-index: calc(var(--z-tooltip) + 1);
  padding: var(--space-3) var(--space-4);
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
