/*
 * sd/inner-hero: the opening band of an inner page. One set of parts (trail, headline, lead, actions,
 * proof) in four layouts: print (default), centred, enquiry and showcase. Plus the "On this page" bar,
 * which follows the section as a sibling so it can stick inside the page content.
 *
 * Breakpoints follow the old inner hero: 62rem is the two-column split, 48rem is phones.
 * Not to be confused with the older `sd-inner` hero primitive (src/css/primitives/inner-hero.css):
 * it styles `.sd-inner*` only, and this component never carries those classes.
 */

/* ---------------------------------------------------------------- The band */

.sd-inner-hero {
	--ih-gap: clamp(16px, 1.7vw, 24px);
	--ih-display: clamp(3rem, 1.2rem + 5.75vw, 6.375rem);
	--ih-ink: var(--wp--preset--color--contrast);
	--ih-tape: color-mix(in srgb, var(--wp--preset--color--highlighter) 92%, #e8c547);

	position: relative;
	isolation: isolate;
	overflow: clip;
	margin: 0;
	padding: clamp(32px, 3.6vw, 56px) 24px clamp(40px, 5vw, 80px);
	/* The homepage hero's ground at about half strength: white where the band meets the header,
	   warming to cream at the foot, with the flamingo wash low on the right. */
	background:
		radial-gradient(ellipse 46% 58% at 80% 96%, color-mix(in srgb, var(--wp--preset--color--secondary) 11%, transparent), transparent 70%),
		radial-gradient(ellipse 30% 40% at 96% 70%, color-mix(in srgb, var(--wp--preset--color--secondary) 6%, transparent), transparent 70%),
		linear-gradient(180deg, var(--wp--preset--color--white) 0%, var(--wp--preset--color--white) 10%, color-mix(in srgb, var(--wp--preset--color--sd-cream) 70%, var(--wp--preset--color--white)) 100%);
	color: var(--ih-ink);
	font-family: var(--wp--preset--font-family--sans);
}

/* The overlay header lies over the page, so a band that opens the page pads itself clear of it. */
body:has(.wp-block-stronger-site-header.is-overlay) :is(main, .wp-block-post-content) > .sd-inner-hero:first-child {
	padding-block-start: calc(var(--stronger-header-height, 4.75rem) + clamp(32px, 3.6vw, 56px));
}

/* The site's own fine grain (the noise-overlay section style's two layers), not a pitted texture:
   even across the band, with no visible repeat. */
.sd-inner-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: url(../../assets/decorations/noise-pixel.png), url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAxIDAiLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYSkiLz48L3N2Zz4=);
	background-size: 192px 192px, 200px 200px;
	filter: brightness(0.5);
	mix-blend-mode: multiply;
	opacity: 0.13;
	pointer-events: none;
	/* As on the homepage: none at the top, building to the foot. */
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 18%, rgb(0 0 0 / 0.5) 55%, #000 90%);
	mask-image: linear-gradient(180deg, transparent 0%, transparent 18%, rgb(0 0 0 / 0.5) 55%, #000 90%);
}

.sd-inner-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
	align-items: center;
	column-gap: clamp(40px, 5vw, 96px);
	width: min(100%, var(--wp--style--global--content-size, 82.1875rem));
	margin-inline: auto;
}

/* The words: one column, one rhythm, no fixed height. */
.sd-inner-hero__words {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--ih-gap);
	min-width: 0;
}

.sd-inner-hero__words > * {
	margin: 0;
}

/* ---------------------------------------------------------------- Trail */

