/* =========================================================
   reset.css
   브라우저마다 다른 기본 스타일을 정리하고,
   어떤 사이트에서든 공통으로 필요한 기본값만 지정한다.
   (색상, 폰트, 크기 등 디자인 값은 site.css 에서 지정)
   ========================================================= */

/* 1. 크기 계산 방식 통일: padding, border 를 너비에 포함 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. 기본 여백 제거 */
* {
    margin: 0;
}

/* 3. 문서 기본 설정 */
html {
    -webkit-text-size-adjust: 100%;  /* 모바일 가로 회전 시 글자 크기 자동 확대 방지 */
    text-size-adjust: 100%;
    hanging-punctuation: first last;
}

/* 앵커 이동 시 부드럽게 스크롤 (동작 줄이기 설정 사용자는 제외) */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 4. 제목: 줄바꿈을 균형 있게, 줄 간격은 본문보다 좁게 */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.25;
    text-wrap: balance;
}

/* 5. 본문: 마지막 줄에 단어 하나만 남는 것 방지, 긴 단어·URL 줄바꿈 */
p, li, figcaption, blockquote, dd {
    text-wrap: pretty;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* 6. 이미지·미디어: 부모보다 커지지 않게, 아래쪽 빈틈 제거 */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

img, video {
    height: auto;
}

/* 이미지를 불러오지 못했을 때 alt 글자를 기울임으로 구분 */
img {
    font-style: italic;
}

/* 7. 폼 요소: 브라우저 기본 폰트 대신 페이지 폰트 사용 */
input, button, textarea, select {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

/* 텍스트 입력 영역은 세로로만 크기 조절 */
textarea {
    resize: vertical;
}

/* 8. 링크: 밑줄이 글자 아래 획과 겹치지 않게 */
a {
    color: inherit;
    text-decoration: inherit;
    text-decoration-skip-ink: auto;
}

/* 9. 목록: 클래스가 있는 목록(메뉴 등)만 기호 제거
   ※ 게시글 본문처럼 클래스 없는 목록은 기호 유지 */
ul,
ol {
    list-style: none;
    padding: 0;
}

/* 10. 표: 칸 사이 간격 제거 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 11. 키보드 사용자를 위한 포커스 표시
   (마우스 클릭 시에는 표시하지 않고, Tab 이동 시에만 표시) */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* 12. 앵커(#id)로 이동했을 때 고정 header 에 가려지지 않게 */
:target {
    scroll-margin-top: 5rem;
}

/* 13. hidden 속성이 CSS 에 덮어써지지 않도록 보장 */
[hidden] {
    display: none !important;
}

/* 14. 동작 줄이기 설정 사용자: 애니메이션·전환 효과 최소화 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 기타 추가 내용 */
em,
address,
i {
    font-style: normal;
}


