/*
 * typography.css — the type system (Lato throughout, matching the client's site).
 *
 * Element defaults + a few intent utilities (.eyebrow, .lead, .display).
 * All sizes/tracking come from tokens.css. text-wrap: balance keeps headline
 * ragging tidy without manual line breaks.
 *
 * Weights available in the subset are 300 / 400 / 700 only. Anything else (500,
 * 600) would be synthesised by the browser into a smeared faux-bold, so every
 * declaration below sticks to those three.
 */

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: var(--lh-heading);
	font-weight: var(--fw-heading);
	margin: 0 0 var(--s-4);
	overflow-wrap: break-word; /* long Finnish compounds never overflow */
	text-wrap: balance;
}

/*
 * No negative tracking. The old set-up tightened headlines because Fraunces is a
 * serif at 600-ish weight; Lato 300 at display size is already open and airy,
 * and pulling it tighter closes up the ä/ö dots on Finnish headlines.
 */
h1,
.display {
	font-size: var(--fs-display);
	line-height: var(--lh-tight);
	letter-spacing: normal;
}

h2 {
	font-size: var(--fs-h2);
	letter-spacing: normal;
}

h3 {
	font-size: var(--fs-h3);
}

/* h4 is a small label rather than a headline, so it holds its weight instead of
   going light — at this size 300 would disappear into the body text. */
h4 {
	font-size: var(--fs-body-lg);
	font-weight: 700;
	letter-spacing: 0;
	line-height: var(--lh-heading);
}

p {
	margin: 0 0 var(--s-4);
	max-width: var(--measure);
	overflow-wrap: break-word;
}

a {
	color: var(--koivu);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color var(--dur-fast) var(--ease);
}

a:hover {
	color: var(--koivu-dark);
}

ul,
ol {
	margin: 0 0 var(--s-4);
	padding-left: var(--s-6);
	max-width: var(--measure);
}

li {
	margin-bottom: var(--s-2);
}

/* ---- Intent utilities ---- */
.eyebrow {
	font-family: var(--font-body);
	font-size: var(--fs-eyebrow);
	font-weight: 700;
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
	color: var(--koivu);
	margin: 0 0 var(--s-4);
}

.lead {
	font-size: var(--fs-body-lg);
	line-height: var(--lh-body);
	color: var(--muted);
	max-width: 60ch;
}

.u-small {
	font-size: var(--fs-small);
}