.sd-inner-hero__trail {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font: 600 var(--wp--preset--font-size--fixed-12) / 1.4 var(--wp--preset--font-family--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sd-inner-hero__trail .sd-breadcrumbs {
	margin: 0;
}

.sd-inner-hero__trail .sd-breadcrumbs__list li {
	font: inherit !important;
	letter-spacing: inherit;
}

.sd-inner-hero__trail .sd-breadcrumbs a {
	color: var(--ih-ink);
}

/* No home icon, no Home: the first step and its slash are dropped, and the current page is the H1. */
.sd-inner-hero__trail .sd-breadcrumbs__list > :is(:first-child, :nth-child(2), :last-child) {
	display: none;
}

.sd-inner-hero__trail .sd-breadcrumbs:has(.sd-breadcrumbs__list > :nth-child(4)) + .sd-inner-hero__keyword {
	margin-inline-start: 8px;
}

.sd-inner-hero__keyword {
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: color-mix(in srgb, var(--ih-ink) 62%, transparent);
}

/* ---------------------------------------------------------------- Headline and lead */

/*
 * The theme sets `main p` to serif at class specificity (global.css), so the paragraph parts that
 * carry their own face are written as `.sd-inner-hero .part` to win without a priority flag.
 */

.sd-inner-hero .sd-inner-hero__headline {
	max-width: 13em;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--ih-display);
	font-weight: 700;
	line-height: 0.92;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.sd-inner-hero__underline {
	position: relative;
	isolation: isolate;
	white-space: nowrap;
	text-shadow: 2px 0 var(--wp--preset--color--base), -2px 0 var(--wp--preset--color--base), 0 2px var(--wp--preset--color--base);
}

/*
 * The stroke is the homepage's: the underline-text style's brush, drawn on along its own paths by
 * the composition primitive's script (the wrapper carries `is-style-display-heading` only so that
 * script and its rules treat this as a display heading; its type settings are handed back here).
 * It runs a little past the word's last letter, sits just under the baseline, and passes behind
 * descenders with the paper-coloured gap above rather than the script's cut-out mask, which would
 * stop the line short of a trailing descender.
 */
.sd-inner-hero .sd-inner-hero__draw {
	font-size: inherit !important;
	line-height: inherit !important;
}

.sd-inner-hero .sd-inner-hero__underline {
	font-family: inherit;
	--underline-bottom: 0.1em;
	--underline-height: 0.2em;
}

.sd-inner-hero .sd-inner-hero__draw > .sd-inner-hero__underline::after {
	left: -1%;
	width: 109%;
	z-index: -1;
	-webkit-mask-image: none;
	mask-image: none;
}

.sd-inner-hero__lead {
	max-width: 28em;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.01em;
	text-transform: none;
	text-wrap: pretty;
}

/* ---------------------------------------------------------------- Actions and proof */

.sd-inner-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-block-start: 6px;
}

.sd-inner-hero__button {
	margin: 0;
}

.sd-inner-hero__button .wp-block-button__link {
	display: inline-block;
	box-sizing: border-box;
	min-block-size: 3.25rem;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	border: 2px solid transparent;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--sd-flamingo);
	box-shadow: var(--wp--custom--shadow--raised-accent);
	color: var(--wp--preset--color--white);
	font: 600 var(--wp--preset--font-size--fixed-18) / 28px var(--wp--preset--font-family--sans);
	text-align: center;
	text-decoration: none;
}

.sd-inner-hero__button.is-style-feature-button-secondary .wp-block-button__link {
	border-color: transparent;
	background-color: var(--wp--preset--color--white);
	box-shadow: var(--wp--custom--shadow--raised-quiet);
	color: var(--ih-ink);
}

.sd-inner-hero__link {
	padding-block-end: 4px;
	background: url(../../assets/decorations/underline-scribble-flamingo-1.svg) left bottom / 100% 6px no-repeat;
	color: var(--ih-ink);
	font: 500 var(--wp--preset--font-size--fixed-18) / 1.3 var(--wp--preset--font-family--serif);
	text-decoration: none;
}

.sd-inner-hero__link:hover {
	background-size: 100% 8px;
}

.sd-inner-hero__button .wp-block-button__link:focus-visible,
.sd-inner-hero__link:focus-visible,
.sd-inner-hero__tab:focus-visible,
.sd-inner-hero__trail .sd-breadcrumbs a:focus-visible {
	outline: 2px solid var(--wp--preset--color--sd-flamingo);
	outline-offset: 3px;
}

