/* Deisa Timeline
   Base (senza classe .is-wide): le tappe si sfogliano di lato con il dito.
   Con .is-wide (schermi larghi, aggiunta da timeline.js): la fascia si blocca a schermo e scorre di lato con lo scroll verticale. */

.deisa-tl {
	--dt-red: #e30613;
	--dt-ink: #1c1a1a;
	--dt-paper: #f6f3ee;
	--dt-muted: #c2bbb5;
	--dt-line: #4b4545;
	--dt-yellow: #f5c518;
	--dt-white: #ffffff;
	--dt-bar: 140px;
	--dt-top: 110px;
	--dt-font-title: "Alpaca Scarlett", sans-serif;
	--dt-font-text: inherit;
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	font-family: var(--dt-font-text);
	font-size: 16px;
	line-height: 1.5;
	color: var(--dt-paper);
	text-align: left;
}
.deisa-tl *, .deisa-tl *::before, .deisa-tl *::after { box-sizing: border-box; }
.deisa-tl button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: var(--dt-font-text);
}
.deisa-tl button:focus-visible { outline: 3px solid var(--dt-yellow); outline-offset: 3px; }

.deisa-tl__stage {
	position: relative;
	left: var(--dt-left, 0px);
	width: var(--dt-w, 100%);
	background: var(--dt-ink);
	overflow: hidden;
}
.deisa-tl__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.deisa-tl__track::-webkit-scrollbar { display: none; }

/* Pannello di una tappa */
.deisa-tl__panel {
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 32px 16px 24px;
}
.deisa-tl__text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.deisa-tl .deisa-tl__year {
	font-family: var(--dt-font-title);
	font-weight: 400;
	font-size: clamp(60px, 9vw, 136px);
	line-height: .95;
	color: var(--dt-paper);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.deisa-tl .deisa-tl__title {
	font-family: var(--dt-font-title);
	font-weight: 400;
	font-size: clamp(20px, 1.9vw, 27px);
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--dt-paper);
	margin: 4px 0 0;
	padding: 0;
	max-width: 26ch;
}
.deisa-tl .deisa-tl__body { color: var(--dt-muted); font-size: 17px; line-height: 1.5; max-width: 52ch; }
.deisa-tl .deisa-tl__body p { margin: 0 0 .6em; padding: 0; color: inherit; font: inherit; }
.deisa-tl .deisa-tl__body p:last-child { margin-bottom: 0; }
.deisa-tl .deisa-tl__body a { color: var(--dt-yellow); text-decoration: underline; }

.deisa-tl__chip {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--dt-paper);
	color: var(--dt-ink);
	border-radius: 999px;
	padding: 5px 14px 5px 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.deisa-tl__chip--plain { padding: 6px 14px; background: var(--dt-yellow); }
.deisa-tl .deisa-tl__chip-logo { height: 34px; width: auto; max-width: 90px; object-fit: contain; border-radius: 999px; background: var(--dt-white); padding: 2px; }
.deisa-tl .deisa-tl__bollino { height: 34px; width: auto; }

