/*
 * Group block styles.
 */

/* Section heading pattern: align both columns at the bottom. */
.wp-block-group.gba-section-head {
	align-items: end;
}

/* Card: light surface with border. */
.wp-block-group.is-style-card {
	padding: 32px;
	border: 1px solid var(--wp--preset--color--sky);
	border-radius: var(--wp--preset--border-radius--medium);
	background-color: var(--wp--preset--color--mist);
	transition: border-color 200ms ease;
}

.wp-block-group.is-style-card:hover {
	border-color: var(--wp--preset--color--navy);
}

/* Card dark: navy surface. */
.wp-block-group.is-style-card-dark {
	min-height: 220px;
	padding: 32px 28px;
	border-radius: var(--wp--preset--border-radius--medium);
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--mist);
}

/* Tiles: grid with hairlines between navy tiles (set block spacing to 1px). */
.wp-block-group.is-style-tiles {
	overflow: hidden;
	border: 1px solid rgba(245, 249, 255, 0.16);
	border-radius: var(--wp--preset--border-radius--medium);
	background-color: rgba(245, 249, 255, 0.16);
}

.wp-block-group.is-style-tiles > * {
	margin: 0;
	padding: 36px 32px;
	background-color: var(--wp--preset--color--navy);
	transition: background-color 200ms ease;
}

.wp-block-group.is-style-tiles > *:hover {
	background-image: linear-gradient(rgba(189, 213, 244, 0.1), rgba(189, 213, 244, 0.1));
}

/* Steps: process row with a navy top rule. */
.wp-block-group.is-style-steps {
	border-top: 2px solid var(--wp--preset--color--navy);
}

.wp-block-group.is-style-steps > * {
	margin: 0;
	padding: 28px 28px 8px 0;
}

/* Section: full-width band with vertical padding. */
.wp-block-group.gba-section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Section with a red decorative circle (top right). */
.wp-block-group.gba-deco-circle {
	position: relative;
	overflow: hidden;
}

.wp-block-group.gba-deco-circle::before {
	content: "";
	position: absolute;
	top: -180px;
	right: -180px;
	width: 560px;
	height: 560px;
	border: 2px solid rgba(237, 44, 44, 0.55);
	border-radius: 50%;
	pointer-events: none;
}

.wp-block-group.gba-deco-circle > * {
	position: relative;
}

/*
 * Narrow text blocks inside constrained sections start at the left edge of
 * the wide content area (core centres them with !important margins).
 */
.wp-block-group.is-layout-constrained > :is(.gba-heading-narrow, .gba-hero__title, .gba-hero__lead) {
	margin-right: auto !important;
	margin-left: calc((100% - min(100%, var(--wp--style--global--wide-size))) / 2) !important;
}

.wp-block-group .gba-heading-narrow {
	max-width: 20ch;
	margin-bottom: var(--wp--preset--spacing--60);
}

/* Quote band. */
.wp-block-group.gba-quote-band {
	align-items: center;
}

.wp-block-group.gba-quote-band .wp-block-quote {
	margin: 0;
	text-wrap: balance;
}

.wp-block-group.gba-quote-band .wp-block-quote p {
	margin: 0;
}

/*
 * Core's one-column fallback for "columnSpan" does not work with a min()
 * column width, so the quote kept two columns on phones and overflowed.
 * 727px: below two 340px columns plus the 48px gap.
 */
@container (max-width: 727px) {
	.wp-block-group.gba-quote-band > .wp-block-quote {
		grid-column: 1 / -1;
	}
}

/*
 * Service overview (section 02): client levels in rows, service types in
 * columns. On phones the rows stack and each cell shows its own label, which
 * on larger screens stays for screen readers only (the column heads show it).
 */
.gba-service-matrix {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--sky);
	border-radius: var(--wp--preset--border-radius--large);
	background-color: var(--wp--preset--color--white);
}

.gba-service-matrix__head,
.gba-service-matrix__row {
	display: grid;
	grid-template-columns: minmax(150px, 0.7fr) 1fr 1fr;
}

.gba-service-matrix :is(.gba-service-matrix__head, .gba-service-matrix__row, .gba-service-matrix__column, .gba-service-matrix__cell, .gba-service-matrix__roles, .wp-block-heading) {
	margin-block: 0;
}

