@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@700;800;900&family=Inter:wght@400..700&display=swap');

/* Sela. — warm ivory and white surfaces, charcoal body text. Deep olive and
   powder blue are the logo's pairing and the app's dominant accents: olive for
   headings, primary actions and eyebrows; powder blue for selected states,
   secondary actions, icon tiles, pills and hover tints. Inter Tight ExtraBold for
   headings, Inter for every functional surface. Stone hairlines, olive section
   rules, 10–14px radii, near-flat shadows. */

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.968 0.009 84.6);           /* warm ivory    #F7F4EE */
  --foreground: oklch(0.284 0.004 106.6);          /* soft charcoal #2A2A28 */
  --card: oklch(1 0 0);                            /* white                 */
  --card-foreground: oklch(0.284 0.004 106.6);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.284 0.004 106.6);
  --primary: oklch(0.321 0.042 125.4);             /* deep olive    #2E371F */
  --primary-foreground: oklch(0.985 0.005 84.6);
  --secondary: oklch(0.941 0.012 84.6);            /* deeper ivory  #EFEBE3 */
  --secondary-foreground: oklch(0.284 0.004 106.6);
  --muted: oklch(0.941 0.012 84.6);
  --muted-foreground: oklch(0.531 0.013 89.8);     /* warm grey     #6F6C64 — 4.8:1 on ivory */
  --accent: oklch(0.953 0.01 87.5);
  --accent-foreground: oklch(0.284 0.004 106.6);
  --destructive: oklch(0.5 0.13 30);
  --destructive-foreground: oklch(0.985 0.005 84.6);
  --border: oklch(0.914 0.014 84.6);               /* stone hairline #E7E2D8 */
  --input: oklch(0.868 0.018 84.6);                /* warm stone    #D9D3C7 */
  --ring: oklch(0.321 0.042 125.4);
  --success: oklch(0.497 0.055 123.7);
  --warning: oklch(0.64 0.1 70);
  --chart-1: oklch(0.321 0.042 125.4);
  --chart-2: oklch(0.746 0.048 122.5);
  --chart-3: oklch(0.883 0.057 264.2);
  --chart-4: oklch(0.868 0.018 84.6);
  --chart-5: oklch(0.531 0.013 89.8);
  --sidebar: oklch(0.321 0.042 125.4);             /* deep olive    #2E371F — fixed across modes */
  --sidebar-foreground: oklch(0.883 0.057 264.2);  /* powder blue   #C6D9FF */
  --sidebar-primary: oklch(0.321 0.042 125.4);
  --sidebar-primary-foreground: oklch(0.985 0.005 84.6);
  --sidebar-accent: oklch(0.883 0.057 264.2);      /* powder blue   #C6D9FF */
  --sidebar-accent-foreground: oklch(0.321 0.042 125.4); /* deep olive #2E371F */
  --sidebar-border: color-mix(in srgb, oklch(0.883 0.057 264.2) 20%, oklch(0.321 0.042 125.4));
  --sidebar-ring: oklch(0.883 0.057 264.2);

  /* ── brand accents ────────────────────────────────────────────── */
  --olive: oklch(0.497 0.055 123.7);               /* mid olive     #5C6845 — 6:1 on white */
  --sage: oklch(0.746 0.048 122.5);                /* soft sage     #A7B291 */
  --sage-soft: color-mix(in srgb, var(--sage) 20%, var(--card));
  --sage-text: oklch(0.535 0.048 128.3);           /* deep olive-grey #657355 — AA on ivory/white */
  --blue: oklch(0.883 0.057 264.2);                /* powder blue   #C6D9FF */
  --blue-hover: oklch(0.85 0.068 264.2);           /* hovered powder blue   */
  --blue-soft: color-mix(in srgb, var(--blue) 55%, var(--card));
  --blue-tint: color-mix(in srgb, var(--blue) 22%, var(--card));
  --blue-foreground: oklch(0.321 0.042 125.4);     /* deep olive ink on blue */
  --rule: color-mix(in srgb, oklch(0.321 0.042 125.4) 20%, transparent); /* olive section divider */
  --stone: oklch(0.868 0.018 84.6);                /* warm stone    #D9D3C7 */

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.941 0.012 84.6);
  --surface-hover:   color-mix(in srgb, var(--blue) 26%, var(--background));
  --surface-active:  color-mix(in srgb, var(--blue) 55%, var(--card));
  --surface-elevated: oklch(1 0 0);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(0.94 0.01 84.6);
  --border-muted: oklch(0.928 0.012 84.6);
  --border-strong: oklch(0.868 0.018 84.6);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.42 0.01 91.6);   /* #4F4D47 — 7.7:1 on ivory */

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: oklch(0.376 0.049 125.6);       /* #3B4629 */
  --primary-muted: color-mix(in srgb, var(--olive) 14%, var(--card));
  --primary-soft:  color-mix(in srgb, var(--olive) 8%,  var(--card));
  --primary-tint:  color-mix(in srgb, var(--olive) 4%,  var(--card));

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: oklch(0.321 0.042 125.4 / 0.3);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: oklch(0.5 0.13 30);
  --error-foreground: oklch(0.985 0.005 84.6);

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 0.625rem;                              /* 10px — controls */
  --radius-none: 0rem;
  --radius-sm: 0.375rem;
  --radius-lg: 0.75rem;                            /* 12px */
  --radius-xl: 0.875rem;                           /* 14px — cards */
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: var(--font-display);               /* retired serif slot — never decorative */
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --font-weight-display: 800;
  --line-height-display: 1.08;
  --tracking-display: -0.03em;
  --font-weight-body: 400;
  --line-height-body: 1.6;
  --tracking-body: -0.006em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 1px rgba(42, 42, 40, 0.03);
  --shadow-md: 0 1px 2px rgba(42, 42, 40, 0.04), 0 6px 16px -10px rgba(42, 42, 40, 0.12);
  --shadow-lg: 0 2px 4px rgba(42, 42, 40, 0.04), 0 18px 40px -20px rgba(42, 42, 40, 0.2);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* ── spacing (4px steps; layouts move in 8px pairs) ───────────── */
  --spacing-base: 0.25rem;
}

