/**
 * Absolute 2026: homepage styles.
 *
 * Section order follows front-page.php: split hero, trust strip, pillars,
 * the two division bands (with offer and deadlines), steps, reviews,
 * coverage and guides. The team and enquiry sections are shared with inner
 * pages, so their styles live in base.css.
 *
 * 0.5.1: the trust strip shares its width between however many items it has.
 *
 * @package Absolute_2026
 * @author  Steve Austen
 * @company The PCGP
 * @version 0.5.1
 */

/* ==========================================================================
   1. Split hero
   --------------------------------------------------------------------------
   Phones: a dark intro band, then Photocopiers stacked above Facilities. The
   Facilities panel has a gently slanted top edge lined with the lime and
   violet ribbons.

   From 900px: one shared headline across the top, with the two halves side by
   side. The divide is a clip-path polygon on each half's photo layer:

     top of divide    = --split + --skew
     bottom of divide = --split - --skew

   so the line leans slightly, like the logo's ribbons. --split is a
   registered custom property, so it can be animated. Hovering or focusing a
   half moves it 4% towards the other side. Only clip-path changes, so the
   layout never shifts (no CLS).
   ========================================================================== */

@property --split {
	syntax: "<percentage>";
	inherits: true;
	initial-value: 50%;
}

.hero-split {
	position: relative;
	isolation: isolate;
	background: var(--ink);
	color: #fff;
	--focus-ring: #fff;
}

.hero-split__intro {
	padding: 1.6rem var(--gutter) 1.4rem;
	background: var(--ink);
}

.hero-split__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.6rem;
	color: rgb(255 255 255 / 85%);
	font-size: 0.875rem;
	font-weight: 600;
}

.hero-split__eyebrow .icon {
	color: var(--photocopiers-400);
}

.hero-split__title {
	max-width: 20ch;
	margin: 0;
	color: #fff;
	font-size: var(--h1);
	line-height: 1.06;
}

/* Panels (phones) */
.hero-panel {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 1.75rem var(--gutter) 2rem;
}

.hero-panel__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--accent-ink);
}

.hero-panel__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Brand-tinted overlay: keeps white text above 4.5:1 whatever the photo does. */
.hero-panel__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--accent-ink) 80%, transparent),
		color-mix(in srgb, var(--accent-ink) 94%, transparent)
	);
}

.hero-panel--facilities {
	margin-top: calc(var(--slant) * -1);
	padding-top: calc(1.75rem + var(--slant));
	clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
}

/* The two ribbons along the slanted edge between the panels (phones only). */
.hero-panel--facilities::before,
.hero-panel--facilities::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1;
	height: calc(var(--slant) + 12px);
	pointer-events: none;
}

.hero-panel--facilities::before {
	background: var(--photocopiers-400);
	clip-path: polygon(0 var(--slant), 100% 0, 100% 5px, 0 calc(var(--slant) + 5px));
}

.hero-panel--facilities::after {
	background: var(--facilities-500);
	clip-path: polygon(0 calc(var(--slant) + 5px), 100% 5px, 100% 10px, 0 calc(var(--slant) + 10px));
}

.hero-panel .division-label {
	margin-bottom: 0.6rem;
	color: var(--accent-bright);
}

.hero-panel__title {
	margin-bottom: 0.45rem;
	color: #fff;
	font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.4rem);
}

.hero-panel__text {
	max-width: 32rem;
	margin-bottom: 1rem;
	color: #fff;
	font-size: 1rem;
}

.hero-panel__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

/* Service links sit above the stretched panel link so they stay clickable. */
.hero-panel__links a {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 2.25rem;
	padding: 0.3rem 0.85rem;
	border: 1px solid rgb(255 255 255 / 45%);
	border-radius: 999px;
	background: rgb(255 255 255 / 6%);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s;
}

.hero-panel__links a:hover {
	border-color: #fff;
	background: rgb(255 255 255 / 18%);
}

/* Main button in the division's bright accent with dark text (9.2:1 lime, 4.8:1 lilac). */
.hero-panel__cta {
	background: var(--accent-bright);
	color: var(--ink);
}

.hero-panel__cta:hover {
	background: #fff;
	color: var(--ink);
}

/* No press transform here: a transform would re-anchor the stretched ::after to the button. */
.hero-panel__cta:active {
	transform: none;
}

/* Stretched link: the whole panel is clickable through the main button. */
.hero-panel__cta::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hero-split__ribbons {
	display: none;
}

