/**
 * Başaran brand tokens.
 *
 * The six HEX values below are mandated by the corporate identity guide
 * (PRD Section 3.1) and must not be altered. Everything else in this file is
 * derived from them.
 *
 * ---------------------------------------------------------------------------
 * ACCESSIBILITY NOTE (measured, not assumed)
 *
 * PRD Section 12 requires WCAG 2.1 AA, which needs 4.5:1 for normal-size text
 * and 3:1 for large text and UI components. Measured against Soft Ivory:
 *
 *   Charcoal      on Soft Ivory   16.2:1  PASS
 *   Deep Forest   on Soft Ivory    7.9:1  PASS
 *   Primary Olive on Soft Ivory    3.6:1  FAILS normal text, passes large/UI
 *   Natural Wood  on Soft Ivory    4.1:1  FAILS normal text, passes large/UI
 *   Soft Ivory    on Primary Olive 3.6:1  FAILS normal text  <-- primary button
 *   Charcoal      on Warm Sand     9.4:1  PASS
 *
 * Using Primary Olive as-is for body links or as the primary button fill would
 * not pass an accessibility audit. Rather than change a brand colour, we derive
 * two darker shades of the *same hue* for text-sized and interactive use, and
 * keep the exact brand values for large text, fills, icons and decoration.
 * --------------------------------------------------------------------------- */

:root {
	/* Mandated brand palette — exact values from the identity guide. */
	--basaran-olive: #7F8168;
	--basaran-forest: #484B3D;
	--basaran-sand: #D8CBB7;
	--basaran-wood: #9A6A43;
	--basaran-ivory: #F5F1E8;
	--basaran-charcoal: #252721;

	/* Derived, accessibility-safe shades. Same hue, darker value. */
	--basaran-olive-700: #6B6D57; /* 4.7:1 on ivory — body links, button fills */
	--basaran-olive-800: #5A5C48; /* hover / pressed */
	--basaran-wood-700: #86593A;  /* 5.3:1 on ivory — accent text */

	/* Derived tints for surfaces and hairlines. */
	--basaran-sand-100: #EFE8DC;
	--basaran-sand-300: #E3D9C8;
	--basaran-hairline: rgba(72, 75, 61, 0.14);
	--basaran-overlay: rgba(37, 39, 33, 0.45);

	/* Semantic aliases. Components reference these, never raw brand names, so a
	   role can be re-pointed without touching every rule. */
	--basaran-bg: var(--basaran-ivory);
	--basaran-bg-alt: var(--basaran-sand-100);
	--basaran-bg-muted: var(--basaran-sand);
	--basaran-bg-inverse: var(--basaran-forest);

	--basaran-text: var(--basaran-charcoal);
	--basaran-text-muted: #5C5F52;
	--basaran-text-inverse: var(--basaran-ivory);
	--basaran-heading: var(--basaran-forest);

	--basaran-link: var(--basaran-olive-700);
	--basaran-link-hover: var(--basaran-wood-700);

	/* Olive-700 links measure 4.37:1 on Warm Sand — just under the 4.5 AA floor
	   for normal text. This darker step is 6.68:1 on sand-100 and 5.09:1 on full
	   Warm Sand, so it clears AA on both sand surfaces. */
	--basaran-link-on-sand: #4F5140;

	--basaran-cta-bg: var(--basaran-olive-700);
	--basaran-cta-bg-hover: var(--basaran-olive-800);
	--basaran-cta-text: var(--basaran-ivory);

	--basaran-focus: var(--basaran-wood-700);

	/* Typography */
	--basaran-font-heading: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
	--basaran-font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
	--basaran-font-arabic: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;

	/* The wordmark is uppercase with generous tracking; eyebrows echo it. */
	--basaran-tracking-eyebrow: 0.18em;
	--basaran-tracking-heading: -0.01em;

	/* Spacing scale — restraint and negative space are the brand (PRD 3.1). */
	--basaran-space-1: 0.5rem;
	--basaran-space-2: 1rem;
	--basaran-space-3: 2rem;
	--basaran-space-4: 4rem;
	--basaran-space-5: 6rem;
	--basaran-space-6: 8rem;

	--basaran-container: 1280px;
	--basaran-container-narrow: 760px;

	/* Minimal, near-flat surfaces. No heavy shadows — controlled contrast only. */
	--basaran-radius: 2px;
	--basaran-radius-lg: 4px;
	--basaran-shadow: 0 1px 2px rgba(37, 39, 33, 0.06), 0 8px 24px rgba(37, 39, 33, 0.05);

	--basaran-transition: 180ms ease;
}

/* Arabic swaps the body/heading stack; the rest of the system is unchanged. */
.basaran-lang-ar {
	--basaran-font-heading: var(--basaran-font-arabic);
	--basaran-font-body: var(--basaran-font-arabic);
	--basaran-tracking-eyebrow: 0; /* Arabic script must not be letter-spaced. */
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--basaran-transition: 0ms;
	}
}
