/**
 * Subpage section: Banner (template-parts/sections/subpage/section-banner.php).
 *
 * text_logo (section-three-option-one): white text on the orange gradient,
 * image tile on the right. NOTE: white on the frame's orange is below WCAG AA
 * for body text; --banner-orange is the single switch to the safer
 * --banner-orange-safe once the designer signs off (see the contrast report).
 * cards (section-three-option-two) and title_list (section-three-option-three):
 * white text on the dark gradients. cta_band (blog-overview, faq-main): a
 * contained orange or dark box with one button.
 * Gradients are token fallbacks until the exports arrive (TODO). Mobile
 * (proposal, TODO): text first then a smaller image then the buttons; cards
 * one column; title_list heading above the list.
 * Values come from assets/css/tokens.css.
 *
 * @package cartrack
 */

.banner--text-logo,
.banner--cards,
.banner--title-list {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: var(--color-text-inverse);
}

.banner--text-logo {
	background: var(--banner-text-logo-bg-mobile);
}

.banner--cards {
	background: var(--banner-cards-bg);
}

.banner--title-list {
	background: var(--banner-title-list-bg);
}

/* ---------- Uploaded background + overlay ---------- */

.banner__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--banner-image-base);
}

.banner__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--banner-overlay-colour);
	opacity: var(--banner-overlay-medium);
}

.banner--overlay-none .banner__bg::after { opacity: 0; }
.banner--overlay-light .banner__bg::after { opacity: var(--banner-overlay-light); }
.banner--overlay-strong .banner__bg::after { opacity: var(--banner-overlay-strong); }

.banner__bg-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Shared ---------- */

.banner__heading {
	color: inherit;
}

.banner__buttons {
	margin-top: var(--space-lg);
}

/* The white button turns orange on hover elsewhere; on orange it would vanish. TODO: verify in Figma. */
.banner--text-logo .btn--light:hover,
.banner--text-logo .btn--light:focus-visible {
	background-color: var(--banner-light-button-hover);
	color: var(--color-text);
}

/*
 * Focus rings on the coloured backgrounds (every variant sits on dark or orange; none is light). The section
 * has no "banner" class, so the variant classes carry the rules. White on the dark variants; on the orange
 * ones white is below 3:1 (about 2.8:1), so they get the dark ring. Contrast: CLAUDE.md 4.11.
 */
.banner--cards .btn:focus-visible,
.banner--title-list .btn:focus-visible,
.banner--band-dark .banner__band-button:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

.banner--text-logo .btn:focus-visible,
.banner--text-logo .banner__text a:focus-visible,
.banner--band-orange .banner__band-button:focus-visible,
.banner--band-orange .banner__band-icon:focus-visible {
	outline: 2px solid var(--color-focus-dark);
	outline-offset: 2px;
}

/* ---------- text_logo ---------- */

/* Mobile: text, image, buttons. Desktop: text and buttons left, image right. */
.banner--text-logo .banner__inner {
	display: grid;
	grid-template-areas:
		"body"
		"media"
		"buttons";
	gap: var(--space-lg);
	align-items: center;
}

.banner--text-logo .banner__body { grid-area: body; }
.banner--text-logo .banner__media { grid-area: media; }
.banner--text-logo .banner__buttons { grid-area: buttons; margin-top: 0; }

.banner__attribution {
	margin: 0 0 var(--space-sm);
	font-size: var(--banner-attribution-size);
	line-height: var(--line-height-snug);
}

.banner__text {
	font-size: var(--banner-text-size);
	line-height: var(--banner-text-line-height);
}

.banner__text p {
	margin: 0 0 var(--space-sm);
}

.banner__text > :last-child {
	margin-bottom: 0;
}

.banner__text a {
	color: inherit;
	text-decoration: underline;
}

/* Image tile with a soft gradient (the frame's peach to blue). */
.banner__media {
	position: relative;
	overflow: hidden;
	width: min(100%, var(--banner-tile-size-mobile));
	aspect-ratio: 1;
	background: var(--banner-tile-bg);
}

.banner__media--logo .banner__image {
	width: 100%;
	height: 100%;
	padding: var(--banner-tile-padding);
	object-fit: contain;
}

/* Photo: fills the tile and fades into it on the left edge. */
.banner__media--photo .banner__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 var(--banner-photo-fade));
	mask-image: linear-gradient(90deg, transparent 0%, #000 var(--banner-photo-fade));
}

/*
 * Testimonial mode (quote_mode; design/pages/testimonials/testimonials.png at 1:1): the name line above a
 * larger quote, both in one figure. Measured: the quote ~30px on a ~37px pitch, the name ~16px, the column
 * ~680px wide. Every value TODO: verify in Figma. Phones keep the text_logo sizes (proposal).
 */
.banner--testimonial {
	--banner-quote-size: var(--banner-text-size);
	--banner-quote-size-desktop: 1.875rem;        /* ~30px. */
	--banner-quote-line-height: 1.23;             /* ~37px pitch. */
	--banner-quote-max: 42.5rem;                  /* ~680px. */
	--banner-quote-name-size: 1rem;               /* ~16px. */
}

.banner__quote {
	margin: 0;
}

.banner--testimonial .banner__attribution {
	font-size: var(--banner-quote-name-size);
	overflow-wrap: anywhere;
}

.banner--testimonial .banner__text {
	margin: 0;
	font-size: var(--banner-quote-size);
	line-height: var(--banner-quote-line-height);
	overflow-wrap: anywhere;
}

/* ---------- cards ---------- */

