/*
  디자인 토큰. 다크 테마를 기준으로 팔레트를 먼저 잡고 라이트 테마를 파생시켰다.
  :root = 다크(기본), [data-theme="light"] = 라이트(토글 시 적용).
  브레이크포인트는 CSS 변수로 쓸 수 없어(미디어쿼리 제약) layout.css/sections.css에
  768px / 1024px 리터럴로 직접 쓴다.
*/

:root {
  color-scheme: dark;

  /* 색 — 다크 */
  --color-bg: #12100e;
  --color-bg-elevated: #1c1813;
  --color-bg-muted: #2a241d;
  --color-text: #f2ede3;
  --color-text-muted: #c3bbae;
  --color-text-faint: #a49a8b;
  --color-border: #40382e;
  --color-accent: #c9a227;
  --color-accent-strong: #d9a441;
  --color-accent-contrast: #12100e;
  --color-accent-secondary: #d4b46a;
  --color-success: #86b68e;
  --color-error: #df8b78;
  --color-warning: #d9a441;
  --color-overlay: rgba(18, 16, 14, 0.76);

  /* 그림자 — 다크 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);

  /* 타이포 */
  --font-sans: "Noto Sans KR", "Malgun Gothic", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --lh-base: 1.7;
  --lh-heading: 1.3;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-black: 900;

  /* 간격 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* 형태 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* 애니메이션 */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* 레이아웃 */
  --container-max: 1200px;
  --container-padding: 1.25rem;
  --header-height: 64px;

  /* z-index */
  --z-nav: 100;
  --z-float: 150;
  --z-toast: 300;
}

[data-theme="light"] {
  color-scheme: light;

  /* 색 — 라이트 */
  --color-bg: #f5f0e6;
  --color-bg-elevated: #fffcf5;
  --color-bg-muted: #eae1d1;
  --color-text: #2a241d;
  --color-text-muted: #5e5549;
  --color-text-faint: #746a5c;
  --color-border: #d8ccb9;
  --color-accent: #8a6412;
  --color-accent-strong: #6f4f08;
  --color-accent-contrast: #ffffff;
  --color-accent-secondary: #806e38;
  --color-success: #477a52;
  --color-error: #a54b3c;
  --color-warning: #8a6412;
  --color-overlay: rgba(42, 36, 29, 0.55);

  /* 그림자 — 라이트 */
  --shadow-sm: 0 1px 2px rgba(18, 21, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(18, 21, 28, 0.08);
  --shadow-lg: 0 20px 48px rgba(18, 21, 28, 0.12);
}
