/* Fast Tracks redesign - home page (top strip, cards, card pop-up). Everything under .ft-home; colours from tokens.css.
 * Values come from projects/front-page/reference/g1c/G1c-header-all-dark.dc.html. */

/* Before the script runs, while loading, or if the picture or drawing fails: dark band, words showing. */
.ft-home .ft-strip {
	position: relative;
	overflow: hidden;
	background-color: var(--surface-inverse);
	display: flex;
	justify-content: flex-end;
	align-items: stretch;
	height: max(200px, 15vw);
}

/* The page still loads GeneratePress's img rule (height:auto; max-width:100%), so every property is set here. */
.ft-home img.ft-strip-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-width: 1280px;
	max-width: none;
	object-fit: cover;
	display: block;
}

.ft-home img.ft-strip-img-n {
	display: none;
	position: absolute;
	left: clamp(calc(100% - 1000px), calc(50% - 333px), 0px);
	width: 1000px;
	max-width: none;
	height: auto;
}

.ft-home .ft-topfade {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to right, color-mix(in srgb, var(--espresso-900) 0%, transparent) 0%, color-mix(in srgb, var(--espresso-900) 0%, transparent) 46%, color-mix(in srgb, var(--espresso-900) 90%, transparent) 64%, var(--espresso-900) 72%);
}

.ft-home .ft-topphoto-text {
	position: relative;
	flex: 0 1 34%;
	min-width: 280px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 24px clamp(16px, 4vw, 48px);
}

.ft-home .ft-strip-eyebrow {
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--brass-400);
}

.ft-home h1.ft-strip-h {
	margin: 0;
	padding: 0;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--text-on-inverse);
}

.ft-home .ft-strip-bar {
	width: 72px;
	height: 3px;
	background: var(--brass-400);
}

/* Tie-template drawings: ties drop in, rails sweep across, the sweep carries across the words, then the caption. */
@keyframes tkTie {
	from {
		opacity: 0;
		transform: translateY(0.14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes tkRail {
	from {
		clip-path: inset(0 100% 0 0);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes tkCap {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.ft-home .tk-tie {
	opacity: 0;
	animation: tkTie 0.25s ease-out forwards;
}

.ft-home .tk-reveal {
	clip-path: inset(0 100% 0 0);
	animation: tkRail 1.3s 0.9s linear forwards;
}

.ft-home .tk-txt {
	clip-path: inset(0 100% 0 0);
	animation: tkRail 0.7s 2.2s linear forwards;
}

.ft-home .tk-cap {
	margin-top: 8px;
	font-size: 15px;
	line-height: 22px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--brass-400);
	opacity: 0;
	animation: tkCap 0.2s 2.9s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
	.ft-home .tk-tie {
		opacity: 1;
		animation: none;
	}

	.ft-home .tk-reveal {
		clip-path: none;
		animation: none;
	}

	.ft-home .tk-cap {
		opacity: 1;
		animation: none;
	}

	.ft-home .tk-txt {
		clip-path: none;
		animation: none;
	}
}

/* Phone and small tablet. */
@media (max-width: 760px) {
	/* The copied drawing fragments carry inline width:66%, so this one needs !important. */
	.ft-home .ft-strip-anim {
		width: 100% !important;
		opacity: 0.55;
	}

	.ft-home .tk-cap {
		display: none;
	}

	.ft-home .ft-strip {
		height: 150px;
	}

	.ft-home img.ft-strip-img {
		display: none;
	}

	.ft-home img.ft-strip-img-n {
		display: block;
	}

	.ft-home .ft-topfade {
		background: radial-gradient(ellipse at center, color-mix(in srgb, var(--espresso-900) 66%, transparent) 0%, color-mix(in srgb, var(--espresso-900) 42%, transparent) 70%, color-mix(in srgb, var(--espresso-900) 34%, transparent) 100%);
	}

	.ft-home .ft-topphoto-text {
		flex-basis: 100%;
		justify-content: center;
		align-items: center;
		text-align: center;
		gap: 6px;
		padding: 12px 16px;
	}

	.ft-home h1.ft-strip-h {
		font-size: 20px;
		line-height: 1.15;
		text-wrap: balance;
		text-shadow: 0 1px 3px color-mix(in srgb, var(--espresso-900) 80%, transparent);
	}
}

/* ---------- cards ---------- */
.ft-home .ft-cards {
	font-family: var(--font-body);
}

.ft-home .ft-cards .ft-container {
	padding-top: 28px;
	padding-bottom: 36px;
}

.ft-home .ft-gridsq {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.ft-home .ft-sqw {
	position: relative;
}

.ft-home a.ft-sq {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--surface-card);
	border: 1px solid var(--border-hairline);
	border-radius: 5px;
	overflow: hidden;
	text-decoration: none;
	transition: transform .16s ease-out, box-shadow .16s ease-out, border-color .16s ease-out;
}

.ft-home a.ft-sq.ft-sq--tt {
	border-color: var(--brass-400);
}

.ft-home a.ft-sq:hover,
.ft-home a.ft-sq:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
	border-color: var(--brass-400);
	text-decoration: none;
}

.ft-home a.ft-sq:focus-visible {
	outline: none;
	box-shadow: var(--shadow-md), var(--ring);
}

.ft-home a.ft-sq:active {
	transform: translateY(0);
}

.ft-home img.ft-sq-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .2s ease-out;
}

.ft-home a.ft-sq:hover .ft-sq-img,
.ft-home a.ft-sq:focus-visible .ft-sq-img {
	transform: scale(1.04);
}

.ft-home .ft-sq-label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	box-sizing: border-box;
	padding: 0 12px 16px;
	text-align: center;
	font-size: 17px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--text-strong);
	background: transparent;
}

.ft-home .ft-sq-eyebrow {
	display: block;
	margin-bottom: 3px;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--brass-700);
}

