/* K Visuals design system, version 1 (November 2026). Light theme only.
   The full rules are in DESIGN.md. The same values live in the Wonder file "Medina" as tokens named gray/1-12 and kv/...
   Components use the role tokens (--ground, --text, --line...), never the raw greys, so the palette can be retuned here. */
:root {
  color-scheme: light;

  /* ---------- Colour: a neutral 12-step grey (Radix gray, light) plus white. No hue anywhere. ---------- */
  --gray-1: #fcfcfc;  /* text on the primary */
  --gray-2: #f9f9f9;  /* page ground */
  --gray-3: #f0f0f0;  /* wells: toggle track, slots, fields */
  --gray-4: #e8e8e8;  /* hover on a fill */
  --gray-5: #e0e0e0;  /* pressed fill */
  --gray-6: #d9d9d9;  /* 0.5px hairlines */
  --gray-7: #cecece;  /* strong line */
  --gray-8: #bbbbbb;  /* light halftone dots */
  --gray-9: #8d8d8d;  /* icons, numbering, dotted underlines (3.3:1, never text you must read) */
  --gray-10: #838383; /* focus ring, placeholders */
  --gray-11: #646464; /* secondary text (5.9:1 on white, 5.2:1 on gray-3) */
  --gray-12: #202020; /* text, the primary, dark dots, shadow ink (15.5:1 on gray-2) */
  --white: #ffffff;

  /* Roles (Wonder: kv/ground, kv/surface, kv/well, kv/fill-hover, kv/line, kv/text, kv/text-secondary, kv/text-faint, kv/primary) */
  --ground: var(--gray-2);
  --surface: var(--white);
  --well: var(--gray-3);
  --fill-hover: var(--gray-4);
  --line: var(--gray-6);
  --text: var(--gray-12);
  --text-secondary: var(--gray-11);
  --text-faint: var(--gray-9);
  --primary-bg: var(--gray-12);
  --primary-fg: var(--gray-1);
  --primary-hover: color-mix(in oklab, var(--primary-bg) 93%, var(--primary-fg));
  --brand-linkedin: #0077b5; /* LinkedIn blue: only on the LinkedIn pill (white text 4.8:1) */
  --focus-ring: var(--gray-10);
  --hairline: 0.5px;

  /* ---------- Elevation: a 1px ring and a crisp 1px drop, plus at most one short drop. Drawn in gray-12. ---------- */
  --shadow-ink: 32 32 32;
  --shadow-button: 0 1px 2px 0 rgb(var(--shadow-ink) / .12), 0 0 0 1px rgb(var(--shadow-ink) / .08);
  --shadow-toggle: var(--shadow-button);
  --shadow-primary: 0 0 0 1px var(--ground); /* a ring in the colour of the surface under it: redeclared on white surfaces */
  --shadow-card: 0 0 0 1px rgb(var(--shadow-ink) / .07), 0 1px 2px 0 rgb(var(--shadow-ink) / .12),
                 0 3px 4px -2px rgb(var(--shadow-ink) / .08);
  --shadow-popover: 0 0 0 1px rgb(var(--shadow-ink) / .08), 0 1px 2px 0 rgb(var(--shadow-ink) / .12),
                    0 4px 8px -4px rgb(var(--shadow-ink) / .16);
  --shadow-panel: 0 0 0 0.5px rgb(var(--shadow-ink) / .10), 0 1px 2px 0 rgb(var(--shadow-ink) / .015),
                  0 3px 4px -2px rgb(var(--shadow-ink) / .025);
  --shadow-knob: 0 0 0 1px var(--surface), 0 1px 2px 0 rgb(var(--shadow-ink) / .12);

  /* ---------- Shape and size ---------- */
  --radius-control: 6px;   /* buttons, fields, slots */
  --radius-container: 8px; /* cards, popovers, panels */
  --radius-full: 999px;    /* pills: the wave control, link pills, toggle options */
  --control-h: 36px;       /* 44px on a phone */
  --control-h-pill: 28px;

  /* ---------- Type: three faces, one weight each ---------- */
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* interface and reading */
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;              /* the personal: hover words, wordmark */
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* machine values: time, numbers */
  --weight-ui: 500;
  --text-meta: 12px;    --leading-meta: 16px;
  --text-body: 13px;    --leading-body: 20px;    /* controls, nav, labels */
  --text-reading: 15px; --leading-reading: 24px; /* intro, case text */
  --text-title: 16px;   --leading-title: 24px;
  --text-section: 20px; --leading-section: 28px;
  --text-display: 32px; --leading-display: 40px;
  --tracking-ui: -0.01em;
  --tracking-display: -0.02em;
  --word-size: 1.3em;   /* a hover word, relative to its sentence */

  /* ---------- Space: 4px grid ---------- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --page-x: 24px;        /* page edges: 24px desktop, 20px phone */
  --column-max: 1104px;  /* content column */

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(.23, 1, .32, 1);      /* anything the visitor causes */
  --ease-spring: cubic-bezier(.3, 1.12, .5, 1);   /* the toggle pill: a small overshoot that stays inside the 4px inset */
  --dur-hover: 150ms;
  --dur-pop-in: 150ms;
  --dur-pop-out: 120ms;
  --dur-move: 400ms;
}

/* Phone: values only, never new shapes. */
@media (max-width: 767px) {
  :root {
    --control-h: 44px;
    --control-h-pill: 34px;
    --text-body: 15px;  --leading-body: 24px;
    --text-meta: 14px;  --leading-meta: 20px;
    --page-x: 20px;
  }
}
