/* ============================================================
   러비너프 Design Tokens
   Single source of truth for colors, typography, spacing, etc.
   Updated: 2026-04-14
============================================================ */

:root {
  /* ---- Brand & Semantic Colors ---- */
  --color-primary: #ff6986;
  --color-primary-hover: #ff5577;
  --color-primary-soft: #fff0f3;
  --color-primary-strong: #e85577;

  /* Text — values aligned to most-used existing colors to avoid visual drift */
  --color-text: #333333;
  --color-text-sub: #666666;
  --color-text-muted: #999999;
  --color-text-placeholder: #c8c8c8;
  --color-text-on-primary: #ffffff;
  --color-text-disabled: #cccccc;

  /* Surface / Background */
  --color-bg: #f9f9f9;
  --color-surface: #ffffff;
  --color-surface-alt: #fafafa;
  --color-surface-sunken: #f4f4f4;

  /* Border */
  --color-border: #efefef;
  --color-border-strong: #dcdcdc;
  --color-border-focus: var(--color-primary);

  /* Gray scale — for ad-hoc decorative use (legacy CSS) */
  --gray-50:  #fbfbfb;
  --gray-100: #f4f4f4;
  --gray-150: #ededed;
  --gray-200: #e9e9e9;
  --gray-300: #c8c8c8;
  --gray-400: #a5a5a5;
  --gray-500: #8f8f8f;
  --gray-600: #707070;
  --gray-700: #555555;

  /* Status */
  --color-danger: #ff4444;
  --color-danger-soft: #ffeaea;
  --color-success: #22c55e;
  --color-success-soft: #e8f7ee;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;

  /* Overlay */
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-overlay-light: rgba(0, 0, 0, 0.25);

  /* ---- Typography ---- */
  --font-family-base: 'SUIT', -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", sans-serif;

  /* Sizes (px-based for predictability) */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;

  /* Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Line heights */
  --lh-tight: 1.25;
  --lh-snug: 1.4;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* Letter spacing */
  --ls-tight: -0.02em;
  --ls-normal: 0;

  /* ---- Spacing (4pt rhythm) ---- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ---- Radius ---- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* ---- Shadow ---- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.12);

  /* ---- Z-index scale ---- */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-toast: 100;
  --z-tooltip: 110;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 260ms;

  /* ---- Layout ---- */
  --container-max: 480px;
  --header-height: 56px;
  --bottom-nav-height: 60px;

  /* ---- Touch target ---- */
  --touch-target: 44px;

  /* ---- Breakpoints (reference values — CSS @media can't use var()) ----
     사용할 때는 아래 표준 값을 직접 사용하세요. 새 미디어쿼리는 이 스케일에 맞춰 작성.
     Standard scale — mobile-first 권장:
       --bp-sm:  480px  (large mobile)
       --bp-md:  768px  (tablet)
       --bp-lg: 1024px  (laptop)
       --bp-xl: 1280px  (desktop)

     Legacy 스케일 (기존 9000줄에 산재, 리팩터링 시 점진 정렬):
       style.css  : 400 / 491 / 641 / 1001  (min-width, mobile-first)
       style2.css : 490 / 640 / 700 / 920 / 1200 / 1250 / 1320  (max-width, desktop-first)
   */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}
