/* SK Story widget: stacked by default; on wide screens with motion allowed it becomes
   a pinned scroll scene driven by assets/js/story.js. */

.sk-story {
	--sk-story-h: calc(100svh - var(--sk-header-h) - var(--sk-admin-bar));
	--sk-story-radius: clamp(12px, 1vw, 20px);
	padding: clamp(48px, 8vw, 120px) var(--sk-gutter);
}

/* ---------- Shared pieces ---------- */

.sk-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 clamp(14px, 1.4vw, 26px);
	padding: 6px 14px;
	border-radius: 999px;
	background: #e6e8e8;
	color: #3b4044;
	font-family: var(--sk-font-sans);
	font-size: clamp(11px, 0.7vw, 13px);
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* At the larger (13px) size the uppercase text sits high in its line box: pad a touch more on top to centre it. */
@media (min-width: 1700px) {
	.sk-eyebrow {
		padding: calc(6px + 0.1em) 14px calc(6px - 0.1em);
	}
}

/* Eyebrow pills have no leading dot. */
.sk-eyebrow::before {
	content: none;
	display: none;
}

.sk-story__text {
	text-align: center;
}

.sk-story .sk-story__title {
	max-width: 15em;
	margin: 0 auto;
	font-family: var(--sk-font-serif);
	font-size: clamp(32px, 3.3vw, 64px);
	font-weight: 400;
	line-height: 1.1;
	text-wrap: balance;
}

.sk-story .sk-story__lead {
	max-width: 36em;
	margin: clamp(14px, 1.4vw, 26px) auto clamp(22px, 2.4vw, 44px);
	color: var(--sk-muted);
	font-size: clamp(15px, 1.05vw, 20px);
	line-height: 1.45;
	text-wrap: balance;
}

.sk-story__photo {
	margin: 0;
	overflow: hidden;
	border-radius: var(--sk-story-radius);
}

.sk-story .sk-story__photo img,
.sk-story .sk-story__poster {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.sk-story__card {
	position: relative;
	overflow: hidden;
	border-radius: var(--sk-story-radius);
	background: #14171a;
}

.sk-story__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 12, 14, 0.6), rgba(10, 12, 14, 0) 45%);
	opacity: 0;
	pointer-events: none;
}

.sk-story__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: clamp(60px, 5vw, 96px);
	height: clamp(60px, 5vw, 96px);
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s var(--sk-ease), transform 0.4s var(--sk-ease);
}

.sk-story__play:hover {
	background: rgba(255, 255, 255, 0.28);
	transform: translate(-50%, -50%) scale(1.06);
}

.sk-story__play svg {
	width: 36%;
	height: 36%;
	margin-left: 4%;
}

.sk-story__close {
	position: absolute;
	top: clamp(10px, 1.4vw, 24px);
	right: clamp(10px, 1.4vw, 24px);
	z-index: 2;
	display: grid;
	place-items: center;
	width: clamp(40px, 3vw, 52px);
	height: clamp(40px, 3vw, 52px);
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	background: rgba(10, 12, 14, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.3s var(--sk-ease);
}

.sk-story__close:hover {
	background: rgba(10, 12, 14, 0.8);
}

.sk-story__card video,
.sk-story__card iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	background: #000;
}

/* ---------- Stacked layout (no JS, phones, reduced motion) ---------- */

.sk-story__stage {
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 5vw, 56px);
	width: min(1180px, 100%);
	margin: 0 auto;
}

.sk-story__photos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.sk-story__photo {
	aspect-ratio: 4 / 3;
}

.sk-story__card {
	aspect-ratio: 16 / 10;
}

/* ---------- Pinned scroll scene ---------- */

/* Pinned scene needs room for the text between the photos: wide and tall screens only. */
@media (min-width: 1024px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
	.js .sk-story:not(.is-static) {
		/* Scroll distance while pinned: about one and a half screens. */
		height: calc(var(--sk-story-h) + 150svh);
		padding: 0;
	}

	.js .sk-story:not(.is-static) .sk-story__stage {
		position: sticky;
		top: calc(var(--sk-header-h) + var(--sk-admin-bar));
		display: block;
		width: 100%;
		height: var(--sk-story-h);
		margin: 0;
		overflow: hidden;
	}

	.js .sk-story:not(.is-static) .sk-story__text {
		position: absolute;
		top: 50%;
		left: 50%;
		z-index: 2;
		/* Stays in the gap between the left and right photos (24.75% to 76.25% of the stage). */
		width: min(640px, 40%);
		transform: translate(-50%, -52%);
		will-change: opacity;
	}

	.js .sk-story:not(.is-static) .sk-story__photos {
		display: block;
	}

	.js .sk-story:not(.is-static) .sk-story__photo {
		position: absolute;
		z-index: 1;
		aspect-ratio: auto;
		will-change: transform, opacity;
	}

	/* Positions and sizes measured from the design (1920 px wide artboard). */
	.js .sk-story:not(.is-static) .sk-story__photo--a { left: 3.75%; top: 13.6%; width: 21%; aspect-ratio: 404 / 364; }
	.js .sk-story:not(.is-static) .sk-story__photo--b { left: 76.25%; top: 10%; width: 19.6%; aspect-ratio: 376 / 308; }
	.js .sk-story:not(.is-static) .sk-story__photo--c { left: 14.4%; top: 64.9%; width: 13.1%; aspect-ratio: 252 / 184; }
	.js .sk-story:not(.is-static) .sk-story__photo--d { left: 74%; top: 60.5%; width: 18.3%; aspect-ratio: 352 / 232; }

	.js .sk-story:not(.is-static) .sk-story__card {
		position: absolute;
		top: 50%;
		left: 50%;
		z-index: 3;
		width: 52px;
		height: 38px;
		aspect-ratio: auto;
		border-radius: 18px;
		opacity: 0;
		transform: translate(-50%, -50%);
		will-change: width, height, opacity;
	}

	.js .sk-story:not(.is-static) .sk-story__play {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sk-story__play {
		transition: none;
	}
}