.sd-inner-hero__proof {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sd-inner-hero__tick {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 0;
	font: 400 var(--wp--preset--font-size--fixed-16) / 1.4 var(--wp--preset--font-family--sans);
	color: color-mix(in srgb, currentcolor 82%, transparent);
}

.sd-inner-hero__tick::before {
	content: "";
	flex: none;
	inline-size: 16px;
	block-size: 16px;
	background: url(../../assets/icons/checkmark-disc.svg) center / contain no-repeat;
}

/* ---------------------------------------------------------------- Reviews chip */

.sd-inner-hero .sd-inner-hero__rating {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 14px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white);
	box-shadow: 0 1px 1px rgb(29 45 53 / 0.15), 0 10px 18px -8px rgb(29 45 53 / 0.4);
	font: 600 var(--wp--preset--font-size--fixed-14) / 1 var(--wp--preset--font-family--sans);
	letter-spacing: 0;
}

.sd-inner-hero__stars {
	inline-size: 77px;
	block-size: 13px;
	background: url(../../assets/icons/5-star.svg) center / contain no-repeat;
}

.sd-inner-hero__note {
	font-size: var(--wp--preset--font-size--fixed-13);
	font-weight: 400;
	color: color-mix(in srgb, var(--ih-ink) 78%, transparent);
}

/* ---------------------------------------------------------------- The print */

.sd-inner-hero__media {
	position: relative;
	justify-self: end;
	inline-size: min(100%, 33rem);
	margin-inline-end: 36px;
	padding-block-end: 20px;
}

.sd-inner-hero__print {
	position: relative;
	margin: 0;
	padding: 8px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white);
	box-shadow: 0 2px 2px rgb(29 45 53 / 0.2), 0 28px 44px -20px rgb(29 45 53 / 0.55);
	rotate: 1.2deg;
}

.sd-inner-hero__image {
	display: block;
	inline-size: 100%;
	aspect-ratio: 1.05;
	object-fit: cover;
	object-position: 50% 62%;
	border-radius: var(--wp--custom--radius--sm);
}

.sd-inner-hero__print::before,
.sd-inner-hero__print::after {
	content: "";
	position: absolute;
	z-index: 1;
	inline-size: 86px;
	block-size: 26px;
	background:
		linear-gradient(180deg, rgb(255 255 255 / 0.4), rgb(255 255 255 / 0) 45%, rgb(0 0 0 / 0.06)),
		var(--ih-tape);
	clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 2%, 88% 0, 92% 9%, 96% 1%, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 99%, 12% 100%, 8% 91%, 4% 99%, 0 90%);
	opacity: 0.95;
}

.sd-inner-hero__print::before {
	inset: -11px auto auto -26px;
	rotate: -28deg;
}

.sd-inner-hero__print::after {
	inset: -9px -26px auto auto;
	rotate: 30deg;
}

.sd-inner-hero__media > .sd-inner-hero__rating {
	position: absolute;
	inset: auto auto 0 clamp(12px, 2.4vw, 28px);
	z-index: 2;
}

/* ---------------------------------------------------------------- Centred */

.sd-inner-hero--centred {
	--ih-display: clamp(3rem, 1.5rem + 6.2vw, 7rem);
}

.sd-inner-hero--centred .sd-inner-hero__inner {
	grid-template-columns: minmax(0, 1fr);
}

.sd-inner-hero--centred .sd-inner-hero__words {
	align-items: center;
	text-align: center;
}

.sd-inner-hero--centred .sd-inner-hero__trail,
.sd-inner-hero--centred .sd-inner-hero__actions,
.sd-inner-hero--centred .sd-inner-hero__proof {
	justify-content: center;
}

.sd-inner-hero--centred .sd-inner-hero__headline {
	max-width: 12em;
}

