/* An inner page's first screen: the h1 on the night beside a fragment of the atlas (the fan of spans from Riyadh). */
.phead {
	position: relative; isolation: isolate; overflow: hidden;
	padding-block: 28px 56px;
	min-height: 380px;
}
.phead__ground {
	position: absolute; inset: 0; z-index: -2;
	background:
		radial-gradient(50% 70% at 22% 46%, color-mix(in srgb, var(--navy) 80%, transparent), transparent 72%),
		linear-gradient(180deg, var(--night), color-mix(in srgb, var(--night) 55%, var(--deep)));
}
[dir="ltr"] .phead__ground {
	background:
		radial-gradient(50% 70% at 78% 46%, color-mix(in srgb, var(--navy) 80%, transparent), transparent 72%),
		linear-gradient(180deg, var(--night), color-mix(in srgb, var(--night) 55%, var(--deep)));
}
.phead__ground::after { /* the atlas's grain */
	content: ""; position: absolute; inset: 0; opacity: .08; 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");
}
.phead::after { /* the band's lower edge: a gold hairline that fades out at both ends */
	content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; z-index: 1;
	background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 45%, transparent) 30%, color-mix(in srgb, var(--gold) 45%, transparent) 70%, transparent);
}

/* the map fragment: never mirrored, faded toward the text */
.phead__map {
	position: absolute; z-index: -1;
	inset: 0; width: 100%;
	opacity: .48;
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 32%, transparent 82%);
	mask-image: linear-gradient(to bottom, #000 0, #000 32%, transparent 82%);
}
.phead__map svg { width: 100%; height: 100%; max-width: none; direction: ltr; }
.phead__grat { fill: none; stroke: color-mix(in srgb, var(--gold-soft) 10%, transparent); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 2 5; }
.phead__land { fill: var(--land); fill-opacity: .7; stroke: color-mix(in srgb, var(--mist) 40%, transparent); stroke-width: 1px; }
.phead__span { fill: none; stroke: var(--gold); stroke-width: 1.2px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .55; }
.phead__span--on { stroke: var(--gold-soft); stroke-width: 2.4px; opacity: 1; }
.phead__dot { fill: var(--chalk); opacity: .8; }
.phead__dot--on { fill: var(--gold-soft); opacity: 1; }
.phead__orbit { fill: none; stroke: color-mix(in srgb, var(--gold) 40%, transparent); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 3 6; }
.phead__ring { fill: none; stroke: var(--gold); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.phead__core { fill: var(--gold); }

/* the text */
.phead__in { position: relative; display: grid; gap: 28px; }
.phead__text { max-width: 680px; }
.phead__coord {
	display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 16px;
	color: var(--gold-soft); font-size: var(--fs-small); font-weight: 700; line-height: 1.5;
}
.phead__pin {
	width: 12px; height: 12px; border-radius: 50%; flex: none;
	border: 1.5px solid var(--gold); box-shadow: inset 0 0 0 2.5px var(--night), inset 0 0 0 6px var(--gold);
}
.phead__latlon {
	padding-inline-start: 12px; border-inline-start: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
	color: var(--mist); font-weight: 500; unicode-bidi: isolate;
}
.phead__title { font-size: clamp(2.125rem, 1.6rem + 2.3vw, 3.5rem); line-height: 1.32; color: var(--chalk); max-width: 20ch; }
.phead__title:lang(en) { line-height: 1.14; max-width: 22ch; }
.phead__lede { margin-top: 18px; max-width: 58ch; color: var(--mist); font-size: var(--fs-lede); line-height: var(--lh-lede); }
.phead__acts { margin-top: 28px; }

/* the breadcrumb: the sheet's reference line */
.crumbs { margin-bottom: 26px; font-size: var(--fs-small); }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.crumbs__item { display: inline-flex; align-items: center; color: var(--mist); line-height: 1.5; }
.crumbs__item + .crumbs__item::before {
	content: ""; width: 18px; height: 8px; margin-inline: 10px;
	border-top: 1.5px solid color-mix(in srgb, var(--gold) 70%, transparent);
	border-radius: 50% 50% 0 0 / 100% 100% 0 0; /* a small span, bowed like the logo's deck */
	transform: translateY(3px);
}
.crumbs a {
	display: inline-block; padding-block: 10px; color: var(--chalk); text-decoration: none;
	transition: color var(--t-answer) var(--ease-out);
}
.crumbs a:hover, .crumbs a:focus-visible { color: var(--gold-soft); text-decoration: underline; text-decoration-color: var(--gold); }
.crumbs [aria-current] { color: var(--gold-soft); }

/* a record's photograph, framed */
.phead__media {
	position: relative; overflow: visible; border-radius: var(--r-lg);
	aspect-ratio: 16 / 10;
	background: var(--plate);
	box-shadow: var(--sh-night);
}
.phead__img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); filter: saturate(.9) contrast(1.04); }
.phead__scrim {
	position: absolute; inset: 0; border-radius: var(--r-lg); pointer-events: none;
	background: linear-gradient(180deg, color-mix(in srgb, var(--night) 18%, transparent), transparent 40%, color-mix(in srgb, var(--night) 42%, transparent));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent);
}
.phead__deck { position: absolute; inset: 14px 0 auto; width: 100%; height: 48px; overflow: visible; pointer-events: none; }
.phead__deck path { fill: none; stroke: var(--gold-soft); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .9; }
[dir="rtl"] .phead__deck { transform: scaleX(-1); }
.phead__key {
	position: absolute; inset-inline-start: 22px; bottom: -26px;
	display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--r-md);
	background: var(--night); color: var(--gold-soft);
	border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent);
	box-shadow: var(--sh-night);
}
.phead__symbol { width: 32px; height: 32px; }
.phead__symbol * { vector-effect: non-scaling-stroke; }
.phead--media { padding-bottom: 72px; }