.banner--cards .banner__heading {
	max-width: var(--banner-cards-heading-max);
	margin-inline: auto;
	text-align: center;
}

.banner--cards .banner__list {
	max-width: var(--banner-cards-max);
	margin: var(--banner-heading-gap) auto 0;

	--check-list-icon-colour: var(--banner-check-outline);
}

.banner--cards .banner__inner {
	max-width: calc(var(--banner-cards-max) + 2 * var(--container-gutter));
}

.banner--cards .banner__buttons {
	justify-content: center;
}

/*
 * Feature cards (an icon or a title on any card): design/pages/call-to-action-grid.png at 1:1 (EV's "Why
 * Choose" grid). 406px cards with 20px gaps (1260px for three), a 1px #a2a4a6 border, a #151a1e to #323b41
 * fill, a ~36px icon, a white 20px title and #a8abad text; the band black fading to #3e454c at the bottom.
 * Every value TODO: verify in Figma. Phones: one column; tablets: two.
 */
.banner--cards-rich {
	--banner-feature-bg: linear-gradient(180deg, #000000 0%, #000000 55%, #3e454c 100%);
	--banner-feature-max: 78.75rem;               /* 1260px. */
	--banner-feature-gap: 1.25rem;                /* 20px. */
	--banner-feature-border: #a2a4a6;
	--banner-feature-fill: linear-gradient(180deg, #151a1e 0%, #323b41 100%);
	--banner-feature-padding: 1.25rem;
	--banner-feature-icon: 2.25rem;               /* ~36px glyph. */
	--banner-feature-title-size: 1.25rem;         /* ~20px. */
	--banner-feature-text: #a8abad;
	--banner-feature-min-height: 13.875rem;       /* ~222px cards. */
	--banner-feature-heading-gap: 2rem;           /* ~31px under the heading. */
	background: var(--banner-feature-bg);
}

.banner--cards-rich .banner__inner {
	max-width: calc(var(--banner-feature-max) + 2 * var(--container-gutter));
}

.banner--cards-rich .banner__heading {
	max-width: none;
	overflow-wrap: anywhere;
}

/* Beats the plain cards' list rule (.banner--cards .banner__list): the feature grid is wider and closer. */
.banner--cards-rich .banner-cards {
	max-width: none;
	margin: var(--banner-feature-heading-gap) 0 0;
}

.banner-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--banner-feature-gap);
	padding: 0;
	list-style: none;
}

.banner-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: var(--banner-feature-padding);
	border: 1px solid var(--banner-feature-border);
	border-radius: var(--radius-sm);
	background: var(--banner-feature-fill);
}

.banner-card__icon {
	display: block;
	inline-size: var(--banner-feature-icon);
	block-size: var(--banner-feature-icon);
	object-fit: contain;
	margin-block-end: var(--space-xs);
}

.banner-card__title {
	margin: 0;
	color: var(--color-text-inverse);
	font-family: var(--t-body-bold-family);
	font-size: var(--banner-feature-title-size);
	font-weight: var(--t-body-bold-weight);
	line-height: var(--line-height-snug);
	overflow-wrap: anywhere;
}

.banner-card__text {
	margin: 0;
	color: var(--banner-feature-text);
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
	overflow-wrap: anywhere;
}

@media (min-width: 48em) { /* --bp-md */
	.banner-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) { /* --bp-lg */
	.banner-card {
		min-block-size: var(--banner-feature-min-height);
	}

	.banner--cards-3 .banner-cards,
	.banner--cards-3 .check-list--cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------- title_list ---------- */

.banner--title-list .banner__inner {
	display: grid;
	gap: var(--space-lg);
}

.banner--title-list .banner__list {
	--check-list-icon-colour: var(--banner-check-filled);
	--check-list-divider: var(--banner-divider);
}

.banner--title-list .banner__buttons {
	margin-top: 0;
}

/* ---------- cta_band ---------- */

/*
 * A contained box (blog-overview, faq-main), wider than the content column
 * (~1220px at 1920). The section itself keeps the Section settings
 * background; the band carries the colour. Mobile (proposal, TODO): text
 * stacks above the button.
 */
.banner--cta-band .banner__inner {
	max-width: calc(var(--banner-band-max) + 2 * var(--container-gutter));
}

.banner__band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--banner-band-gap);
	padding: var(--banner-band-padding-y-mobile) var(--banner-band-padding-x-mobile);
	border-radius: var(--banner-band-radius);
	color: var(--color-text-inverse);
}

.banner--band-orange .banner__band {
	background: var(--banner-band-orange-bg);
}

.banner--band-dark .banner__band {
	background: var(--banner-band-dark-bg);
}

.banner__band-heading {
	max-width: var(--banner-band-heading-max);
	margin: 0;
	color: inherit;
	font-family: var(--t-h4-family);
	font-size: var(--t-h4-size);
	font-weight: var(--t-h4-weight);
	line-height: var(--t-h4-line-height);
	letter-spacing: var(--t-h4-tracking);
}

.banner__band-text {
	margin: var(--space-xs) 0 0;
	font-family: var(--t-body-family);
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
}

.banner__band-button {
	flex: none;
}

/* The white button turns orange on hover elsewhere; on the orange band it would vanish. TODO: verify in Figma. */
.banner--band-orange .banner__band-button:hover,
.banner--band-orange .banner__band-button:focus-visible {
	background-color: var(--banner-light-button-hover);
	color: var(--color-text);
}

