/* Shared `tone` classes (BYGGSPEC.md §5) for section blocks — paired
   with includes/section-tone.php's ptsussis_tone_class(). */
.tone-paper {
	background: var(--wp--preset--color--warm-300);
	color: var(--wp--preset--color--neutral-900);
}

.tone-warm {
	background: var(--wp--preset--color--warm-500);
	border-block: 1px solid var(--wp--preset--color--warm-500);
	color: var(--wp--preset--color--neutral-900);
}

/* Wave from warm into paper: the paper section's top, masked to the area above the curve, in warm.
   It sits behind the paper section's content; isolation keeps it above the section's own background. */
.tone-warm + .tone-paper {
	--section-wave-height: 8em;
	position: relative;
	isolation: isolate;
	padding-block-start: calc(var(--wp--custom--section-block) * 2);
}

.tone-warm + .tone-paper::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 0;
	z-index: -1;
	block-size: var(--section-wave-height);
	background: var(--wp--preset--color--warm-500);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 150' preserveAspectRatio='none'%3E%3Cpath d='M672.6 66.5 800.8 88 565.7 36.7c-106-23.1-276.1-16-378.2 15.8l-69 21.5 90.8-15.2c115-19.2 323.6-15.8 463.3 7.7z' opacity='.5'/%3E%3Cpath d='M0 93.8v17.1l118.5-37L0 93.9z' opacity='.6'/%3E%3Cpath d='M0 0v93.8L118.5 74l69-21.5c102-31.8 272.3-39 378.2-15.8l235 51.3 85.7 14.4c139.7 23.5 335 31.2 433.9 17L1500 93.9V0H0z'/%3E%3Cpath d='M886.4 102.4 800.8 88l147.1 32.2c106 23.1 273.5 30.5 372.4 16.4l179.7-25.7V93.8l-179.8 25.7c-98.8 14-294 6.4-433.8-17z' opacity='.5'/%3E%3C/svg%3E")
		no-repeat 0 0 / 500% 100%;
	pointer-events: none;
}

.tone-deep {
	--focus-ring-color: var(--wp--preset--color--primary-100);
	--tone-text-muted: var(--wp--custom--text-muted-on-dark);
	background: var(--wp--preset--color--primary-500);
	color: var(--wp--preset--color--neutral-100);
}

/* ptsussis/place-box is always its own light card, even inside a dark
   tone — the override above would otherwise put its links white-on-white. */
.tone-deep .place-box-name,
.tone-deep .place-box-directions {
	color: var(--wp--preset--color--primary-500) !important;
}

.tone-deep a:not(.wp-element-button) {
	color: var(--wp--preset--color--primary-100);
}
