/* Typography: body font and colours, headings, paragraphs, gradient headings.
   Loaded on the front end AND in the block editor (see inc/setup.php), so the
   editor matches the live site. In the editor, `body` becomes .editor-styles-wrapper. */

body {
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-optical-sizing: auto;
	font-style: normal;
	font-variation-settings: "wdth" 100;
	color: var(--wp--custom--color--text, #131319);
	background: var(--wp--custom--color--background, #F0F0F0);
}

/* General type styling */

h1, h2, h3, h4, h5, h6 {
	line-height: 115%;
	font-weight: 600;
	letter-spacing: clamp(2px, 2vw, 8px);
	text-transform: uppercase;
	margin: 0;
}

h1, h2, h3, h4, h5, h6, p, a {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2 {
	font-size: clamp(24px, 5vw, 40px);
	letter-spacing: clamp(2px, 2vw, 8px);
	margin: 0;
}

h2 { 

}
h3 {
	font-size: clamp(18px, 3vw, 24px);
	letter-spacing: clamp(2px, 1vw, 4px);
}
h4 {
	font-size: clamp(16px, 2vw, 18px);
	letter-spacing: clamp(2px, 1vw, 4px);
}
h5 { font-size: 18px; }

a {
	text-decoration: none;
}

p {
	font-size: clamp(15px, 3.4vw, 18px);
}

strong {
	font-weight: 600
}

/* Gradient headings (token: settings.custom.gradient.heading in theme.json).
   Applies to every heading, even one with a text colour set in the editor, matching the
   animated headings (Site Controls), whose words always carry the same gradient. Animated
   headings are skipped here because their words carry the gradient themselves. */
h1:not(.animated-heading),
h2:not(.animated-heading),
h3:not(.animated-heading),
h4:not(.animated-heading),
h5:not(.animated-heading),
h6:not(.animated-heading) {
	background-image: var(--wp--custom--gradient--heading, linear-gradient(180deg, #0A79F7 0%, #4F9FF9 100%));
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* Heading marker: add "th-heading-marker" to a heading's Additional CSS class(es).
   Places a red dot icon just above the heading's top-left corner. */
.th-heading-marker {
	position: relative;
}

.th-heading-marker::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none'%3E%3Ccircle opacity='0.2' cx='11' cy='11' r='11' fill='%23FF0000'/%3E%3Ccircle cx='11' cy='11' r='4' fill='%23FF0000'/%3E%3C/svg%3E") no-repeat center / contain;
	pointer-events: none;
}

/* Animated headings are clipped to their own box (clip-path) to hide the slide-up.
   Let the marker show above the top edge; sides and bottom stay clipped as before. */
.animated-heading.th-heading-marker {
	clip-path: inset(-40px -0.2em 0 -0.2em);
	-webkit-clip-path: inset(-40px -0.2em 0 -0.2em);
}

/* Small, Medium and Large paragraphs (the font sizes in the editor): narrower measure. */
p.has-small-font-size,
p.has-medium-font-size,
p.has-large-font-size {
	max-width: clamp(550px, 60vw, 750px);
}

/* Button block, "Link with arrow" style: matches the "More info" link in Service items
   (uppercase, gradient text, arrow that nudges right on hover). The default roundel
   style is unchanged. */
.wp-block-button.is-style-th-link .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 14px;
	font-weight: 700;
	line-height: normal;
	letter-spacing: 2.24px;
	text-transform: uppercase;
	text-decoration: none;
	background-color: transparent;
	background-image: var(--wp--custom--gradient--heading, linear-gradient(180deg, #0A79F7 0%, #4F9FF9 100%));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.wp-block-button.is-style-th-link .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 10px;
	background-image: var(--wp--custom--gradient--heading, linear-gradient(180deg, #0A79F7 0%, #4F9FF9 100%));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
	transition: transform 0.3s cubic-bezier(0.09, 0.51, 0.34, 1);
}

.wp-block-button.is-style-th-link .wp-block-button__link:hover::after,
.wp-block-button.is-style-th-link .wp-block-button__link:focus-visible::after {
	transform: translateX(5px);
}

.wp-block-button.is-style-th-link .wp-block-button__link:focus-visible {
	outline: 2px solid #0A79F7;
	outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-th-link .wp-block-button__link::after {
		transition: none;
	}
}

/* Text colour applied inside rich text (core/text-color): keep the browser's yellow <mark> highlight off. */
mark.has-inline-color {
	background-color: transparent;
}
