/*--------------------------------------------------------------
# Contrail divider (global)
# A dashed route between two white sections; a plane flies along it
# with scroll (js/contrail.js sets --p from 0 to 1 on the track).
--------------------------------------------------------------*/

/* The divider has no vertical spacing of its own: the full padding of the
   sections either side spaces it out (on the About page, 100px above and
   below on large desktops). Add padding to .contrail for more room. */

.contrail__container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ── Route ── */
.contrail__track {
	position: relative;
	height: 64px;
}

.contrail__line {
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	margin-top: -1px;
	border-top: 2px dashed var(--tpp-border);
}

/* The trail runs to the plane's centre; the plane's white box hides the
   end of it, so it looks like it streams from the tail. */
.contrail__trail {
	position: absolute;
	top: 50%;
	left: 0;
	width: calc(var(--p, 0) * (100% - 42px) + 21px);
	height: 2px;
	margin-top: -1px;
	background: linear-gradient(90deg, transparent, var(--tpp-accent-dark));
}

/* 34px glyph + 4px white padding each side = a 42px box that masks the
   dashed line under the plane. */
.contrail__plane {
	position: absolute;
	top: 50%;
	left: calc(var(--p, 0) * (100% - 42px));
	box-sizing: content-box;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	padding: 0 4px;
	background: var(--tpp-white);
	color: var(--tpp-black);
}


/* ── Mobile (≤767px) ── */
@media screen and (max-width: 767px) {
	.contrail__track {
		height: 52px;
	}

	/* A smaller plane: 28px + 4px padding each side = a 36px box, so the
	   position and trail maths change with it. */
	.contrail__plane {
		left: calc(var(--p, 0) * (100% - 36px));
		width: 28px;
		height: 28px;
		margin-top: -14px;
	}

	.contrail__trail {
		width: calc(var(--p, 0) * (100% - 36px) + 18px);
	}
}
