/*
 * Homepage projects timeline (template-parts/timeline.php, assets/timeline.js). Sizes, colours
 * and timings follow the public M06 component (docs/ANIMATION_INVENTORY.md). The public
 * component is a 778px-tall iframe whose vh units are that frame, so its clamp() offsets are
 * written here as the pixel values they resolve to (2.5vh = 19.45px, 12vh = 93.36px,
 * 18vh = 140px). Below 768px the public layout overlaps and clips; this one stacks instead.
 */
/* The dialog moves to <body> at runtime (above the fixed header), so it carries the palette too. */
.eiatec-timeline, .eiatec-tl-backdrop {
	--tl-dark: #020a0d; --tl-teal: #0d3b45; --tl-green: #2c6957; --tl-accent: #62b455; --tl-yellow: #e6d070;
	--tl-text: #e2ede8; --tl-soft: #8fa89a; --tl-muted: #4d6358; --tl-border: rgba(255, 255, 255, .08);
}
.eiatec-timeline {
	--padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0; --gap: 0;
	position: relative;
	isolation: isolate;
	gap: 0;
	align-items: center;
	height: 778px;
	padding: 19.45px 20px 4px;
	overflow: hidden;
	background: var(--tl-dark);
	color: var(--tl-text);
	text-align: center;
}
.eiatec-timeline > .eiatec-timeline-title, .eiatec-timeline > .eiatec-timeline-subtitle { position: relative; z-index: 10; width: 100%; pointer-events: none; }
.elementor-editor-active .eiatec-timeline > .eiatec-timeline-title, .elementor-editor-active .eiatec-timeline > .eiatec-timeline-subtitle { pointer-events: auto; }
.eiatec-timeline .eiatec-timeline-title .elementor-heading-title {
	margin: 0 0 4px;
	background: linear-gradient(135deg, #fff 30%, var(--tl-yellow));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-family: inherit;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	font-weight: 800;
	line-height: normal;
	letter-spacing: -.3px;
	text-transform: uppercase;
}
.eiatec-timeline .eiatec-timeline-subtitle .elementor-heading-title { margin: 0; color: var(--tl-soft); font-family: inherit; font-size: clamp(.65rem, 1.1vw, .8rem); font-weight: 400; line-height: normal; letter-spacing: .5px; }
.eiatec-timeline > .eiatec-timeline-widget { position: absolute; inset: 0; width: auto; max-width: none; margin: 0; }
.eiatec-timeline-widget > .elementor-widget-container, .eiatec-timeline-widget .elementor-shortcode { height: 100%; }

.eiatec-tl { --card-w: 300px; --gap: 180px; position: relative; height: 100%; color: var(--tl-text); font-family: inherit; text-align: left; }
.eiatec-tl button { font-family: inherit; }

/* Living background: three blurred blobs and the particle network. */
.eiatec-tl-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.eiatec-tl-blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .2; animation: eiatec-tl-blob 18s infinite alternate ease-in-out; }
.eiatec-tl-blob:nth-child(1) { top: -20%; left: -10%; width: 60vw; height: 60vw; background: var(--tl-green); animation-duration: 22s; }
.eiatec-tl-blob:nth-child(2) { right: -10%; bottom: -15%; width: 50vw; height: 50vw; background: var(--tl-teal); animation-delay: -7s; animation-duration: 20s; }
.eiatec-tl-blob:nth-child(3) { top: 40%; left: 40%; width: 40vw; height: 40vw; background: var(--tl-accent); opacity: .15; animation-delay: -14s; animation-duration: 16s; }
@keyframes eiatec-tl-blob { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 8vh) scale(1.15); } }
.eiatec-tl-particles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }

/* Year chips. */
.eiatec-tl-years {
	position: absolute; top: 93.36px; left: 50%; z-index: 15; transform: translateX(-50%);
	display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 95%; padding: 6px 14px; overflow-x: auto;
	border: 1px solid var(--tl-border); border-radius: 40px; background: rgba(5, 16, 12, .8);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
}
.eiatec-tl-year {
	padding: 6px 14px; border: 1.5px solid transparent; border-radius: 20px; background: transparent; color: var(--tl-soft);
	font-size: clamp(.62rem, .9vw, .75rem); font-weight: 600; line-height: normal; letter-spacing: .5px; text-transform: uppercase;
	white-space: nowrap; cursor: pointer; transition: all .25s;
}
.eiatec-tl-year:hover, .eiatec-tl-year:focus-visible { border-color: rgba(230, 208, 112, .4); background: transparent; color: var(--tl-yellow); }
.eiatec-tl-year.is-active { border-color: var(--tl-yellow); background: rgba(230, 208, 112, .1); color: var(--tl-yellow); box-shadow: 0 0 12px rgba(230, 208, 112, .15); }
.eiatec-tl-year:focus-visible, .eiatec-tl-side:focus-visible, .eiatec-tl-control:focus-visible { outline: 2px solid var(--tl-yellow); outline-offset: 2px; }

