@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* NestDesk brand system v1 — linen, sage, ink and one brass accent (identical to Nestbook).
   Display: Ivypresto Headline, body: Gibson (Adobe Fonts); Cormorant Garamond and Hanken
   Grotesk stand in until those are loaded. Corners 2–4px, no pills. Sage carries text only
   at 24px and up — smaller sage-coloured text uses forest-ink (foreground-secondary). */

:root {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: #F2EFEA;            /* linen */
  --foreground: #2E3029;            /* ink */
  --card: #FFFFFF;
  --card-foreground: #2E3029;
  --popover: #FFFFFF;
  --popover-foreground: #2E3029;
  --primary: #6F7766;               /* sage */
  --primary-foreground: #FFFFFF;
  --secondary: #E7EAE2;             /* sage-tint */
  --secondary-foreground: #4F5748;  /* forest-ink */
  --muted: #E7EAE2;
  --muted-foreground: #5F6757;
  --accent: #E7EAE2;
  --accent-foreground: #2E3029;
  --destructive: #8A3B2E;           /* danger-ink */
  --destructive-foreground: #FFFFFF;
  --border: #DDD8CC;                /* line-soft */
  --input: #7F8478;                 /* line-strong */
  --ring: #2E3029;                  /* focus is a 2px ink ring */
  --success: #1E5B63;
  --warning: #7A5C2E;
  --chart-1: #6F7766;               /* sage */
  --chart-2: #7A5C2E;               /* brass-ink — brass as text */
  --chart-3: #B08D57;               /* brass — decorative only */
  --chart-4: #B4BAAD;               /* sage-light */
  --chart-5: #BEB6A5;               /* taupe */
  --sidebar: #FFFFFF;
  --sidebar-foreground: #2E3029;
  --sidebar-primary: #6F7766;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #E7EAE2;
  --sidebar-accent-foreground: #2E3029;
  --sidebar-border: #DDD8CC;
  --sidebar-ring: #2E3029;

  /* ── brand extras ─────────────────────────────────────────────── */
  --brass-soft: #C4A370;            /* accent button — ink label, one per view */
  --brass-hover: #BE9C66;
  --band: #B4BAAD;                  /* sage-light section band — ink text only */
  --success-soft: #DEEBEC;
  --warning-soft: #F4EAD5;
  --danger-soft: #F6E3DE;

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: #EAE6DF;
  --surface-hover:   #E7EAE2;
  --surface-active:  #DCE0D5;
  --surface-elevated: #FFFFFF;

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: #E6E2D9;
  --border-muted: #DDD8CC;
  --border-strong: #7F8478;

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: #4F5748;  /* forest-ink */

  /* ── primary depth (hover/tint states for brand colour) ─────── */
  --primary-hover: #5F6757;
  --primary-muted: #E7EAE2;
  --primary-soft:  #EDEFE9;
  --primary-tint:  #F5F6F2;

  /* ── focus ring (alpha-blended, for soft ring style) ────────── */
  --focus-ring: rgba(46, 48, 41, 0.35);

  /* ── error (form validation — distinct from destructive) ─────── */
  --error: #8A3B2E;
  --error-foreground: #FFFFFF;

  /* ── radius ───────────────────────────────────────────────────── */
  --radius: 3px;
  --radius-none: 0rem;
  --radius-sm: 2px;
  --radius-lg: 4px;
  --radius-xl: 4px;
  --radius-full: 9999px;

  /* ── typography ───────────────────────────────────────────────── */
  --font-display: "Ivypresto Headline", "Cormorant Garamond", Georgia, serif;
  --font-sans: Gibson, "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-display: 500;
  --line-height-display: 1.08;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.5;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── shadows ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(46, 48, 41, 0.08);
  --shadow-md: 0 4px 12px rgba(46, 48, 41, 0.12);
  --shadow-lg: 0 12px 32px rgba(46, 48, 41, 0.18);

  /* ── motion ───────────────────────────────────────────────────── */
  --duration-fast: 140ms;
  --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 ──────────────────────────────────────────────────── */
  --spacing-base: 0.25rem;
}

/* The brand book defines light only; dark keeps the same hues on an ink ground. */
.dark {
  /* ── shadcn base tokens ───────────────────────────────────────── */
  --background: #23251F;
  --foreground: #F2EFEA;
  --card: #2C2E27;
  --card-foreground: #F2EFEA;
  --popover: #2C2E27;
  --popover-foreground: #F2EFEA;
  --primary: #B4BAAD;
  --primary-foreground: #2E3029;
  --secondary: #363930;
  --secondary-foreground: #F2EFEA;
  --muted: #363930;
  --muted-foreground: #BEC3B7;
  --accent: #363930;
  --accent-foreground: #F2EFEA;
  --destructive: #E4A091;
  --destructive-foreground: #2E3029;
  --border: rgba(242, 239, 234, 0.12);
  --input: rgba(242, 239, 234, 0.3);
  --ring: #F2EFEA;
  --success: #9CCBD1;
  --warning: #EBD7B0;
  --chart-1: #B4BAAD;
  --chart-2: #EBD7B0;
  --chart-3: #C4A370;
  --chart-4: #6F7766;
  --chart-5: #BEB6A5;
  --sidebar: #2C2E27;
  --sidebar-foreground: #F2EFEA;
  --sidebar-primary: #B4BAAD;
  --sidebar-primary-foreground: #2E3029;
  --sidebar-accent: #363930;
  --sidebar-accent-foreground: #F2EFEA;
  --sidebar-border: rgba(242, 239, 234, 0.1);
  --sidebar-ring: #F2EFEA;

  /* ── brand extras ─────────────────────────────────────────────── */
  --band: #363930;
  --success-soft: rgba(156, 203, 209, 0.14);
  --warning-soft: rgba(235, 215, 176, 0.14);
  --danger-soft: rgba(228, 160, 145, 0.14);

  /* ── surface hierarchy ────────────────────────────────────────── */
  --background-secondary: #292B24;
  --surface-hover: #363930;
  --surface-active: #40443A;
  --surface-elevated: #363930;

  /* ── border hierarchy ─────────────────────────────────────────── */
  --border-subtle: rgba(242, 239, 234, 0.06);
  --border-muted: rgba(242, 239, 234, 0.09);
  --border-strong: rgba(242, 239, 234, 0.3);

  /* ── text hierarchy ───────────────────────────────────────────── */
  --foreground-secondary: #D3D7CD;

  /* ── primary depth ────────────────────────────────────────────── */
  --primary-hover: #C3C8BD;
  --primary-muted: #363930;
  --primary-soft: #30332B;
  --primary-tint: #2A2C25;

  /* ── focus ring ───────────────────────────────────────────────── */
  --focus-ring: rgba(242, 239, 234, 0.4);

  /* ── error ────────────────────────────────────────────────────── */
  --error: #E4A091;
  --error-foreground: #2E3029;
}
