/**
 * Design tokens — ported from the Berim frontend (src/styles/globals.css).
 * Do not invent new values. See DESIGN-TOKENS.md.
 * Light mode is the default; dark mode mirrors the product via prefers-color-scheme.
 */

:root {
	/* Surfaces / backgrounds */
	--background-surface-0: #ffffff;
	--background-surface-1: #f5f5f5;
	--background-surface-2: #e6e6e6;
	--background-primary: #e3dfff;
	--background-secondary: #dbe1ff;
	--background-neutral: #f3eeff;
	--background-caution: #feedd7;
	--background-success: #d6ffc2;
	--background-error: #ffdad6;
	--background-snackbar: #2f2c4f;
	--background-scrim: #76739a1a;
	--background-shadow: #0000001a;

	/* Content / text */
	--content-light: #ffffff;
	--content-disabled: #f3eeff;
	--content-lowemphasis: #76739a;
	--content-highemphasis: #76739a;
	--content-dark: #191739;
	--content-primary: #8981ff;
	--content-secondary: #5373ca;
	--content-neutral: #454367;
	--content-error: #de3730;
	--content-success: #2b8900;
	--content-caution: #d96700;

	/* Borders */
	--border-0: #ffffff;
	--border-1: #e3dfff;
	--border-2: #c6c2ed;

	/* Buttons */
	--button-primary: #8981ff;
	--button-primary-content: #ffffff;
	--button-shade: #6c5eff40;
	--button-outline: #908cb5;
	--button-error: #de3730;

	/* Brand */
	--brand: #8981ff;
	--brand-strong: #6c5eff;

	/* Typography */
	--font-sans: 'IRANSansXV', Arial, Helvetica, sans-serif;
	--line-height-body: 1.8;
	--line-height-heading: 1.5;
	--font-size-base: 1rem;
	--font-size-sm: 0.875rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.375rem;
	--font-size-2xl: 1.75rem;
	--font-size-3xl: 2.25rem;
	--font-weight-regular: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;

	/* Spacing (Tailwind base, 0.25rem step) */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.25rem;
	--space-6: 1.5rem;
	--space-7: 1.75rem;
	--space-8: 2rem;
	--space-10: 2.5rem;
	--space-12: 3rem;
	--space-16: 4rem;

	/* Radius */
	--radius-md: 0.375rem;
	--radius-lg: 0.5rem;
	--radius-xl: 0.75rem;
	--radius-2xl: 1rem;
	--radius-full: 9999px;

	/* Shadows (built on the product's low-alpha scrim) */
	--shadow-sm: 0 1px 2px var(--background-shadow);
	--shadow-md: 0 4px 12px var(--background-shadow);
	--shadow-lg: 0 8px 24px var(--background-shadow);

	/* Layout */
	--content-max-width: 72rem;
	--header-height: 4.25rem;

	/* ===================================================================== *
	 * Elevation layer — warmth + depth layered on the product palette.
	 * No new brand colours: the travel accent is the product's existing
	 * caution/amber family, promoted to an accent role for the blog.
	 * ===================================================================== */

	/* Travel accent (product caution family → warm, trustworthy, travel). */
	--accent: #d96700;
	--accent-strong: #b85600;
	--accent-soft: #feedd7;
	--accent-tint: #fff6ec;
	--accent-contrast: #ffffff;

	/* Warm editorial surfaces (derived from the amber family — a long-form
	 * "paper" feel that sets the blog apart from the cool app UI). Deepened
	 * a touch so crisp-white cards/header read as layered, not flat. */
	--surface-warm: #f7f1e8;
	--surface-warm-2: #f1e9dc;

	/* Soft brand fills. */
	--brand-soft: #f3eeff;
	--brand-tint: #eae5ff;

	/* Accessible solid purple for text-on-white and solid buttons/fills
	 * (the brand #6c5eff is only ~4.5:1 on white — borderline). ≈6:1. */
	--brand-ink: #564bd1;

	/* Legible secondary text — overrides the failing #76739a (now ≈6.4:1). */
	--content-lowemphasis: #5d5a80;

	/* Layered, brand-tinted shadows (premium depth). */
	--shadow-xs: 0 1px 2px rgba(25, 23, 57, 0.06);
	--shadow-sm: 0 2px 4px rgba(25, 23, 57, 0.06), 0 1px 2px rgba(25, 23, 57, 0.04);
	--shadow-md: 0 6px 16px rgba(25, 23, 57, 0.08), 0 2px 6px rgba(25, 23, 57, 0.05);
	--shadow-lg: 0 18px 44px rgba(25, 23, 57, 0.13), 0 5px 14px rgba(25, 23, 57, 0.07);
	--shadow-brand: 0 12px 30px rgba(108, 94, 255, 0.28);
	--shadow-accent: 0 12px 28px rgba(217, 103, 0, 0.22);

	/* Display typography. */
	--font-size-4xl: 2.75rem;
	--font-size-5xl: 3.25rem;
	--font-weight-extrabold: 800;
	--font-weight-black: 900;

	/* Extra section spacing. */
	--space-14: 3.5rem;
	--space-20: 5rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--background-surface-0: #17141e;
		--background-surface-1: #232029;
		--background-surface-2: #2e2b34;
		--background-primary: #6c5eff;
		--background-secondary: #6e8de6;
		--background-neutral: #2f2c4f;
		--background-caution: #d96700;
		--background-success: #206d00;
		--background-error: #93000a;
		--background-snackbar: #e3dfff;
		--background-scrim: #76739a40;
		--background-shadow: #e3dfff1a;

		--content-light: #191739;
		--content-disabled: #5d5a80;
		--content-lowemphasis: #76739a;
		--content-highemphasis: #aba7d1;
		--content-dark: #e3dfff;
		--content-primary: #c5c0ff;
		--content-secondary: #dbe1ff;
		--content-neutral: #aba7d1;
		--content-error: #ffb4ab;
		--content-success: #d6ffc2;
		--content-caution: #fcd9b0;

		--border-0: #0b0a0c;
		--border-1: #2f2c4f;
		--border-2: #5d5a80;

		--button-primary: #a7a1ff;
		--button-primary-content: #2400a2;
		--button-shade: #6c5eff59;
		--button-outline: #5d5a80;
		--button-error: #ffb4ab;

		--brand: #a7a1ff;
		--brand-strong: #6c5eff;
		--brand-ink: #8f86ff;

		/* Elevation layer — dark mode. */
		--accent: #ffb877;
		--accent-strong: #ffce9e;
		--accent-soft: #3a2a17;
		--accent-tint: #2a1f12;
		--accent-contrast: #2a1700;

		--surface-warm: #1c1922;
		--surface-warm-2: #232029;

		--brand-soft: #2f2c4f;
		--brand-tint: #322e57;

		--content-lowemphasis: #aba7d1;

		--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
		--shadow-md: 0 6px 16px rgba(0, 0, 0, 0.45);
		--shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
		--shadow-brand: 0 12px 30px rgba(108, 94, 255, 0.4);
		--shadow-accent: 0 12px 28px rgba(217, 103, 0, 0.3);
	}
}