.sd-inner-hero--centred .sd-inner-hero__lead {
	max-width: 32em;
}

.sd-inner-hero__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px clamp(28px, 4vw, 54px);
	width: min(100%, var(--wp--style--global--content-size, 82.1875rem));
	margin: clamp(36px, 5vw, 64px) auto 0;
	padding: 0;
	list-style: none;
	opacity: 0.5;
}

.sd-inner-hero__client {
	margin: 0;
	padding: 0;
}

.sd-inner-hero__client img {
	display: block;
	max-block-size: 26px;
	max-inline-size: 120px;
	inline-size: auto;
	block-size: auto;
}

/* ---------------------------------------------------------------- Enquiry */

.sd-inner-hero--enquiry .sd-inner-hero__inner {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.sd-inner-hero__card {
	position: relative;
	justify-self: end;
	box-sizing: border-box;
	inline-size: min(100%, 28rem);
	margin-block-start: 12px;
	padding: 28px 28px 24px;
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--white);
	box-shadow: 0 2px 2px rgb(29 45 53 / 0.12), 0 30px 50px -24px rgb(29 45 53 / 0.5);
}

.sd-inner-hero__tag {
	position: absolute;
	inset: -12px 22px auto auto;
	padding: 4px 9px 3px;
	border-radius: 2px;
	background: var(--ih-tape);
	color: var(--ih-ink);
	font: 600 var(--wp--preset--font-size--fixed-10) / 1.3 var(--wp--preset--font-family--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	rotate: 3deg;
}

.sd-inner-hero .sd-inner-hero__card-title {
	margin: 0;
	font: 700 var(--wp--preset--font-size--fixed-28) / 1 var(--wp--preset--font-family--display);
}

.sd-inner-hero .sd-inner-hero__card-note {
	margin: 6px 0 16px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--fixed-14);
	font-weight: 400;
	letter-spacing: 0;
	color: color-mix(in srgb, var(--ih-ink) 78%, transparent);
}

.sd-inner-hero__form {
	min-width: 0;
}

/* Gravity Forms' primary button in the site's flamingo, through the plugin's own variables. */
.sd-inner-hero__form .gform_wrapper {
	--gf-ctrl-btn-bg-color-primary: var(--wp--preset--color--sd-flamingo);
	--gf-ctrl-btn-bg-color-hover-primary: color-mix(in srgb, var(--wp--preset--color--sd-flamingo) 88%, black);
	--gf-ctrl-btn-bg-color-focus-primary: var(--gf-ctrl-btn-bg-color-hover-primary);
	--gf-ctrl-btn-color-primary: var(--wp--preset--color--white);
	--gf-ctrl-btn-color-hover-primary: var(--wp--preset--color--white);
	--gf-ctrl-btn-color-focus-primary: var(--wp--preset--color--white);
}

.sd-inner-hero .sd-inner-hero__notice {
	margin: 0;
	padding: 14px;
	border: 1px dashed var(--wp--preset--color--paper-edge);
	border-radius: var(--wp--custom--radius--md);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--fixed-14);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
}

/* ---------------------------------------------------------------- Showcase */