/* The axis and the alternating cards. */
.eiatec-tl-viewport { position: absolute; top: 140px; right: 0; bottom: 80px; left: 0; z-index: 2; overflow: hidden; }
.eiatec-tl.is-enhanced .eiatec-tl-viewport { cursor: default; touch-action: pan-y; }
.eiatec-tl-viewport.is-dragging { cursor: grabbing; }
.eiatec-tl-line { position: absolute; top: 50%; right: 0; left: 0; z-index: 1; height: 1.5px; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(230, 208, 112, .15) 8%, rgba(230, 208, 112, .35) 50%, rgba(230, 208, 112, .15) 92%, transparent 100%); }
.eiatec-tl-track { position: absolute; top: 0; left: 0; height: 100%; margin: 0; padding: 0; list-style: none; }
.eiatec-tl-item { position: absolute; top: 0; z-index: 3; width: var(--card-w); margin: 0; transition: transform .3s; will-change: left; }
.eiatec-tl-item.is-above { top: calc(50% - 240px); }
.eiatec-tl-item.is-below { top: calc(50% + 50px); }
.eiatec-tl-item::after { content: ""; position: absolute; left: 50%; z-index: 0; width: 2px; height: 40px; transform: translateX(-50%); background: linear-gradient(to bottom, var(--cat-col, var(--tl-yellow)), rgba(230, 208, 112, .15)); box-shadow: 0 0 6px rgba(230, 208, 112, .25); }
.eiatec-tl-item.is-above::after { top: 100%; }
.eiatec-tl-item.is-below::after { bottom: 100%; }
.eiatec-tl-card {
	display: block; width: 100%; margin: 0; padding: clamp(14px, 2vw, 20px);
	border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px;
	background: linear-gradient(135deg, rgba(13, 59, 69, .25), rgba(2, 10, 13, .7));
	-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
	color: inherit; font-weight: 400; line-height: normal; text-align: left; text-transform: none; letter-spacing: normal;
	white-space: normal; cursor: pointer; transition: border-color .3s, box-shadow .3s;
}
.eiatec-tl-card:hover, .eiatec-tl-card:focus { background: linear-gradient(135deg, rgba(13, 59, 69, .25), rgba(2, 10, 13, .7)); color: inherit; }
.eiatec-tl-item:hover, .eiatec-tl-item:focus-within { transform: translateY(-6px) scale(1.02); }
.eiatec-tl-item:hover .eiatec-tl-card, .eiatec-tl-card:focus-visible { border-color: rgba(230, 208, 112, .5); box-shadow: 0 18px 44px rgba(0, 0, 0, .7), 0 0 24px var(--cat-glow, rgba(230, 208, 112, .2)); }
.eiatec-tl-card:focus-visible { outline: 2px solid var(--tl-yellow); outline-offset: 3px; }
.eiatec-tl-card > span { display: block; }
.eiatec-tl-card-year { margin-bottom: 6px; background: linear-gradient(135deg, var(--cat-col, var(--tl-yellow)), rgba(255, 255, 255, .7)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-size: clamp(1.6rem, 2.5vw, 2.4rem); font-weight: 800; line-height: 1; letter-spacing: -1px; }
.eiatec-tl-card .eiatec-tl-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 7px; }
.eiatec-tl-tag { padding: 3px 8px; border: 1px solid var(--cat-border, rgba(230, 208, 112, .3)); border-radius: 6px; background: var(--cat-bg, rgba(230, 208, 112, .1)); color: var(--cat-col, var(--tl-yellow)); font-size: .55rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.eiatec-tl-region { display: flex; align-items: center; gap: 3px; color: var(--tl-muted); font-size: .55rem; font-weight: 600; }
.eiatec-tl-region svg { width: .5rem; height: .5rem; }
.eiatec-tl-card-title { display: -webkit-box !important; margin-bottom: 5px; overflow: hidden; color: var(--tl-text); font-size: clamp(.7rem, 1.1vw, .85rem); font-weight: 700; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.eiatec-tl-card-client { margin-bottom: 5px; overflow: hidden; color: var(--tl-muted); font-size: .6rem; white-space: nowrap; text-overflow: ellipsis; }
.eiatec-tl-card-client svg { margin-right: 3px; opacity: .4; vertical-align: -1px; }
.eiatec-tl-card-desc { display: -webkit-box !important; overflow: hidden; color: var(--tl-soft); font-size: .65rem; line-height: 1.6; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Side arrows and the control bar. */
.eiatec-tl-side, .eiatec-tl-control {
	display: flex; align-items: center; justify-content: center; padding: 0; border: 1.5px solid var(--tl-border); border-radius: 50%;
	color: var(--tl-soft); cursor: pointer;
}
.eiatec-tl-side[hidden], .eiatec-tl-controls[hidden] { display: none; }
.eiatec-tl-side { position: absolute; top: 50%; z-index: 25; width: 44px; height: 44px; transform: translateY(-50%); background: rgba(5, 16, 12, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: all .25s; }
.eiatec-tl-side.is-left { left: 12px; }
.eiatec-tl-side.is-right { right: 12px; }
.eiatec-tl-side:hover, .eiatec-tl-side:focus-visible { transform: translateY(-50%) scale(1.1); }
.eiatec-tl-side:hover, .eiatec-tl-side:focus-visible, .eiatec-tl-control:hover, .eiatec-tl-control:focus-visible { border-color: var(--tl-accent); background: rgba(98, 180, 85, .15); color: var(--tl-yellow); }
.eiatec-tl-controls {
	position: absolute; bottom: 19.45px; left: 50%; z-index: 20; transform: translateX(-50%);
	display: flex; align-items: center; gap: 10px; padding: 7px 18px;
	border: 1px solid var(--tl-border); border-radius: 40px; background: rgba(2, 10, 13, .85);
	-webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 8px 28px rgba(0, 0, 0, .6);
}
.eiatec-tl-control { width: 36px; height: 36px; background: rgba(255, 255, 255, .03); transition: all .2s; }
.eiatec-tl-play-icon, .eiatec-tl.is-paused .eiatec-tl-pause-icon { display: none; }
.eiatec-tl.is-paused .eiatec-tl-play-icon { display: block; }
.eiatec-tl-progress { display: block; width: clamp(80px, 16vw, 160px); height: 3px; overflow: hidden; border-radius: 3px; background: var(--tl-border); }
.eiatec-tl-progress-fill { display: block; width: 0; height: 100%; background: var(--tl-yellow); transition: width .1s linear; }

/* Project dialog. */
.eiatec-tl-backdrop {
	position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(2, 8, 6, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	opacity: 0; transition: opacity .3s; font-family: inherit;
}
.eiatec-tl-backdrop[hidden] { display: none; }
.eiatec-tl-backdrop.is-open { opacity: 1; }
.eiatec-tl-dialog { width: 100%; max-width: 540px; line-height: normal; max-height: 85vh; overflow-y: auto; border: 1px solid var(--tl-border); border-radius: 22px; background: rgba(8, 20, 14, .97); color: var(--tl-text); text-align: left; transform: scale(.94) translateY(16px); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.eiatec-tl-backdrop.is-open .eiatec-tl-dialog { transform: scale(1) translateY(0); }
.eiatec-tl-dialog:focus { outline: none; }
.eiatec-tl-dialog-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 14px; border-bottom: 1px solid var(--tl-border); }
.eiatec-tl-dialog-year { flex-shrink: 0; background: linear-gradient(135deg, var(--cat-col, var(--tl-yellow)), rgba(255, 255, 255, .5)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.eiatec-tl-dialog-heading { flex: 1; }
.eiatec-tl-dialog-title { margin: 0 0 6px; color: var(--tl-text); font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: normal; text-transform: none; }
.eiatec-tl-dialog-category { display: inline-block; }
.eiatec-tl-dialog-close { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--tl-border); border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--tl-soft); cursor: pointer; transition: all .2s; }
.eiatec-tl-dialog-close:hover, .eiatec-tl-dialog-close:focus-visible { border-color: rgba(200, 50, 50, .4); background: rgba(200, 50, 50, .2); color: #fff; }
.eiatec-tl-dialog-close:focus-visible, .eiatec-tl-dialog-cta:focus-visible { outline: 2px solid var(--tl-yellow); outline-offset: 2px; }
.eiatec-tl-dialog-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 22px; }
.eiatec-tl-dialog-sep { height: 1px; background: var(--tl-border); }
.eiatec-tl-dialog-label { margin: 0; color: var(--tl-muted); font-size: .6rem; font-weight: 700; line-height: normal; letter-spacing: 2px; text-transform: uppercase; }
.eiatec-tl-dialog-desc { margin: 0; color: var(--tl-soft); font-size: .8rem; line-height: 1.75; }
.eiatec-tl-dialog-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.eiatec-tl-dialog-meta div { padding: 9px 12px; border: 1px solid var(--tl-border); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.eiatec-tl-dialog-meta dt { margin: 0 0 2px; color: var(--tl-muted); font-size: .56rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.eiatec-tl-dialog-meta dd { margin: 0; color: var(--tl-text); font-size: .76rem; font-weight: 600; }
.eiatec-tl-dialog-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.eiatec-tl-dialog-tags li { margin: 0; padding: 3px 9px; border: 1px solid var(--tl-border); border-radius: 7px; background: rgba(255, 255, 255, .04); color: var(--tl-soft); font-size: .6rem; font-weight: 600; }
.eiatec-tl-dialog-tags-label[hidden], .eiatec-tl-dialog-tags[hidden] { display: none; }
.eiatec-tl-dialog-cta { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 12px; background: var(--tl-yellow); color: var(--tl-dark); font-size: .75rem; font-weight: 700; text-decoration: none; transition: all .22s; }
.eiatec-tl-dialog-cta:hover, .eiatec-tl-dialog-cta:focus { color: var(--tl-dark); filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }

/* Without JavaScript: a horizontally scrollable row of cards under the year list. */
.eiatec-tl:not(.is-enhanced) .eiatec-tl-viewport { overflow-x: auto; }
.eiatec-tl:not(.is-enhanced) .eiatec-tl-track { display: flex; gap: 24px; width: max-content; padding: 0 24px; }
.eiatec-tl:not(.is-enhanced) .eiatec-tl-item { position: relative; align-self: center; top: auto; }
.eiatec-tl:not(.is-enhanced) .eiatec-tl-item::after { display: none; }

/* Phones and small tablets: the public component keeps its 300px cards here and clips them
 * (its 240px/120px variables never reach its script). The cards now use them, and the header,
 * chips, axis and controls stack inside the section instead of overlapping. */
@media (max-width: 768px) {
	.eiatec-timeline { height: auto; padding: 28px 0 20px; }
	.eiatec-timeline > .eiatec-timeline-title, .eiatec-timeline > .eiatec-timeline-subtitle { padding: 0 16px; }
	.eiatec-timeline > .eiatec-timeline-widget { position: static; width: 100%; }
	.eiatec-tl { --card-w: 240px; --gap: 120px; position: static; display: flex; flex-direction: column; align-items: center; height: auto; }
	.eiatec-tl-years { position: relative; top: auto; left: auto; transform: none; gap: 4px; max-width: calc(100% - 32px); margin: 16px 16px 0; padding: 4px 10px; border-radius: 22px; }
	.eiatec-tl-year { padding: 5px 10px; font-size: .62rem; }
	.eiatec-tl-viewport { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: 100%; height: 470px; margin-top: 6px; }
	.eiatec-tl-card { padding: 12px; }
	.eiatec-tl-item.is-above { top: calc(50% - 200px); }
	.eiatec-tl-item.is-below { top: calc(50% + 40px); }
	.eiatec-tl-card-year { font-size: 1.6rem; }
	.eiatec-tl-card-title { font-size: .7rem; }
	.eiatec-tl-side { width: 36px; height: 36px; }
	.eiatec-tl-controls { position: relative; bottom: auto; left: auto; transform: none; gap: 6px; margin-top: 6px; padding: 6px 12px; }
	.eiatec-tl-control { width: 32px; height: 32px; }
}

/* Reduced motion: no drift (assets/timeline.js), no particles, still blobs, instant states. */
@media (prefers-reduced-motion: reduce) {
	.eiatec-tl-blob { animation: none; }
	.eiatec-tl-particles { display: none; }
	.eiatec-tl-item, .eiatec-tl-card, .eiatec-tl-year, .eiatec-tl-side, .eiatec-tl-control, .eiatec-tl-progress-fill,
	.eiatec-tl-backdrop, .eiatec-tl-dialog, .eiatec-tl-dialog-close, .eiatec-tl-dialog-cta { transition: none; }
	.eiatec-tl-item:hover, .eiatec-tl-item:focus-within, .eiatec-tl-dialog-cta:hover { transform: none; }
}