/* Square arrow button (faq-main), named by the link text. */
.banner__band-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--banner-band-icon-size);
	height: var(--banner-band-icon-size);
	border-radius: var(--radius-sm);
	background-color: var(--color-bg);
	color: var(--color-text);
}

.banner__band-icon .icon {
	width: var(--banner-band-icon-glyph);
	height: var(--banner-band-icon-glyph);
}

.banner__band-icon:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

/* TODO: verify hover state in Figma (no hover frame supplied). */
@media (hover: hover) {
	.banner__band-icon:hover {
		background-color: var(--banner-light-button-hover);
	}
}

@media (min-width: 48em) { /* --bp-md */
	.banner__band {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: var(--banner-band-padding-y) var(--banner-band-padding-x);
	}
}

/* ---------- Desktop ---------- */

@media (min-width: 64em) { /* --bp-lg */
	.banner--text-logo {
		background: var(--banner-text-logo-bg);
	}

	.banner--text-logo .banner__inner {
		grid-template-columns: minmax(0, 1fr) var(--banner-tile-size);
		grid-template-rows: auto auto;
		grid-template-areas:
			"body media"
			"buttons media";
		column-gap: var(--banner-column-gap);
		row-gap: var(--space-lg);
	}

	.banner--text-logo .banner__body { align-self: end; }
	.banner--text-logo .banner__buttons { align-self: start; }

	.banner__body {
		max-width: var(--banner-text-max);
	}

	.banner__media {
		width: var(--banner-tile-size);
	}

	.banner__text {
		font-size: var(--banner-text-size-desktop);
	}

	.banner--testimonial .banner__body {
		max-width: var(--banner-quote-max);
	}

	.banner--testimonial .banner__text {
		font-size: var(--banner-quote-size-desktop);
	}

	/* Heading and button on the left, the list spanning both rows on the right. */
	.banner--title-list .banner__inner {
		grid-template-columns: var(--banner-title-list-columns);
		grid-template-rows: auto 1fr;
		column-gap: var(--banner-column-gap);
		row-gap: var(--space-lg);
		align-items: start;
	}

	.banner--title-list .banner__list {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.banner--title-list .banner__buttons {
		grid-column: 1;
		grid-row: 2;
	}
}

/* ---------- split_media (CLAUDE.md 8.13) ---------- */

/*
 * Full bleed, two halves: text on a dark panel, one contained image on an orange panel (the Products
 * "Why choose" band). The text lines up with the page container. Sampled from
 * design/pages/products/products.png; every value TODO: verify in Figma. Mobile (TODO, no frame):
 * stacked, the text panel first.
 */
.banner--split-media {
	--banner-split-dark: linear-gradient(180deg, #000000 0%, #445565 100%); /* Sampled top and bottom. */
	--banner-split-orange: #f47735;                                         /* Sampled. */
	--banner-split-min: 31.25rem;                                           /* ~500px tall at 1920. */
	--banner-split-pad-y: var(--space-2xl);
	--banner-split-text-max: 34rem;                                         /* ~540px text block. */
	--banner-split-media-pad: var(--space-xl);
	--banner-split-image-max: 43.75rem;                                     /* ~700px collage. */
	color: var(--color-text-inverse);
}

.banner__split {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.banner__split-text {
	display: flex;
	align-items: center;
	padding: var(--banner-split-pad-y) var(--container-gutter);
	background: var(--banner-split-dark);
}

.banner__split-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-md);
	max-inline-size: var(--banner-split-text-max);
	min-inline-size: 0;
}

.banner__split-heading {
	margin: 0;
	color: inherit;
	overflow-wrap: anywhere;
}

.banner__split-copy {
	margin: 0;
	color: inherit;
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
	overflow-wrap: anywhere;
}

.banner__split-button {
	max-inline-size: 100%;
	overflow-wrap: anywhere;
}

/* A light ring on the dark panel (the default dark ring would not show on black). */
.banner--split-media .banner__split-button:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

.banner__split-media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--banner-split-media-pad) var(--container-gutter);
	background: var(--banner-split-orange);
}

.banner__split-image {
	display: block;
	max-inline-size: min(100%, var(--banner-split-image-max));
	block-size: auto;
}

/* No image: no empty orange block on phones; the orange half stays on wide screens. */
.banner--split-no-image .banner__split-media {
	display: none;
}

@media (min-width: 48em) { /* --bp-md */
	.banner__split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		min-block-size: var(--banner-split-min);
	}

	/* The text starts on the container's edge: the half is 50% of the section, so 100% here minus half the container. */
	.banner__split-text {
		padding-inline: max(var(--container-gutter), calc(100% - var(--container-max) / 2 + var(--container-gutter))) var(--space-xl);
	}

	.banner--split-image-start .banner__split-media {
		order: -1;
	}

	.banner--split-image-start .banner__split-text {
		padding-inline: var(--space-xl) max(var(--container-gutter), calc(100% - var(--container-max) / 2 + var(--container-gutter)));
	}

	.banner--split-no-image .banner__split-media {
		display: flex;
	}
}

/* ---------- media_bleed (CLAUDE.md 7.2, 8.14) ---------- */

/*
 * One continuous dark gradient (black, fading through blue-grey, an orange glow at the top end), white text
 * at the start, a main image bleeding off the end edges and an optional product tile over its start edge.
 * Sampled from design/pages/extra-page-section-for-pages.png at 1920 (554px tall; the text from x 353; the image
 * from x 1053 to the end and from y 75 to the bottom; the 207px tile 93px before the image, 19px above the
 * bottom); every value TODO: verify in Figma. The text column is capped so its end stays on the dark part (4.5:1
 * or more for white).
 * Full bleed: .banner__bleed is the band's own wrapper, edge to edge (the gradient, the size container and the
 * image's positioning box); the text lines up with the frame's content edge (--bleed-edge), not the narrower
 * subpage content column. Nothing is wider than the wrapper, so there is no horizontal scroll.
 * Mobile (proposal, TODO): the text, then the main image full width; the glow at the bottom; no tile.
 */