.sd-inner-hero--showcase .sd-inner-hero__inner {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.sd-inner-hero--showcase .sd-inner-hero__print {
	rotate: -2deg;
}

.sd-inner-hero--showcase .sd-inner-hero__image {
	aspect-ratio: 4 / 3;
	object-position: 50% 0;
}

.sd-inner-hero__stat {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	margin: 0;
}

.sd-inner-hero__figure {
	color: var(--wp--preset--color--sd-flamingo);
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(4.5rem, 2.8rem + 5vw, 6.5rem);
	font-weight: 700;
	line-height: 0.82;
	letter-spacing: -0.02em;
}

.sd-inner-hero__caption {
	padding-block-end: 6px;
	font: 500 var(--wp--preset--font-size--fixed-18) / 1.3 var(--wp--preset--font-family--serif);
}

.sd-inner-hero__sticker {
	position: absolute;
	inset: auto auto 6px -14px;
	z-index: 2;
	box-sizing: border-box;
	inline-size: clamp(110px, 12vw, 150px);
	margin: 0;
	padding: 8px 10px;
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px rgb(29 45 53 / 0.05), 0 4px 8px -5px rgb(29 45 53 / 0.34);
	rotate: -6deg;
}

.sd-inner-hero__sticker img {
	display: block;
	inline-size: 100%;
	max-block-size: 52px;
	block-size: auto;
	object-fit: contain;
}

/* ---------------------------------------------------------------- Tablet and phone: one column */

@media (width < 62rem) {
	.sd-inner-hero__inner {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--ih-gap);
	}

	/* The words dissolve into the column so the print can sit between the lead and the buttons. */
	.sd-inner-hero__words {
		display: contents;
	}

	.sd-inner-hero__trail { order: 1; }
	.sd-inner-hero__headline { order: 2; }
	.sd-inner-hero__lead { order: 3; }
	.sd-inner-hero__stat { order: 4; }
	.sd-inner-hero__media { order: 5; }
	.sd-inner-hero__actions { order: 6; }
	.sd-inner-hero__proof { order: 7; }
	.sd-inner-hero__words > .sd-inner-hero__rating { order: 8; }
	.sd-inner-hero__card { order: 9; }

	.sd-inner-hero__media {
		align-self: stretch;
		inline-size: auto;
		margin: 12px 14px 0 10px;
	}

	.sd-inner-hero__image,
	.sd-inner-hero--showcase .sd-inner-hero__image {
		aspect-ratio: 16 / 10;
	}

	.sd-inner-hero__card {
		align-self: stretch;
		inline-size: auto;
		margin-block-start: 14px;
	}

	.sd-inner-hero--centred .sd-inner-hero__inner {
		align-items: center;
		text-align: center;
	}
}

/* Room: Airy. From the tablet up the band grows with the window, its contents centred, so it breathes
   on a tall screen; it stops short of the window's height by the depth of the proof strip that follows,
   so that strip stays in view when the page opens. On a short window it is the snug band. */
@media (width >= 48rem) {
	.sd-inner-hero.sd-inner-hero--airy {
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-block-size: min(calc(100svh - 6.75rem), 54rem);
	}
}

@media (width < 48rem) {
	.sd-inner-hero {
		--ih-display: clamp(2.75rem, 0.3rem + 11vw, 3.5rem);
		padding-block-end: 32px;
	}

	.sd-inner-hero--centred {
		--ih-display: clamp(2.75rem, 1rem + 9vw, 4rem);
	}

	.sd-inner-hero__lead {
		font-size: var(--wp--preset--font-size--fixed-18);
		line-height: 1.45;
	}

	.sd-inner-hero__actions {
		flex-direction: column;
		align-items: stretch;
		align-self: stretch;
		gap: 10px;
		margin-block-start: 4px;
	}

	.sd-inner-hero__button {
		inline-size: 100%;
	}

	.sd-inner-hero__button .wp-block-button__link {
		display: block;
		inline-size: 100%;
		padding-block: 14px;
	}

	.sd-inner-hero__link {
		align-self: center;
	}

	.sd-inner-hero__proof {
		flex-direction: column;
		gap: 6px;
	}

	.sd-inner-hero--centred .sd-inner-hero__proof {
		align-items: center;
	}

	.sd-inner-hero__logos {
		gap: 16px 28px;
	}

	.sd-inner-hero__client img {
		max-block-size: 22px;
		max-inline-size: 96px;
	}
}

/* ---------------------------------------------------------------- On this page */

/*
 * The bar follows the section as its sibling, so its sticky container is the page content and it
 * stays after the band has gone. It pins under the fixed site header, which publishes its height.
 */
:root:root:has(.sd-inner-hero__tabs) {
	--ih-tabs-h: 3.25rem;

	scroll-padding-block-start: calc(var(--stronger-header-height, 0px) + var(--stronger-top-offset, 0px) + var(--ih-tabs-h) + 1rem);
}

