/*
 * C21HG design tokens
 *
 * Extracted from the Lovable prototype (c21hg-public-site-prototype). The
 * prototype uses Tailwind v4, which has no tailwind.config.* and no
 * index.css: tokens are declared in src/styles.css (`:root` + `@theme inline`),
 * and the remainder comes from Tailwind's built-in default theme.
 *
 *   §1–§6  Brand tokens — copied verbatim from src/styles.css
 *   §7     Tailwind v4 defaults the prototype actually uses (verified by class
 *          usage counts), so vanilla CSS can reproduce the same sizes
 *   §8     Derived state colours the shadcn variants produce with `/opacity`
 *
 * Colours are oklch, as in the prototype; hex comments are the brand names
 * recorded there. The prototype declares a `dark` variant but defines no dark
 * values, so there is no dark theme to extract.
 */

:root {
  /* ---------- 1. Typography: families ---------- */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif; /* h1–h4, eyebrows, brand buttons */
  --font-body: "Work Sans", system-ui, sans-serif;
  /* Self-hosted (base.css @font-face): Barlow Condensed 500/600/700, Work Sans 400–600 */

  /* ---------- 2. Semantic surface colours (light) ---------- */
  --background: oklch(0.975 0.008 85);
  --foreground: oklch(0.18 0.006 60);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.006 60);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.006 60);

  --primary: oklch(0.245 0 0);
  --primary-foreground: oklch(0.975 0.008 85);
  --secondary: oklch(0.94 0.012 85);
  --secondary-foreground: oklch(0.2 0.006 60);
  --muted: oklch(0.94 0.008 85);
  --muted-foreground: oklch(0.48 0.012 70);
  --accent: oklch(0.75 0.05 88);
  --accent-foreground: oklch(0.16 0.003 60);
  --destructive: oklch(0.55 0.2 27);
  --destructive-foreground: oklch(0.98 0.005 85);

  --border: oklch(0.88 0.012 85);
  --input: oklch(0.88 0.012 85);
  --ring: oklch(0.75 0.05 88);

  /* ---------- 3. Brand palette ---------- */
  /* Dark "ink" surfaces: hero, about, footer, Back Office chrome */
  --ink: oklch(0.245 0 0);              /* Obsessed Grey #212121 */
  --ink-raised: oklch(0.37 0.004 300);  /* Obsessed Grey #414042 */
  --ink-foreground: oklch(0.97 0.006 85);
  --ink-muted: oklch(0.72 0.012 85);
  --ink-border: oklch(0.33 0.003 300);

  --gold: oklch(0.75 0.05 88);          /* Relentless Gold #BEAF87 */
  --gold-dark: oklch(0.66 0.05 85);     /* Dark Gold #A1926E */
  --gold-soft: oklch(0.82 0.045 88);
  --gold-foreground: oklch(0.245 0 0);

  /* ---------- 4. Gradients ---------- */
  --gradient-ink: linear-gradient(180deg, oklch(0.14 0.003 60 / 0.35) 0%, oklch(0.1 0.003 60 / 0.85) 100%); /* image overlays */
  --gradient-gold: linear-gradient(120deg, var(--gold-soft), var(--gold)); /* brand buttons, #apply band */

  /* ---------- 5. Shadows (brand) ---------- */
  --shadow-card: 0 10px 30px -18px oklch(0.14 0.003 60 / 0.35);
  --shadow-elevated: 0 26px 60px -30px oklch(0.14 0.003 60 / 0.55);
  --shadow-assistant: 0 18px 40px -12px oklch(0.14 0.003 60 / 0.35), 0 4px 12px -4px oklch(0.14 0.003 60 / 0.18);
  --shadow-gold: 0 12px 28px -12px oklch(0.6 0.06 85 / 0.7); /* brand-button hover */

  /* ---------- 6. Radius ---------- */
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);  /* 4px  — inputs in lists, small chips */
  --radius-md: calc(var(--radius) - 2px);  /* 6px  — buttons, inputs, selects */
  --radius-lg: var(--radius);              /* 8px  — cards, photos, alerts */
  --radius-xl: calc(var(--radius) + 4px);  /* 12px */
  --radius-2xl: calc(var(--radius) + 8px); /* 16px */
  --radius-3xl: 1.5rem;                    /* Tailwind default (used once) */
  --radius-full: 9999px;                   /* pills, brand buttons, avatars */

  /* ---------- 7. Tailwind v4 defaults in use ---------- */

  /* Spacing: Tailwind multiplies this unit (p-4 = 4 × 0.25rem = 1rem) */
  --spacing: 0.25rem;

  /* Type scale: size / line-height pairs */
  --text-xs: 0.75rem;    --text-xs--line-height: calc(1 / 0.75);
  --text-sm: 0.875rem;   --text-sm--line-height: calc(1.25 / 0.875);
  --text-base: 1rem;     --text-base--line-height: 1.5;
  --text-lg: 1.125rem;   --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;    --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;    --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;   --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem;      --text-5xl--line-height: 1;
  --text-6xl: 3.75rem;   --text-6xl--line-height: 1;
  --text-7xl: 4.5rem;    --text-7xl--line-height: 1;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800; /* map info-window titles */

  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-relaxed: 1.625;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Container widths (max-w-*) */
  --container-xs: 20rem;
  --container-sm: 24rem;
  --container-md: 28rem;   /* auth form */
  --container-lg: 32rem;
  --container-xl: 36rem;
  --container-2xl: 42rem;
  --container-3xl: 48rem;  /* reading width (AGENTS.md: "max-w-3xl for reading") */
  --container-4xl: 56rem;
  --container-5xl: 64rem;  /* .workspace-container (Back Office) */
  --container-7xl: 80rem;  /* .public-container (public site) */
  --gutter: 1.5rem;        /* container inline padding */

  /* Generic shadows used by shadcn components */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); /* also Tailwind's bare `shadow` */
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* menus, popovers */
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* dialogs, switch thumb */
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Focus ring: shadcn uses ring-1 (inputs, buttons) and ring-2 + 2px offset (switch, tabs) */
  --ring-width: 1px;
  --ring-width-strong: 2px;
  --ring-offset: 2px;

  /* Motion */
  --duration-fast: 150ms;   /* colours, brand-button lift */
  --duration-base: 200ms;   /* accordion, chevrons, popover fade/zoom */
  --duration-marquee: 40s;  /* service gallery auto-scroll */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --lift: -2px;             /* brand-button hover translateY */

  /*
   * Breakpoints — custom properties can't be used inside @media, so these are
   * for reference/JS only. Use the literal values in media queries:
   *   sm 40rem (640px) · md 48rem (768px) · lg 64rem (1024px)
   *   xl 80rem (1280px) · 2xl 96rem (1536px)
   * Usage in the prototype: lg (111) > sm (88) > md (51) > xl (3).
   */
  --bp-sm: 40rem;
  --bp-md: 48rem;
  --bp-lg: 64rem;
  --bp-xl: 80rem;
  --bp-2xl: 96rem;

  /* ---------- 8. Derived state colours (from shadcn `/opacity` modifiers) ---------- */
  --primary-hover: color-mix(in oklch, var(--primary) 90%, transparent);         /* bg-primary/90 */
  --secondary-hover: color-mix(in oklch, var(--secondary) 80%, transparent);     /* bg-secondary/80 */
  --destructive-hover: color-mix(in oklch, var(--destructive) 90%, transparent); /* bg-destructive/90 */
  --destructive-border: color-mix(in oklch, var(--destructive) 50%, transparent); /* alert border */
  --skeleton: color-mix(in oklch, var(--primary) 10%, transparent);             /* bg-primary/10 */
  --disabled-opacity: 0.5;
  --overlay: rgb(0 0 0 / 0.8);  /* dialog backdrop (bg-black/80) */

  /* ---------- 9. Back office (docs/design.md) ---------- */
  /* Owner's decisions, 2026-11-05: gold text and field borders dark enough for WCAG AA on
     light surfaces (gold on the background is 2.1:1, gold-dark 2.9:1, the input border 1.4:1),
     and a small status palette the style guide lacked. The public site uses --gold-text too:
     gold text on light surfaces there, with --gold kept on dark ones (.surface-ink). */
  --gold-text: oklch(0.52 0.06 85);
  /* Working style (DISC) dimensions, as TRAIN21 colours them: text/edge, letter fill, letter text. */
  --disc-d: #b52d42; --disc-d-fill: #bf3548; --disc-d-ink: #ffffff;
  --disc-i: #826000; --disc-i-fill: #efc63d; --disc-i-ink: #34290b;
  --disc-s: #13784c; --disc-s-fill: #167d53; --disc-s-ink: #ffffff;
  --disc-c: #245fc3; --disc-c-fill: #2d66c5; --disc-c-ink: #ffffff;     /* gold text on light: 5.1:1 on background, 4.6:1 on muted */
  --field-border: oklch(0.62 0.012 85); /* input, select, checkbox outlines: 3.4:1 */

  /* Status: text/icon colour (≥5:1 on background and on its soft fill), soft fill, border. */
  --success: oklch(0.5 0.11 150);
  --success-soft: oklch(0.955 0.035 150);
  --success-border: oklch(0.82 0.07 150);
  --warning: oklch(0.52 0.11 65);
  --warning-soft: oklch(0.955 0.045 85);
  --warning-border: oklch(0.82 0.09 80);
  --info: oklch(0.5 0.11 250);
  --info-soft: oklch(0.955 0.02 250);
  --info-border: oklch(0.82 0.06 250);
  --destructive-soft: oklch(0.955 0.02 27);
  --status-foreground: oklch(1 0 0);    /* text on a solid status fill */

  /* The style guide's `/opacity` tints */
  --gold-10: color-mix(in oklch, var(--gold) 10%, transparent);
  --gold-15: color-mix(in oklch, var(--gold) 15%, transparent);
  --gold-30: color-mix(in oklch, var(--gold) 30%, transparent);
  --gold-40: color-mix(in oklch, var(--gold) 40%, transparent);
  --gold-60: color-mix(in oklch, var(--gold) 60%, transparent);
  --muted-40: color-mix(in oklch, var(--muted) 40%, transparent);
  --muted-50: color-mix(in oklch, var(--muted) 50%, transparent);
  --foreground-25: color-mix(in oklch, var(--foreground) 25%, transparent);
  --foreground-85: color-mix(in oklch, var(--foreground) 85%, transparent);
  --destructive-30: color-mix(in oklch, var(--destructive) 30%, transparent);
  --ink-raised-60: color-mix(in oklch, var(--ink-raised) 60%, transparent);
  --background-95: color-mix(in oklch, var(--background) 95%, transparent);

  /* Shell */
  --sidebar-width: 14rem;       /* 16rem from 1024px */
  --sidebar-width-lg: 16rem;
  --sidebar-collapsed: 4.5rem;
  --duration-slow: 300ms;       /* sidebar width */
}