.banner--media-bleed {
	--bleed-glow: rgba(240, 132, 84, 0.95);                       /* Sampled #e08e65 at the top end. */
	--bleed-bg: radial-gradient(60% 130% at 50% 120%, var(--bleed-glow) 0%, rgba(240, 132, 84, 0) 70%), linear-gradient(180deg, #000000 0%, #000000 45%, #3d4c5c 80%, #95a5b9 100%);
	--bleed-content-max: 76rem;                                   /* ~1214px: the text starts at x 353 at 1920. */
	/* The content edge, from the wrapper's width (100% in padding and in the gradient both mean the wrapper). */
	--bleed-edge: max(var(--container-gutter), (100% - var(--bleed-content-max)) / 2);
	/* The dark zone ends just after the text column (its start edge plus its width), so white text stays on black at
	   every width; then blue-grey, a pale band and peach under the image. */
	--bleed-text-end: calc(var(--bleed-edge) + var(--bleed-text-cap) + var(--space-lg));
	--bleed-stops: #000000 0%, #000000 var(--bleed-text-end), #1a2025 calc(var(--bleed-text-end) + 4%), #95a5b9 calc(var(--bleed-text-end) + 11%), #c2bbbf calc(var(--bleed-text-end) + 24%), #e3b8a2 100%;
	--bleed-bg-desktop: radial-gradient(45% 55% at 100% 0%, var(--bleed-glow) 0%, rgba(240, 132, 84, 0) 100%), linear-gradient(90deg, var(--bleed-stops));
	--bleed-bg-desktop-start: radial-gradient(45% 55% at 0% 0%, var(--bleed-glow) 0%, rgba(240, 132, 84, 0) 100%), linear-gradient(270deg, var(--bleed-stops));
	--bleed-min: 34.625rem;                                       /* ~554px at 1920. */
	--bleed-pad-y: var(--space-2xl);
	--bleed-text-max: 33rem;                                      /* ~528px: the text ends by x 880 at 1920. */
	/* The text never reaches the image: at most the space before it (the image is --bleed-image-w of the band). */
	--bleed-text-cap: min(var(--bleed-text-max), calc(100% - var(--bleed-image-w) - var(--bleed-tile-room, 0px) - var(--bleed-edge) - var(--space-lg)));
	/* The same cap for the text body, measured against the band (a size container) instead of the body's parent. */
	--bleed-text-cap-cq: min(var(--bleed-text-max), calc(100cqi - var(--bleed-image-w-cq) - var(--bleed-tile-room, 0px) - max(var(--container-gutter), (100cqi - var(--bleed-content-max)) / 2) - var(--space-lg)));
	--bleed-image-w-cq: 45cqi;
	--bleed-image-top: 4.6875rem;                                 /* ~75px. */
	--bleed-image-w: 45%;                                         /* ~867 of 1920. */
	--bleed-tile: 13rem;                                          /* ~207px. */
	--bleed-tile-over: 5.8125rem;                                 /* ~93px before the image's start edge. */
	--bleed-tile-bottom: 1.1875rem;                               /* ~19px. */
	--bleed-tile-bg: #e6e8eb;                                     /* The light tile. TODO: verify in Figma. */
	color: var(--color-text-inverse);
}

/* With a tile the text also keeps clear of the tile's overhang (it would cover the text end at 1024). */
.banner--bleed-has-tile {
	--bleed-tile-room: var(--bleed-tile-over);
}

/*
 * The band is its own block (its padding and min height come from the frame), so the section adds no
 * padding: the Section settings spacing would show as white strips around the gradient (and at --bp-lg the
 * "none" spacing classes are overridden by the desktop .sp-section padding in subpage.css).
 */
.sp-section.banner--media-bleed {
	padding-block: 0;
}

.banner__bleed {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	container-type: inline-size;
	background: var(--bleed-bg);
}

.banner__bleed-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	padding-block: var(--bleed-pad-y);
	padding-inline: var(--bleed-edge);
}

.banner__bleed-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-md);
	max-inline-size: var(--bleed-text-max);
	min-inline-size: 0;
}

.banner__bleed-heading {
	margin: 0;
	color: inherit;
	overflow-wrap: anywhere;
}

.banner__bleed-copy {
	margin: 0;
	color: inherit;
	font-size: var(--banner-lm-item-size);
	line-height: var(--banner-lm-item-line);
	overflow-wrap: anywhere;
}

.banner__bleed-buttons {
	margin: var(--space-xs) 0 0;
}

/* The phone link is white on the dark gradient. */
.banner--media-bleed .btn--link-icon {
	color: var(--color-text-inverse);
}

.banner--media-bleed .btn:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

.banner__bleed-media {
	position: relative;
	aspect-ratio: 16 / 9;
}

.banner__bleed-image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.banner__bleed-tile {
	display: none;
}

