/*
 * 디자인 토큰 — 컨트롤 타워 공용
 * 모든 인스턴스(워드프레스/티스토리)가 동일 토큰을 참조한다.
 * 인스턴스별 오버라이드는 인스턴스 폴더의 자체 CSS 에서 :root 재정의로 처리.
 */

:root {
  /* Color */
  --bg: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --bg-elevated: #F5F5F7;
  --text: #1A1A1A;
  --text-muted: #5C5C66;
  --text-inverse: #FFFFFF;
  --border: #E5E5EA;
  --border-strong: #D1D1D6;

  --accent: #FF5722;
  --accent-hover: #E64A19;
  --accent-soft: #FFE5DC;
  --accent-contrast: #FFFFFF;

  --secondary: #00B894;
  --secondary-hover: #009E7C;
  --secondary-soft: #D6F5EC;

  --highlight: #FFF3CD;
  --code-bg: #F4F4F6;
  --code-text: #1A1A1A;

  --success: #00B894;
  --warning: #F59E0B;
  --danger: #DC2626;

  /* Typography */
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "DejaVu Sans Mono", monospace;

  --fs-body: 1rem;          /* 16px */
  --fs-body-lg: 1.0625rem;  /* 17px (모바일 본문) */
  --fs-lead: 1.125rem;      /* 18px (첫 문단) */
  --fs-meta: 0.8125rem;     /* 13px */
  --fs-small: 0.875rem;     /* 14px */
  --fs-h1: 2.5rem;          /* 40px */
  --fs-h1-mobile: 2rem;     /* 32px */
  --fs-h2: 1.75rem;         /* 28px */
  --fs-h3: 1.375rem;        /* 22px */
  --fs-card-title: 1.25rem; /* 20px */

  --lh-body: 1.75;
  --lh-tight: 1.25;
  --lh-heading: 1.3;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Spacing (8px base) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;
  --sp-10: 4rem;
  --sp-12: 5rem;

  /* Layout */
  --width-prose: 760px;
  --width-archive: 1200px;
  --width-full: 100%;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-focus: 0 0 0 3px rgba(255, 87, 34, 0.35);

  /* Motion */
  --t-fast: 120ms;
  --t-base: 200ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Z */
  --z-sticky: 50;
  --z-overlay: 100;
}

/* 모바일에서 본문 살짝 키움 + H1 축소 */
@media (max-width: 640px) {
  :root {
    --fs-body: var(--fs-body-lg);
    --fs-h1: var(--fs-h1-mobile);
  }
}

/* 동작 감소 선호 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-base: 0ms;
  }
}
