/* =========================================================================
   tokens.css — design tokens (spec Section 5). Both themes are built from the
   same token set. Palette source: iNSPO/color palette.jpg (deep-green scale).
   Typography scale source: iNSPO/Typography.jpg.
   ========================================================================= */

:root {
  /* --- Brand green scale (from the inspiration palette) ------------------ */
  --green-900: #051f20;
  --green-800: #0b2b26;
  --green-700: #163832;
  --green-600: #235347;
  --green-400: #8eb69b;
  --green-100: #daf1de;

  /* --- Accent (single confident accent, spec Section 2) ----------------- */
  --accent: #8eb69b;
  --accent-strong: #235347;
  --accent-contrast: #051f20;

  /* --- Status palette (color + never color-only, spec Section 5) --------- */
  --status-neutral: #8a9a93;
  --status-info: #5b8def;
  --status-warn: #d9a441;
  --status-success: #4bb96f;
  --status-danger: #e5654b;
  --status-purple: #9b7ede;

  /* --- Typography (Typography.jpg) -------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, monospace;

  --fs-h1: 3rem;      /* 48 (scaled down from 96 for app density) */
  --fs-h2: 2.25rem;   /* 36 */
  --fs-h3: 1.75rem;   /* 28 */
  --fs-h4: 1.375rem;  /* 22 */
  --fs-h5: 1.125rem;  /* 18 */
  --fs-h6: 1rem;      /* 16 */
  --fs-body: 0.9375rem;   /* 15 */
  --fs-small: 0.8125rem;  /* 13 */
  --fs-caption: 0.75rem;  /* 12 */

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

  --lh-tight: 1.2;
  --lh-normal: 1.5;

  /* --- Spacing scale ---------------------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  /* --- Radii (generous, Apple-like rounding) --------------------------- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* --- Motion (subtle, fluid — Apple-style easing) --------------------- */
  --dur-fast: 160ms;
  --dur-mid: 260ms;
  --dur-slow: 420ms;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 68px;
  --header-h: 60px;
}

/* --- Dark theme (primary) — refined graphite, Apple-style ---------------- */
:root,
[data-theme='dark'] {
  --bg: #000000;
  --bg-raised: #141416;
  --surface: #1c1c1e;
  --surface-2: #242427;
  --surface-hover: #2c2c30;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-faint: #6e6e73;
  --text-on-accent: #051f20;

  /* translucent materials for glass surfaces */
  --glass: rgba(28, 28, 30, 0.72);
  --glass-strong: rgba(20, 20, 22, 0.82);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 16px 48px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  --overlay: rgba(0, 0, 0, 0.6);
}

/* --- Light theme — Apple soft-gray / white ------------------------------ */
[data-theme='light'] {
  --bg: #f5f5f7;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --surface-hover: #eaeaee;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-faint: #a1a1a6;
  --text-on-accent: #ffffff;

  --accent: #2f7d63;
  --accent-strong: #1f5a46;

  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(245, 245, 247, 0.82);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
  --overlay: rgba(0, 0, 0, 0.28);
}
