/* Default text colour from the background.
   A dark background (the "Dark" gradient or colour preset, or a dark page background)
   defaults to the light text colour; a light one defaults to the dark text colour.
   Text colours set on individual blocks still win. Used on the front end and in the editor. */

.has-th-dark-gradient-background,
.has-th-dark-background-color,
body.th-page-bg-dark {
	--th-surface-text: var(--wp--preset--color--th-light, #F0F0F0);
	color: var(--th-surface-text);
}

.has-th-light-gradient-background,
.has-th-light-background-color,
body.th-page-bg-light {
	--th-surface-text: var(--wp--preset--color--th-dark, #2A2B33);
	color: var(--th-surface-text);
}

/* Links follow the surface colour instead of the theme's default link colour. */
.has-th-dark-gradient-background a:not(.wp-element-button):not(.wp-block-button__link),
.has-th-dark-background-color a:not(.wp-element-button):not(.wp-block-button__link),
body.th-page-bg-dark a:not(.wp-element-button):not(.wp-block-button__link),
.has-th-light-gradient-background a:not(.wp-element-button):not(.wp-block-button__link),
.has-th-light-background-color a:not(.wp-element-button):not(.wp-block-button__link),
body.th-page-bg-light a:not(.wp-element-button):not(.wp-block-button__link) {
	color: inherit;
}

/* Sector page: the main image under the title. */
.wp-block-image.th-sector-image img {
	width: 100%;
	aspect-ratio: 1.8 / 1;
	object-fit: cover;
	border-radius: clamp(14px, 4vw, 45px);
	box-shadow: 0 0 40px -10px rgba(0, 0, 0, 0.2);
}

/* Space between the sector title and its image: 30px on mobile, 60px from 768px. */
h1:has(+ .th-sector-image) {
	margin-bottom: 0;
}

.th-sector-image {
	margin-top: 30px;
}

@media (min-width: 768px) {
	.th-sector-image {
		margin-top: 60px;
	}
}

/* .home-capture: 100px of top padding on mobile, none from 768px. (Repeated class beats the Container's padding scale.) */
.home-capture.home-capture.home-capture {
	padding-top: 100px;
}

@media (min-width: 768px) {
	.home-capture.home-capture.home-capture {
		padding-top: 0;
	}
}