.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: oklch(0.2 0.008 120);
  --foreground: oklch(0.95 0.006 90);
  --card: oklch(0.24 0.009 120);
  --card-foreground: oklch(0.95 0.006 90);
  --popover: oklch(0.24 0.009 120);
  --popover-foreground: oklch(0.95 0.006 90);
  --primary: oklch(0.82 0.06 123);
  --primary-foreground: oklch(0.24 0.035 125);
  --secondary: oklch(0.28 0.01 120);
  --secondary-foreground: oklch(0.95 0.006 90);
  --muted: oklch(0.28 0.01 120);
  --muted-foreground: oklch(0.72 0.01 100);
  --accent: oklch(0.29 0.01 120);
  --accent-foreground: oklch(0.95 0.006 90);
  --destructive: oklch(0.68 0.13 32);
  --destructive-foreground: oklch(0.18 0.02 32);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.72 0.05 120);
  --success: oklch(0.74 0.06 120);
  --warning: oklch(0.78 0.1 75);
  --chart-1: oklch(0.72 0.06 120);
  --chart-2: oklch(0.6 0.04 123);
  --chart-3: oklch(0.85 0.04 122);
  --chart-4: oklch(0.78 0.06 75);
  --chart-5: oklch(0.65 0.01 100);
  --sidebar: oklch(0.321 0.042 125.4);             /* deep olive    #2E371F — fixed across modes */
  --sidebar-foreground: oklch(0.883 0.057 264.2);  /* powder blue   #C6D9FF */
  --sidebar-primary: oklch(0.8 0.045 122);
  --sidebar-primary-foreground: oklch(0.22 0.02 122);
  --sidebar-accent: oklch(0.883 0.057 264.2);      /* powder blue   #C6D9FF */
  --sidebar-accent-foreground: oklch(0.321 0.042 125.4); /* deep olive #2E371F */
  --sidebar-border: color-mix(in srgb, oklch(0.883 0.057 264.2) 20%, oklch(0.321 0.042 125.4));
  --sidebar-ring: oklch(0.883 0.057 264.2);

  /* ── brand accents ────────────────────────────────────────────── */
  --olive: oklch(0.72 0.06 120);
  --sage: oklch(0.62 0.045 122.5);
  --sage-text: var(--sage);                        /* already AA on the dark surfaces */
  --blue: oklch(0.8 0.07 264);
  --blue-hover: oklch(0.76 0.08 264);
  --blue-soft: color-mix(in srgb, var(--blue) 22%, var(--card));
  --blue-tint: color-mix(in srgb, var(--blue) 12%, var(--card));
  --blue-foreground: oklch(0.9 0.04 264);
  --rule: oklch(0.82 0.06 123 / 0.2);
  --stone: oklch(0.4 0.012 84.6);
  --sage-soft: color-mix(in srgb, var(--sage) 22%, var(--card));

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: oklch(0.22 0.009 120);
  --surface-hover:   color-mix(in srgb, var(--blue) 12%, var(--background));
  --surface-active:  color-mix(in srgb, var(--blue) 20%, var(--card));
  --surface-elevated: oklch(0.28 0.01 120);

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: oklch(1 0 0 / 5%);
  --border-muted: oklch(1 0 0 / 7%);
  --border-strong: oklch(1 0 0 / 20%);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: oklch(0.8 0.008 95);

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: color-mix(in srgb, var(--primary) 88%, var(--foreground));
  --primary-muted: color-mix(in srgb, var(--olive) 20%, var(--card));
  --primary-soft:  color-mix(in srgb, var(--olive) 12%, var(--card));
  --primary-tint:  color-mix(in srgb, var(--olive) 7%,  var(--card));

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: oklch(0.72 0.06 120 / 0.45);

  /* ── error ────────────────────────────────────────────────────── */
  --error: oklch(0.7 0.13 32);
  --error-foreground: oklch(0.18 0.02 32);

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);
}
