/* =========================================================
   design/tokens.css — Design tokens cho game Đập Chuột
   Nguồn: DESIGN-pinterest.md (Pinterest-design-analysis, alpha)
   Dùng chung cho bộ tài liệu (docs/) và code game sau này.
   ========================================================= */

/* Pin Sans là font độc quyền -> dùng Inter (thay thế gần nhất theo DESIGN-pinterest.md) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* ---------- Màu: thương hiệu ---------- */
  --color-primary: #e60023;          /* chỉ cho CTA chính, tab đang chọn, logo chữ */
  --color-on-primary: #ffffff;
  --color-primary-pressed: #cc001f;

  /* ---------- Màu: chữ ---------- */
  --color-ink: #000000;              /* tiêu đề, chữ nút, nav */
  --color-ink-soft: #211922;         /* chỉ dùng cho link trong đoạn văn */
  --color-body: #33332e;             /* đoạn văn mặc định */
  --color-charcoal: #262622;
  --color-mute: #62625b;             /* chú thích, metadata, chân trang */
  --color-ash: #91918c;              /* chữ nút bị vô hiệu, placeholder */
  --color-stone: #c8c8c1;

  /* ---------- Màu: bề mặt ---------- */
  --color-canvas: #ffffff;
  --color-surface-soft: #fbfbf9;     /* nền trang */
  --color-surface-card: #f6f6f3;     /* thẻ, ô lưới, nút icon */
  --color-surface-elevated: #ffffff;
  --color-surface-dark: #262622;
  --color-secondary-bg: #e5e5e0;     /* nút phụ */
  --color-secondary-pressed: #c8c8c1;
  --color-on-secondary: #000000;
  --color-on-dark: #ffffff;
  --color-on-dark-mute: rgba(255, 255, 255, 0.7);

  /* ---------- Màu: đường kẻ ---------- */
  --color-hairline: #dadad3;
  --color-hairline-soft: #e5e5e0;

  /* ---------- Màu: ngữ nghĩa ---------- */
  --color-focus-outer: #435ee5;
  --color-focus-inner: #ffffff;
  --color-error: #9e0a0a;
  --color-error-deep: #cc001f;
  --color-success-deep: #103c25;
  --color-success-pale: #c7f0da;
  --color-accent-blue: #617bff;
  --color-accent-purple: #7e238b;
  --color-accent-purple-deep: #6845ab;

  /* ---------- Chữ ---------- */
  --font-family: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* cỡ chữ theo thang typography */
  --size-display-xl: 70px;
  --size-display-lg: 44px;
  --size-heading-xl: 28px;
  --size-heading-lg: 22px;
  --size-heading-md: 18px;
  --size-body-md: 16px;
  --size-body-sm: 14px;
  --size-caption: 12px;

  --leading-display-xl: 1.1;
  --leading-display-lg: 1.15;
  --leading-heading-xl: 1.2;
  --leading-heading-lg: 1.25;
  --leading-heading-md: 1.3;
  --leading-body: 1.4;
  --leading-caption: 1.5;
  --leading-button: 1;

  --tracking-display-xl: -1.2px;
  --tracking-display-lg: -0.8px;
  --tracking-heading-xl: -1.2px;

  /* ---------- Bo góc (chỉ 3 giá trị dùng thường xuyên: md, lg, full) ---------- */
  --radius-none: 0px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  /* ---------- Khoảng cách (gốc 8px) ---------- */
  --space-xxs: 4px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-section: 64px;

  /* ---------- Độ nổi ---------- */
  /* Hệ thống gần như không có bóng: chỉ modal có bóng mềm 16px trên lớp phủ 50% */
  --shadow-modal: 0 0 16px rgba(0, 0, 0, 0.16);
  --scrim: rgba(0, 0, 0, 0.5);
  --border-hairline: 1px solid var(--color-hairline);

  /* ---------- Vòng focus (2 lớp: trắng trong, xanh ngoài) ---------- */
  --focus-ring: 0 0 0 2px var(--color-focus-inner), 0 0 0 4px var(--color-focus-outer);

  /* ---------- Thành phần ---------- */
  --button-height: 40px;
  --button-padding: 6px 14px;
  --button-icon-size: 40px;
  --input-height: 44px;
  --touch-target-min: 44px;

  /* ---------- Bố cục ---------- */
  --container-max: 1280px;
  --container-gutter: 24px;

  /* ---------- Chuyển động (bổ sung cho game; DESIGN-pinterest.md không quy định) ---------- */
  --duration-fast: 120ms;
  --duration-base: 150ms;
  --duration-slow: 300ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

@media (max-width: 768px) {
  :root {
    --space-section: 48px;
    --size-display-xl: 44px;
    --size-display-lg: 36px;
  }
}

@media (max-width: 480px) {
  :root {
    --space-section: 32px;
    --size-display-xl: 36px;
    --size-display-lg: 32px;
    --container-gutter: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
}
