/*
 * Kaitago Studio — global design tokens.
 * Approved palette + type intent from KAITAGO_PRODUCTION_HANDOFF_BATCH1.md §3.
 * Spacing keeps the prototype's 4/8/12/16/24/32/48/64/96/128 rhythm rather
 * than inventing a new scale. No shadows anywhere, no pills, no gradients —
 * enforced by not defining any token for them here. 0.6.2: one narrow,
 * explicitly Product-Owner-approved radius token exists (--kts-radius-sm) --
 * see its own comment below for exactly where it may be used. Everywhere
 * else in the system remains hard-edged.
 */

:root {
	/* Color */
	--kts-off-white: #F6F5F0;
	--kts-ink-black: #151716;
	--kts-deep-olive: #46563C;
	--kts-mineral-blue: #5D7B82;
	--kts-signal-orange: #D66B45;
	--kts-soft-grey: #DADDD7;

	/* Hairline separator: prototype used a 45%-mixed soft-grey. Approved
	 * production target reads 50-60% lighter than that first-pass value —
	 * implemented as a low-alpha mix rather than a flat lighter hex, so it
	 * still tracks --kts-soft-grey if that token ever changes. Used for the
	 * rail/header separator only — row dividers use --kts-border-default,
	 * one step stronger, matching the approved Route 2A reference. */
	--kts-hairline: color-mix(in srgb, var(--kts-soft-grey) 20%, transparent);

	/* Semantic roles, added Batch 2 — confirmed 2026-08-20 against the
	 * approved design system export (colors.css) bundled with
	 * "Kaitago.com Human Polish Pass 6.zip". Same hex/oklch source values,
	 * re-namespaced under --kts-* rather than imported verbatim. */
	--kts-surface-card: #FFFFFF;
	--kts-surface-sunken: var(--kts-soft-grey);
	/* 0.6.1 — Journal Art Direction: a restrained neutral-grey "paper slab"
	   surface, lighter than --kts-surface-sunken. Used for the Journal grid
	   cards and the Studio Rail v2 nav-item hover/current states --
	   deliberately subtle contrast against --kts-off-white, not a
	   SaaS-card grey. */
	--kts-surface-tint: color-mix(in srgb, var(--kts-surface-sunken) 45%, var(--kts-off-white));
	/* 0.6.2 — Journal Surface System: a fainter resting-state surface, used
	   for Studio Rail nav items at rest (every entry gets a very light
	   neutral surface per instruction; --kts-surface-tint above stays
	   reserved for hover/focus/current, so the current page still reads
	   as "slightly stronger"). Reference: PORTO ROCHA's own nav-card
	   surface measured at rgb(245,245,245) against a pure white page --
	   translated to Kaitago's off-white base as a light mix rather than
	   copied as a literal hex. */
	--kts-surface-faint: color-mix(in srgb, var(--kts-surface-sunken) 18%, var(--kts-off-white));
	/*
	 * 0.6.2 — Journal Surface System: the ONE explicitly Product-Owner-
	 * approved radius exception to this system's otherwise deliberate
	 * no-radius rule (see the file header note below and shell.css/
	 * home.css's own long-standing "no card radius" comments). Value
	 * measured directly off the PORTO ROCHA reference (DOM
	 * getBoundingClientRect + computed border-radius: cards 8px, nav
	 * surface cards 10px) -- landed in the middle of the instructed
	 * 6-10px range. Used ONLY on Journal tiles and Studio Rail nav-item
	 * surfaces; nothing else in the system gains a radius from this.
	 */
	--kts-radius-sm: 8px;
	--kts-text-secondary: oklch(0.38 0.005 120);
	--kts-text-muted: oklch(0.56 0.006 120);
	--kts-accent-hover: oklch(0.32 0.045 135);
	--kts-border-default: var(--kts-soft-grey);
	--kts-border-strong: oklch(0.7 0.005 120);

	/* Typography */
	--kts-font-serif: "Newsreader", Georgia, serif;
	--kts-font-sans: "Manrope", system-ui, -apple-system, sans-serif;

	/* Fluid type scale, added Batch 2. Reference hardcodes px per fixed
	 * mockup width (e.g. 46px hero at a 1440 canvas) — these clamp()
	 * equivalents land at the same size at ~1440px viewport width and scale
	 * down for real responsive layout, per the instruction not to copy fixed
	 * board dimensions. */
	--kts-text-hero: clamp(2rem, 1.55rem + 1.9vw, 2.9rem);   /* ~46px @1440 */
	--kts-text-row-title: clamp(1.5rem, 1.3rem + 0.85vw, 1.95rem); /* ~31px @1440 */
	--kts-text-wordmark: clamp(1.5rem, 1.3rem + 0.85vw, 2.1rem);   /* ~34px @1440 */

	/* Spacing — 4/8/12/16/24/32/48/64/96/128 rhythm, named not renumbered. */
	--kts-space-4: 0.25rem;
	--kts-space-8: 0.5rem;
	--kts-space-12: 0.75rem;
	--kts-space-16: 1rem;
	--kts-space-24: 1.5rem;
	--kts-space-32: 2rem;
	--kts-space-48: 3rem;
	--kts-space-64: 4rem;
	--kts-space-96: 6rem;
	--kts-space-128: 8rem;

	/* Shell */
	--kts-rail-width: 316px; /* Route 2A "refined": narrowed 336 -> 316px */
	--kts-stage-width: clamp(320px, 34vw, 480px);
	--kts-focus-ring: var(--kts-mineral-blue);
}