/* Desktop and tablet landscape: side by side with the diagonal divide */
@media (min-width: 56.25em) {
	.hero-split {
		--split: 50%;
		--skew: clamp(2rem, 3.6vw, 4rem);
		--ribbon: 0.45rem;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto 1fr;
		min-height: clamp(38rem, calc(100svh - 7.5rem), 54rem);
		transition: --split 0.7s var(--ease);
	}

	.hero-split__intro {
		position: relative;
		z-index: 2;
		grid-column: 1 / -1;
		grid-row: 1;
		padding: clamp(3.25rem, 7vh, 6rem) var(--gutter) 1.5rem;
		background: none;
		text-align: center;
	}

	.hero-split__eyebrow {
		justify-content: center;
	}

	.hero-split__title {
		max-width: 22ch;
		margin-inline: auto;
		text-shadow: 0 2px 30px rgb(0 0 0 / 35%);
	}

	.hero-panel {
		position: static;
		isolation: auto;
		overflow: visible;
		grid-row: 2;
		align-self: end;
		margin: 0;
		padding: 1rem clamp(1.5rem, 4vw, 4.5rem) clamp(2.5rem, 6vh, 4.5rem);
		clip-path: none;
	}

	.hero-panel--photocopiers {
		grid-column: 1;
		padding-right: calc(var(--skew) * 2 + 1.5rem);
	}

	.hero-panel--facilities {
		grid-column: 2;
		padding-left: calc(var(--skew) * 2 + 1.5rem);
	}

	.hero-panel--facilities::before,
	.hero-panel--facilities::after {
		display: none;
	}

	.hero-panel__content {
		max-width: 34rem;
	}

	.hero-panel--facilities .hero-panel__content {
		margin-left: auto;
	}

	/* Photo layers now cover the whole hero, clipped to their half of the divide. */
	.hero-panel__media {
		z-index: -2;
	}

	.hero-panel--photocopiers .hero-panel__media,
	.hero-panel--photocopiers .hero-panel__cta::after {
		clip-path: polygon(0 0, calc(var(--split) + var(--skew)) 0, calc(var(--split) - var(--skew)) 100%, 0 100%);
	}

	.hero-panel--facilities .hero-panel__media,
	.hero-panel--facilities .hero-panel__cta::after {
		clip-path: polygon(calc(var(--split) + var(--skew)) 0, 100% 0, 100% 100%, calc(var(--split) - var(--skew)) 100%);
	}

	/* Each photo only needs to cover its own half plus the lean of the divide. */
	.hero-panel__media img {
		position: absolute;
		top: 0;
		width: calc(58% + var(--skew));
		height: 100%;
		transition: transform 1.2s var(--ease);
	}

	.hero-panel--photocopiers .hero-panel__media img {
		left: 0;
	}

	.hero-panel--facilities .hero-panel__media img {
		right: 0;
	}

	/* Darker at the top (shared headline) and bottom (panel text), lighter in between to show the photo. */
	.hero-panel__media::after {
		background: linear-gradient(
			180deg,
			color-mix(in srgb, var(--accent-ink) 84%, transparent) 0%,
			color-mix(in srgb, var(--accent-ink) 42%, transparent) 36%,
			color-mix(in srgb, var(--accent-ink) 72%, transparent) 60%,
			color-mix(in srgb, var(--accent-ink) 95%, transparent) 100%
		);
	}

	/* The divide: lime ribbon on the Photocopiers side, violet on the Facilities side. */
	.hero-split__ribbons {
		display: block;
		position: absolute;
		inset: 0;
		z-index: -1;
		pointer-events: none;
		/* Fade the ribbons out behind the shared headline so it stays clean. */
		-webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 32%, #000 54%);
		mask-image: linear-gradient(180deg, transparent 0%, transparent 32%, #000 54%);
	}

	.hero-split__ribbons::before,
	.hero-split__ribbons::after {
		content: "";
		position: absolute;
		inset: 0;
	}

	.hero-split__ribbons::before {
		background: var(--photocopiers-400);
		clip-path: polygon(
			calc(var(--split) + var(--skew) - var(--ribbon)) 0,
			calc(var(--split) + var(--skew)) 0,
			calc(var(--split) - var(--skew)) 100%,
			calc(var(--split) - var(--skew) - var(--ribbon)) 100%
		);
	}

	.hero-split__ribbons::after {
		background: var(--facilities-500);
		clip-path: polygon(
			calc(var(--split) + var(--skew)) 0,
			calc(var(--split) + var(--skew) + var(--ribbon)) 0,
			calc(var(--split) - var(--skew) + var(--ribbon)) 100%,
			calc(var(--split) - var(--skew)) 100%
		);
	}
}

/* Hover and focus shift the divide, but only for visitors happy with motion. */
@media (min-width: 56.25em) and (prefers-reduced-motion: no-preference) {
	.hero-split:has(.hero-panel--photocopiers:hover),
	.hero-split:has(.hero-panel--photocopiers :focus-visible) {
		--split: 54%;
	}

	.hero-split:has(.hero-panel--facilities:hover),
	.hero-split:has(.hero-panel--facilities :focus-visible) {
		--split: 46%;
	}

	.hero-panel:hover .hero-panel__media img,
	.hero-panel:has(:focus-visible) .hero-panel__media img {
		transform: scale(1.04);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-split,
	.hero-panel__media img {
		transition: none;
	}
}

/* ==========================================================================
   2. Trust strip
   ========================================================================== */

.trust-strip {
	border-bottom: 1px solid var(--line);
	background: #fff;
}

.trust-strip__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1rem 1.25rem;
	padding-block: 1.5rem;
}

/*
 * On wider screens the items sit in one row of equal columns, however many
 * there are. Items without a fact are hidden on the live site, so the count
 * varies (three at launch).
 */
@media (min-width: 56.25em) {
	.trust-strip__list {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		gap: 1.25rem;
	}

	.trust-item + .trust-item {
		padding-left: 1.25rem;
		border-left: 1px solid var(--line);
	}
}

.trust-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.trust-item__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--surface-2);
	color: var(--ink);
}

