/*
 * Typography styles — brand-templated for engagement isjac.
 *
 * Source: vendor/zysys/wp-runtime/assets/css/typography.css.template
 * Built:  wp-content/zysys-generated/isjac/css/typography.css
 *
 * The template substitutes isjac at composer install. To change
 * a rule, edit this template and re-run `composer install` (or
 * `composer update`) in the consumer repo.
 *
 * Naming convention: <brand>-<class> per ADR-002.
 */

/* ---------- Heading family ---------- *
 * theme.json declares H1's font-family at `:where(h1)` zero specificity, so
 * the body's `font-family: var(--isjac-font-body)` (Inter) inherits down and
 * wins on every heading the cascade reaches. Explicit selectors here pin
 * every brand heading surface to DM Sans per brand-guide §06.
 */
h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-kadence-advancedheading,
.entry-title,
.site-footer h2,
.site-footer h3 {
	font-family: var(--isjac-font-family);
}

/* ---------- Body type defaults ---------- *
 * Kadence parent ships `.entry-content p { font-size: 1rem }` which clobbers
 * the 17px body set in theme.json. Re-anchor prose elements to the body
 * preset so paragraphs, list items, and definition descriptions all match.
 *
 * Singular post + page titles also need the brand H1 size — Kadence renders
 * them at its global "headline" preset which is smaller than our H1 token.
 */
.entry-content p,
.entry-content li,
.entry-content dd,
.entry-content blockquote p {
	font-size: var(--isjac-font-size-body);
	line-height: var(--isjac-baseline);
}

.single .entry-title,
.single .entry-header h1,
.page .entry-title,
.page .entry-header h1 {
	font-size: var(--isjac-font-size-h1);
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-weight: 700;
	color: var(--isjac-color-ink);
}

/* ---------- Heading rhythm ---------- *
 * Headings sit 0.5lh above their following content (8-12px on 24px baseline)
 * and follow with a sentence-line gap. Removes the cumulative section-padding
 * + heading-margin stack that produced 6rem of dead space earlier.
 */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 0;
	margin-bottom: var(--isjac-pad-md);
}

/* Default heading typography consumes the per-component semantic tokens
 * defined in plugin/tokens.css (--isjac-h2-*, --isjac-h3-*, --isjac-h4-*).
 * Setting these here means a plain <h2> in entry content renders identical
 * to .isjac-section__title — single source of truth in the token layer.
 * Without color set explicitly, Kadence parent's h2 rule wins and the
 * heading inherits its dark-slate (#1a202c) — see T-111 for the bug. */
.entry-content h2 {
	font-family: var(--isjac-h2-font-family);
	font-size: var(--isjac-h2-font-size);
	font-weight: var(--isjac-h2-font-weight);
	line-height: var(--isjac-h2-line-height);
	letter-spacing: var(--isjac-h2-letter-spacing);
	color: var(--isjac-h2-color);
}

.entry-content h3 {
	font-family: var(--isjac-h3-font-family);
	font-size: var(--isjac-h3-font-size);
	font-weight: var(--isjac-h3-font-weight);
	line-height: var(--isjac-h3-line-height);
	letter-spacing: var(--isjac-h3-letter-spacing);
	color: var(--isjac-h3-color);
}

.entry-content h4 {
	font-family: var(--isjac-h4-font-family);
	font-size: var(--isjac-h4-font-size);
	font-weight: var(--isjac-h4-font-weight);
	line-height: var(--isjac-h4-line-height);
	letter-spacing: var(--isjac-h4-letter-spacing);
	color: var(--isjac-h4-color);
}

.entry-content h1 {
	font-size: var(--isjac-font-size-h1);
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--isjac-color-ink);
}

.entry-content h2 + p,
.entry-content h2 + .wp-block-shortcode,
.entry-content h3 + p {
	margin-top: var(--isjac-pad-sm);
}

/* ---------- Links ---------- *
 * Brand-mid default; brand-deep + underline on hover/focus.
 * The :not() chain excludes interactive elements that aren't text links:
 * buttons, pagination chips, image-only anchors. Image-only handling lives
 * in figures.css.template — this rule is the text-link default.
 */
.entry-content a:not(.wp-block-button__link):not(.page-numbers):not(.wp-element-button):not(.isjac-btn):not(.kb-button):not(:has(> img)):not(:has(> figure)) {
	color: var(--isjac-color-brand-mid);                      /* brand-mid */
	text-decoration: none;
	text-underline-offset: 3px;
	transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}

.entry-content a:not(.wp-block-button__link):not(.page-numbers):not(.wp-element-button):not(.isjac-btn):not(.kb-button):not(:has(> img)):not(:has(> figure)):visited {
	color: var(--isjac-color-brand-deep);                      /* brand-deep — visited trail */
}

.entry-content a:not(.wp-block-button__link):not(.page-numbers):not(.wp-element-button):not(.isjac-btn):not(.kb-button):not(:has(> img)):not(:has(> figure)):hover,
.entry-content a:not(.wp-block-button__link):not(.page-numbers):not(.wp-element-button):not(.isjac-btn):not(.kb-button):not(:has(> img)):not(:has(> figure)):focus-visible {
	color: var(--isjac-color-brand-deep);                      /* brand-deep */
	text-decoration: underline;
	text-decoration-color: var(--isjac-color-brand-deep);
}

/* ---------- Code spans / inline mono ---------- */
.entry-content code,
.entry-content kbd {
	font-family: var(--isjac-font-mono);
	font-size: 0.95em;
	background: var(--isjac-surface-tinted);
	padding: 0.125rem 0.375rem;
	border-radius: var(--isjac-radius-sm);
}

/* ---------- Pull quotes ---------- */
.entry-content blockquote {
	margin: var(--isjac-section-sm) 0;
	padding-left: var(--isjac-pad-lg);
	border-left: 3px solid var(--isjac-color-brand-deep);
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--isjac-color-ink);
}
