/* İdol Mobilya – homepage scene deck. Adapted from YOL Living (yol-site.css "Reference-aligned homepage" +
   yol-reference / yol-wide overrides); brand colours, Myriad Pro and the İdol header instead of YOL's. */

body.has-idol-scenes .entry-header {
	display: none;
}

body.has-idol-scenes .site-main,
body.has-idol-scenes .site-main > article,
body.has-idol-scenes .entry-content {
	max-width: none;
	margin: 0;
	padding: 0;
}

html:has(body.has-idol-scenes) {
	scroll-snap-type: y mandatory;
	scroll-padding-top: 0;
}

body.has-idol-scenes {
	--idol-admin-offset: 0px;
	background: #f2f3f3;
}

body.admin-bar.has-idol-scenes {
	--idol-admin-offset: 32px;
}

.idol-home-scroll-viewport {
	position: relative;
}

.idol-home-scroll-content {
	will-change: transform;
}

.idol-home-scrollbar {
	display: none;
}

.idol-home-scenes {
	position: relative;
	background: #111617;
}

.idol-home-scene {
	position: relative;
	height: calc(100svh - var(--idol-admin-offset));
	min-height: 560px;
	overflow: hidden;
	color: #fff;
	background: #111617;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	isolation: isolate;
}

.idol-home-scene__page {
	position: absolute;
	inset: 0;
	overflow: hidden;
	isolation: isolate;
	will-change: transform;
}

body.idol-site .idol-home-scene__media {
	position: absolute;
	z-index: -2;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.idol-home-scene__shade {
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		linear-gradient(90deg, rgb(17 22 23 / 0.38), rgb(17 22 23 / 0.02) 61%),
		linear-gradient(0deg, rgb(17 22 23 / 0.3), transparent 43%),
		linear-gradient(180deg, rgb(17 22 23 / 0.4), transparent 22%);
}

.idol-home-scene__content {
	position: absolute;
	left: 4.6vw;
	top: 43.6%;
	max-width: min(680px, 70vw);
	transform: translateY(-50%);
	text-transform: uppercase;
}

.idol-home-scene__content h1,
.idol-home-scene__content h2 {
	margin: 0 0 1.4rem;
	color: #fff;
	font-size: clamp(3.2rem, 5vw, 5.2rem);
	font-weight: 300;
	line-height: 0.96;
	letter-spacing: -0.02em;
}

body.idol-site .idol-home-scene__content a {
	display: inline-block;
	color: #fff;
	text-decoration: none;
}

.idol-home-scene__content p {
	margin: 0;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.14em;
}

.idol-home-scene__next {
	position: absolute;
	left: 4.6vw;
	bottom: -0.24em;
	color: #fff;
	font-size: clamp(3.2rem, 5vw, 5.2rem);
	font-weight: 300;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	opacity: 0.16;
	white-space: nowrap;
	pointer-events: none;
}

/* About + footer after the scenes */
.idol-home-about {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 1.6rem;
	min-height: 340px;
	padding: 7rem 4.6vw 3.6rem;
	background: #f2f3f3;
	color: #111617;
	scroll-snap-align: end;
}

.idol-home-about p {
	width: min(720px, 100%);
	margin: 0;
	color: #111617;
	font-size: 1.25rem;
	line-height: 1.7;
}

body.idol-site .idol-home-about__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	padding-bottom: 4px;
	border-bottom: 1px solid currentColor;
	color: #111617;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-decoration: none;
	text-transform: uppercase;
}

body.has-idol-scenes .idol-footer {
	scroll-snap-align: end;
}

/* Header over the light about/footer part */
body.has-idol-scenes .idol-header.is-on-light {
	color: #111617;
}

/* Enhanced (JS) mode: the page itself does not scroll; the content layer is moved scene by scene. */
.idol-scroll-enhanced {
	overflow: hidden;
}

html:has(body.idol-scroll-enhanced) {
	overflow: hidden;
	scroll-snap-type: none;
}

.idol-scroll-enhanced .idol-home-scroll-viewport {
	position: fixed;
	z-index: 1;
	top: var(--idol-admin-offset);
	right: 0;
	bottom: 0;
	left: 0;
	height: calc(100svh - var(--idol-admin-offset));
	overflow: hidden;
}

