/* IAN TECH Sliders v1.0.0 – hero slider + projects carousel. No dependencies. */

/* ---------- Hero slider ---------- */
.ian-hero {
	position: relative;
	overflow: hidden;
	background: #111;
	color: #fff;
}
/* All slides share one grid cell, so the slider is as tall as its tallest slide */
.ian-hero__track { display: grid; }
.ian-hero__slide {
	grid-area: 1 / 1;
	position: relative;
	min-height: clamp(420px, var(--ian-hero-h, 80vh), 900px);
	display: flex;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility 0s linear .8s;
}
.ian-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .8s ease;
	z-index: 1;
}
.ian-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 7s ease-out;
}
.ian-hero__slide.is-active .ian-hero__img { transform: scale(1); }
.ian-hero__slide::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(0,0,0,calc(var(--ian-overlay,.45) + .2)) 0%, rgba(0,0,0,var(--ian-overlay,.45)) 55%, rgba(0,0,0,calc(var(--ian-overlay,.45) - .15)) 100%);
}
.ian-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1170px;
	margin: 0 auto;
	padding: 72px 24px 96px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
}
.ian-hero--center .ian-hero__content { align-items: center; text-align: center; }
.ian-hero__content > * { max-width: 720px; }
.ian-hero__kicker {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ian-accent, #fff);
}
.ian-hero__title {
	margin: 0 0 18px;
	font-size: clamp(30px, 4.6vw, 58px);
	line-height: 1.1;
	font-weight: 700;
	color: #fff;
	letter-spacing: -.01em;
}
.ian-hero__text {
	margin: 0 0 28px;
	font-size: clamp(16px, 1.4vw, 19px);
	line-height: 1.6;
	color: rgba(255,255,255,.88);
}
.ian-hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.ian-hero--center .ian-hero__buttons { justify-content: center; }
.ian-btn {
	display: inline-block;
	padding: 15px 28px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none !important;
	border: 2px solid var(--ian-accent, #fff);
	transition: background .2s, color .2s;
}
.ian-btn--primary { background: var(--ian-accent, #fff); color: #111 !important; }
.ian-btn--primary:hover, .ian-btn--primary:focus-visible { background: transparent; color: #fff !important; }
.ian-btn--ghost { background: transparent; color: #fff !important; }
.ian-btn--ghost:hover, .ian-btn--ghost:focus-visible { background: var(--ian-accent, #fff); color: #111 !important; }

/* Entrance animation for the active slide's text */
.ian-hero__slide .ian-hero__content > * { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.ian-hero__slide.is-active .ian-hero__content > * { opacity: 1; transform: none; }
.ian-hero__slide.is-active .ian-hero__content > :nth-child(2) { transition-delay: .12s; }
.ian-hero__slide.is-active .ian-hero__content > :nth-child(3) { transition-delay: .24s; }
.ian-hero__slide.is-active .ian-hero__content > :nth-child(4) { transition-delay: .36s; }
/* First paint: no fade-in delay on the LCP slide */
.ian-hero:not(.is-ready) .ian-hero__slide.is-active .ian-hero__content > * { transition: none; }

.ian-hero__controls {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 10px;
}
.ian-hero__arrow, .ian-hero__pause {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255,255,255,.6);
	border-radius: 50%;
	background: rgba(0,0,0,.25);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: grid;
	place-items: center;
}
.ian-hero__pause { font-size: 10px; letter-spacing: -2px; }
.ian-hero__arrow:hover, .ian-hero__pause:hover { background: rgba(255,255,255,.2); }
.ian-hero__dots { display: flex; gap: 8px; }
.ian-hero__dot {
	width: 28px;
	height: 4px;
	padding: 0;
	border: 0;
	background: rgba(255,255,255,.45);
	cursor: pointer;
	transition: background .2s, width .2s;
}
.ian-hero__dot.is-active { background: #fff; width: 44px; }
.ian-hero button:focus-visible, .ian-hero a:focus-visible, .ian-projects :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 767px) {
	.ian-hero__slide { min-height: 560px; }
	.ian-hero__content { padding: 64px 20px 96px; }
	.ian-hero__arrow { display: none; }
	.ian-btn { padding: 13px 20px; }
}

/* ---------- Projects carousel ---------- */
.ian-projects { --ian-gap: 24px; position: relative; margin: 0 auto; }
.ian-projects__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ian-projects__title { margin: 0; }
.ian-projects__nav { display: flex; gap: 8px; margin-left: auto; }
.ian-projects__arrow {
	width: 44px;
	height: 44px;
	border: 1px solid #111;
	background: #fff;
	color: #111;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: grid;
	place-items: center;
	transition: background .2s, color .2s;
}
.ian-projects__arrow:hover { background: #111; color: #fff; }
.ian-projects__arrow[disabled] { opacity: .35; cursor: default; background: #fff; color: #111; }
.ian-projects__track {
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--ian-visible, 4) - 1) * var(--ian-gap)) / var(--ian-visible, 4));
	gap: var(--ian-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.ian-projects__track::-webkit-scrollbar { display: none; }
.ian-projects__card { scroll-snap-align: start; margin: 0; padding: 0; }
.ian-projects__card::before { content: none !important; }
.ian-projects__link { display: block; color: inherit; text-decoration: none !important; }
.ian-projects__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.ian-projects__media img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .5s ease; display: block; }
.ian-projects__link:hover .ian-projects__media img { transform: scale(1.05); }
.ian-projects__name { margin: 14px 0 0; font-size: 17px; line-height: 1.35; font-weight: 600; }
.ian-projects__link:hover .ian-projects__name { text-decoration: underline; }

@media (max-width: 1024px) { .ian-projects__track { grid-auto-columns: calc((100% - var(--ian-gap)) / 2); } }
@media (max-width: 600px)  { .ian-projects__track { grid-auto-columns: 85%; } .ian-projects { --ian-gap: 16px; } }

@media (prefers-reduced-motion: reduce) {
	.ian-hero__slide, .ian-hero__img, .ian-hero__slide .ian-hero__content > *, .ian-projects__media img { transition: none !important; transform: none !important; }
	.ian-projects__track { scroll-behavior: auto; }
}
