/* Design tokens.
   Dark values appear twice: once for the system preference (when the user has not chosen),
   once for an explicit choice. Keep the two blocks identical. */

:root {
  color-scheme: light;

  /* type */
  --font: "Plus Jakarta Sans", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --w-regular: 400;
  --w-strong: 600;
  --fs-display: clamp(2.75rem, 1.4rem + 5.8vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --fs-h3: 1.375rem;
  --fs-h4: 1.0625rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  /* spacing: 8px grid with 4px half-steps for tight mock-up internals */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;
  --section-y: clamp(80px, 9vw, 128px);
  --gutter: 24px;
  --container: 1200px;
  --nav-h: 64px;

  /* radius system */
  --r-xs: 12px;
  --r-sm: 16px;
  --r-card: 24px;
  --r-lg: 32px;
  --r-pill: 999px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* colour: light */
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f2f5f8;
  --app-bg: #f4f6f9;
  --text: #0e1116;
  --text-2: #4a5461;
  --text-3: #646e7b;
  --line: rgba(14, 17, 22, 0.08);
  --line-strong: rgba(14, 17, 22, 0.14);
  --bar-muted: #c9d0d9;
  --focus: #0a7a58;

  --accent: #12b886;
  --accent-ink: #0a7a58;
  --accent-soft: #e1f6ee;
  --warn-ink: #8a5300;
  --warn-soft: #fff1d3;

  --btn-bg: #0e1116;
  --btn-fg: #ffffff;
  --btn-arrow-bg: rgba(255, 255, 255, 0.16);

  --nav-bg: rgba(255, 255, 255, 0.8);
  --glow-mint: #c6f2df;
  --glow-sky: #c9e4fb;
  --cta-from: #bdefd8;
  --cta-to: #c4e1fa;
  --cta-ring: rgba(255, 255, 255, 0.6);

  --phone-frame: #0e1116;
  --phone-ring: rgba(14, 17, 22, 0.9);

  /* category colours, reused by every chart */
  --c-food: #12b886;
  --c-bills: #4f8fe8;
  --c-shop: #e9a53a;
  --c-move: #ee8a6e;
  --c-other: #98a3b1;
  --chart-1: var(--c-food);
  --chart-2: var(--c-bills);
  --chart-3: var(--c-shop);
  --chart-4: var(--c-move);
  --chart-5: var(--c-other);

  /* one shadow style, two elevations */
  --shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 12px 32px -12px rgba(14, 17, 22, 0.1);
  --shadow-hover: 0 2px 4px rgba(14, 17, 22, 0.04), 0 24px 48px -16px rgba(14, 17, 22, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0d11;
    --surface: #12171d;
    --surface-2: #1a2029;
    --app-bg: #0d1116;
    --text: #f1f4f7;
    --text-2: #a9b3c0;
    --text-3: #8c97a5;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --bar-muted: #3a4452;
    --focus: #4bddb0;
    --accent: #22c997;
    --accent-ink: #4bddb0;
    --accent-soft: rgba(34, 201, 151, 0.14);
    --warn-ink: #f3be6b;
    --warn-soft: rgba(233, 165, 58, 0.16);
    --btn-bg: #f1f4f7;
    --btn-fg: #0e1116;
    --btn-arrow-bg: rgba(14, 17, 22, 0.1);
    --nav-bg: rgba(18, 23, 29, 0.78);
    --glow-mint: #0f3a31;
    --glow-sky: #12304f;
    --cta-from: #0f4a3c;
    --cta-to: #143b63;
    --cta-ring: rgba(255, 255, 255, 0.12);
    --phone-frame: #05070a;
    --phone-ring: rgba(255, 255, 255, 0.18);
    --c-food: #2bd3a1;
    --c-bills: #6aa5f2;
    --c-shop: #f0b65a;
    --c-move: #f29a82;
    --c-other: #9aa6b5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0d11;
  --surface: #12171d;
  --surface-2: #1a2029;
  --app-bg: #0d1116;
  --text: #f1f4f7;
  --text-2: #a9b3c0;
  --text-3: #8c97a5;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --bar-muted: #3a4452;
  --focus: #4bddb0;
  --accent: #22c997;
  --accent-ink: #4bddb0;
  --accent-soft: rgba(34, 201, 151, 0.14);
  --warn-ink: #f3be6b;
  --warn-soft: rgba(233, 165, 58, 0.16);
  --btn-bg: #f1f4f7;
  --btn-fg: #0e1116;
  --btn-arrow-bg: rgba(14, 17, 22, 0.1);
  --nav-bg: rgba(18, 23, 29, 0.78);
  --glow-mint: #0f3a31;
  --glow-sky: #12304f;
  --cta-from: #0f4a3c;
  --cta-to: #143b63;
  --cta-ring: rgba(255, 255, 255, 0.12);
  --phone-frame: #05070a;
  --phone-ring: rgba(255, 255, 255, 0.18);
  --c-food: #2bd3a1;
  --c-bills: #6aa5f2;
  --c-shop: #f0b65a;
  --c-move: #f29a82;
  --c-other: #9aa6b5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
