/*
 * EWT Timeline – standalone stylesheet for the [ewt_timeline] shortcode.
 * Every selector is scoped under .ewt-tl, so nothing here can affect the
 * rest of the site and no existing stylesheet needs to change.
 * Colours, fonts and sizes are variables: override them on .ewt-tl if needed.
 */

.ewt-tl {
	--ewt-tl-bg: #43433a;
	--ewt-tl-card: #98997c;
	--ewt-tl-card-border: #a5a68b;
	--ewt-tl-text: #ffffff;
	--ewt-tl-dim: rgba(255, 255, 255, 0.32);
	--ewt-tl-font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
	--ewt-tl-font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
	--ewt-tl-max: 1320px;
	--ewt-tl-speed: 0.45s;

	box-sizing: border-box;
	color: var(--ewt-tl-text);
	font-family: var(--ewt-tl-font-body);
	text-align: left;
}

.ewt-tl *,
.ewt-tl *::before,
.ewt-tl *::after {
	box-sizing: border-box;
}

.ewt-tl--bg {
	background: var(--ewt-tl-bg);
	padding: clamp(48px, 6vw, 96px) clamp(16px, 4vw, 48px);
}

.ewt-tl .ewt-tl__wrap {
	max-width: var(--ewt-tl-max);
	margin: 0 auto;
}

/* ---------- Section header ---------- */

.ewt-tl .ewt-tl__header {
	margin: 0 0 clamp(32px, 5vw, 76px);
}

.ewt-tl .ewt-tl__eyebrow {
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--ewt-tl-font-display);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--ewt-tl-text);
}

.ewt-tl .ewt-tl__eyebrow::before {
	content: "";
	display: block;
	width: 122px;
	height: 4px;
	margin-bottom: 14px;
	background: var(--ewt-tl-text);
}

.ewt-tl .ewt-tl__title {
	margin: 0;
	padding: 0;
	font-family: var(--ewt-tl-font-display);
	font-size: clamp(40px, 5.2vw, 76px);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	color: var(--ewt-tl-text);
}

/* ---------- Stage: panels + track ---------- */

.ewt-tl .ewt-tl__stage {
	display: flex;
	flex-direction: column;
}

.ewt-tl .ewt-tl__panels {
	display: grid;
	gap: 32px;
}

.ewt-tl .ewt-tl__panel {
	margin: 0;
	padding: clamp(18px, 2.6vw, 34px);
	background: var(--ewt-tl-card);
	border: 1px solid var(--ewt-tl-card-border);
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.ewt-tl .ewt-tl__inner {
	column-count: 2;
	column-gap: clamp(20px, 2vw, 28px);
}

.ewt-tl .ewt-tl__media {
	margin: 0 0 clamp(20px, 3vw, 40px);
	padding: 0;
	break-inside: avoid;
	aspect-ratio: 610 / 242;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.12);
}

.ewt-tl .ewt-tl__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ewt-tl .ewt-tl__heading {
	margin: 0 0 clamp(18px, 2.4vw, 36px);
	padding: 0;
	break-inside: avoid;
	break-after: avoid;
	font-family: var(--ewt-tl-font-display);
	font-size: clamp(30px, 3.4vw, 50px);
	font-weight: 300;
	line-height: 1.12;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ewt-tl-text);
}

/* Decade shown above each heading only when all panels are listed (no JavaScript). */
.ewt-tl .ewt-tl__heading-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.5em;
	font-weight: 400;
	text-transform: uppercase;
	opacity: 0.8;
}

.ewt-tl.is-js .ewt-tl__heading-label {
	display: none;
}

.ewt-tl .ewt-tl__text {
	font-family: var(--ewt-tl-font-body);
	font-size: clamp(15px, 1.25vw, 17px);
	font-weight: 400;
	line-height: 1.42;
	color: var(--ewt-tl-text);
}

.ewt-tl .ewt-tl__text p {
	margin: 0 0 1.4em;
	padding: 0;
	font: inherit;
	color: inherit;
	orphans: 2;
	widows: 2;
}