.trust-item__icon .icon-star {
	color: #b7791f;
}

.trust-item__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-size: var(--text-sm);
	line-height: 1.3;
}

.trust-item__main {
	color: var(--ink);
	font-weight: 700;
}

.trust-item__sub {
	color: var(--ink-3);
	font-size: 0.875rem;
}

.trust-item .tbc {
	margin: 0.25rem 0 0;
}

/* ==========================================================================
   3. Pillars: Print · Connect · Power · Protect
   ========================================================================== */

.pillars__tagline {
	margin-bottom: 0.75rem;
	color: var(--ink-3);
	font-family: var(--font-serif);
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

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

@media (min-width: 40em) {
	.pillars__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 67.5em) {
	.pillars__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

.pillar {
	display: flex;
	flex-direction: column;
	padding: 1.6rem 1.5rem 1.5rem;
	border: 1px solid var(--line);
	border-top: 4px solid var(--accent);
	border-radius: var(--radius);
	background: #fff;
}

.pillar__word {
	margin-bottom: 0.5rem;
	color: var(--accent);
	font-family: var(--font-serif);
	font-size: 2rem;
	font-weight: 600;
}

.pillar__text {
	flex: 1;
}

.pillar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--accent);
	font-weight: 700;
	text-decoration: none;
}

.pillar__link:hover {
	text-decoration: underline;
}

/* ==========================================================================
   4. Division bands (shared by Photocopiers and Facilities)
   ========================================================================== */

/*
 * Each band overlaps the section above by one --slant, and its clipped top
 * corner shows that section through. The result is a slanted join, e.g.
 * green into purple, with a thin accent ribbon along the edge.
 */
.division-band {
	position: relative;
	margin-top: calc(var(--slant) * -1);
	padding-top: calc(var(--section-space) + var(--slant));
	background: var(--accent-tint);
	clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
}

.division-band::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: calc(var(--slant) + 5px);
	background: var(--accent);
	clip-path: polygon(0 var(--slant), 100% 0, 100% 5px, 0 calc(var(--slant) + 5px));
}

.division-band__intro {
	display: grid;
	align-items: center;
	gap: 2rem;
	margin-bottom: 2.5rem;
}

@media (min-width: 56.25em) {
	.division-band__intro.has-image {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		gap: 4rem;
	}

	/* Facilities mirrors the layout so the two bands alternate. */
	.division-band[data-division="facilities"] .division-band__intro.has-image {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}

	.division-band[data-division="facilities"] .division-band__media {
		order: -1;
	}
}

.division-band__copy .section-title {
	max-width: 23ch;
}

.division-band__media {
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	aspect-ratio: 4 / 3;
}

.division-band__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Offer card (Photocopiers): free print audit */
.offer-card {
	display: grid;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1.75rem;
	border-radius: var(--radius);
	background: var(--accent);
	color: #fff;
	--focus-ring: #fff;
}

