/**
 * Self-Hosted Optimized Fonts
 * Subsetted for Hebrew (U+0590-05FF) and Latin (U+0020-007E)
 * 
 * Performance optimizations:
 * - font-display: swap - Prevents FOIT, ensures fast LCP
 * - Subsetted fonts - 50%+ size reduction
 * - Self-hosted - Eliminates third-party latency
 * - Variable font for Assistant - Single file for all weights
 */

/* ====================================
	 ASSISTANT VARIABLE FONT
	 ==================================== */

/* Metric-adjusted fallback font for Assistant to prevent CLS */
@font-face {
	font-family: "Assistant-Fallback";
	size-adjust: 98%;
	ascent-override: 92%;
	descent-override: 24%;
	line-gap-override: 0%;
	src: local("Arial");
}

/* Assistant Variable Font - All weights (200-800) */
@font-face {
	font-family: "Assistant";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("../fonts/Assistant-subset.woff2") format("woff2");
}

/* ====================================
	 LATO FONT FAMILY
	 ==================================== */

/* Metric-adjusted fallback font for Lato to prevent CLS */
@font-face {
	font-family: "Lato-Fallback";
	size-adjust: 100%;
	ascent-override: 95%;
	descent-override: 21%;
	line-gap-override: 0%;
	src: local("Arial");
}

/* Lato Light (300) */
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("../fonts/Lato-300-subset.woff2") format("woff2");
}

/* Lato Regular (400) */
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/Lato-400-subset.woff2") format("woff2");
}

/* Lato Bold (700) */
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/Lato-700-subset.woff2") format("woff2");
}

/* Lato Black (900) */
@font-face {
	font-family: "Lato";
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url("../fonts/Lato-900-subset.woff2") format("woff2");
}

/* ====================================
	 CSS CUSTOM PROPERTIES
	 ==================================== */

/* 
 * Optional: Use these CSS variables in your theme for consistent font stacks
 * The @font-face rules above will automatically apply when 'Assistant' or 'Lato' 
 * are used in any font-family declaration.
 */

:root {
	--font-assistant: "Assistant", "Assistant-Fallback", -apple-system,
		BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--font-lato: "Lato", "Lato-Fallback", -apple-system, BlinkMacSystemFont,
		"Segoe UI", Arial, sans-serif;
}

/* 
 * Note: Your existing CSS declarations like:
 *   font-family: Assistant, sans-serif;
 *   font-family: Lato, sans-serif;
 * 
 * Will automatically use the self-hosted fonts defined above.
 * The fallback fonts (Assistant-Fallback, Lato-Fallback) help prevent CLS.
 */