.ft-home .ft-sq-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--brass-400);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .2s ease-out;
}

.ft-home a.ft-sq:hover .ft-sq-bar,
.ft-home a.ft-sq:focus-visible .ft-sq-bar {
	transform: scaleX(1);
}

/* The three-dots button. GeneratePress styles every button (grey, padded, hover colours): set it all back. */
.ft-home button.ft-info,
.ft-home button.ft-info:hover,
.ft-home button.ft-info:focus,
.ft-home button.ft-info:active {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	outline: none;
}

.ft-home .ft-info-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	box-sizing: border-box;
	background: color-mix(in srgb, var(--white) 94%, transparent);
	border: 2px solid var(--brass-600);
	color: var(--brass-700);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s ease-out, color .15s ease-out;
}

.ft-home .ft-info:hover .ft-info-dot,
.ft-home .ft-info:focus-visible .ft-info-dot {
	background: var(--brass-400);
	color: var(--espresso-900);
}

.ft-home .ft-info:focus-visible .ft-info-dot {
	box-shadow: var(--ring);
}

@media (prefers-reduced-motion: reduce) {
	.ft-home a.ft-sq,
	.ft-home img.ft-sq-img,
	.ft-home .ft-sq-bar {
		transition: none;
	}

	.ft-home a.ft-sq:hover,
	.ft-home a.ft-sq:hover .ft-sq-img {
		transform: none;
	}
}