@media (min-width: 64em) { /* --bp-lg */
	.banner__bleed {
		display: flex;
		align-items: center;
		min-block-size: var(--bleed-min);
		background: var(--bleed-bg-desktop);
	}

	.banner__bleed-inner {
		inline-size: 100%;
	}

	.banner__bleed-body {
		max-inline-size: var(--bleed-text-cap-cq);
	}

	.banner__bleed-media {
		position: absolute;
		inset-block: var(--bleed-image-top) 0;
		inset-inline-end: 0;
		inline-size: var(--bleed-image-w);
		aspect-ratio: auto;
	}

	.banner__bleed-tile {
		position: absolute;
		inset-block-end: var(--bleed-tile-bottom);
		inset-inline-start: calc(var(--bleed-tile-over) * -1);
		display: block;
		inline-size: var(--bleed-tile);
		aspect-ratio: 1;
		background-color: var(--bleed-tile-bg);
	}

	.banner__bleed-tile img {
		display: block;
		inline-size: 100%;
		block-size: 100%;
		object-fit: contain;
	}

	/* Image at the start: the media on the start edge, the text after it, the gradient mirrored. */
	.banner--bleed-image-start .banner__bleed-media {
		inset-inline: 0 auto;
	}

	.banner--bleed-image-start .banner__bleed-tile {
		inset-inline: auto calc(var(--bleed-tile-over) * -1);
	}

	.banner--bleed-image-start .banner__bleed-body {
		margin-inline-start: auto;
	}

	.banner--bleed-image-start .banner__bleed {
		background: var(--bleed-bg-desktop-start);
	}

	/* No image: the text on the dark gradient only. */
	.banner--bleed-no-image .banner__bleed {
		min-block-size: 0;
	}

	/* The gradient is physical (left to right): mirror it in RTL. */
	.banner--media-bleed:dir(rtl) .banner__bleed {
		background: var(--bleed-bg-desktop-start);
	}

	.banner--bleed-image-start:dir(rtl) .banner__bleed {
		background: var(--bleed-bg-desktop);
	}
}

/* ---------- media_bleed: full photo (CLAUDE.md 7.2) ---------- */

/*
 * design/pages/call-to-action-right-side-content.png (1902 x 497, Mining's CTA): the photo covers the band and
 * the text block starts at about the middle (x 958) and is ~470px wide, on the end side. The source photo is
 * already dark (white text 5.2:1 or more at the brightest pixel under its text); the overlay adds darkness
 * toward the text so a lighter replacement photo still passes 4.5:1. Every value TODO: verify in Figma.
 * Phones: the photo as a 16:9 band above the text (the 640 px candidate) and the text on a solid dark band,
 * so phone contrast never depends on the photo.
 */
.banner--bleed-full {
	--bleed-full-min: 31rem;                                      /* ~497px at 1920. */
	--bleed-full-text-max: 30rem;                                 /* ~470px text block. */
	--bleed-full-focus: 25% 20%;                                  /* Phones: the subject on the start third. */
	--bleed-full-focus-rtl: 75% 20%;
	--bleed-full-focus-desktop: 100% 0%;                          /* The source's "top right". */
	--bleed-full-focus-desktop-rtl: 0% 0%;
	--bleed-full-bg-mobile: linear-gradient(180deg, #000000 0%, #1a2025 100%);
	--bleed-full-base: #000000;
	--bleed-full-overlay: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.6) 100%);
	--bleed-full-overlay-start: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.6) 100%);
}

.banner--bleed-full .banner__bleed {
	background: var(--bleed-full-bg-mobile);
}

.banner__bleed-photo {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.banner__bleed-photo-image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: var(--bleed-full-focus);
}

.banner--bleed-full:dir(rtl) .banner__bleed-photo-image {
	object-position: var(--bleed-full-focus-rtl);
}

@media (min-width: 64em) { /* --bp-lg */
	.banner--bleed-full .banner__bleed {
		min-block-size: var(--bleed-full-min);
		background: var(--bleed-full-base);
	}

	.banner__bleed-photo {
		position: absolute;
		inset: 0;
		aspect-ratio: auto;
	}

	.banner__bleed-photo-image {
		object-position: var(--bleed-full-focus-desktop);
	}

	.banner--bleed-full:dir(rtl) .banner__bleed-photo-image {
		object-position: var(--bleed-full-focus-desktop-rtl);
	}

	.banner__bleed-photo::after {
		content: "";
		position: absolute;
		inset: 0;
		background: var(--bleed-full-overlay);
	}

	/* The text block from the middle of the content area to its end edge. */
	.banner--bleed-full .banner__bleed-body {
		max-inline-size: min(var(--bleed-full-text-max), 50%);
		margin-inline-start: 50%;
	}

	.banner--bleed-text-start .banner__bleed-body {
		margin-inline-start: 0;
	}

	.banner--bleed-text-start .banner__bleed-photo::after,
	.banner--bleed-text-end:dir(rtl) .banner__bleed-photo::after {
		background: var(--bleed-full-overlay-start);
	}

	.banner--bleed-text-start:dir(rtl) .banner__bleed-photo::after {
		background: var(--bleed-full-overlay);
	}
}

/* ---------- list_media (2026-11-16; banner-list_media.php) ----------
 * cartrack.id's AI Cameras "driver events": a centred heading above a rounded card (10px radius, 30px padding) on
 * a dark-to-orange background (an uploaded image, else the token gradient) with white list items (20px icons)
 * at 40% beside a wide video (about 2.33:1) at 60%. Every value TODO: verify in Figma (no frame). White text sits on
 * the dark start of the card (the gradient's lightest part is behind the media).
 */