.sd-inner-hero__tabs {
	position: sticky;
	inset-block-start: calc(var(--stronger-header-height, 0px) + var(--stronger-top-offset, 0px));
	z-index: 90;
	box-sizing: border-box;
	margin-block: 0;
	padding-inline: 24px;
	border-block: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
	background: color-mix(in srgb, var(--wp--preset--color--white) 96%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-family: var(--wp--preset--font-family--sans);
}

/*
 * With scripting, the bar is not part of the hero at rest: it takes no room under the band and
 * stays out of sight until the reader has scrolled past the hero, then slides in under the header
 * (the script sets `is-pinned`). Without scripting it is simply a bar under the hero, as above.
 */
@media (scripting: enabled) {
	/* Named with its element so the pull-up outranks the flow layout's own zero block margins. */
	nav.sd-inner-hero__tabs {
		margin-block-end: calc(-1 * var(--ih-tabs-h, 3.25rem) - 2px);
		visibility: hidden;
		opacity: 0;
		translate: 0 -10px;
		pointer-events: none;
	}

	.sd-inner-hero__tabs.is-pinned {
		visibility: visible;
		opacity: 1;
		translate: none;
		pointer-events: auto;
		box-shadow: 0 10px 18px -14px rgb(29 45 53 / 0.35);
	}
}

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
	.sd-inner-hero__tabs {
		transition: opacity 180ms ease, translate 220ms cubic-bezier(0.3, 0.7, 0.2, 1), visibility 0s linear 220ms;
	}

	.sd-inner-hero__tabs.is-pinned {
		transition: opacity 180ms ease, translate 220ms cubic-bezier(0.3, 0.7, 0.2, 1);
	}
}

.sd-inner-hero__tabs-inner {
	display: flex;
	align-items: center;
	gap: 18px;
	min-block-size: var(--ih-tabs-h, 3.25rem);
	width: min(100%, var(--wp--style--global--content-size, 82.1875rem));
	margin-inline: auto;
}

.sd-inner-hero__tabs-label {
	flex: none;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 62%, transparent);
	font: 600 var(--wp--preset--font-size--fixed-10) / 1 var(--wp--preset--font-family--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* A switch, not a row of labels: a recessed track with one raised key that slides under the
   current section's name. The script places the key (--ih-key-x, --ih-key-w); without it the
   track is still a row of plain links. */
.sd-inner-hero__tablist {
	position: relative;
	display: flex;
	gap: 2px;
	min-width: 0;
	margin: 0;
	padding: 4px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	border-radius: 10px;
	background: color-mix(in srgb, var(--wp--preset--color--sd-deep-midnight) 5%, transparent);
	box-shadow: var(--wp--custom--shadow--well);
}

.sd-inner-hero__tablist::-webkit-scrollbar {
	display: none;
}

.sd-inner-hero__tablist::before {
	content: "";
	position: absolute;
	inset-block: 4px;
	inset-inline-start: 0;
	inline-size: var(--ih-key-w, 0);
	border-radius: 7px;
	background: linear-gradient(180deg, var(--wp--preset--color--white), #f6f5f3);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.9),
		0 0 0 1px rgb(29 45 53 / 0.08),
		0 1px 2px rgb(29 45 53 / 0.22),
		0 3px 5px -2px rgb(29 45 53 / 0.25);
	translate: var(--ih-key-x, 0) 0;
	opacity: 0;
	pointer-events: none;
}

.sd-inner-hero__tablist.has-key::before {
	opacity: 1;
}

.sd-inner-hero__tablist > li {
	position: relative;
	flex: none;
	margin: 0;
	padding: 0;
}

.sd-inner-hero__tab {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border-radius: 7px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 72%, transparent);
	font: 600 var(--wp--preset--font-size--fixed-14) / 1.2 var(--wp--preset--font-family--sans);
	text-decoration: none;
	white-space: nowrap;
}

/* The key's lamp: a small flamingo light beside the current section's name. */
.sd-inner-hero__tab::before {
	content: "";
	inline-size: 6px;
	block-size: 6px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
	box-shadow: inset 0 1px 1px rgb(29 45 53 / 0.25);
}

.sd-inner-hero__tab:hover {
	color: var(--wp--preset--color--contrast);
}

.sd-inner-hero__tab[aria-current="true"] {
	color: var(--wp--preset--color--contrast);
}

.sd-inner-hero__tab[aria-current="true"]::before {
	background: var(--wp--preset--color--secondary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--secondary) 18%, transparent);
}