@media (min-width: 768px) {
	.phead { padding-block: 40px 80px; min-height: 440px; }
	.phead__map { inset-inline-start: auto; inset-inline-end: -22%; width: 78%; opacity: .7; -webkit-mask-image: none; mask-image: none; }
	[dir="rtl"] .phead__map { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 46%); mask-image: linear-gradient(to left, transparent 0, #000 46%); }
	[dir="ltr"] .phead__map { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 46%); mask-image: linear-gradient(to right, transparent 0, #000 46%); }
	.phead__text { max-width: 64%; }
	.phead--media .phead__text { max-width: 680px; }
	.phead--media .phead__map { opacity: .45; }
}
@media (min-width: 1100px) {
	.phead { padding-block: 48px 96px; min-height: 520px; display: flex; align-items: center; }
	.phead__in { width: 100%; }
	.phead__map { inset-inline-end: -6%; width: 62%; opacity: .9; }
	.phead__text { max-width: 640px; }
	.crumbs { margin-bottom: 34px; }
	.phead--media { padding-block: 40px 104px; }
	.phead--media .phead__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 72px; align-items: center; }
	.phead--media .crumbs { grid-column: 1 / -1; margin-bottom: 0; }
	.phead--media .phead__map { inset-inline-end: auto; inset-inline-start: -8%; width: 56%; opacity: .5; }
	[dir="rtl"] .phead--media .phead__map { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 50%); mask-image: linear-gradient(to right, transparent 0, #000 50%); }
	[dir="ltr"] .phead--media .phead__map { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 50%); mask-image: linear-gradient(to left, transparent 0, #000 50%); }
	.phead--media .phead__media { aspect-ratio: 5 / 4; }
	.phead__key { width: 68px; height: 68px; bottom: -30px; inset-inline-start: 28px; }
	.phead__symbol { width: 36px; height: 36px; }
}

/* the arrival: the fan draws from Riyadh, the text after it. Only with a script and without reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	.js .phead__land, .js .phead__grat { animation: phead-fade .6s var(--ease-in) both; }
	.js .phead__span { stroke-dasharray: 1; animation: phead-draw .56s var(--ease-in) both; animation-delay: calc(180ms + var(--i) * 28ms); }
	.js .phead__dot { animation: phead-fade .3s var(--ease-in) both; animation-delay: calc(140ms + var(--i) * 28ms); }
	.js .phead__ring { transform-box: fill-box; transform-origin: center; animation: phead-ring .7s var(--ease-in) .08s both; }
	.js .phead__coord { animation: phead-rise .5s var(--ease-in) .04s both; }
	.js .phead__title { animation: phead-rise .6s var(--ease-in) .1s both; }
	.js .phead__lede { animation: phead-rise .6s var(--ease-in) .24s both; }
	.js .phead__acts { animation: phead-rise .6s var(--ease-in) .36s both; }
	.js .phead__media { animation: phead-frame .8s var(--ease-in) .16s both; }
	.js .phead__deck { animation: phead-deck .7s var(--ease-in) .62s both; }
	.js .phead__key { animation: phead-rise .5s var(--ease-in) .7s both; }
}
@keyframes phead-fade { from { opacity: 0; } }
@keyframes phead-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes phead-deck { from { clip-path: inset(-4px 100% -4px 0); } to { clip-path: inset(-4px 0 -4px 0); } }
@keyframes phead-ring { from { opacity: 0; transform: scale(.4); } }
@keyframes phead-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes phead-frame { from { opacity: 0; clip-path: inset(0 0 12% 0 round var(--r-lg)); transform: translateY(10px); } }
