/* ============================================================================
 * base.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) + 16px);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-2);
  background-color: var(--bg-1);
  background-image: var(--gradient-aurora);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

/* 페이지 하단까지 은은한 노이즈/비네팅 느낌 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, transparent 40%, rgba(0,0,0,.45) 100%);
  z-index: 0;
}

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

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

button { cursor: pointer; background: none; border: none; }

a {
  color: var(--text-1);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--brand-3); }

/* ----- 타이포 ----- */
h1, h2, h3, h4 {
  color: var(--text-1);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -.02em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
p { line-height: var(--lh-normal); }

strong { color: var(--text-1); font-weight: var(--fw-semibold); }

ul, ol { padding-left: 1.25em; }
li { margin-bottom: var(--space-2); }

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-2);
  padding: .15em .4em;
  border-radius: var(--radius-sm);
  color: var(--brand-3);
}

hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: var(--space-6) 0;
}

::selection {
  background: rgba(236,72,153,.35);
  color: #fff;
}

/* 포커스 접근성 */
:focus-visible {
  outline: 2px solid var(--brand-3);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 스크롤바 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }

/* 유틸리티: 스크린리더 전용 */
.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;
}
