/**
 * Finova design tokens.
 * Dark scheme is the default. Option-driven values are layered on top via the
 * inline `finova-theme-vars` style block; light scheme via [data-theme="light"].
 */

:root {
	/* Color: dark scheme defaults (overridden by theme options). */
	--fv-bg: #0b1220;
	--fv-surface: #0f1626;
	--fv-surface-soft: #131c30;
	--fv-border: #1e2a3e;
	--fv-text: #e7e8ea;
	--fv-text-muted: #9ba3af;
	--fv-text-faint: #6b7280;
	--fv-primary: #0fb981;
	--fv-secondary: #14b8a6;
	--fv-accent: #d4a017;
	--fv-positive: #16c784;
	--fv-negative: #ea3943;
	--fv-on-primary: #06281c;
	--fv-on-accent: #241a02;

	/* Typography. */
	--fv-font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--fv-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--fv-article-size: 18px;

	/* Layout. */
	--fv-container: 1280px;
	--fv-gutter: 24px;
	--fv-section-gap: 56px;
	--fv-logo-h: 48px;

	/* Radii. */
	--fv-radius-sm: 6px;
	--fv-radius-md: 10px;
	--fv-radius-lg: 14px;

	/* Shadows (dark mode relies on borders, shadows stay subtle). */
	--fv-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.25);
	--fv-shadow-md: 0 6px 24px rgb(0 0 0 / 0.28);

	/* Motion. */
	--fv-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--fv-dur: 180ms;

	color-scheme: dark;
}

@supports (color: color-mix(in srgb, red, blue)) {
	:root {
		--fv-surface-soft: color-mix(in srgb, var(--fv-surface) 90%, #ffffff 10%);
	}
}

/* Light scheme: explicit toggle choice. */
[data-theme="light"] {
	--fv-bg: #f7f6f2;
	--fv-surface: #ffffff;
	--fv-surface-soft: #f0eee8;
	--fv-border: #e5e2d9;
	--fv-text: #171b23;
	--fv-text-muted: #5b6472;
	--fv-text-faint: #8a8f99;
	--fv-shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
	--fv-shadow-md: 0 6px 24px rgb(16 24 40 / 0.08);

	color-scheme: light;
}

@supports (color: color-mix(in srgb, red, blue)) {
	[data-theme="light"] {
		--fv-surface-soft: color-mix(in srgb, var(--fv-surface) 94%, #000000 6%);
	}
}

/* No-JS fallback: honor the OS preference when no explicit theme is set. */
@media (prefers-color-scheme: light) {
	:root:not([data-theme]) {
		--fv-bg: #f7f6f2;
		--fv-surface: #ffffff;
		--fv-surface-soft: #f0eee8;
		--fv-border: #e5e2d9;
		--fv-text: #171b23;
		--fv-text-muted: #5b6472;
		--fv-text-faint: #8a8f99;

		color-scheme: light;
	}
}
