/**
 * Services hub (/services/, page-services.php): ecosystem map hero, relations, all-services grid, steps band.
 * Loaded only on that page, after home-sections.css (section head, reveal, consult form).
 * Hover / focus / active states only change colours, shadows or transforms, never a box size.
 */

/* TEMPORARY (pending approval): logo-derived blues + hub radii, scoped to this page. */
.site-main--services {
	--at-blue: #7d97aa;      /* decorative strokes / dots only (3.05:1, not for text) */
	--at-blue-ink: #4f6779;  /* blue text on white (5.9:1) */
	--at-blue-deep: #2c3e4c; /* dark surface, white text (11:1) */
	--at-blue-soft: #eef2f5; /* tint surface */
	--at-teal-soft: #eef7f7;
	--at-r-lg: 40px;
	--at-r-md: 24px;
	--at-r-sm: 12px;
}

/* The theme has no global margin / list reset: reset what this page uses. */
.site-main--services :where(.hub-hero, .hub-sec) :where(h1, h2, h3, p, ul, ol) {
	margin: 0;
}

.site-main--services :where(.hub-hero, .hub-sec) :where(ul, ol) {
	padding: 0;
	list-style: none;
}

.site-main--services .hub-ico {
	width: 28px;
	height: 28px;
}

.site-main--services .mini {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: var(--at-btn);
}

/* ---------- Small shared bits ---------- */
.at-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--at-btn);
	font-size: 14px;
	font-weight: 500;
}

.at-eyebrow::before {
	content: "";
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--at-teal);
}

.at-soon {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--at-blue-soft);
	color: var(--at-blue-ink);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.at-soon::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--at-blue);
}

.at-soon--lg {
	height: 36px;
	padding: 0 14px;
}

/* Pause / play toggle: same 40px footprint as .at-arrow, only the icon swaps. */
.at-pause .i-play,
.at-pause[aria-pressed="true"] .i-pause {
	display: none;
}

.at-pause[aria-pressed="true"] .i-play {
	display: block;
}

/* White pill on dark surfaces (steps band). */
.at-btn--light {
	background: #fff;
	border-color: #fff;
	color: var(--at-btn-hover);
}

.at-btn--light:hover,
.at-btn--light:focus-visible {
	background: var(--at-teal-soft);
	border-color: var(--at-teal-soft);
	color: var(--at-btn-hover);
	box-shadow: none;
}

.hub-steps :focus-visible,
.home-consult__box :focus-visible {
	outline-color: #fff;
}

/* ---------- Sections ---------- */
.hub-sec {
	padding-block: clamp(56px, 7vw, 104px);
}

.hub-sec--soft {
	background: var(--at-soft);
}

.hub-sec--steps {
	padding-bottom: 40px;
}

.site-main--services > .home-consult {
	margin-top: 0;
}

/* ---------- Hero: ecosystem map ---------- */
.hub-hero {
	padding-block: 40px 24px;
	background: radial-gradient(900px 520px at 20% 40%, var(--at-blue-soft), transparent 70%);
}

.eco {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
	gap: 56px;
	align-items: center;
}

.eco__title {
	margin-top: 10px;
	color: var(--at-ink);
	font-size: clamp(28px, 2.6vw, 38px);
	font-weight: 700;
	line-height: 1.5;
}

.eco__lead {
	max-width: 620px;
	margin-top: 10px;
	color: var(--at-muted);
	line-height: 2;
}

/* Panels share one grid cell so switching never changes the column height. */
.eco__panels {
	display: grid;
	margin-top: 24px;
}

.panel {
	grid-area: 1 / 1;
	padding: 24px 28px;
	border: 1px solid var(--at-line);
	border-radius: var(--at-r-md);
	background: #fff;
	box-shadow: 0 18px 40px -24px rgba(44, 62, 76, 0.25);
	transition: opacity 0.35s var(--at-ease), visibility 0.35s;
}

.panel:not(.is-active) {
	opacity: 0;
	visibility: hidden;
}

.panel__top {
	display: flex;
	align-items: center;
	gap: 14px;
}

.panel__top .at-soon {
	margin-inline-start: auto;
}

.panel__ico {
	display: grid;
	flex: 0 0 52px;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	background: var(--at-teal-soft);
	color: var(--at-btn);
}

.panel--soon .panel__ico {
	background: var(--at-blue-soft);
	color: var(--at-blue-ink);
}

.panel__n {
	color: var(--at-blue-ink);
	font-size: 13px;
	font-weight: 500;
}

.panel__name {
	color: var(--at-ink);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.5;
}

.panel__desc {
	margin-top: 12px;
	color: var(--at-body);
	line-height: 1.95;
}

.panel__offers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 20px;
	margin-top: 14px;
	font-size: 15px;
}

.panel__offers li {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.panel__offers li::before {
	content: "";
	flex: 0 0 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--at-teal);
	transform: translateY(-2px);
}

.panel__rel {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--at-line);
	color: var(--at-muted);
	font-size: 14px;
}

.panel__rel-title {
	color: var(--at-blue-ink);
	font-size: 13px;
	font-weight: 600;
}

