/**
 * MHSI New Text Styles — selectable block style variations.
 * Source: Figma “New Text Styles / MHSI - *” (Mark OT).
 * Classes work on Heading, Paragraph, and Button so any style can override another element.
 */

:root {
	--mhsi-text-h1-home-size: clamp(2.5rem, 5vw, 4.1116rem); /* 65.785px */
	--mhsi-text-h1-size: clamp(2.75rem, 5.5vw, 4.8125rem); /* 77px */
	--mhsi-text-h2-size: clamp(1.85rem, 3.5vw, 3.0453rem); /* 48.725px */
	/* Interpolated mid H2↔H3 — no Figma “MHSI - H2.5” style exists. */
	--mhsi-text-h2-5-size: clamp(1.675rem, 3vw, 2.5452rem); /* 40.723px */
	--mhsi-text-h3-size: clamp(1.5rem, 2.5vw, 2.045rem); /* 32.72px */
	--mhsi-text-h4-size: clamp(1.25rem, 2vw, 1.5625rem); /* 25px */
	--mhsi-text-intro-big-size: clamp(1.625rem, 2.8vw, 2.4416rem); /* 39.066px */
	--mhsi-text-intro-size: clamp(1.375rem, 2vw, 1.625rem); /* 26px */
	--mhsi-text-paragraph-size: clamp(1.125rem, 1.4vw, 1.3125rem); /* 21px */
	--mhsi-text-paragraph-big-size: clamp(1.375rem, 2vw, 1.625rem); /* 26px */
	--mhsi-text-eyebrow-size: var(--mhsi-text-paragraph-size); /* same fluid size as paragraph */
	--mhsi-text-button-label-size: 1.375rem; /* 22px */
	--mhsi-text-small-size: 1.125rem; /* 18px */
	--mhsi-text-post-tag-size: 1.125rem; /* 18px */
}

/* Button block puts is-style-* on the wrapper; typography must hit the link. */
.wp-block-button[class*="is-style-mhsi-"] .wp-block-button__link {
	font-family: inherit;
}

/* —— H1 (home) —— */
.is-style-mhsi-h1-home,
.wp-block-button.is-style-mhsi-h1-home .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h1-home-size) !important;
	font-weight: 500 !important;
	line-height: 1.11 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— H1 —— */
.is-style-mhsi-h1,
.wp-block-button.is-style-mhsi-h1 .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h1-size) !important;
	font-weight: 500 !important;
	line-height: 1.23 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— H2 —— */
.is-style-mhsi-h2,
.wp-block-button.is-style-mhsi-h2 .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h2-size) !important;
	font-weight: 500 !important;
	line-height: 1.23 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— H2.5 (interpolated between H2 and H3) —— */
.is-style-mhsi-h2-5,
.wp-block-button.is-style-mhsi-h2-5 .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h2-5-size) !important;
	font-weight: 500 !important;
	line-height: 1.23 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— H3 —— */
.is-style-mhsi-h3,
.wp-block-button.is-style-mhsi-h3 .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h3-size) !important;
	font-weight: 500 !important;
	line-height: 1.23 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— H4 —— */
.is-style-mhsi-h4,
.wp-block-button.is-style-mhsi-h4 .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-h4-size) !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* —— Intro Big —— */
.is-style-mhsi-intro-big,
.wp-block-button.is-style-mhsi-intro-big .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-intro-big-size) !important;
	font-weight: 500 !important;
	line-height: 1.23 !important;
	letter-spacing: -0.04em !important;
	text-transform: none !important;
}

/* —— Intro —— */
.is-style-mhsi-intro,
.wp-block-button.is-style-mhsi-intro .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-intro-size) !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* —— Paragraph —— */
.is-style-mhsi-paragraph,
.wp-block-button.is-style-mhsi-paragraph .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-paragraph-size) !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
}

/* —— Paragraph (big) —— */
.is-style-mhsi-paragraph-big,
.wp-block-button.is-style-mhsi-paragraph-big .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-paragraph-big-size) !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
}

/* —— Eyebrow —— */
.is-style-mhsi-eyebrow,
.wp-block-button.is-style-mhsi-eyebrow .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-eyebrow-size) !important;
	font-weight: 700 !important;
	line-height: 24px !important;
	letter-spacing: 0.01em !important;
	text-transform: uppercase !important;
}

/*
 * Default accent = page theme color. Skip when the block editor set a text
 * color (.has-text-color covers palette classes + custom inline color).
 */
.is-style-mhsi-eyebrow:not(.has-text-color),
.wp-block-button.is-style-mhsi-eyebrow:not(.has-text-color) .wp-block-button__link:not(.has-text-color) {
	color: var(--mhsi-page-theme-bg, var(--mhsi-color-teal, #18808e)) !important;
}

.is-style-mhsi-eyebrow {
	margin-bottom: 0.5rem;
}

/* Light blue theme: use accent blue, not the pale bg. */
body.mhsi-theme-blue-light .is-style-mhsi-eyebrow:not(.has-text-color),
body.mhsi-theme-blue-light .wp-block-button.is-style-mhsi-eyebrow:not(.has-text-color) .wp-block-button__link:not(.has-text-color) {
	color: #0090e9 !important;
}

/* Eyebrow + H2 stack: drop the default H2 top margin. */
.is-style-mhsi-eyebrow + h2,
.is-style-mhsi-eyebrow + .wp-block-heading:where(h2),
.wp-block-button.is-style-mhsi-eyebrow + h2,
.wp-block-button.is-style-mhsi-eyebrow + .wp-block-heading:where(h2) {
	margin-top: 0;
	margin-block-start: 0;
}

/* —— Button Label —— */
.is-style-mhsi-button-label,
.wp-block-button.is-style-mhsi-button-label .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-button-label-size) !important;
	font-weight: 700 !important;
	line-height: 24px !important;
	letter-spacing: -0.02em !important;
	text-transform: none !important;
}

/* —— Small —— */
.is-style-mhsi-small,
.wp-block-button.is-style-mhsi-small .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-small-size) !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* —— Post Tag —— */
.is-style-mhsi-post-tag,
.wp-block-button.is-style-mhsi-post-tag .wp-block-button__link {
	font-family: var(--wp--preset--font-family--mark-ot) !important;
	font-size: var(--mhsi-text-post-tag-size) !important;
	font-weight: 700 !important;
	line-height: 24px !important;
	letter-spacing: 0 !important;
	text-transform: uppercase !important;
}