.sd-inner-hero__tab:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: -2px;
}

@media (prefers-reduced-motion: no-preference) {
	.sd-inner-hero__tab,
	.sd-inner-hero__tab::before {
		transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
	}

	.sd-inner-hero__tablist.has-key::before {
		transition: translate 260ms cubic-bezier(0.3, 0.7, 0.2, 1), inline-size 260ms cubic-bezier(0.3, 0.7, 0.2, 1), opacity 160ms ease;
	}
}

@media (width < 48rem) {
	:root:root:has(.sd-inner-hero__tabs) {
		--ih-tabs-h: 3rem;
	}

	.sd-inner-hero__tabs-label {
		display: none;
	}

	/* Edge to edge on a phone: the tabs slide under the screen edge instead of stopping at the gutter. */
	.sd-inner-hero__tabs {
		padding-inline: 0;
	}

	.sd-inner-hero__tablist {
		margin-inline: 20px;
		scroll-padding-inline: 20px;
	}

	.sd-inner-hero__tab {
		padding-inline: 10px;
		gap: 6px;
	}
}

/* A calmer print: one strip of tape across the top corner, not two. */
.sd-inner-hero__print::after {
	display: none;
}

/* The photo as the homepage has its prints: the picture itself with rounded corners and a deep
   shadow, no white border, a strip of tape on two opposite corners. */
.sd-inner-hero__print {
	padding: 0;
	background: none;
	box-shadow: 0 4px 12px rgb(0 0 0 / 0.18), 0 18px 40px -16px rgb(0 0 0 / 0.45);
}

.sd-inner-hero__image {
	border-radius: var(--wp--custom--radius--md);
}

.sd-inner-hero__print::after {
	display: block;
	inset: auto -30px 18px auto;
	rotate: -22deg;
}

.sd-inner-hero__print::before {
	inset: -12px auto auto -30px;
	rotate: -24deg;
}

/* No tape on the photo. */
.sd-inner-hero__print::before,
.sd-inner-hero__print::after {
	display: none;
}

/*
 * A testimonial over the photo's lower corner, where the homepage lays its second print: a small
 * ink card, leaning the other way to the photo, with the stars, the client's words and their name.
 */
.sd-inner-hero__quote {
	position: absolute;
	inset: auto auto -38px -44px;
	z-index: 2;
	box-sizing: border-box;
	inline-size: min(30.5rem, 100%);
	margin: 0;
	padding: 20px 20px 18px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px rgb(29 45 53 / 0.06), 0 1px 2px rgb(29 45 53 / 0.08), 0 10px 18px -12px rgb(29 45 53 / 0.3);
	color: var(--wp--preset--color--contrast);
	rotate: -2deg;
}

.sd-inner-hero .sd-inner-hero__quote-text {
	margin: 14px 0 0;
	padding: 0;
	border: 0;
	color: inherit;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--fixed-18);
	font-style: italic;
	font-weight: 700;
	line-height: 1.5;
	text-wrap: balance;
}

.sd-inner-hero__quote-by {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-block-start: 18px;
	font: 600 var(--wp--preset--font-size--fixed-13) / 1.3 var(--wp--preset--font-family--sans);
}