.banner--list-media {
	--banner-lm-bg: linear-gradient(105deg, #000000 30%, #3a1f12 52%, #c4612c 78%, #aad4f9 100%);
	--banner-lm-radius: 0.625rem;
	--banner-lm-pad: 1.875rem;
	--banner-lm-gap: var(--space-xl);
	--banner-lm-icon: 1.25rem;
	--banner-lm-item-gap: 0.625rem;
	--banner-lm-item-size: 1.125rem;              /* Roboto 18 / 28 on the source. */
	--banner-lm-item-line: 1.5556;
	--media-ratio: 7 / 3;
	--media-ratio-number: 2.3333;
}

.banner__lm-heading {
	max-inline-size: var(--content-header-max);
	margin: 0 auto var(--space-xl);
	text-align: center;
}

.banner__lm-card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	gap: var(--banner-lm-gap);
	padding: var(--banner-lm-pad);
	border-radius: var(--banner-lm-radius);
	background: var(--banner-lm-bg);
	color: var(--color-text-inverse);
}

.banner__lm-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: 50% 100%;
}

.banner__lm-list {
	display: flex;
	flex-direction: column;
	gap: var(--banner-lm-item-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.banner__lm-item {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--banner-lm-item-size);
	line-height: var(--banner-lm-item-line);
	overflow-wrap: anywhere;
}

.banner__lm-icon {
	flex: none;
	inline-size: var(--banner-lm-icon);
	block-size: var(--banner-lm-icon);
	object-fit: contain;
}

.banner__lm-media {
	min-inline-size: 0;
	align-self: center;
}

.banner--list-media .banner__buttons {
	justify-content: center;
	margin-block-start: var(--space-lg);
}

.banner__lm-card a:focus-visible,
.banner__lm-card button:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

@media (min-width: 64em) { /* --bp-lg */
	.banner__lm-card {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: center;
	}

	.banner--lm-media-start .banner__lm-media {
		order: -1;
	}

	.banner--lm-media-start .banner__lm-card {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}

	.banner--lm-no-media .banner__lm-card {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- showcase (2026-11-16; banner-showcase.php) ----------
 * cartrack.id's Multi-Cam view: from --bp-md a dark section with the centred white heading at the top and the picture
 * below it at its own ratio (fixed 2026-11-16: it was the section background, behind the heading); the picture's
 * description is screen-reader text there. Phones:
 * their own background and the label, device, tiles and chips. Backgrounds through inline custom properties, so
 * each width downloads only its own. Every value TODO: verify in Figma (no frame; read from the source CSS).
 */
.banner--showcase {
	--banner-sc-base: #0b0f14;
	--banner-sc-heading-max: 80%;
	--banner-sc-chip-bg: rgba(255, 255, 255, 0.05);  /* #FFFFFF0D on the source. */
	--banner-sc-icon: 1.875rem;

	position: relative;
	background-color: var(--banner-sc-base);
	background-image: var(--banner-sc-bg-mobile, var(--banner-sc-bg, none));
	background-position: 50% 50%;
	background-size: cover;
	color: var(--color-text-inverse);
}

.banner__sc-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-lg);
	text-align: center;
}

.banner__sc-heading {
	max-inline-size: 100%;
	margin: 0;
	color: inherit;
	font-family: var(--t-h2-family);
	font-size: var(--t-h2-size);
	font-weight: var(--t-h2-weight);
	line-height: var(--t-h2-line-height);
	overflow-wrap: anywhere;
}

/* Phones: the tiles carry the facts, so the picture's description is not printed. */
.banner__sc-desc {
	display: none;
}

.banner__sc-phone {
	display: grid;
	gap: var(--space-md);
	inline-size: 100%;
}

.banner__sc-label {
	margin: 0;
	font-size: var(--t-subtitle-size);
	font-style: italic;
	line-height: var(--t-subtitle-line-height);
}

.banner__sc-device,
.banner__sc-tile-image {
	background-image: var(--banner-sc-img);
	background-position: 50% 50%;
	background-repeat: no-repeat;
}

.banner__sc-device {
	aspect-ratio: 402 / 228;
	background-size: contain;
}

.banner__sc-tiles,
.banner__sc-chips {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-sm);
	margin: 0;
	padding: 0;
	list-style: none;
}

.banner__sc-tile {
	display: grid;
	gap: var(--space-2xs);
}

.banner__sc-tile-image {
	min-block-size: 20vh;
	background-size: cover;
	border-radius: var(--radius-sm);
}

.banner__sc-caption,
.banner__sc-chip {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	margin: 0;
	padding: 0.3125rem;
	background: var(--banner-sc-chip-bg);
	font-size: var(--t-small-size);
	line-height: var(--t-small-line-height);
	text-align: start;
	overflow-wrap: anywhere;
}

.banner__sc-icon {
	flex: none;
	inline-size: var(--banner-sc-icon);
	block-size: var(--banner-sc-icon);
	background-image: var(--banner-sc-img);
	background-position: 50% 50%;
	background-repeat: no-repeat;
	background-size: contain;
}

.banner--showcase .banner__buttons {
	justify-content: center;
}

.banner--showcase a:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

/* The desktop picture block: hidden on phones (they keep their own background and content). */
.banner__sc-picture {
	display: none;
}

@media (min-width: 48em) { /* --bp-md */
	/* 2026-11-16 fix: the heading at the top, the picture below it at its own ratio (as the source); the picture is
	   never behind the text, so the heading and the camera views are both readable. */
	.banner--showcase {
		background-image: none;
	}

	.banner__sc-picture {
		display: block;
		inline-size: 100%;
		background-image: var(--banner-sc-bg, none);
		background-position: 50% 50%;
		background-repeat: no-repeat;
		background-size: cover;
	}

	.banner--showcase .banner__sc-inner {
		inline-size: 100%;
	}

	.banner__sc-heading {
		max-inline-size: var(--banner-sc-heading-max);
	}

	.banner__sc-phone {
		display: none;
	}

	/* The picture's words, for screen readers only (the theme's screen-reader-text, by width). */
	.banner__sc-desc {
		display: block;
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}
}

