/* From glacier to rack (critique P8, approved 23 November 2026): one line drawing in the locations
   map's style and a caption per point. The section background is in patterns.css (.cn-g2r). */

.cn-g2r__block {
	margin-block: 0;
}

/* The drawing scrolls sideways where it does not fit (phones). */
.cn-g2r__scroll {
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.cn-g2r__scroll:focus-visible {
	outline: 2px solid var(--purple);
	outline-offset: 6px;
}

.cn-g2r__svg {
	display: block;
	width: 100%;
	min-width: 1100px;
	height: auto;
	overflow: visible;
}

.cn-g2r__block .cn-g2r__hint {
	margin: 14px 0 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fg-2);
}

.cn-g2r__hint-phone {
	display: none;
}

/* ---- The drawing ---------------------------------------------------------------------- */
.cn-g2r__svg path,
.cn-g2r__svg rect,
.cn-g2r__svg circle,
.cn-g2r__svg line {
	vector-effect: non-scaling-stroke;
}

.cn-g2r__grid line {
	stroke: rgba(86, 61, 110, 0.07);
	stroke-width: 0.8;
}

.cn-g2r__ground {
	stroke: rgba(86, 61, 110, 0.35);
	stroke-width: 1;
}

.cn-g2r__mountain {
	fill: rgba(86, 61, 110, 0.05);
	stroke: rgba(0, 123, 168, 0.32);
	stroke-width: 0.8;
	stroke-linejoin: round;
}

.cn-g2r__ice {
	fill: rgba(0, 221, 255, 0.24);
	stroke: var(--fjord);
	stroke-width: 1;
	stroke-linejoin: round;
}

.cn-g2r__contour {
	fill: none;
	stroke: rgba(0, 123, 168, 0.55);
	stroke-width: 1;
	stroke-dasharray: 3 4;
}

.cn-g2r__river {
	fill: none;
	stroke: rgba(0, 221, 255, 0.55);
	stroke-width: 3;
	stroke-linecap: round;
}

.cn-g2r__building {
	fill: var(--wp--preset--color--white);
	stroke: var(--fjord);
	stroke-width: 1;
}

.cn-g2r__roof,
.cn-g2r__blades,
.cn-g2r__pylon,
.cn-g2r__wire {
	fill: none;
	stroke: var(--fjord);
	stroke-width: 1;
}

.cn-g2r__turbine,
.cn-g2r__unit,
.cn-g2r__exchanger {
	fill: rgba(0, 221, 255, 0.24);
	stroke: var(--fjord);
	stroke-width: 1;
}

.cn-g2r__rack {
	fill: rgba(86, 61, 110, 0.05);
	stroke: rgba(0, 123, 168, 0.55);
	stroke-width: 0.8;
}

.cn-g2r__led {
	fill: var(--ice);
}

.cn-g2r__loop {
	fill: none;
	stroke: var(--ice);
	stroke-width: 1.5;
	stroke-dasharray: 5 7;
	animation: cn-g2r-flow 3.6s linear infinite;
}

.cn-g2r__heatline {
	fill: none;
	stroke: rgba(86, 61, 110, 0.35);
	stroke-width: 1;
}

.cn-g2r__rise {
	fill: none;
	stroke: rgba(86, 61, 110, 0.45);
	stroke-width: 1;
}

.cn-g2r__cable {
	fill: none;
	stroke: rgba(0, 123, 168, 0.35);
	stroke-width: 1;
}

/* Flows: dashes travel along the river, the wire, the heat line and the fibre. */
.cn-g2r__flow {
	fill: none;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-dasharray: 5 11;
	animation: cn-g2r-flow 2.6s linear infinite;
}

.cn-g2r__flow--water {
	stroke: var(--fjord);
}

.cn-g2r__flow--power {
	stroke: var(--ice);
	animation-duration: 1.8s;
}

.cn-g2r__flow--heat {
	stroke: var(--purple);
	animation-duration: 3.2s;
}

.cn-g2r__flow--fibre {
	stroke: var(--fjord);
	stroke-dasharray: 2 10;
	animation-duration: 1.2s;
}

@keyframes cn-g2r-flow {
	to { stroke-dashoffset: -16; }
}

/* The structures draw in when the block arrives (view.js adds is-drawn). */
.cn-g2r__land path,
.cn-g2r__plant *,
.cn-g2r__power path,
.cn-g2r__hall rect,
.cn-g2r__heat rect,
.cn-g2r__cable,
.cn-g2r__ground {
	stroke-dasharray: 2000;
	stroke-dashoffset: 2000;
	transition: stroke-dashoffset 2.2s var(--ease);
}

.cn-g2r__contour {
	stroke-dasharray: 3 4;
	stroke-dashoffset: 0;
}

.is-drawn .cn-g2r__land path,
.is-drawn .cn-g2r__plant *,
.is-drawn .cn-g2r__power path,
.is-drawn .cn-g2r__hall rect,
.is-drawn .cn-g2r__heat rect,
.is-drawn .cn-g2r__cable,
.is-drawn .cn-g2r__ground {
	stroke-dashoffset: 0;
}

.is-drawn .cn-g2r__plant * { transition-delay: 0.3s; }
.is-drawn .cn-g2r__power path { transition-delay: 0.6s; }
.is-drawn .cn-g2r__hall rect { transition-delay: 0.9s; }
.is-drawn .cn-g2r__heat rect,
.is-drawn .cn-g2r__cable { transition-delay: 1.2s; }

.cn-g2r__flow,
.cn-g2r__pin,
.cn-g2r__rise,
.cn-g2r__led,
.cn-g2r__loop {
	opacity: 0;
	transition: opacity 0.8s 1.6s;
}