.gba-service-matrix__head {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

.gba-service-matrix__column {
	padding: 24px 32px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.gba-service-matrix__column:first-child {
	grid-column-start: 2;
}

.gba-service-matrix__column p {
	margin-block: 0;
}

.gba-service-matrix__column p.is-style-eyebrow {
	margin-bottom: 6px;
}

.gba-service-matrix__row .wp-block-heading {
	padding: 32px;
	color: var(--wp--preset--color--navy);
	font-size: 26px;
	line-height: 1.15;
}

.gba-service-matrix__cell {
	padding: 32px;
	border-left: 1px solid var(--wp--preset--color--sky);
	font-size: var(--wp--preset--font-size--small, 16px);
	line-height: 1.55;
}

.gba-service-matrix__cell p {
	margin-block: 0;
}

.gba-service-matrix__roles {
	grid-column: 1 / -1;
	padding: 16px 32px;
	border-top: 1px solid var(--wp--preset--color--sky);
	font-size: var(--wp--preset--font-size--small, 16px);
	line-height: 1.55;
}

.gba-service-matrix__row:not(:last-child) .gba-service-matrix__roles {
	border-bottom: 1px solid var(--wp--preset--color--sky);
}

.gba-service-matrix__roles strong {
	margin-right: 12px;
	color: var(--wp--preset--color--navy);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

@media (min-width: 782px) {
	.gba-service-matrix__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* In the editor the labels stay visible, so they can be edited. */
	.editor-styles-wrapper .gba-service-matrix__label {
		position: static;
		width: auto;
		height: auto;
		margin-bottom: 6px;
		overflow: visible;
		clip-path: none;
		white-space: normal;
	}
}

@media (max-width: 781px) {
	.gba-service-matrix__head {
		display: none;
	}

	.gba-service-matrix__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.gba-service-matrix__row .wp-block-heading {
		padding: 24px 24px 8px;
		font-size: 24px;
	}

	.gba-service-matrix__cell {
		padding: 8px 24px 16px;
		border-left: 0;
	}

	.gba-service-matrix__label {
		margin-bottom: 4px;
	}

	.gba-service-matrix__roles {
		padding: 14px 24px;
	}

	.gba-service-matrix__roles strong {
		display: block;
		margin: 0 0 4px;
	}
}

/* Mandate cards: title close to its description. */
.wp-block-group.is-style-card-dark .wp-block-heading {
	letter-spacing: -0.02em;
}

/* Tile numbers. */
.gba-tile__number {
	font-weight: 800;
}

/*
 * Hero: navy band with light glows, star field, static globe (assets/img/globe.svg)
 * and a left-to-right shade for legibility. Content sits at the bottom.
 */
.wp-block-group.is-style-hero {
	/* The sphere fills 78% of the globe box; sized so it fits the hero
	   height and the southern hemisphere (Australia, New Zealand) stays visible. */
	--gba-globe-size: clamp(780px, 126vh, 1160px);
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: clamp(560px, 82vh, 780px);
	padding-top: clamp(80px, 12vh, 140px);
	padding-bottom: 56px;
	overflow: hidden;
	background-image:
		radial-gradient(1px 1px at 12% 18%, #f5f9ff 50%, transparent 51%),
		radial-gradient(1px 1px at 27% 72%, rgba(245, 249, 255, 0.8) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 41% 12%, #f5f9ff 50%, transparent 51%),
		radial-gradient(1px 1px at 8% 55%, rgba(245, 249, 255, 0.6) 50%, transparent 51%),
		radial-gradient(1px 1px at 33% 38%, rgba(245, 249, 255, 0.5) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 58% 8%, rgba(245, 249, 255, 0.9) 50%, transparent 51%),
		radial-gradient(1px 1px at 52% 88%, rgba(245, 249, 255, 0.7) 50%, transparent 51%),
		radial-gradient(1px 1px at 18% 92%, rgba(245, 249, 255, 0.5) 50%, transparent 51%),
		radial-gradient(1px 1px at 92% 10%, #f5f9ff 50%, transparent 51%),
		radial-gradient(1px 1px at 97% 62%, rgba(245, 249, 255, 0.7) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 4% 30%, rgba(245, 249, 255, 0.8) 50%, transparent 51%),
		radial-gradient(1px 1px at 46% 55%, rgba(245, 249, 255, 0.4) 50%, transparent 51%),
		radial-gradient(1px 1px at 22% 8%, rgba(245, 249, 255, 0.6) 50%, transparent 51%),
		radial-gradient(1px 1px at 63% 95%, rgba(245, 249, 255, 0.6) 50%, transparent 51%),
		radial-gradient(1px 1px at 88% 92%, rgba(245, 249, 255, 0.5) 50%, transparent 51%),
		radial-gradient(1px 1px at 20px 30px, rgba(245, 249, 255, 0.55) 50%, transparent 51%),
		radial-gradient(1px 1px at 140px 90px, rgba(245, 249, 255, 0.4) 50%, transparent 51%),
		radial-gradient(1px 1px at 75px 160px, rgba(245, 249, 255, 0.3) 50%, transparent 51%),
		radial-gradient(1px 1px at 190px 200px, rgba(245, 249, 255, 0.35) 50%, transparent 51%),
		radial-gradient(ellipse 55% 65% at 72% 45%, rgba(189, 213, 244, 0.22) 0%, rgba(189, 213, 244, 0) 70%),
		linear-gradient(180deg, rgba(189, 213, 244, 0.12) 0%, rgba(189, 213, 244, 0) 60%);
	background-size:
		100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%,
		100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%,
		100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%,
		230px 230px, 230px 230px, 230px 230px, 230px 230px,
		100% 100%, 100% 100%;
}

.wp-block-group.is-style-hero::before {
	content: "";
	position: absolute;
	top: 50%;
	right: -16%;
	width: var(--gba-globe-size);
	aspect-ratio: 1;
	background: url("../../img/globe.svg") center / contain no-repeat;
	transform: translateY(-50%);
	pointer-events: none;
}

.wp-block-group.is-style-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(1, 46, 114, 0.55), rgba(1, 46, 114, 0.25) 45%, rgba(1, 46, 114, 0) 75%);
	pointer-events: none;
}

.wp-block-group.is-style-hero > * {
	position: relative;
	z-index: 1;
	width: 100%;
}

/* Rotating globe (assets/js/globe.js) replaces the static one. */
.wp-block-group.is-style-hero.has-live-globe::before {
	background-image: none;
}

.wp-block-group.is-style-hero > .gba-hero__globe {
	position: absolute;
	top: 50%;
	right: -16%;
	z-index: 0;
	width: var(--gba-globe-size);
	max-width: none !important;
	height: auto;
	aspect-ratio: 1;
	margin: 0 !important;
	transform: translateY(-50%);
	pointer-events: none;
}

/* Phones: the text runs across the globe, so the globe steps back. */
@media (max-width: 599px) {
	.wp-block-group.is-style-hero::before,
	.wp-block-group.is-style-hero > .gba-hero__globe {
		opacity: 0.35;
	}
}

.wp-block-group.is-style-hero > .gba-hero__title {
	max-width: 15ch;
	margin-top: 40px;
}

.wp-block-group.is-style-hero > .gba-hero__lead {
	max-width: 54ch;
	margin-top: 28px;
	line-height: 1.5;
}

.wp-block-group.is-style-hero > .gba-hero__actions {
	margin-top: 40px;
}

/*
 * Key figures: spread across the full content width (first at the left,
 * last at the right edge), each label beside its number.
 */
.wp-block-group.is-style-hero > .gba-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 24px 40px;
	margin-top: clamp(56px, 9vh, 96px);
	padding-top: 28px;
	border-top: 1px solid rgba(245, 249, 255, 0.22);
}

.wp-block-group.is-style-hero > .gba-hero__stats > .wp-block-group {
	flex-direction: row;
	align-items: center;
	gap: 14px;
}

.gba-hero__stats .is-style-stat {
	margin: 0;
}

.gba-hero__stats .gba-stat-label {
	max-width: 12ch;
	margin: 0;
	font-size: 14px;
	line-height: 1.35;
}

/*
 * Card link: navy card; the first link covers the whole card, so the card
 * is one large click target (for example the enquiry card next to the firms).
 */
.wp-block-group.is-style-card-link {
	position: relative;
	min-height: 260px;
	padding: 28px;
	border-radius: var(--wp--preset--border-radius--medium);
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--mist);
	transition: background-color 200ms ease;
}

.wp-block-group.is-style-card-link:hover {
	background-color: var(--wp--preset--color--ink);
}

.wp-block-group.is-style-card-link a {
	color: inherit;
	text-decoration: none;
}

.wp-block-group.is-style-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.wp-block-group.is-style-card-link a:focus-visible {
	outline: none;
}

.wp-block-group.is-style-card-link:focus-within {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
}
