/* ========================================
   CSS RESET - 모던 브라우저 호환성
   ======================================== */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: var(--line-height-normal);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-neutral-900);
  background-color: var(--color-neutral-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   BASE TYPOGRAPHY - 기본 타이포그래피
   ======================================== */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

/* Paragraphs */
p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
  color: var(--color-neutral-700);
}

/* Links */
a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-duration-200) var(--transition-timing-function-ease);
}

a:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  line-height: var(--line-height-relaxed);
}

/* Blockquotes */
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-primary-500);
  background-color: var(--color-primary-50);
  font-style: italic;
  border-radius: var(--border-radius-lg);
}

/* Code */
code {
  font-family: var(--font-family-mono);
  background-color: var(--color-neutral-100);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
}

pre {
  background-color: var(--color-neutral-900);
  color: var(--color-neutral-100);
  padding: var(--space-4);
  border-radius: var(--border-radius-lg);
  overflow-x: auto;
  margin: var(--space-4) 0;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* ========================================
   BASE FORMS - 기본 폼 스타일
   ======================================== */

/* Form elements */
input,
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width-1) solid var(--color-neutral-300);
  border-radius: var(--border-radius-lg);
  background-color: var(--color-neutral-50);
  transition: all var(--transition-duration-200) var(--transition-timing-function-ease);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-100);
  background-color: var(--color-neutral-50);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-neutral-500);
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: all var(--transition-duration-200) var(--transition-timing-function-ease);
}

button:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ========================================
   BASE LAYOUT - 기본 레이아웃
   ======================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Section spacing */
section {
  padding: var(--space-16) 0;
}

/* ========================================
   UTILITY CLASSES - 유틸리티 클래스
   ======================================== */

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text colors */
.text-primary { color: var(--color-primary-600); }
.text-accent { color: var(--color-accent-600); }
.text-success { color: var(--color-success-600); }
.text-warning { color: var(--color-warning-600); }
.text-error { color: var(--color-error-600); }
.text-neutral { color: var(--color-neutral-600); }

/* Background colors */
.bg-primary { background-color: var(--color-primary-600); }
.bg-accent { background-color: var(--color-accent-600); }
.bg-success { background-color: var(--color-success-600); }
.bg-warning { background-color: var(--color-warning-600); }
.bg-error { background-color: var(--color-error-600); }
.bg-neutral { background-color: var(--color-neutral-600); }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index */
.z-0 { z-index: var(--z-index-0); }
.z-10 { z-index: var(--z-index-10); }
.z-20 { z-index: var(--z-index-20); }
.z-30 { z-index: var(--z-index-30); }
.z-40 { z-index: var(--z-index-40); }
.z-50 { z-index: var(--z-index-50); } 