.panel__rel li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.panel__rel b {
	color: var(--at-ink);
	font-weight: 600;
}

.panel__note {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: var(--at-r-sm);
	background: var(--at-blue-soft);
	color: var(--at-blue-ink);
	font-size: 14px;
	line-height: 1.9;
}

.panel__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 14px;
	margin-top: 18px;
}

/* Map */
.map {
	width: 100%;
	max-width: 600px;
	margin-inline: auto;
}

.map__in {
	position: relative;
	aspect-ratio: 1;
}

.map__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.map__orbit {
	fill: none;
	stroke: var(--at-blue);
	stroke-width: 0.25;
	stroke-dasharray: 1 1.2;
	opacity: 0.3;
}

.map__orbit--main {
	opacity: 0.7;
}

.map__spoke {
	stroke: var(--at-blue);
	stroke-width: 0.3;
	opacity: 0.35;
	transition: stroke 0.3s, opacity 0.3s, stroke-width 0.3s;
}

.map__spoke.is-on {
	stroke: var(--at-btn);
	stroke-width: 0.55;
	opacity: 1;
}

.map__rel {
	fill: none;
	stroke: var(--at-teal);
	stroke-width: 0.45;
	stroke-dasharray: 1.4 1.2;
	opacity: 0;
	transition: opacity 0.35s;
}

.map__rel.is-on {
	opacity: 1;
}

.map__core {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 25%;
	aspect-ratio: 1;
	border: 1px solid var(--at-line);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 18px 40px -20px rgba(44, 62, 76, 0.35);
	transform: translate(-50%, -50%);
}

.map__core img {
	width: 62%;
	height: auto;
}

.node {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 21%;
	aspect-ratio: 1;
	margin: 0;
	padding: 6px;
	border: 1.5px solid var(--at-line);
	border-radius: 50%;
	background: #fff;
	color: var(--at-ink);
	font: inherit;
	text-align: center;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.node__ico {
	width: 30%;
	height: auto;
	color: var(--at-btn);
	transition: color 0.3s;
}

.node__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.node:hover {
	border-color: var(--at-teal);
	box-shadow: 0 10px 26px -12px rgba(55, 125, 129, 0.45);
}

.node:focus-visible {
	outline: 2px solid var(--at-ink);
	outline-offset: 8px;
}

.node__ring {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	background: conic-gradient(var(--at-teal) calc(var(--p, 0) * 360deg), transparent 0);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	opacity: 0;
	transition: opacity 0.3s;
	pointer-events: none;
}

.node.is-active {
	border-color: var(--at-btn);
	background: var(--at-btn);
	color: #fff;
	box-shadow: 0 14px 30px -12px rgba(55, 125, 129, 0.6);
}

.node.is-active .node__ico {
	color: #fff;
}

.node.is-active .node__ring {
	opacity: 1;
}

.is-static .node__ring,
.is-paused .node__ring {
	background: var(--at-teal);
}

.node--soon {
	border-style: dashed;
	border-color: var(--at-blue);
	background: var(--at-blue-soft);
}

.node--soon .node__ico {
	color: var(--at-blue-ink);
}

.node--soon.is-active {
	border-color: var(--at-blue-deep);
	background: var(--at-blue-deep);
}

.node__soon {
	position: absolute;
	bottom: -12px;
	left: 50%;
	height: 24px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--at-blue-deep);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 24px;
	white-space: nowrap;
	transform: translateX(-50%);
}

.eco__ctrl {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

.eco__ctrl[hidden] {
	display: none;
}

.eco__ctrl .at-arrow[hidden] {
	display: none;
}

.eco__hint {
	margin-inline-start: 8px;
	color: var(--at-muted);
	font-size: 14px;
}

/* ---------- Relations ---------- */
.rels {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.relc {
	padding: 20px 22px;
	border: 1px solid var(--at-line);
	border-radius: var(--at-r-md);
	background: #fff;
}

.relc__pair {
	display: flex;
	align-items: center;
	gap: 10px;
}

.relc__s {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--at-teal-soft);
	color: var(--at-ink);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.relc__ln {
	flex: 1;
	min-width: 20px;
	height: 0;
	border-top: 1.5px dashed var(--at-blue);
}

.relc p {
	margin-top: 12px;
	color: var(--at-muted);
	font-size: 15px;
	line-height: 1.9;
}

/* ---------- All services grid (also the no-JS view of the map) ---------- */
.grid6 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.grid6 > li {
	display: flex;
}

.gc {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 28px;
	border: 1px solid var(--at-line);
	border-radius: var(--at-r-lg);
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: transform 0.3s var(--at-ease), box-shadow 0.3s var(--at-ease), border-color 0.3s;
}

a.gc:hover,
a.gc:focus-visible {
	border-color: #d9e7e8;
	box-shadow: 0 24px 48px -28px rgba(44, 62, 76, 0.35);
	transform: translateY(-6px);
}

a.gc:focus-visible {
	outline: 2px solid var(--at-ink);
	outline-offset: 3px;
}

.gc__ico {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 18px;
	background: var(--at-teal-soft);
	color: var(--at-btn);
}

.gc__n {
	position: absolute;
	top: 28px;
	inset-inline-end: 28px;
	color: var(--at-blue-ink);
	font-size: 14px;
	font-weight: 600;
}

.gc__name {
	margin-top: 18px;
	color: var(--at-ink);
	font-size: 19px;
	font-weight: 700;
}

.gc__short {
	flex: 1;
	margin-top: 8px;
	color: var(--at-muted);
	font-size: 15px;
	line-height: 1.95;
}

.gc__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 28px;
	margin-top: 18px;
}

.gc__go {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--at-btn);
	font-size: 15px;
	font-weight: 600;
}

