/* ==========================================================================
   KEYWORK v4 - CSS Reset & Base Styles
   ========================================================================== */

/* Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset Margins */
* {
    margin: 0;
    padding: 0;
}

/* HTML & Body */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    /* 푸터를 항상 하단에 배치하기 위한 flex 레이아웃 */
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-bottom: var(--spacing-4);
}

a {
    color: var(--color-primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-600);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form Elements */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Misc */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-6) 0;
}

/* Selection */
::selection {
    background-color: var(--color-primary-100);
    color: var(--color-primary-700);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}
