/* Natige company page: ecosystem as a year rail after history.
   Not a slide deck. Lime axis, blue years, photo ribbons. */

.ecosystem {
	--eco-blue: #3A78BA;
	--eco-lime: #C6E260;
	--eco-ink: #243040;
	--eco-mute: #5a6168;
	--eco-paper: #ffffff;
	--eco-ease: cubic-bezier(0.35, 0, 0.14, 1);
	padding: 16px 0 64px;
	background: var(--eco-paper);
	scroll-margin-top: 96px;
}

.ecosystem__head {
	max-width: 36em;
	margin: 0 auto 48px;
	text-align: center;
}

.ecosystem__title {
	margin: 0;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.12;
	color: var(--eco-blue);
}

.ecosystem__list {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecosystem__list::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 72px;
	width: 2px;
	background: var(--eco-lime);
	pointer-events: none;
}

.ecosystem__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 0 24px;
	padding: 0 0 32px;
}

.ecosystem__item:last-child {
	padding-bottom: 0;
}

.ecosystem__year {
	position: relative;
	z-index: 1;
	margin: 8px 0 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--eco-blue);
	text-align: right;
	padding-right: 16px;
}

.ecosystem__year time {
	font: inherit;
	color: inherit;
}

.ecosystem__year::after {
	content: "";
	position: absolute;
	top: 2px;
	right: -6px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--eco-paper);
	border: 3px solid var(--eco-lime);
	box-shadow: 0 0 0 4px var(--eco-paper);
}

.ecosystem__body {
	min-width: 0;
}

.ecosystem__intro {
	display: grid;
	grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
	gap: 8px 20px;
	align-items: center;
	margin: 0 0 12px;
}

.ecosystem__logo {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	justify-self: start;
	width: max-content;
	max-width: 220px;
	min-height: 0;
}

.ecosystem__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 40px;
	object-fit: contain;
	object-position: left center;
}

.ecosystem__logo--tall img {
	max-height: 56px;
}

.ecosystem__logo--ink {
	justify-content: center;
	padding: 8px 12px;
	border-radius: 12px;
	background: var(--eco-ink);
}

.ecosystem__logo--ink img {
	object-position: center;
	max-height: 44px;
}

.ecosystem__logo--ink.ecosystem__logo--tall img {
	max-height: 56px;
}

.ecosystem__name {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--eco-ink);
}

html body .ecosystem__name {
	font-weight: 600;
}

.ecosystem__text {
	margin: 0;
	max-width: 40em;
	font-size: 16px;
	line-height: 1.55;
	color: var(--eco-mute);
}

.ecosystem__shots {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecosystem__shots li {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #ffffff;
	aspect-ratio: 3 / 4;
}

.ecosystem__shots img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ecosystem__shots--cutout li {
	aspect-ratio: 3 / 2;
}

.ecosystem__shots--cutout img {
	object-fit: contain;
	padding: 8px;
	box-sizing: border-box;
}

@media (max-width: 991.98px) {
	.ecosystem {
		padding: 8px 0 48px;
	}

	.ecosystem__title {
		font-size: 28px;
	}

	.ecosystem__head {
		margin-bottom: 32px;
		text-align: left;
	}

	.ecosystem__list::before {
		left: 40px;
	}

	.ecosystem__item {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 0 16px;
		padding-bottom: 28px;
	}

	.ecosystem__year {
		font-size: 13px;
		text-align: right;
		padding-right: 12px;
		margin: 8px 0 0;
	}

	.ecosystem__year::after {
		top: 2px;
		right: -7px;
		left: auto;
		bottom: auto;
		margin: 0;
	}

	.ecosystem__intro {
		grid-template-columns: 1fr;
		gap: 8px;
		align-items: start;
		margin-bottom: 10px;
	}

	.ecosystem__shots {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		touch-action: pan-x;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		-webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 56px), rgb(0 0 0 / 0.28) 100%);
		mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 56px), rgb(0 0 0 / 0.28) 100%);
	}

	.ecosystem__shots::-webkit-scrollbar {
		display: none;
	}

	.ecosystem__shots li {
		flex: 0 0 calc((100% - 8px - 56px) / 2);
		width: calc((100% - 8px - 56px) / 2);
		aspect-ratio: 3 / 4;
		scroll-snap-align: start;
	}

	.ecosystem__shots li:last-child {
		scroll-snap-align: end;
	}

	.ecosystem__shots--cutout li {
		aspect-ratio: 3 / 2;
	}

	.ecosystem__logo img {
		max-height: 36px;
	}

	.ecosystem__logo--tall img {
		max-height: 52px;
	}

	.ecosystem__logo--ink img {
		max-height: 40px;
	}

	.ecosystem__logo--ink.ecosystem__logo--tall img {
		max-height: 56px;
	}
}

@media (max-width: 575.98px) {
	.ecosystem__year {
		font-size: 13px;
	}

	.ecosystem__name {
		font-size: 18px;
	}

	.ecosystem__shots li {
		border-radius: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ecosystem__shots img {
		transform: none;
		transition: none;
	}
}