.sd-inner-hero__quote-photo {
	flex: none;
	inline-size: 36px;
	block-size: 36px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgb(29 45 53 / 0.12);
}

.sd-inner-hero__quote-role {
	display: block;
	color: color-mix(in srgb, currentcolor 72%, transparent);
	font-weight: 400;
}

/* Stacked layouts: the card shrinks to one line on the photo's corner (stars, who said it), so the
   buttons stay on the first screen. The words themselves are kept for the wide layout. */
@media (width < 62rem) {
	.sd-inner-hero__quote {
		inset: auto auto -14px 12px;
		display: flex;
		align-items: center;
		gap: 10px;
		inline-size: auto;
		max-inline-size: calc(100% - 24px);
		padding: 9px 13px;
		rotate: none;
	}

	.sd-inner-hero__quote-text,
	.sd-inner-hero__quote-photo {
		display: none;
	}

	.sd-inner-hero__quote > .sd-inner-hero__stars {
		flex: none;
	}

	.sd-inner-hero__quote-by {
		margin: 0;
		font-size: var(--wp--preset--font-size--fixed-12);
	}

	.sd-inner-hero__quote-role {
		display: inline;
	}

	.sd-inner-hero__quote-role::before {
		content: ", ";
	}
}

.sd-inner-hero__quote > .sd-inner-hero__stars {
	display: block;
}

@media (width < 62rem) {
	.sd-inner-hero__media:has(.sd-inner-hero__quote) {
		margin-block-end: 14px;
	}
}

/* On the wide page frame (the content width steps up at 1680px) the headline steps up with it. */
@media (width >= 105rem) {
	.sd-inner-hero:not(.sd-inner-hero--centred) {
		--ih-display: 7.125rem;
	}
}

/*
 * The entrance, as the homepage hero makes it: the words rise in one after another, the photo drops
 * onto the page and settles to its tilt, and the testimonial lands on it after. Once, on load, for
 * people who have not asked for less motion, on the wide layout; everyone else sees it all in place.
 */
@media (prefers-reduced-motion: no-preference) and (width >= 64rem) {
	.sd-inner-hero__words > * {
		animation: sd-inner-hero-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	.sd-inner-hero__words > :nth-child(1) { animation-delay: 0ms; }
	.sd-inner-hero__words > :nth-child(2) { animation-delay: 80ms; }
	.sd-inner-hero__words > :nth-child(3) { animation-delay: 160ms; }
	.sd-inner-hero__words > :nth-child(4) { animation-delay: 240ms; }
	.sd-inner-hero__words > :nth-child(5) { animation-delay: 320ms; }
	.sd-inner-hero__words > :nth-child(n + 6) { animation-delay: 400ms; }

	.sd-inner-hero__print,
	.sd-inner-hero__card {
		animation: sd-inner-hero-drop 800ms cubic-bezier(0.22, 1, 0.36, 1) 250ms both;
	}

	.sd-inner-hero__quote,
	.sd-inner-hero__media > .sd-inner-hero__rating,
	.sd-inner-hero__sticker {
		animation: sd-inner-hero-drop 800ms cubic-bezier(0.22, 1, 0.36, 1) 600ms both;
	}
}

@keyframes sd-inner-hero-rise {
	from {
		opacity: 0;
		translate: 0 18px;
	}
}

@keyframes sd-inner-hero-drop {
	from {
		opacity: 0;
		translate: 0 -14px;
		scale: 1.04;
		rotate: 0deg;
	}
}

/* Between 64rem and 85rem the two columns are close: the quote card stays inside the picture's left
   edge there (it hangs out over the words otherwise), and the words keep a clear gap from the picture. */
@media (64rem <= width < 85rem) {
	.sd-inner-hero__quote {
		inset-inline-start: 12px;
		inline-size: min(26rem, calc(100% - 24px));
	}

	.sd-inner-hero__words > :is(.sd-inner-hero__lead, .sd-inner-hero__proof) {
		max-inline-size: calc(100% - 2rem);
	}
}
