/**
 * Typography Scale
 *
 * VISUAL THEME FRAMEWORK.
 *
 * Sets document-level base typography (body, headings as raw
 * elements for any markup outside the block system's reach, e.g.
 * WordPress's own wp_kses_post()-rendered shortcode output) and adds
 * letter-spacing refinement to the EXISTING .atb-heading size scale
 * from the Block System phase. This does not redefine font-size or
 * font-weight for .atb-heading — those remain owned by
 * blocks/heading/heading.css exactly as built. This file only adds
 * letter-spacing, which heading.css never set, so there is no
 * property-level conflict between the two files.
 *
 * TOKEN-ONLY: every value reads from var(--atb-*).
 */

html {
	font-size: 100%; /* Respects user/browser font-size preferences. */
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--atb-font-family-base, sans-serif);
	font-size: var(--atb-font-size-base, 1rem);
	line-height: var(--atb-line-height-normal, 1.5);
	color: var(--atb-color-text, #171717);
	background-color: var(--atb-color-background, #ffffff);
}

/* Raw heading elements (h1-h6) outside the block system's reach —
   e.g. headings inside a third-party shortcode's own output rendered
   through .atb-shortcode-container, which this theme deliberately
   does not style (see shortcode-container.css). This rule is scoped
   to NOT apply inside .atb-shortcode-container, preserving that
   block's "don't impose opinions on plugin output" guarantee. */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--atb-font-family-heading, sans-serif);
	font-weight: var(--atb-font-weight-bold, 700);
	line-height: var(--atb-line-height-tight, 1.2);
	letter-spacing: var(--atb-letter-spacing-tight, -0.02em);
}

.atb-shortcode-container h1,
.atb-shortcode-container h2,
.atb-shortcode-container h3,
.atb-shortcode-container h4,
.atb-shortcode-container h5,
.atb-shortcode-container h6 {
	font-family: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

/* Letter-spacing refinement for the existing .atb-heading scale.
   font-size/font-weight/color/margin remain entirely owned by
   blocks/heading/heading.css — this file adds exactly one property
   that file never touched. */
.atb-heading {
	letter-spacing: var(--atb-letter-spacing-tight, -0.02em);
}

/* Base anchor color for any link OUTSIDE the block system's reach
   (e.g. inside a shortcode's own output). blocks/text/text.css's
   .atb-text a rule has higher specificity (0,2,0 vs 0,0,1) and
   continues to win for links inside text blocks — this rule never
   overrides it, it only sets a sane default elsewhere. */
a {
	color: var(--atb-color-primary, #2563eb);
}

a:hover {
	color: var(--atb-color-primary-dark, #1d4ed8);
}
