/* The first screen: the night atlas (Concept 1). --s: map units to px at each width. */
.atlas {
	--s: .26;
	position: relative; isolation: isolate;
	display: flex; flex-direction: column;
}
.atlas__ground {
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(60% 55% at 40% 40%, color-mix(in srgb, var(--navy) 72%, transparent), transparent 70%),
		linear-gradient(180deg, color-mix(in srgb, var(--night) 70%, var(--deep)), var(--deep));
}
.atlas__ground::after { /* a fine grain over the night */
	content: ""; position: absolute; inset: 0; opacity: .09; mix-blend-mode: soft-light;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.atlas__frame { position: relative; order: 2; overflow: hidden; height: 330px; margin-top: 8px; direction: ltr; } /* a map never mirrors */
.atlas__map {
	position: absolute; max-width: none; direction: ltr;
	width: calc(2284px * var(--s)); height: calc(2000px * var(--s));
	inset-inline-start: calc(50% - 255px); top: -96px;
}
.atlas__text { order: 1; position: relative; z-index: 2; padding: 20px var(--gutter) 0; }
.atlas__company { margin-bottom: 10px; color: var(--gold-soft); font-weight: 500; font-size: 1rem; }
.atlas__title { font-size: var(--fs-display); line-height: 1.28; color: var(--chalk); max-width: 13ch; }
.atlas__title:lang(en) { line-height: 1.12; max-width: 16ch; }
.atlas__lede { margin-top: 18px; max-width: 46ch; color: var(--mist); font-size: var(--fs-lede); line-height: var(--lh-lede); }
.atlas__acts { margin-top: 28px; }

/* the map */
.atlas__grat { fill: none; stroke: color-mix(in srgb, var(--gold-soft) 9%, transparent); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 2 5; }
.atlas__land { fill: var(--land); fill-opacity: .78; stroke: color-mix(in srgb, var(--mist) 45%, transparent); stroke-width: 1px; }
#wps-land { vector-effect: non-scaling-stroke; }
.atlas__glow-in { stop-color: var(--gold); stop-opacity: .22; }
.atlas__glow-mid { stop-color: var(--gold); stop-opacity: .05; }
.atlas__glow-out { stop-color: var(--gold); stop-opacity: 0; }
.atlas__span { fill: none; stroke: var(--gold); stroke-width: 1.4px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .88; }
.atlas__dot { r: calc(4px / var(--s)); fill: var(--chalk); }
.atlas__name, .atlas__hq-name {
	font-family: var(--text); font-size: calc(13px / var(--s)); font-weight: 500; fill: var(--chalk);
	paint-order: stroke; stroke: var(--night); stroke-width: calc(4px / var(--s)); stroke-linejoin: round;
}
.atlas__city--minor .atlas__name { display: none; }
.atlas__core { r: calc(5px / var(--s)); fill: var(--gold); }
.atlas__ring { r: calc(13px / var(--s)); fill: none; stroke: var(--gold); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.atlas__pulse { r: calc(13px / var(--s)); fill: none; stroke: var(--gold-soft); stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0; }
.atlas__hq-name { font-family: var(--display); font-size: calc(16px / var(--s)); font-weight: 700; fill: var(--gold-soft); }

/* the legend: the map sheet's margin */
.legend {
	order: 3; margin: 0 var(--gutter) 28px; padding-top: 16px;
	border-top: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
	font-size: var(--fs-small); line-height: 1.6; color: var(--mist);
}
.legend__title { margin-bottom: 8px; color: var(--gold-soft); font-weight: 700; font-size: .8125rem; white-space: nowrap; }
.legend__keys { display: grid; gap: 6px; }
.legend__keys li { display: flex; align-items: center; gap: 10px; }
.key { flex: none; display: inline-block; width: 22px; height: 12px; position: relative; }
.key--hq::before { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--gold); box-shadow: inset 0 0 0 2.5px var(--night), inset 0 0 0 6px var(--gold); }
.key--city::before { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--chalk); }
.key--span { border-top: 1.5px solid var(--gold); border-radius: 50% 50% 0 0 / 100% 100% 0 0; height: 10px; margin-top: 4px; }
.legend__scale { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.legend__bar { /* 200 km at the map's scale: 1.8° of latitude */
	display: inline-block; width: calc(180px * var(--s)); height: 7px;
	border: 1px solid var(--gold-soft); border-top: 0;
	background: linear-gradient(90deg, var(--gold-soft) 0 50%, transparent 50%) bottom / 100% 3px no-repeat;
}

@media (min-width: 768px) {
	.atlas { --s: .43; }
	.atlas__text { padding-top: 36px; }
	.atlas__title { max-width: 15ch; }
	.atlas__frame { height: 525px; }
	.atlas__map { inset-inline-start: calc(50% - 422px); top: -154px; }
	.atlas__city--minor .atlas__name { display: inline; }
	.legend { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 36px; }
	.legend__keys { display: flex; flex-wrap: wrap; gap: 8px 24px; }
	.legend__title { flex-basis: 100%; margin: 0; }
	.legend__scale { margin: 0; }
}
@media (min-width: 1100px) {
	.atlas { --s: .60; display: block; min-height: max(100svh, 860px); }
	.atlas__frame { position: absolute; inset: 0; height: auto; margin: 0; }
	.atlas__map { inset-inline-start: calc(50% - 920px); top: -112px; }
	[dir="ltr"] .atlas { --s: .55; } /* the text covers the west coast on English pages: the fan moves east */
	[dir="ltr"] .atlas__map { inset-inline-start: calc(50% - 305px); top: -78px; }
	.atlas__frame::after { /* the night deepens under the text */
		content: ""; position: absolute; inset: 0; pointer-events: none;
		background: linear-gradient(to left, color-mix(in srgb, var(--deep) 95%, transparent) 0, color-mix(in srgb, var(--deep) 82%, transparent) 30%, transparent 50%);
	}
	[dir="ltr"] .atlas__frame::after { background: linear-gradient(to right, color-mix(in srgb, var(--deep) 95%, transparent) 0, color-mix(in srgb, var(--deep) 82%, transparent) 32%, transparent 52%); }
	.atlas__text { position: absolute; top: 52%; transform: translateY(-50%); inset-inline-start: var(--gutter); width: min(585px, 43vw); padding: 0; }
	.atlas__title { max-width: none; }
	.atlas__title:lang(en) { font-size: clamp(2.45rem, 3.65vw, 3.55rem); line-height: 1.1; }
	.atlas__company { font-size: 1.0625rem; margin-bottom: 14px; }
	.legend { position: absolute; inset-inline: var(--gutter); bottom: 0; margin: 0; padding-block: 14px 18px; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px 20px; font-size: .8125rem; }
	.legend__title { flex-basis: auto; }
	.legend__keys { gap: 6px 18px; }
}
@media (min-width: 1320px) {
	.legend__keys { flex-wrap: nowrap; }
}

/* the first-screen sequence: only with a script, only without reduced motion */
@media (prefers-reduced-motion: no-preference) {
	.js .atlas__land, .js .atlas__grat { animation: atlas-fade .7s var(--ease-in) both; }
	.js .atlas__city { animation: atlas-fade .3s var(--ease-in) both; animation-delay: calc(150ms + var(--i) * 30ms); }
	.js .atlas__span { stroke-dasharray: 1; animation: atlas-draw var(--t-reveal) var(--ease-in) both; animation-delay: calc(260ms + var(--i) * 30ms); }
	.js .atlas__ring { animation: atlas-fade .4s var(--ease-in) .1s both; }
	.js .atlas__pulse { animation: atlas-pulse 1.6s var(--ease-out) .9s 2; }
	.js .atlas__title { animation: atlas-wipe .7s var(--ease-in) .12s both; }
	.js .atlas__company { animation: atlas-fade .5s var(--ease-in) .05s both; }
	.js .atlas__lede { animation: atlas-fade .5s var(--ease-in) .42s both; }
	.js .atlas__acts { animation: atlas-fade .5s var(--ease-in) .56s both; }
	.js .legend { animation: atlas-fade .5s var(--ease-in) .9s both; }
	[dir="ltr"].js .atlas__title, .js [dir="ltr"] .atlas__title { animation-name: atlas-wipe-ltr; }
}
@keyframes atlas-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes atlas-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes atlas-wipe { from { clip-path: inset(-10% 0 -10% 100%); } to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes atlas-wipe-ltr { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes atlas-pulse { from { r: calc(13px / var(--s)); opacity: .8; } to { r: calc(46px / var(--s)); opacity: 0; } }