/* Immagini: da 1 a 4 */
.deisa-tl__figs { display: grid; gap: 16px; align-items: start; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deisa-tl__figs--1 { grid-template-columns: minmax(0, 1fr); }
.deisa-tl .deisa-tl__fig { margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.deisa-tl .deisa-tl__zoom { display: block; line-height: 0; cursor: zoom-in; border-radius: 2px; max-width: 100%; }
.deisa-tl .deisa-tl__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 46vh;
	background: var(--dt-paper);
	border-radius: 0;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
	transition: transform .25s ease;
}
.deisa-tl .deisa-tl__zoom:hover .deisa-tl__img { transform: translateY(-4px); }
.deisa-tl .deisa-tl__caption { margin: 0; padding: 0; font-size: 14px; font-style: italic; line-height: 1.4; color: var(--dt-muted); max-width: 34ch; text-align: left; }
.deisa-tl__figs--3 .deisa-tl__img, .deisa-tl__figs--4 .deisa-tl__img { max-height: 30vh; }
.deisa-tl__figs--3 .deisa-tl__caption, .deisa-tl__figs--4 .deisa-tl__caption { font-size: 13px; }

/* Righello: decadi sopra, tappe della decade sotto */
.deisa-tl__ui { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 12px 16px 20px; }
.deisa-tl__periods { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--dt-line); }
.deisa-tl__periods::-webkit-scrollbar { display: none; }
.deisa-tl .deisa-tl__period {
	flex: none;
	padding: 8px 14px;
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--dt-muted);
	border-bottom: 3px solid transparent;
}
.deisa-tl .deisa-tl__period:hover { color: var(--dt-paper); }
.deisa-tl .deisa-tl__period[aria-current="true"] { color: var(--dt-paper); font-weight: 600; border-bottom-color: var(--dt-red); }
.deisa-tl__row { display: flex; align-items: center; gap: 12px; }
.deisa-tl .deisa-tl__nav {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--dt-line);
	display: grid;
	place-items: center;
	font-size: 20px;
	line-height: 1;
	color: var(--dt-paper);
	text-align: center;
}
.deisa-tl .deisa-tl__nav:hover { border-color: var(--dt-paper); }
.deisa-tl .deisa-tl__nav[disabled] { opacity: .35; cursor: default; }
.deisa-tl__ruler { flex: 1; min-width: 0; position: relative; height: 56px; }
.deisa-tl__line, .deisa-tl__fill { position: absolute; left: 0; top: 12px; height: 3px; border-radius: 2px; }
.deisa-tl__line { right: 0; background: var(--dt-line); }
.deisa-tl__fill { width: 0; background: var(--dt-red); }
.deisa-tl .deisa-tl__ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; list-style: none; margin: 0; padding: 0; }
.deisa-tl .deisa-tl__ticks li { width: 0; display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.deisa-tl .deisa-tl__ticks li::before { content: none; }
.deisa-tl .deisa-tl__tick {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding-top: 5px;
	white-space: nowrap;
	font-size: 13px;
	color: var(--dt-muted);
	font-variant-numeric: tabular-nums;
}
.deisa-tl .deisa-tl__tick::before { content: ""; width: 17px; height: 17px; border-radius: 50%; background: var(--dt-ink); border: 3px solid var(--dt-line); }
.deisa-tl .deisa-tl__tick[aria-current="true"] { color: var(--dt-paper); font-weight: 600; }
.deisa-tl .deisa-tl__tick[aria-current="true"]::before, .deisa-tl .deisa-tl__tick.is-done::before { background: var(--dt-red); border-color: var(--dt-red); }
.deisa-tl .deisa-tl__ticks li:first-child { justify-content: flex-start; }
.deisa-tl .deisa-tl__ticks li:first-child .deisa-tl__tick { align-items: flex-start; }
.deisa-tl .deisa-tl__ticks li:last-child { justify-content: flex-end; }
.deisa-tl .deisa-tl__ticks li:last-child .deisa-tl__tick { align-items: flex-end; }
.deisa-tl .deisa-tl__ticks li:only-child { justify-content: flex-start; }
.deisa-tl .deisa-tl__ticks li:only-child .deisa-tl__tick { align-items: flex-start; }
.deisa-tl:not(.is-wide) .deisa-tl__tick span { display: none; }
.deisa-tl:not(.is-wide) .deisa-tl__tick[aria-current="true"] span { display: inline; }

/* Schermi larghi: fascia bloccata, scorrimento laterale guidato dallo scroll */
.deisa-tl.is-wide .deisa-tl__stage { position: absolute; top: 0; }
.deisa-tl.is-wide[data-state="after"] .deisa-tl__stage { top: auto; bottom: 0; }
.deisa-tl.is-wide[data-state="pinned"] .deisa-tl__stage { position: fixed; left: 0; top: var(--dt-off, 0px); z-index: 20; }
.deisa-tl.is-wide .deisa-tl__track { overflow: visible; scroll-snap-type: none; height: calc(100% - var(--dt-bar)); will-change: transform; }
.deisa-tl.is-wide .deisa-tl__panel {
	flex: 0 0 var(--dt-w, 100vw);
	width: var(--dt-w, 100vw);
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(32px, 4vw, 72px);
	align-items: center;
	padding: var(--dt-top) clamp(32px, 5vw, 72px) 16px;
}
.deisa-tl.is-wide .deisa-tl__figs { gap: 24px; }
.deisa-tl.is-wide .deisa-tl__figs--1 .deisa-tl__img { max-height: calc(var(--dt-h, 100vh) * .50); }
.deisa-tl.is-wide .deisa-tl__figs--2 .deisa-tl__img { max-height: calc(var(--dt-h, 100vh) * .48); }
.deisa-tl.is-wide .deisa-tl__figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.deisa-tl.is-wide .deisa-tl__figs--3 .deisa-tl__img { max-height: calc(var(--dt-h, 100vh) * .40); }
.deisa-tl.is-wide .deisa-tl__figs--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.deisa-tl.is-wide .deisa-tl__figs--4 .deisa-tl__img { max-height: calc(var(--dt-h, 100vh) * .21); }
.deisa-tl.is-wide .deisa-tl__figs--4 .deisa-tl__fig { gap: 6px; }
.deisa-tl.is-wide .deisa-tl__ui { position: absolute; left: 0; right: 0; bottom: 0; height: var(--dt-bar); padding: 0 clamp(32px, 5vw, 72px) 8px; }
.deisa-tl.is-wide .deisa-tl__periods { justify-content: center; gap: 12px; }

/* Ingrandimento dell'immagine */
.deisa-tl-lb { border: 0; padding: 0; background: #1c1a1a; color: #f6f3ee; max-width: min(92vw, 980px); max-height: 92vh; border-radius: 6px; overflow: auto; }
.deisa-tl-lb::backdrop { background: rgba(10, 8, 8, .82); }
.deisa-tl-lb__in { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.deisa-tl-lb__in img { display: block; max-width: 100%; max-height: 68vh; width: auto; height: auto; margin: 0 auto; background: #f6f3ee; }
.deisa-tl-lb__in p { margin: 0; font-style: italic; font-size: 15px; line-height: 1.4; color: #c2bbb5; }
.deisa-tl-lb__close { all: unset; align-self: flex-end; cursor: pointer; border: 1px solid #4b4545; border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 600; color: #f6f3ee; }
.deisa-tl-lb__close:hover { border-color: #f6f3ee; }
.deisa-tl-lb__close:focus-visible { outline: 3px solid #f5c518; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.deisa-tl .deisa-tl__img { transition: none; }
}
