/* commons.css
  - 프로젝트 전역(공통) 스타일 가이드 전용
  - reset/normalize, typography scale, color tokens, spacing, layout util 등을 여기에 둡니다.
*/

/* ========== Design Tokens ========== */
:root {
  /* Light Mode */
  --color-text: #111;
  --color-muted: #666;
  --color-bg: #fff;
  --color-border: #e5e7eb;

  /* Dark Mode */
  --color-text-dark: #f5f5f5;
  --color-muted-dark: #b0b0b0;
  --color-bg-dark: #0f0f0f;
  --color-border-dark: #2a2a2a;

  /* Brand Colors */
  --color-primary: #6366f1;
  --color-primary-dark: #818cf8;
  --color-accent: #ec4899;
  --color-success: #10b981;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  --gradient-hero-mobile: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR",
    "Apple SD Gothic Neo", "Malgun Gothic", "Helvetica Neue", Arial, sans-serif;

  --radius-1: 8px;
  --radius-2: 12px;
  --radius-3: 16px;
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-3: 0 20px 48px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* Dark Mode */
html[data-theme="dark"] {
  --color-text: var(--color-text-dark);
  --color-muted: var(--color-muted-dark);
  --color-bg: var(--color-bg-dark);
  --color-border: var(--color-border-dark);
}

/* ========== Base / Reset (lightweight) ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-base),
    color var(--transition-base);
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0;
}

/* ========== Buttons (Base Style) ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
  border: 2px solid #ec4899;
}

.btn--secondary:hover {
  background: rgba(236, 72, 153, 0.2);
  transform: translateY(-2px);
}

.btn--secondary:active {
  transform: translateY(0);
}

/* ========== Utilities ========== */
.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  padding-inline: 20px;
}

.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;
}

/* Responsive Typography Scale */
@media (max-width: 768px) {
  .container {
    width: min(100%, calc(100% - 32px));
  }
}

/* Toast Animations */
@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