/* ---------- case_banner (2026-11-16; banner-case_banner.php) ----------
 * cartrack.id's Maintenance case-study banners: the gradient edge to edge, linear-gradient(145deg, #000 24%,
 * #f47735) or linear-gradient(34deg, #aad4f999, #000 42%); on the container the heading (Roboto 34px weight 500)
 * and a paragraph at 60%, then side-by-side stats (a 50px arrow beside a large value, the caption under both, a
 * dashed 1px white rule between them); a photo at 40% on the end. Every value TODO: verify in Figma (no frame).
 * White text sits on the dark start of both gradients.
 */
.banner--case-banner {
	--banner-cb-orange: linear-gradient(145deg, #000000 24%, #f47735 100%);
	--banner-cb-blue: linear-gradient(34deg, rgba(170, 212, 249, 0.6) 0%, #000000 42%);
	--banner-cb-heading-size: 2.125rem;            /* 34px. */
	--banner-cb-value-size: var(--t-h1-size);
	--banner-cb-arrow: 2.5rem;
	--banner-cb-rule: 1px dashed rgba(255, 255, 255, 0.8);
	--banner-cb-gap: var(--space-2xl);

	background: var(--banner-cb-orange);
	color: var(--color-text-inverse);
}

.banner--cb-blue {
	background: var(--banner-cb-blue);
}

.banner__cb-panel {
	display: grid;
	gap: var(--space-xl);
}

.banner__cb-body {
	display: grid;
	align-content: center;
	gap: var(--space-lg);
}

.banner__cb-heading {
	margin: 0;
	color: inherit;
	font-family: var(--font-body);
	font-size: var(--banner-cb-heading-size);
	font-weight: var(--font-weight-medium);
	line-height: 1;
	overflow-wrap: anywhere;
}

.banner__cb-text {
	margin: 0;
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
}

.banner__cb-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	align-items: start;
	gap: var(--space-lg);
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
}

.banner--case-banner .stat {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas: "arrow value" "label label";
	align-items: center;
	gap: var(--space-2xs) var(--space-sm);
	padding: 0;
}

.banner--case-banner .stat::before {
	content: none;
}

.banner--case-banner .stat + .stat {
	padding-inline-start: var(--space-lg);
	border-inline-start: var(--banner-cb-rule);
}

.banner__cb-arrow {
	grid-area: arrow;
	inline-size: var(--banner-cb-arrow);
	block-size: var(--banner-cb-arrow);
}

.banner--case-banner .stat__value {
	grid-area: value;
	color: inherit;
	font-family: var(--font-heading);
	font-size: var(--banner-cb-value-size);
	font-weight: var(--font-weight-bold);
	line-height: 1;
}

.banner--case-banner .stat:not(.stat--arrow) .stat__value {
	grid-column: 1 / -1;
}

.banner--case-banner .stat__label {
	grid-area: label;
	color: inherit;
	font-size: var(--t-body-size);
	line-height: var(--t-body-line-height);
}

.banner__cb-image {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.banner--case-banner a:focus-visible {
	outline: 2px solid var(--color-text-inverse);
	outline-offset: 2px;
}

@media (min-width: 64em) { /* --bp-lg */
	.banner__cb-panel {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		align-items: center;
		gap: var(--banner-cb-gap);
	}

	.banner--cb-no-image .banner__cb-panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.banner__cb-image {
		aspect-ratio: 39 / 44;                     /* ~390 x 440 on the source. */
	}
}

/* ---------- showcase, Desktop "Diagram" (2026-11-16; banner-showcase-diagram.php) ----------
 * cartrack.id's Multi-Cam view as layout: a dark section with an orange glow (sampled from the source picture,
 * Frame-427319324.png), the caption and the device in the middle, callouts with orange dots and connector lines.
 * Positions are % of a 1090 x 600 stage, measured from that picture; sizes scale with the stage (container units).
 * Phones: the same callouts stacked (photo tiles two per row, label chips), no lines. TODO: verify in Figma.
 */
.banner--sc-diagram {
	--banner-dg-orange: var(--color-primary);
	--banner-dg-glow: radial-gradient(ellipse 30% 62% at 50% 64%, #a04f23 0%, #5b2c13 42%, #2a140a 68%, rgb(0 0 0 / 0) 100%);
	--banner-dg-gap: var(--space-sm);

	background: var(--banner-dg-glow), #000000;
}

.banner__dg {
	display: grid;
	gap: var(--space-md);
	inline-size: 100%;
}

.banner__dg-lines {
	display: none;
}

.banner__dg-caption {
	margin: 0;
	font-size: var(--t-subtitle-size);
	font-style: italic;
	line-height: var(--t-subtitle-line-height);
}

.banner__dg-device-image {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
	margin-inline: auto;
}

.banner__dg-callouts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--banner-dg-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.banner__dg-callout {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs);
	padding: 0.3125rem;
	background: var(--banner-sc-chip-bg);
	font-size: var(--t-small-size);
	line-height: var(--t-small-line-height);
	text-align: start;
	overflow-wrap: anywhere;
}

.banner__dg-dot {
	flex: none;
	inline-size: 0.75rem;
	block-size: 0.75rem;
	border-radius: 50%;
	background: var(--banner-dg-orange);
	box-shadow: 0 0 0 0.25rem rgb(244 119 53 / 0.35);
}

.banner__dg-label {
	flex: 1;
	min-inline-size: 0;
}

/* Phones: a photo callout is a tile, the photo above its dot and label. */
.banner__dg-image {
	order: -1;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

@media (min-width: 48em) { /* --bp-md: the diagram, scaled to its width. */
	.banner--sc-diagram .banner__sc-inner {
		gap: var(--space-md);
	}

	.banner__dg {
		position: relative;
		display: block;
		max-inline-size: 68.125rem; /* 1090px, the source's diagram width at 1920. */
		margin-inline: auto;
		aspect-ratio: 1090 / 612;
		container-type: inline-size;
	}

	.banner__dg-lines {
		position: absolute;
		inset: 0;
		display: block;
		inline-size: 100%;
		block-size: calc(100% * 600 / 612);
		fill: none;
		stroke: var(--banner-dg-orange);
		stroke-width: 1.5;
		opacity: 0.85;
	}

	.banner__dg-lines path {
		vector-effect: non-scaling-stroke;
	}

	.banner__dg-caption {
		position: absolute;
		inset-block-start: 21.5%;
		inset-inline: 0;
		font-size: clamp(0.875rem, 1.85cqw, 1.25rem);
		text-align: center;
	}

	/* The device spans the lines' ends (x 29.5% to 70.5%) and always ends above the labels below it (a taller image is
	   contained and centred). */
	.banner__dg-device {
		position: absolute;
		inset-block-start: 27.6%;
		inset-inline-start: 29.5%;
		inline-size: 41%;
		block-size: 36%;
	}

	.banner__dg-device-image {
		inline-size: 100%;
		block-size: 100%;
		object-fit: contain;
	}

	.banner__dg-callouts {
		display: block;
	}

	/* Each callout is placed at its dot's centre; the label sits above the line, a photo below it. */
	.banner__dg-callout {
		position: absolute;
		display: block;
		inline-size: 0;
		block-size: 0;
		padding: 0;
		background: none;
		font-size: clamp(0.75rem, 1.56cqw, 1.0625rem);
		font-weight: var(--font-weight-medium);
		line-height: 1.2;
	}

	.banner__dg-dot {
		position: absolute;
		inset-block-start: 0;
		inset-inline-start: 0;
		inline-size: 1.65cqw;
		block-size: 1.65cqw;
		box-shadow: 0 0 0 0.5cqw rgb(244 119 53 / 0.35);
		transform: translate(-50%, -50%);
	}

	[dir="rtl"] .banner__dg-dot {
		transform: translate(50%, -50%);
	}

	.banner__dg-label {
		position: absolute;
		inset-block-end: 0.9cqw;
		white-space: nowrap;
	}

	.banner__dg-image {
		position: absolute;
		inset-block-start: 1.65cqw;
		inline-size: 23.9cqw;
		border-radius: 0;
	}

	/* The dot on the start side: label and photo to its end (2.9% of the stage away). */
	.banner__dg--top-start,
	.banner__dg--side-start,
	.banner__dg--bottom-start,
	.banner__dg--below-start,
	.banner__dg--below-center {
		--dg-in: 2.9cqw;
	}

	.banner__dg--top-start .banner__dg-label,
	.banner__dg--bottom-start .banner__dg-label,
	.banner__dg--top-start .banner__dg-image,
	.banner__dg--bottom-start .banner__dg-image {
		inset-inline-start: var(--dg-in);
	}

	.banner__dg--side-start .banner__dg-label,
	.banner__dg--below-start .banner__dg-label,
	.banner__dg--below-center .banner__dg-label {
		inset-inline-start: 2.3cqw;
	}

	/* The dot on the end side: label and photo to its start, left-aligned with the photo. */
	.banner__dg--top-end .banner__dg-label,
	.banner__dg--bottom-end .banner__dg-label {
		inset-inline-end: 1.75cqw;
		inline-size: 23.9cqw;
		text-align: start;
	}

	.banner__dg--top-end .banner__dg-image,
	.banner__dg--bottom-end .banner__dg-image {
		inset-inline-end: 1.75cqw;
	}

	.banner__dg--side-end .banner__dg-label,
	.banner__dg--below-end .banner__dg-label {
		inset-inline-end: 4.1cqw;
	}

	/* The places (the dot's centre, % of the stage). */
	.banner__dg--top-start { inset-inline-start: 1.2%; inset-block-start: 7.5%; }
	.banner__dg--top-end { inset-inline-start: 98.8%; inset-block-start: 7.5%; }
	.banner__dg--side-start { inset-inline-start: 11.6%; inset-block-start: 49.7%; }
	.banner__dg--side-end { inset-inline-start: 88.6%; inset-block-start: 49.7%; }
	.banner__dg--bottom-start { inset-inline-start: 1.2%; inset-block-start: 71.6%; }
	.banner__dg--bottom-end { inset-inline-start: 98.8%; inset-block-start: 71.6%; }
	.banner__dg--below-start { inset-inline-start: 33.9%; inset-block-start: 71.7%; }
	.banner__dg--below-end { inset-inline-start: 66.5%; inset-block-start: 71.7%; }
	.banner__dg--below-center { inset-inline-start: 36.4%; inset-block-start: 87.7%; }

	/* The lines are drawn left to right; in RTL the stage mirrors, so they do too. */
	[dir="rtl"] .banner__dg-lines {
		transform: scaleX(-1);
	}
}
