/*!
 * CaptainLock Service Area Map
 *
 * Everything is scoped under .cl-areas so nothing leaks into the theme.
 * Override the custom properties below to restyle without editing this file.
 */

.cl-areas {
	/* brand */
	--cl-red: #e4002b;
	--cl-red-dark: #c00023;
	--cl-red-wash: rgba(228, 0, 43, .13);
	--cl-ink: #141618;

	/* map */
	--cl-bg: #efefef;
	--cl-water: #e7e7e7;   /* inlets, river and lakes — read as gaps, not blue */
	--cl-region: #ffffff;
	--cl-region-line: #e4e6e8;

	/* layout */
	--cl-gap: 72px;
	--cl-pad-y: 80px;
	--cl-pad-x: 40px;

	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background:
		radial-gradient(120% 90% at 12% 8%, #f3f3f3 0%, rgba(243, 243, 243, 0) 62%),
		var(--cl-bg);
	color: var(--cl-ink);
	padding: var(--cl-pad-y) var(--cl-pad-x);
	-webkit-font-smoothing: antialiased;
}

.cl-areas *,
.cl-areas *::before,
.cl-areas *::after {
	box-sizing: border-box;
}

.cl-shell {
	max-width: 1340px;
	margin: 0 auto;
}

.cl-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	column-gap: var(--cl-gap);
	align-items: center;
}

/* ------------------------------------------------------------------ map */

.cl-mapwrap {
	position: relative;
}

.cl-map {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible; /* lets an enlarged pin or its label cross the frame */
}

.cl-water-fill { fill: var(--cl-water); }

.cl-region {
	fill: var(--cl-region);
	stroke: var(--cl-region-line);
	stroke-width: 1.9;
	stroke-linejoin: round;
	transition: fill .28s ease, stroke .28s ease;
	cursor: pointer;
}

/* Ladner, Tsawwassen and White Rock sit inside a larger municipality. They stay
   invisible at rest — an outline here would read as clutter — but still light up
   on their own, and the parent's highlight washes straight through them. */
.cl-region--sub {
	fill: transparent;
	stroke: none;
}

.cl-region.is-active {
	fill: var(--cl-red-wash);
	stroke: var(--cl-red);
	stroke-width: 2.2;
	stroke-dasharray: none;
}

.cl-river {
	fill: none;
	stroke: var(--cl-water);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cl-river--main { stroke-width: 8.5; }

/* Water sits above the shapes so shorelines stay crisp, but must not
   swallow hover events meant for the municipality underneath. */
.cl-hydro { pointer-events: none; }

/* Translate first, then scale — that keeps the pin tip locked to its
   coordinate instead of drifting as it grows. */
.cl-pin {
	transform: translate(var(--x), var(--y)) scale(1);
	transform-box: view-box;
	transform-origin: 0 0;
	transition: transform .34s cubic-bezier(.34, 1.56, .64, 1);
	cursor: pointer;
}

.cl-pin__body   { fill: var(--cl-red); transition: fill .25s ease; }
.cl-pin__dot    { fill: #fff; }
.cl-pin__shadow { fill: rgba(20, 22, 24, .20); }

.cl-pin__ring {
	fill: none;
	stroke: var(--cl-red);
	stroke-width: 2;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	transform: scale(.5);
}

.cl-pin.is-active { transform: translate(var(--x), var(--y)) scale(1.45); }
.cl-pin.is-active .cl-pin__body { fill: var(--cl-red-dark); }
.cl-pin.is-active .cl-pin__ring { animation: cl-ripple 1.5s ease-out infinite; }

@keyframes cl-ripple {
	0%        { opacity: .55; transform: scale(.55); }
	70%, 100% { opacity: 0;   transform: scale(2.1); }
}

.cl-tip {
	transform: translate(var(--x), var(--y));
	transform-box: view-box;
	transform-origin: 0 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
}

.cl-tip.is-active { opacity: 1; }
.cl-tip__bg,
.cl-tip__tail  { fill: var(--cl-ink); }
.cl-tip__label { fill: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }

/* ------------------------------------------------------------- city list */

.cl-cities {
	display: flex;
	flex-wrap: wrap;
	align-content: center;
	align-self: center;
	gap: 26px 34px;
}

.cl-city {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
	color: var(--cl-ink);
	font-size: clamp(15px, 1.15vw, 18.5px);
	font-weight: 500;
	line-height: 1.25;
	transition: color .2s ease;
}

.cl-city__pin {
	width: 17px;
	height: 17px;
	flex: none;
	color: var(--cl-red);
	transition: transform .25s ease;
}

.cl-city__name {
	border-bottom: 1.5px solid rgba(20, 22, 24, .55);
	padding-bottom: 4px;
	transition: border-color .2s ease;
}

.cl-city:hover,
.cl-city.is-active { color: var(--cl-red); }

.cl-city:hover .cl-city__name,
.cl-city.is-active .cl-city__name { border-color: var(--cl-red); }

.cl-city.is-active .cl-city__pin { transform: translateY(-2px) scale(1.12); }

.cl-city:focus-visible {
	outline: 2px solid var(--cl-red);
	outline-offset: 4px;
	border-radius: 3px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
	.cl-areas { --cl-pad-y: 60px; --cl-pad-x: 28px; }

	.cl-grid {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 34px;
	}

	.cl-mapwrap { margin: 0 -6px; }
}

@media (max-width: 560px) {
	.cl-areas { --cl-pad-y: 48px; --cl-pad-x: 20px; }

	.cl-cities { gap: 20px 24px; }

	/* the map is scaled well down here, so lift the label type */
	.cl-tip__label { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.cl-areas * {
		transition-duration: .01ms !important;
		animation: none !important;
	}
}
