/*
 * LaserStudio.ir — design tokens (child theme `woodmart-child`).
 *
 * Source of truth: design-system/MASTER.md v1.2 §2–§6.
 * Three layers with one dependency direction: primitive -> semantic -> component.
 *
 * This is the only child-theme CSS file allowed to hold literal colour values.
 * B0 is repo-only; these variables reach the live site only after B2 approval.
 *
 * Self-hosted Vazirmatn v33.003 (SIL OFL 1.1) ships in assets/fonts/.
 * Four static weights are declared below; 400 and 700 are preloaded in functions.php.
 */

/* ================================================================
 * Vazirmatn v33.003 — self-hosted, SIL OFL 1.1 (no CDN)
 * Paths are relative to this file at the child theme root.
 * ================================================================ */
@font-face {
	font-family: "Vazirmatn";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/vazirmatn-400.woff2") format("woff2");
}

@font-face {
	font-family: "Vazirmatn";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/vazirmatn-500.woff2") format("woff2");
}

@font-face {
	font-family: "Vazirmatn";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/vazirmatn-600.woff2") format("woff2");
}

@font-face {
	font-family: "Vazirmatn";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/vazirmatn-700.woff2") format("woff2");
}

:root {
	/* ================================================================
	 * 1. Primitives — raw values from MASTER §3.2, §4.2, §5, §6
	 * ================================================================ */

	/* Colour primitives (§3.2) */
	--ls-palette-ink: #1f1a17;
	--ls-palette-ink-muted: #6b625b;
	--ls-palette-surface: #f7f1ea;
	--ls-palette-surface-raised: #fffdf9;
	--ls-palette-surface-sunken: #efe7dd;
	--ls-palette-line: #e6d9c9;
	--ls-palette-gold: #c9a227;
	--ls-palette-gold-text: #8a5a00;
	--ls-palette-rose: #c45c7a;
	--ls-palette-rose-strong: #9e3f5c;
	--ls-palette-rose-strong-hover: #8b3952;
	--ls-palette-success: #2e7d4f;
	--ls-palette-warning: #8a5200;
	--ls-palette-error: #b3261e;
	--ls-palette-on-accent: #ffffff;
	--ls-palette-scrim: rgba(31, 26, 23, 0.55);
	--ls-palette-overlay-ink-08: rgba(31, 26, 23, 0.08);
	--ls-palette-shadow-soft: rgba(31, 26, 23, 0.06);
	--ls-palette-shadow-medium: rgba(31, 26, 23, 0.08);
	--ls-palette-shadow-deep: rgba(31, 26, 23, 0.1);

	/* Type primitives (§4.1, §4.2) */
	--ls-font-sans: "Vazirmatn", "IRANSans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ls-weight-regular: 400;
	--ls-weight-medium: 500;
	--ls-weight-semibold: 600;
	--ls-weight-bold: 700;

	--ls-size-caption: 13px;
	--ls-size-small: 14px;
	--ls-size-body: 16px;
	--ls-size-body-lg: 18px;
	--ls-size-h4: 20px;
	--ls-size-h3: 24px;
	--ls-size-h2: 32px;
	--ls-size-h1: 40px;

	--ls-leading-caption: 1.6;
	--ls-leading-small: 1.7;
	--ls-leading-body: 1.8;
	--ls-leading-heading: 1.4;
	--ls-leading-display: 1.25;
	--ls-measure-body: 68ch;

	/* Spacing primitives (§5.1) */
	--ls-space-2xs: 4px;
	--ls-space-xs: 8px;
	--ls-space-sm: 12px;
	--ls-space-md: 16px;
	--ls-space-lg: 24px;
	--ls-space-xl: 32px;
	--ls-space-2xl: 48px;
	--ls-space-3xl: 64px;
	--ls-space-4xl: 96px;

	/* Layout primitives (§5.2) */
	--ls-container-max: 1280px;
	--ls-content-max: 1200px;
	--ls-narrow-max: 760px;
	--ls-gutter-mobile: 16px;
	--ls-gutter-tablet: 24px;
	--ls-gutter-desktop: 32px;
	--ls-grid-gap-mobile: 16px;
	--ls-grid-gap-desktop: 24px;
	--ls-section-padding-mobile: 40px;
	--ls-section-padding-desktop: 64px;
	--ls-breakpoint-sm: 375px;
	--ls-breakpoint-md: 768px;
	--ls-breakpoint-lg: 1024px;
	--ls-breakpoint-xl: 1280px;
	--ls-breakpoint-2xl: 1440px;

	/* Radius primitives (§6.1) */
	--ls-radius-sm: 4px;
	--ls-radius-md: 8px;
	--ls-radius-lg: 12px;
	--ls-radius-xl: 16px;
	--ls-radius-pill: 999px;

	/* Elevation primitives (§6.2) */
	--ls-shadow-0: none;
	--ls-shadow-1: 0 1px 2px var(--ls-palette-shadow-soft), 0 1px 3px var(--ls-palette-shadow-medium);
	--ls-shadow-2: 0 8px 24px var(--ls-palette-shadow-deep);

	/* Motion primitives (§6.3) */
	--ls-motion-fast: 150ms;
	--ls-motion-base: 250ms;
	--ls-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
	--ls-motion-reduced: 0.01ms;

	/* ================================================================
	 * 2. Semantic tokens — roles only, no literal values
	 * ================================================================ */

	--ls-ink: var(--ls-palette-ink);
	--ls-ink-muted: var(--ls-palette-ink-muted);
	--ls-surface: var(--ls-palette-surface);
	--ls-surface-raised: var(--ls-palette-surface-raised);
	--ls-surface-sunken: var(--ls-palette-surface-sunken);
	--ls-line: var(--ls-palette-line);
	--ls-gold: var(--ls-palette-gold);
	--ls-gold-text: var(--ls-palette-gold-text);
	--ls-rose: var(--ls-palette-rose);
	--ls-rose-strong: var(--ls-palette-rose-strong);
	--ls-rose-strong-hover: var(--ls-palette-rose-strong-hover);
	--ls-success: var(--ls-palette-success);
	--ls-warning: var(--ls-palette-warning);
	--ls-error: var(--ls-palette-error);
	--ls-on-accent: var(--ls-palette-on-accent);
	--ls-border-control: var(--ls-palette-ink-muted);
	--ls-scrim: var(--ls-palette-scrim);
	--ls-overlay-ink-08: var(--ls-palette-overlay-ink-08);

	/* Focus (§3.3): 2px outer + 2px inner, 2px offset, dual ring. */
	--ls-focus-outer: var(--ls-ink);
	--ls-focus-inner: var(--ls-surface-raised);

	/* Type roles (§4.2) */
	--ls-type-caption-size: var(--ls-size-caption);
	--ls-type-caption-line: var(--ls-leading-caption);
	--ls-type-caption-weight: var(--ls-weight-regular);
	--ls-type-small-size: var(--ls-size-small);
	--ls-type-small-line: var(--ls-leading-small);
	--ls-type-small-weight: var(--ls-weight-regular);
	--ls-type-body-size: var(--ls-size-body);
	--ls-type-body-line: var(--ls-leading-body);
	--ls-type-body-weight: var(--ls-weight-regular);
	--ls-type-body-lg-size: var(--ls-size-body-lg);
	--ls-type-body-lg-line: var(--ls-leading-body);
	--ls-type-body-lg-weight: var(--ls-weight-regular);
	--ls-type-h4-size: var(--ls-size-h4);
	--ls-type-h4-line: var(--ls-leading-heading);
	--ls-type-h4-weight: var(--ls-weight-semibold);
	--ls-type-h3-size: var(--ls-size-h3);
	--ls-type-h3-line: var(--ls-leading-heading);
	--ls-type-h3-weight: var(--ls-weight-semibold);
	--ls-type-h2-size: var(--ls-size-h2);
	--ls-type-h2-line: var(--ls-leading-display);
	--ls-type-h2-weight: var(--ls-weight-bold);
	--ls-type-h1-size: var(--ls-size-h1);
	--ls-type-h1-line: var(--ls-leading-display);
	--ls-type-h1-weight: var(--ls-weight-bold);

	/* ================================================================
	 * 3. Component tokens — aliases resolving through semantic tokens
	 * ================================================================ */

	/* Shared control metrics */
	--ls-control-min-size: 44px;
	--ls-focus-ring-width: 2px;
	--ls-focus-ring-offset: 2px;
	--ls-focus-ring-shadow:
		0 0 0 var(--ls-focus-ring-offset) var(--ls-focus-inner),
		0 0 0 calc(var(--ls-focus-ring-offset) + var(--ls-focus-ring-width)) var(--ls-focus-outer);

	/* Link */
	--ls-link-color: var(--ls-gold-text);
	--ls-link-color-hover: var(--ls-ink);

	/* Button */
	--ls-button-primary-bg: var(--ls-rose-strong);
	--ls-button-primary-bg-hover: var(--ls-rose-strong-hover);
	--ls-button-primary-ink: var(--ls-on-accent);
	--ls-button-secondary-bg: var(--ls-ink);
	--ls-button-secondary-bg-hover: var(--ls-ink-muted);
	--ls-button-quiet-bg: var(--ls-surface-raised);
	--ls-button-quiet-bg-hover: var(--ls-surface-sunken);
	--ls-button-quiet-ink: var(--ls-ink);
	--ls-button-quiet-border: var(--ls-border-control);

	/* Card */
	--ls-card-bg: var(--ls-surface-raised);
	--ls-card-ink: var(--ls-ink);
	--ls-card-border: var(--ls-line);
	--ls-card-radius: var(--ls-radius-xl);
	--ls-card-shadow: var(--ls-shadow-1);
	--ls-card-padding-mobile: var(--ls-space-md);
	--ls-card-padding-desktop: var(--ls-space-lg);

	/* Input */
	--ls-input-bg: var(--ls-surface-raised);
	--ls-input-ink: var(--ls-ink);
	--ls-input-border: var(--ls-border-control);
	--ls-input-border-error: var(--ls-error);
	--ls-input-placeholder: var(--ls-ink-muted);
}

/*
 * Desktop type steps from MASTER §4.2: H1 40 -> 56px, H2 32 -> 40px.
 * Media queries cannot consume custom properties, so 1024px is literal here.
 * The semantic tokens above re-resolve because they reference these primitives.
 */
@media (min-width: 1024px) {
	:root {
		--ls-size-h1: 56px;
		--ls-size-h2: 40px;
	}
}

/* Colour keyword token, so components never write a literal colour keyword. */
:root {
	--ls-transparent: transparent;
}