.gc__go svg {
	width: 16px;
	height: 16px;
	transition: transform 0.25s var(--at-ease);
}

a.gc:hover .gc__go svg {
	transform: translateX(-4px);
}

.gc--soon {
	border-style: dashed;
	border-color: #c9d6df;
	background: linear-gradient(180deg, #fff, var(--at-blue-soft));
}

.gc--soon .gc__ico {
	background: #fff;
	color: var(--at-blue-ink);
}

.gc__link {
	color: var(--at-btn);
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.gc__link:hover {
	color: var(--at-btn-hover);
}

/* ---------- Steps band ---------- */
.hub-steps {
	padding: clamp(28px, 4vw, 56px);
	border-radius: var(--at-r-lg);
	background: #316466;
	color: #fff;
}

.hub-steps__head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 36px;
}

.hub-steps__title {
	font-size: clamp(22px, 2vw, 26px);
	font-weight: 600;
	line-height: 1.6;
}

.hub-steps__text {
	margin-top: 6px;
	color: rgba(255, 255, 255, 0.85);
}

.hub-steps__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.hub-step {
	position: relative;
	padding: 4px 0;
}

.hub-step__top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.hub-step__num {
	display: grid;
	flex: 0 0 42px;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #3a777a;
	font-weight: 600;
	transition: background-color 0.3s, color 0.3s;
}

.hub-step__line {
	position: relative;
	flex: 1;
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.2);
}

.hub-step__line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #71cdd0;
	transform: scaleX(var(--p, 0));
	transform-origin: right;
}

.hub-step:last-child .hub-step__line {
	visibility: hidden;
}

.hub-step__title {
	margin-bottom: 6px;
	font-size: 17px;
	font-weight: 600;
}

.hub-step__text {
	color: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	line-height: 1.9;
}

.hub-step.is-active .hub-step__num,
.hub-step.is-done .hub-step__num {
	background: #71cdd0;
	color: #0f3a3c;
}

.hub-step.is-done .hub-step__line::after {
	transform: scaleX(1);
}

/* ---------- Consult: preselected subject chip ---------- */
.home-consult__topic {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	margin-top: 18px;
	padding-block: 4px;
	padding-inline: 14px 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 14px;
}

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

.home-consult__topic-clear {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s;
}

.home-consult__topic-clear:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* ---------- Responsive ---------- */
@media (max-width: 1279.98px) {
	.eco {
		grid-template-columns: 1fr 480px;
		gap: 36px;
	}

	.node__name {
		font-size: 13px;
	}
}

@media (max-width: 991.98px) {
	.eco {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.eco__text {
		display: contents;
	}

	.eco .at-eyebrow {
		grid-row: 1;
		justify-self: start;
	}

	.eco__title {
		grid-row: 2;
	}

	.eco__lead {
		grid-row: 3;
	}

	.eco__mapcol {
		grid-row: 4;
		margin-block: 24px;
	}

	.eco__panels {
		grid-row: 5;
		margin-top: 0;
	}

	.rels,
	.grid6,
	.hub-steps__list {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 599.98px) {
	.hub-hero {
		padding-top: 24px;
	}

	.map {
		max-width: 358px;
	}

	.node {
		width: 25%;
	}

	.node__name {
		font-size: 12px;
	}

	.node__ico {
		width: 28%;
	}

	.map__core {
		width: 22%;
	}

	.eco__hint {
		display: none;
	}

	.panel {
		padding: 20px;
	}

	.panel__offers {
		grid-template-columns: 1fr;
	}

	.panel__name {
		font-size: 20px;
	}

	.panel__cta .at-btn {
		flex: 1 1 100%;
		justify-content: center;
	}

	.rels,
	.grid6 {
		grid-template-columns: 1fr;
	}

	.gc {
		padding: 22px;
		border-radius: var(--at-r-md);
	}

	.hub-steps__list {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.hub-step__line {
		display: none;
	}

	.hub-step {
		display: grid;
		grid-template-columns: 42px 1fr;
		gap: 4px 14px;
	}

	.hub-step__top {
		grid-row: span 2;
		margin: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.panel,
	.node,
	.node__ico,
	.node__ring,
	.map__spoke,
	.map__rel,
	.gc,
	.gc__go svg,
	.hub-step__num {
		transition: none;
	}

	a.gc:hover,
	a.gc:focus-visible,
	a.gc:hover .gc__go svg {
		transform: none;
	}
}