.idol-scroll-enhanced .idol-home-scroll-content {
	width: 100%;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
}

.idol-scroll-enhanced .idol-home-scrollbar {
	position: fixed;
	z-index: 95;
	top: 35%;
	right: 5px;
	display: block;
	width: 3px;
	height: 30%;
	min-height: 150px;
	max-height: 270px;
	overflow: hidden;
	border-radius: 2px;
	background: rgb(255 255 255 / 0.15);
	mix-blend-mode: difference;
}

.idol-scroll-enhanced .idol-home-scrollbar i {
	display: block;
	width: 100%;
	height: 28%;
	border-radius: inherit;
	background: #fff;
	transform: translateY(0);
	will-change: transform;
}

/* Phones: a wide photo on a tall screen shows only a slice, so the active scene pans from its left edge to its
   right edge (furniture is seen whole over the pan). */
@media (max-width: 640px) {
	html:has(body.has-idol-scenes) {
		scroll-snap-type: y proximity;
	}

	.idol-home-scene__shade {
		background:
			linear-gradient(90deg, rgb(17 22 23 / 0.36), rgb(17 22 23 / 0.02) 82%),
			linear-gradient(0deg, rgb(17 22 23 / 0.32), transparent 50%),
			linear-gradient(180deg, rgb(17 22 23 / 0.4), transparent 22%);
	}

	.idol-home-scene__content {
		top: 48%;
		right: 20px;
		left: 20px;
		max-width: none;
	}

	.idol-home-scene__content h1,
	.idol-home-scene__content h2 {
		margin-bottom: 1.1rem;
		font-size: clamp(2.8rem, 14vw, 3.8rem);
	}

	.idol-home-scene__content p {
		font-size: 0.74rem;
	}

	.idol-home-scene__next {
		left: 20px;
		bottom: -0.2em;
		font-size: clamp(2.6rem, 13vw, 3.4rem);
	}

	body.idol-site img.idol-home-scene__media {
		object-position: 0% 50%;
	}

	/* The first scene pans from the very first paint (no wait for the script); later scenes when they come in. The
	   script then marks the first scene active with the same animation, so it continues without a restart. */
	body.idol-site .idol-home-scene.is-active img.idol-home-scene__media,
	body.idol-site .idol-home-scenes:not(.is-ready) .idol-home-scene:first-child img.idol-home-scene__media {
		animation: idol-scene-pan 10s cubic-bezier(0.33, 0, 0.55, 1) both;
	}

	.idol-home-about {
		min-height: 300px;
		padding: 6rem 20px 2.8rem;
	}

	.idol-home-about p {
		font-size: 1.08rem;
	}
}

@keyframes idol-scene-pan {
	from { object-position: 0% 50%; }
	to { object-position: 100% 50%; }
}

@media (min-width: 1967px) {
	.idol-home-scene__content h1,
	.idol-home-scene__content h2,
	.idol-home-scene__next {
		font-size: calc(13.6px + 3vw);
	}
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.has-idol-scenes) {
		scroll-snap-type: none;
	}

	.idol-home-scene.is-active img.idol-home-scene__media {
		animation: none;
		object-position: center;
	}
}

/* Closing film scene: three vertical films side by side; phones show only the main (dining + sofa) film. */
.idol-home-scene__films {
	position: absolute;
	z-index: -2;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2px;
	background: #111617;
}

.idol-home-scene__film {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 767px) {
	.idol-home-scene__films {
		grid-template-columns: 1fr;
	}

	.idol-home-scene__film:not(.is-main) {
		display: none;
	}
}

/* Closing call to action: centred text and a button to all products. */
.idol-home-about {
	align-items: center;
	text-align: center;
}

.idol-home-about p {
	width: min(760px, 100%);
}

body.idol-site .idol-home-about__link {
	align-self: center;
	padding: 1em 2em;
	border: 1px solid #111617;
	border-radius: 999px;
	background: #111617;
	color: #fff;
	transition: background-color 0.25s ease, color 0.25s ease;
}

body.idol-site .idol-home-about__link:hover,
body.idol-site .idol-home-about__link:focus-visible {
	background: transparent;
	color: #111617;
}

@media (prefers-reduced-motion: reduce) {
	body.idol-site .idol-home-scene img.idol-home-scene__media {
		animation: none !important;
		object-position: center;
	}
}
