/*
 * The illustrated map in an arch (template-parts/arch-map.php): Google's map
 * drawn over with the client's places, badge and zoom buttons
 * (assets/js/contact-map.js). On About's Connectivity and on Visit; each page
 * sizes the arch.
 */

/* 527 × 631, in ARC.svg's arch (style.css), as the homepage's. */
.about-connect__arch {
	position: relative;
	aspect-ratio: 527 / 631;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.04);
	-webkit-mask: var(--justco-arc) center top / 100% auto no-repeat;
	mask: var(--justco-arc) center top / 100% auto no-repeat;
}

.about-connect__arch > img,
.about-connect__map {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The illustrated map's own pieces (assets/js/contact-map.js), each a
   zero-size box on its coordinate: the icon centres on it, the label sits to
   one side. Colours are sampled from the client's reference. */
.about-connect__arch:has(.about-connect__map)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to bottom, #fff 15%, #dedad7);
	mix-blend-mode: multiply;
	pointer-events: none;
}

.about-map__place,
.about-map__badge {
	position: absolute;
	width: 0;
	height: 0;
}

/* The places sit above the shapes, so drags on them still move the map. */
.about-map__place {
	pointer-events: none;
}

.about-map__icon {
	position: absolute;
	top: 0;
	left: 0;
	width: 24px;
	height: 24px;
	background: currentColor;
	transform: translate(-50%, -50%);
	-webkit-mask: var(--about-map-icon) center / contain no-repeat;
	mask: var(--about-map-icon) center / contain no-repeat;
}

.about-map__place--mall .about-map__icon {
	--about-map-icon: var(--about-map-mall);
	color: #b5604e;
}

.about-map__place--school .about-map__icon {
	--about-map-icon: var(--about-map-school);
	color: var(--justco-navy);
}

.about-map__place--park .about-map__icon {
	--about-map-icon: var(--about-map-park);
	color: var(--color-walnut-brown);
}

.about-map__place--mrt .about-map__icon {
	width: 36px;
	height: 36px;
	border-radius: 1000px;
	background: #ab2408 var(--about-map-mrt) center / 16px 18px no-repeat;
	-webkit-mask: none;
	mask: none;
}

.about-map__label {
	position: absolute;
	color: var(--color-walnut-brown);
	font-family: "EB Garamond", serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-shadow: 0 0 2px #ebe5e0, 0 0 4px #ebe5e0;
}

.about-map__place--left .about-map__label {
	top: 0;
	right: 18px;
	text-align: right;
	transform: translateY(-50%);
}

.about-map__place--right .about-map__label {
	top: 0;
	left: 18px;
	transform: translateY(-50%);
}


.about-map__place--top .about-map__label {
	bottom: 18px;
	left: 0;
	text-align: center;
	transform: translateX(-50%);
}

.about-map__place--bottom .about-map__label {
	top: 18px;
	left: 0;
	text-align: center;
	transform: translateX(-50%);
}

/* Under the MRT and off to the right, clear of the skate park beside it. */
.about-map__place--below .about-map__label {
	top: 22px;
	left: -12px;
}

.about-map__place--school .about-map__label {
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.05;
}

.about-map__place--mrt .about-map__label {
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Zoomed out past the start, the places overlap; the badge and MRT stay. */
.about-connect__map.is-zoomed-out .about-map__place:not(.about-map__place--mrt) {
	display: none;
}

/* The badge, 10px left and 105px up from the footprint's north-west edge. */
.about-map__badge-line {
	position: absolute;
	top: 0;
	left: 0;
	width: 105px;
	height: 1.5px;
	background: var(--justco-midnight);
	transform: rotate(264.6deg);
	transform-origin: 0 50%;
}

.about-map__badge-button {
	position: absolute;
	top: -157px;
	left: -62px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	padding: 0;
	border: 0;
	border-radius: 1000px;
	background: linear-gradient(150deg, var(--justco-navy) 25%, var(--justco-midnight));
}

.about-map__badge-logo {
	width: 66px;
	aspect-ratio: 1417 / 456;
	background: var(--color-powder-blue);
	-webkit-mask: var(--about-map-logo) center / contain no-repeat;
	mask: var(--about-map-logo) center / contain no-repeat;
}

/* On phones the arch is shorter, so the badge shrinks and stands closer, and
   the school (furthest out, under the arch's curve) goes. */
.about-connect__arch {
	container: about-arch / inline-size;
}

@container about-arch (max-width: 420px) {
	.about-map__place--school {
		display: none;
	}

	.about-map__badge-line {
		width: 82px;
	}

	.about-map__badge-button {
		top: -124px;
		left: -50px;
		width: 84px;
		height: 84px;
	}

	.about-map__badge-logo {
		width: 54px;
	}
}

.about-map__zoom {
	display: flex;
	gap: 12px;
	margin: 0 16px 16px 0;
}

.about-map__zoom-button {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 1000px;
	/* As Visit's Get travel times pill: sand on walnut. */
	background: var(--color-walnut-brown);
	color: #d3bca7;
}

.about-map__zoom-button::before {
	content: "";
	display: block;
	width: 22px;
	height: 22px;
	margin: auto;
	background: currentColor;
	-webkit-mask: var(--about-map-icon) center / contain no-repeat;
	mask: var(--about-map-icon) center / contain no-repeat;
}

.about-map__zoom-button--out {
	--about-map-icon: var(--about-map-minus);
}

.about-map__zoom-button--in {
	--about-map-icon: var(--about-map-plus);
}

.about-map__zoom-button:disabled {
	opacity: 0.5;
	cursor: default;
}