@media (min-width: 56.25em) {
	.offer-card {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 1.75rem;
		padding: 2rem 2.5rem;
	}
}

.offer-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: rgb(255 255 255 / 14%);
}

.offer-card__title {
	margin-bottom: 0.25rem;
	color: #fff;
	font-family: var(--font-serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.offer-card p {
	margin: 0;
}

/* Deadlines (Facilities) */
.deadlines {
	display: grid;
	gap: 1rem;
	margin-top: 2rem;
}

@media (min-width: 56.25em) {
	.deadlines {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		gap: 1.25rem;
	}
}

.deadline {
	position: relative;
	padding: 1.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.deadline--primary {
	border-color: transparent;
	background: var(--facilities-900);
	color: #fff;
	--focus-ring: #fff;
}

.deadline__date {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.85rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--accent-tint-2);
	color: var(--accent-strong);
	font-size: 0.875rem;
	font-weight: 700;
}

.deadline--primary .deadline__date {
	background: rgb(255 255 255 / 12%);
	color: #fff;
}

.deadline__title {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.deadline--primary .deadline__title {
	color: #fff;
}

.deadline__countdown {
	margin: 0 0 1rem;
	padding-left: 0.75rem;
	border-left: 3px solid var(--facilities-300);
	color: #fff;
	font-size: 1.125rem;
	font-weight: 700;
}

.deadline__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--accent);
	font-weight: 700;
	text-decoration: none;
}

.deadline--primary .deadline__link {
	color: #fff;
}

/* The whole deadline card is clickable through its link. */
.deadline__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.deadline:hover .deadline__link {
	text-decoration: underline;
}

/* ==========================================================================
   5. How it works
   ========================================================================== */

.steps__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	counter-reset: step;
}

@media (min-width: 40em) {
	.steps__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 67.5em) {
	.steps__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 2.25rem;
	}
}

.step {
	position: relative;
	padding-top: 3.75rem;
	counter-increment: step;
}

.step::before {
	content: counter(step, decimal-leading-zero);
	position: absolute;
	top: 0;
	left: 0;
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 2.75rem;
	font-weight: 600;
	line-height: 1;
}

/* Connecting line, green to purple: one journey across both divisions. */
.step::after {
	content: "";
	position: absolute;
	top: 1.35rem;
	right: 0;
	left: 4.5rem;
	height: 2px;
	background: linear-gradient(90deg, var(--photocopiers-400), var(--facilities-300));
}

.step__title {
	font-size: 1.25rem;
}

.step__text {
	margin: 0;
}

/* ==========================================================================
   7. Coverage
   ========================================================================== */

.coverage__grid {
	display: grid;
	gap: 2rem;
}

@media (min-width: 56.25em) {
	.coverage__grid {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		align-items: start;
		gap: 4rem;
	}
}

.coverage__subtitle {
	display: flex;
	align-items: center;
	margin: 1.75rem 0 0.75rem;
	color: var(--ink-3);
	font-size: 0.875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.chip-list li {
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--ink);
	font-size: var(--text-sm);
	font-weight: 600;
}

.coverage__card {
	position: relative;
	overflow: hidden;
	padding: 2.25rem 2rem 2rem;
	border-radius: var(--radius);
	background: var(--ink);
	color: rgb(255 255 255 / 88%);
	--focus-ring: #fff;
}

/* Split brand stripe across the top of the card. */
.coverage__card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--photocopiers-700) 0 50%, var(--facilities-700) 50% 100%);
}

.coverage__pin {
	display: inline-flex;
	margin-bottom: 0.75rem;
	color: var(--photocopiers-400);
}

.coverage__card-title {
	color: #fff;
	font-size: 1.25rem;
}

/* Office hours and postal address: icon beside a small label and the detail. */
.coverage__hours,
.coverage__postal {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-bottom: 0.85rem;
	font-size: var(--text-sm);
}

.coverage__hours .icon,
.coverage__postal .icon {
	margin-top: 0.2rem;
	color: rgb(255 255 255 / 65%);
}

.coverage__label {
	display: block;
	color: rgb(255 255 255 / 68%);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.coverage__call {
	margin-top: 0.5rem;
}

/* White button on the dark card: dark text (the card has no division colour). */
.coverage__card .button--light {
	color: var(--ink);
}

.coverage__card .button--light:hover {
	background: var(--photocopiers-400);
	color: var(--ink);
}

/* ==========================================================================
   8. Guides and reviews
   ========================================================================== */

.guides {
	background: var(--surface-2);
}