.ewt-tl .ewt-tl__text p:last-child {
	margin-bottom: 0;
}

.ewt-tl .ewt-tl__text a {
	color: inherit;
	text-decoration: underline;
}

/* With JavaScript: panels share one grid cell and cross-fade. */

.ewt-tl.is-js .ewt-tl__panels {
	gap: 0;
}

.ewt-tl.is-js .ewt-tl__panel {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ewt-tl-speed) ease, visibility 0s linear var(--ewt-tl-speed);
}

.ewt-tl.is-js .ewt-tl__panel.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--ewt-tl-speed) ease, visibility 0s;
}

/* ---------- Decade track ---------- */

.ewt-tl .ewt-tl__track {
	display: none;
	margin: clamp(28px, 4vw, 62px) 0 0;
	padding: 0;
}

.ewt-tl.is-js .ewt-tl__track {
	display: flex;
}

.ewt-tl .ewt-tl__tab {
	flex: 1 1 0;
	min-width: 0;
	display: block;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	color: var(--ewt-tl-dim);
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color var(--ewt-tl-speed) ease;
}

.ewt-tl .ewt-tl__tab:hover,
.ewt-tl .ewt-tl__tab:focus {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	outline: none;
}

.ewt-tl .ewt-tl__tab:focus-visible {
	outline: 2px solid var(--ewt-tl-text);
	outline-offset: 6px;
	border-radius: 2px;
}

.ewt-tl .ewt-tl__tab.is-active,
.ewt-tl .ewt-tl__tab.is-active:hover,
.ewt-tl .ewt-tl__tab.is-active:focus {
	color: var(--ewt-tl-text);
}

.ewt-tl .ewt-tl__label {
	display: block;
	margin-bottom: clamp(10px, 1.4vw, 22px);
	font-family: var(--ewt-tl-font-display);
	font-size: clamp(18px, 3vw, 44px);
	font-weight: 300;
	line-height: 1.1;
	text-transform: uppercase;
	white-space: nowrap;
	color: inherit;
}

.ewt-tl .ewt-tl__rail {
	display: flex;
	align-items: center;
	height: 30px;
}

.ewt-tl .ewt-tl__dot {
	position: relative;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
}

.ewt-tl .ewt-tl__dot::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--ewt-tl-text);
	opacity: 0.4;
	transform: scale(0.4);
	transition: transform var(--ewt-tl-speed) cubic-bezier(0.3, 1.4, 0.5, 1), opacity var(--ewt-tl-speed) ease;
}

.ewt-tl .ewt-tl__tab.is-active .ewt-tl__dot::before {
	opacity: 1;
	transform: scale(1);
}

.ewt-tl .ewt-tl__line {
	position: relative;
	flex: 1 1 auto;
	height: 2px;
	margin: 0 clamp(6px, 1.2vw, 20px) 0 clamp(4px, 0.6vw, 10px);
	background: linear-gradient(var(--ewt-tl-dim), var(--ewt-tl-dim)) center / 100% 1px no-repeat;
}

/* The white "progress" line on decades already passed. */
.ewt-tl .ewt-tl__line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ewt-tl-text);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--ewt-tl-speed) ease;
}

.ewt-tl .ewt-tl__tab.is-past .ewt-tl__line::after {
	transform: scaleX(1);
}

/* ---------- Tablet / mobile ---------- */

@media (max-width: 767px) {
	.ewt-tl .ewt-tl__inner {
		column-count: 1;
	}

	/* Track moves above the card so the decades stay in reach on a long card. */
	.ewt-tl.is-js .ewt-tl__track {
		order: -1;
		margin: 0 0 22px;
	}

	.ewt-tl .ewt-tl__rail {
		height: 18px;
	}

	.ewt-tl .ewt-tl__dot {
		flex-basis: 18px;
		width: 18px;
		height: 18px;
	}

	.ewt-tl .ewt-tl__line {
		margin: 0 4px 0 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ewt-tl {
		--ewt-tl-speed: 0.01s;
	}
}