@media (max-width: 1000px) {
	.ft-home .ft-gridsq {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.ft-home img.ft-sq-img {
		width: 86%;
		height: 86%;
		left: 7%;
	}

	.ft-home .ft-sq-eyebrow {
		display: none;
	}

	.ft-home img.ft-sq-img.ft-sq-l {
		left: 0;
	}

	.ft-home img.ft-sq-img.ft-sq-r {
		left: 14%;
	}
}

@media (max-width: 600px) {
	.ft-home .ft-gridsq {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.ft-home .ft-sq-label {
		font-size: 15px;
		padding: 0 8px 10px;
	}
}

/* ---------- card pop-up (native dialog, opened with showModal) ---------- */
.ft-home dialog.ft-modal {
	position: fixed;
	inset: 0;
	margin: auto;
	padding: 0;
	border: 0;
	width: min(660px, calc(100% - 32px));
	max-width: none;
	height: fit-content;
	max-height: calc(100vh - 24px);
	box-sizing: border-box;
	background: var(--surface-card);
	color: var(--text-body);
	font-family: var(--font-body);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 16px 40px color-mix(in srgb, var(--espresso-800) 45%, transparent);
}

.ft-home dialog.ft-modal[open] {
	display: flex;
	flex-direction: column;
}

.ft-home dialog.ft-modal::backdrop {
	background: color-mix(in srgb, var(--espresso-900) 62%, transparent);
}

.ft-home .ft-modal-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-wrap: wrap;
}

.ft-home .ft-modal img.ft-modal-img {
	flex: 0 0 250px;
	width: 250px;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.ft-home .ft-modal img.ft-modal-img[hidden] {
	display: none;
}

.ft-home .ft-modal-txt {
	flex: 1 1 260px;
	box-sizing: border-box;
	padding: 28px 28px 26px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.ft-home .ft-modal-bar {
	width: 72px;
	height: 3px;
	background: var(--brand);
}

.ft-home .ft-modal h2 {
	margin: 0;
	padding-right: 32px;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--brown-primary);
}

.ft-home .ft-modal p {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	font-weight: 500;
	color: var(--text-body);
}

.ft-home .ft-modal a.ft-btn,
.ft-home .ft-modal a.ft-btn:hover,
.ft-home .ft-modal a.ft-btn:focus {
	margin-top: 8px;
	background: var(--brand);
	color: var(--espresso-900);
	text-decoration: none;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 13px 22px;
	border-radius: 5px;
}

.ft-home .ft-modal a.ft-btn:hover {
	box-shadow: var(--shadow-md);
}

.ft-home .ft-modal a.ft-btn:focus-visible {
	outline: none;
	box-shadow: var(--ring);
}

.ft-home .ft-modal button.ft-x,
.ft-home .ft-modal button.ft-x:focus,
.ft-home .ft-modal button.ft-x:active {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--white) 94%, transparent);
	color: var(--espresso-900);
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	outline: none;
}

.ft-home .ft-modal button.ft-x:hover {
	background: var(--sand-100);
	color: var(--espresso-900);
}

.ft-home .ft-modal button.ft-x:focus-visible {
	box-shadow: var(--ring);
}

@media (max-width: 600px) {
	.ft-home .ft-modal img.ft-modal-img {
		flex-basis: 100%;
		width: 100%;
		height: 170px;
		aspect-ratio: auto;
		object-fit: contain;
		object-position: center top;
		box-sizing: border-box;
		padding-top: 12px;
		background: var(--white);
	}

	.ft-home .ft-modal-txt {
		padding: 4px 20px 20px;
		gap: 10px;
	}

	.ft-home .ft-modal h2 {
		font-size: 21px;
	}

	.ft-home .ft-modal p {
		font-size: 16px;
	}
}

/* ---------- customer quote band (frame lines 616-622) ---------- */
.ft-home .ft-quote {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	background: var(--surface-inverse);
}

.ft-home .ft-quote[hidden] {
	display: none;
}

.ft-home img.ft-quote-img {
	flex: 1 1 520px;
	min-width: 0;
	width: 100%;
	max-width: none;
	height: 300px;
	object-fit: cover;
	object-position: left center;
	display: block;
}

.ft-home .ft-quote-fig {
	flex: 1 1 360px;
	box-sizing: border-box;
	margin: 0;
	padding: 32px clamp(16px, 4vw, 48px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
}

.ft-home .ft-quote-mark {
	height: 30px;
	font-size: 72px;
	line-height: 1;
	font-weight: 700;
	color: var(--brass-400);
}

/* GeneratePress gives every blockquote a left border, padding, a bigger italic type and a bottom margin. */
.ft-home .ft-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 17px;
	line-height: 1.55;
	font-weight: 500;
	font-style: normal;
	color: var(--text-on-inverse);
}

.ft-home .ft-quote figcaption {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	color: var(--brass-400);
}