.is-drawn .cn-g2r__flow,
.is-drawn .cn-g2r__pin,
.is-drawn .cn-g2r__rise,
.is-drawn .cn-g2r__led,
.is-drawn .cn-g2r__loop {
	opacity: 1;
}

/* ---- Pins and labels, as on the map ---------------------------------------------------- */
.cn-g2r__pin circle {
	transform-box: fill-box;
	transform-origin: center;
}

.cn-g2r__lead {
	stroke: var(--fjord);
	stroke-width: 1;
}

.cn-g2r__hit {
	fill: transparent;
}

.cn-g2r__dot {
	fill: var(--fjord);
	transition: transform 0.4s var(--ease), fill 0.3s;
}

.cn-g2r__ring {
	fill: var(--wp--preset--color--white);
	stroke: var(--fjord);
	stroke-width: 1.5;
	transition: transform 0.4s var(--ease), stroke 0.3s;
}

.cn-g2r__pulse {
	fill: var(--wp--preset--color--sky-blue);
	opacity: 0;
	animation: cn-g2r-pulse 2.8s var(--ease) infinite;
	pointer-events: none;
}

.cn-g2r__pulse--2 {
	animation-delay: 1.4s;
}

.is-drawn .cn-g2r__pulse {
	opacity: 0;
}

@keyframes cn-g2r-pulse {
	0% { transform: scale(0.15); opacity: 0.6; }
	100% { transform: scale(1.1); opacity: 0; }
}

.cn-g2r__label {
	fill: var(--purple);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	paint-order: stroke;
	stroke: rgba(255, 255, 255, 0.85);
	stroke-width: 3px;
	stroke-linejoin: round;
	transition: fill 0.3s;
}

.cn-g2r__pin:hover .cn-g2r__ring,
.cn-g2r__pin.is-active .cn-g2r__ring {
	transform: scale(1.7);
	stroke: var(--purple);
}

.cn-g2r__pin:hover .cn-g2r__dot,
.cn-g2r__pin.is-active .cn-g2r__dot {
	transform: scale(1.5);
	fill: var(--purple);
}

.cn-g2r__pin:hover .cn-g2r__label,
.cn-g2r__pin.is-active .cn-g2r__label {
	fill: var(--fjord);
}

/* ---- The captions: five columns, each feature, detail and benefit ---------------------- */
.cn-g2r__block .cn-g2r__facts {
	list-style: none;
	margin: 56px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0 var(--gap);
	border-top: 1px solid var(--line);
}

.cn-g2r__block .cn-g2r__fact {
	position: relative;
	margin: 0;
	padding: 28px 0 8px;
	display: grid;
	gap: 14px;
	align-content: start;
}

.cn-g2r__fact::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -1px;
	height: 2px;
	background: linear-gradient(90deg, var(--ice), var(--fjord));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.5s var(--ease);
}

.cn-g2r__fact:hover::before,
.cn-g2r__fact.is-active::before {
	transform: scaleX(1);
}

.cn-g2r__block .cn-g2r__fact > * {
	margin: 0;
}

.cn-g2r__block .cn-g2r__kicker {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fg-2);
}

.cn-g2r__block .cn-g2r__fact .cn-g2r__figure {
	font-size: clamp(1.75rem, 1.3rem + 1vw, 2.375rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.02em;
	transition: color 0.3s;
}

.cn-g2r__fact.is-active .cn-g2r__figure {
	color: var(--fjord);
}

.cn-g2r__block .cn-g2r__text {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--fg-2);
}

.cn-g2r__block .cn-g2r__benefit {
	padding-top: 12px;
	border-top: 1px solid var(--line);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--fjord);
}

@media (max-width: 1100px) {
	.cn-g2r__block .cn-g2r__facts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px var(--gap);
	}

	.cn-g2r__block .cn-g2r__fact {
		padding-bottom: 24px;
	}
}

@media (max-width: 781px) {
	.cn-g2r__hint-desktop {
		display: none;
	}

	.cn-g2r__hint-phone {
		display: inline;
	}

	.cn-g2r__block .cn-g2r__facts {
		grid-template-columns: 1fr;
		gap: 0;
		margin-top: 40px;
		padding-left: 28px;
		border-top: 0;
		border-left: 1px solid var(--line);
	}

	.cn-g2r__block .cn-g2r__fact {
		padding: 22px 0;
		border-top: 1px solid var(--line);
	}

	.cn-g2r__block .cn-g2r__fact:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.cn-g2r__block .cn-g2r__fact::before {
		top: 30px;
		left: -29px;
		right: auto;
		width: 10px;
		height: 10px;
		border-radius: 50% !important; /* base.css squares every corner site-wide */
		background: var(--fjord);
		box-shadow: 0 0 0 3px rgba(0, 221, 255, 0.35);
		transform: none;
	}

	.cn-g2r__block .cn-g2r__fact:first-child::before {
		top: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cn-g2r__flow,
	.cn-g2r__loop,
	.cn-g2r__pulse {
		animation: none;
	}

	.cn-g2r__pulse {
		display: none;
	}

	.cn-g2r__land path,
	.cn-g2r__plant *,
	.cn-g2r__power path,
	.cn-g2r__hall rect,
	.cn-g2r__heat rect,
	.cn-g2r__cable,
	.cn-g2r__ground {
		stroke-dasharray: none;
		stroke-dashoffset: 0;
		transition: none;
	}

	.cn-g2r__flow,
	.cn-g2r__pin,
	.cn-g2r__rise,
	.cn-g2r__led,
	.cn-g2r__loop {
		opacity: 1;
		transition: none;
	}
}
