/**
 * Design tokens: single source of truth for the whole site.
 * Edit values here; Tailwind (tailwind/input.css, @theme) reads these variables.
 * After changing names, rebuild app.css: `npm run build`.
 */
:root {
	/* Colors */
	--c-primary: #5e0520;
	--c-primary-contrast: #ffffff;
	--c-accent: var(--c-error);
	--c-text: var(--black);
	--c-text-muted: var(--gray-7);
	--c-bg: var(--gray-1);
	--c-surface: #ffffff;
	--c-border: var(--gray-2);
	--c-gold: #c9a34e;

	/* Typography */
	--font-body: 'ASP', system-ui, sans-serif;
	--font-features: 'swsh', 'ss02'; /* the site font renders Persian digits through these OpenType features */
	--fs-xs: 0.75rem;
	--fs-sm: 0.875rem;
	--fs-base: 1rem;
	--fs-lg: 1.25rem;
	--fs-xl: 1.5rem;
	--fs-2xl: 2rem;
	--lh-body: 1.8;
	--lh-tight: 1.35;
	--fw-normal: 400;
	--fw-medium: 500;
	--fw-bold: 700;

	/* Layout */
	--container-max: 1140px; /* content width: nothing (menus included) is wider */
	--container-box: calc(var(--container-max) + var(--container-pad) * 2); /* the container box: content + side padding */
	--container-pad: 16px;
	--gap: 16px;
	--gap-lg: 24px;
	--ahan-sidebar-top: 150px; /* sticky side column: gap under the top (sticky header 136px + 14px); the admin bar offset --ahan-sticky-top is added */
	--ahan-sidebar-bottom: 20px; /* sticky side column taller than the window: gap kept under its end (sticky-sidebar.js) */

	/* Shape */
	--radius: 16px;
	--radius-sm: 8px;
	--shadow: 0 2px 4px rgba(0, 0, 0, 0.12);

	/* Design system: palette (docs/design-system.md). Edit in the admin: Theme settings > Style. */
	--c-secondary: #eec64f;
	--black: #1f1f1f;
	--gray-9: #202020;
	--gray-8: #404040;
	--gray-7: #606060;
	--gray-6: #868686;
	--gray-5: #adadad;
	--gray-4: #cbcbcb;
	--gray-3: #dfdfdf;
	--gray-2: #ededed;
	--gray-1: #f9f9f9;
	--c-error: #dc2626;
	--c-success: #16a34a;
	--c-warning: #f59e0b;
	--c-info: #2563eb;

	/* Design system: spacing scale (multiples of 8) */
	--space-1: 8px;
	--space-2: 12px;
	--space-3: 16px;
	--space-4: 24px;
	--space-5: 32px;
	--space-6: 40px;
	--space-7: 48px;
	--space-8: 56px;
	--space-9: 64px;
	--space-10: 80px;
	--space-11: 120px;
	--space-12: 160px;

	/* Design system: motion. Subtle by default (fast = colour/opacity feedback, base = most hovers, slow = reveals). */
	--dur-fast: 150ms;
	--dur: 250ms;
	--dur-slow: 450ms;
	--ease: ease;

	/* Back-to-top button (inc/totop.php, components/totop.css). Settings > General overrides these; empty = the values here. */
	--totop-z: 9998; /* just under the floating contact column (9999) */
	--totop-size: 48px;
	--totop-bg: var(--c-primary);
	--totop-bg-hover: var(--totop-bg);
	--totop-color: var(--c-primary-contrast);
	--totop-side: 20px;
	--totop-bottom: 20px;
	--totop-side-mobile: 16px;
	--totop-bottom-mobile: 64px; /* clears the 44px mobile call bar */
	--totop-after: 0px; /* scroll distance before it appears (only used with the --after modifier) */
	--totop-reveal: 80px; /* scroll distance of the fade-in */
	--totop-fab-gap: 10px; /* gap of the floating contact column (.ahan-fab); the reveal collapses it */
	--totop-radius-soft: var(--radius-sm);
	--totop-radius-square: 4px;
	--totop-radius-pill: 999px;
	--totop-icon: 22px;
	--totop-icon-rotate: -90deg; /* chevron.svg points right; -90deg points up */
	--totop-fs: var(--fs-sm);
	--totop-text-pad: var(--space-2);
	--totop-text-gap: var(--space-1);

	/* Design system: type styles (desktop). Mobile overrides follow the :root block. */
	--fw-semibold: 600;
	--fw-extrabold: 800;
	--t-display-1-size: 58px;
	--t-display-1-weight: 800;
	--t-display-1-lh: 1.4;
	--t-display-2-size: 48px;
	--t-display-2-weight: 800;
	--t-display-2-lh: 1.2;
	--t-display-3-size: 40px;
	--t-display-3-weight: 700;
	--t-display-3-lh: 1.2;
	--t-h1-size: 28px;
	--t-h1-weight: 700;
	--t-h1-lh: 1.4;
	--t-h2-size: 24px;
	--t-h2-weight: 700;
	--t-h2-lh: 1.4;
	--t-h3-size: 20px;
	--t-h3-weight: 700;
	--t-h3-lh: 1.4;
	--t-h4-size: 18px;
	--t-h4-weight: 600;
	--t-h4-lh: 1.4;
	--t-h5-size: 16px;
	--t-h5-weight: 600;
	--t-h5-lh: 1.4;
	--t-h6-size: 14px;
	--t-h6-weight: 600;
	--t-h6-lh: 1.4;
	--t-body-lg-size: 18px;
	--t-body-lg-weight: 400;
	--t-body-lg-lh: 1.8;
	--t-body-size: 16px;
	--t-body-weight: 400;
	--t-body-lh: 1.8;
	--t-body-sm-size: 14px;
	--t-body-sm-weight: 400;
	--t-body-sm-lh: 1.8;
	--t-caption-lg-size: 14px;
	--t-caption-lg-weight: 500;
	--t-caption-lg-lh: 1.8;
	--t-caption-size: 12px;
	--t-caption-weight: 500;
	--t-caption-lh: 1.8;
	--t-caption-sm-size: 11px;
	--t-caption-sm-weight: 400;
	--t-caption-sm-lh: 1.8;
	--t-label-size: 13px;
	--t-label-weight: 400;
	--t-label-lh: 1.8;
	--t-input-size: 14px;
	--t-input-weight: 500;
	--t-input-lh: 1.8;
	--t-btn-lg-size: 16px;
	--t-btn-lg-weight: 600;
	--t-btn-lg-lh: 1.8;
	--t-btn-size: 14px;
	--t-btn-weight: 600;
	--t-btn-lh: 24px;
	--t-btn-sm-size: 12px;
	--t-btn-sm-weight: 600;
	--t-btn-sm-lh: 24px;
	--t-product-name-size: 16px;
	--t-product-name-weight: 600;
	--t-product-name-lh: 1.8;
	--t-product-desc-size: 14px;
	--t-product-desc-weight: 500;
	--t-product-desc-lh: 24px;
	--t-product-spec-size: 12px;
	--t-product-spec-weight: 500;
	--t-product-spec-lh: 24px;
	--t-product-tag-size: 12px;
	--t-product-tag-weight: 500;
	--t-product-tag-lh: 24px;

	/* Forms and buttons (editable in the admin: Theme settings > Style) */
	--form-radius: var(--radius-sm);
	--form-border: var(--c-border);
	--form-bg: var(--c-surface);
	--form-pad-y: 12px;
	--form-pad-x: 14px;
	--btn-radius: var(--radius-sm);
	--btn-bg: var(--c-primary);
	--btn-color: var(--c-primary-contrast);
}

/* Design system: type styles that change on mobile (below 768px, the site's mobile breakpoint). */
@media (max-width: 767px) {
	:root {
		--t-display-1-size: 40px;
		--t-display-2-size: 36px;
		--t-display-3-size: 32px;
		--t-h1-size: 26px;
		--t-h2-size: 22px;
		--t-body-lg-size: 17px;
		--t-caption-weight: 400;
		--t-btn-lh: 1.8;
	}
}

/* Reduced motion: every transition that uses the duration tokens above stops (the OS setting wins over the admin values). */
@media (prefers-reduced-motion: reduce) {
	:root {
		--dur-fast: 0.01ms;
		--dur: 0.01ms;
		--dur-slow: 0.01ms;
	}
}