/* DLN — Masthead: cielo di Roma + globo delle notizie */

/* ── cielo ─────────────────────────────────────────────────────────── */

.dln-msky {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.dln-msky__l {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 2.5s ease;
}

.dln-msky__l--night { background: linear-gradient(180deg, #030716 0%, #06102b 60%, #0a1638 100%); }
.dln-msky__l--dawn  { background: linear-gradient(180deg, #121844 0%, #33285d 50%, #7a4468 100%); }
.dln-msky__l--day   { background: linear-gradient(180deg, #0a2a62 0%, #0e3776 55%, #174888 100%); }
.dln-msky__l--dusk  { background: linear-gradient(180deg, #13123a 0%, #43204d 50%, #8e3f2a 100%); }

.dln-msky.is-night .dln-msky__l--night,
.dln-msky.is-dawn  .dln-msky__l--dawn,
.dln-msky.is-day   .dln-msky__l--day,
.dln-msky.is-dusk  .dln-msky__l--dusk { opacity: 1; }

/* sole / luna: alone che si sposta lungo l'arco del giorno */
.dln-msky__orb {
	position: absolute;
	left: var(--sx, 80%);
	top: var(--sy, 40%);
	width: 640px;
	height: 640px;
	margin: -320px 0 0 -320px;
	border-radius: 50%;
	transition: left 60s linear, top 60s linear;
}

.dln-msky.is-day   .dln-msky__orb { background: radial-gradient(circle, rgba(255, 244, 214, .42) 0, rgba(255, 226, 160, .14) 16%, rgba(255, 226, 160, 0) 50%); }
.dln-msky.is-dawn  .dln-msky__orb { background: radial-gradient(circle, rgba(255, 186, 150, .55) 0, rgba(255, 140, 140, .18) 20%, rgba(255, 140, 140, 0) 55%); }
.dln-msky.is-dusk  .dln-msky__orb { background: radial-gradient(circle, rgba(255, 150, 70, .6) 0, rgba(255, 90, 40, .2) 22%, rgba(255, 90, 40, 0) 58%); }
.dln-msky.is-night .dln-msky__orb { background: radial-gradient(circle, rgba(210, 222, 255, .16) 0, rgba(210, 222, 255, .05) 10%, rgba(210, 222, 255, 0) 28%); }

/* falce di luna */
.dln-msky.is-night .dln-msky__orb::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 13px;
	height: 13px;
	margin: -6.5px;
	border-radius: 50%;
	box-shadow: inset -4px 2px 0 0 rgba(236, 242, 255, .9);
	filter: drop-shadow(0 0 6px rgba(210, 222, 255, .6));
}

/* stelle (generate dallo script) */
.dln-msky__stars {
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 1px;
	border-radius: 50%;
	opacity: 0;
	transition: opacity 2.5s ease;
	animation: dln-twinkle 5s ease-in-out infinite;
}

.dln-msky__stars--b {
	animation-duration: 7.5s;
	animation-delay: -3s;
}

.dln-msky.is-night .dln-msky__stars { opacity: 1; }
.dln-msky.is-dawn .dln-msky__stars,
.dln-msky.is-dusk .dln-msky__stars { opacity: .35; }

@keyframes dln-twinkle {
	0%, 100% { filter: brightness(1); }
	50%      { filter: brightness(.4); }
}

/* ── globo ─────────────────────────────────────────────────────────── */

.dln-masthead__main .dln-masthead__inner {
	position: relative;
}

.dln-glb {
	display: none;
}

@media (min-width: 1024px) {
	.dln-glb {
		display: flex;
		align-items: center;
		gap: 14px;
		flex: none;
	}

	.dln-glb + .dln-brand {
		margin-right: auto;
	}

	.dln-glb__orb {
		position: relative;
		width: 76px;
		height: 76px;
		margin: -10px -8px -10px -10px;
		flex: none;
	}

	.dln-glb__cv {
		display: block;
		width: 100%;
		height: 100%;
		cursor: grab;
		touch-action: none;
	}

	.dln-glb__cv:active {
		cursor: grabbing;
	}

	.dln-glb__lbl {
		display: none;
	}
}

/* schermi larghi: il globo esce nello spazio libero a sinistra del logo */
@media (min-width: 1560px) {
	.dln-glb {
		position: absolute;
		right: 100%;
		top: 50%;
		transform: translateY(-50%);
		margin-right: 2px;
	}

	.dln-glb__orb {
		width: 112px;
		height: 112px;
		margin: 0;
	}
}

@media (min-width: 1900px) {
	.dln-glb__lbl {
		display: block;
		width: 172px;
		opacity: 0;
		transform: translateY(5px);
		transition: opacity .3s ease, transform .3s ease;
	}

	.dln-glb__lbl.is-in {
		opacity: 1;
		transform: none;
	}
}

.dln-glb__k {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(163, 185, 220, .9);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dln-glb__k::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c, #5dcaa5);
	box-shadow: 0 0 8px var(--c, #5dcaa5);
}

.dln-masthead a.dln-glb__t,
.dln-glb__t {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 5px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.32;
	color: #fff;
	text-decoration: none;
}

.dln-masthead a.dln-glb__t:hover,
.dln-masthead a.dln-glb__t:focus {
	color: #5dcaa5;
	text-decoration: none;
}

.dln-glb.is-new .dln-glb__k {
	color: #ff7a7a;
}

@media (prefers-reduced-motion: reduce) {
	.dln-msky__stars { animation: none; }
	.dln-msky__orb { transition: none; }
}
