/* Slider style */
.md-slider {
	width: 100%;
	position: relative;
	height: 720px;
	padding-top: 70px;
	margin: 10px 0;
}

.md-slider > nav {
	position: absolute;
	text-align: center;
	width: 100%;
	top: 0;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 24px;
	z-index: 5;
}

.md-slider > nav a {
	display: inline-block;
	margin: 0;
	outline: none;
	opacity: 0.35;
	transition: opacity 0.25s ease;
	line-height: 0;
}

.md-slider > nav a:hover,
.md-slider > nav a.md-current {
	opacity: 1;
}

/* Device icons — white stroke (inactive) / white fill (active) */
.md-slider > nav a:before {
	content: "";
	display: block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.md-slider > nav a:nth-child(1):before {
	width: 52px;
	height: 48px;
	background-image: url(../images/device-icons/black/imac.svg);
}

.md-slider > nav a.md-current:nth-child(1):before {
	background-image: url(../images/device-icons/green/imac.svg);
}

.md-slider > nav a:nth-child(2):before {
	width: 56px;
	height: 36px;
	background-image: url(../images/device-icons/black/macbook.svg);
}

.md-slider > nav a.md-current:nth-child(2):before {
	background-image: url(../images/device-icons/green/macbook.svg);
}

.md-slider > nav a:nth-child(3):before {
	width: 24px;
	height: 30px;
	background-image: url(../images/device-icons/black/ipad.svg);
}

.md-slider > nav a.md-current:nth-child(3):before {
	background-image: url(../images/device-icons/green/ipad.svg);
}

.md-slider > nav a:nth-child(4):before {
	width: 18px;
	height: 26px;
	background-image: url(../images/device-icons/black/iphone.svg);
}

.md-slider > nav a.md-current:nth-child(4):before {
	background-image: url(../images/device-icons/green/iphone.svg);
}

.touch .md-slider > nav a {
	opacity: 0.45;
}

.touch .md-slider > nav a.md-current {
	opacity: 1;
}

/* Image slider arrows — 60px matches .site-cursor.link / outer ring */
.md-arrow {
	position: absolute;
	top: 50%;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-top: -30px;
	padding: 0;
	/* border: 1px solid rgba(255, 255, 255, 0.4); */
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	outline: none;
	opacity: 0.8;
	transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Larger invisible hit zone — easier to catch */
.md-arrow::before {
	content: "";
	position: absolute;
	inset: -28px;
	border-radius: 50%;
}

.md-arrow:hover,
.md-arrow.is-magnet {
	opacity: 1;
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.85);
}

.md-arrow-prev {
	left: 60px;
}

.md-arrow-next {
	right: 60px;
}

.md-arrow-icon {
	display: block;
	width: 26px;
	height: 10px;
	position: relative;
	z-index: 1;
}

/* General style for all devices */
.md-device-wrapper {
	position: relative;
	text-align: center;
	width: 780px;
	margin: 0 auto;
}

/* Dark Space Gray product finish */
.md-device {
	position: relative;
	display: inline-block;
	border-radius: 18px;
	background-color: #1c1c1e;
	-webkit-transform: translateY(0px);
	-moz-transform: translateY(0px);
	-ms-transform: translateY(0px);
	transform: translateY(0px);
}

.md-device > a,
.md-device > a img {
	display: block;
	outline: none;
}

.md-device > a {
	position: relative;
	overflow: hidden;
	border-radius: 2px;
	background: #0a0a0a;
}

.md-device > a img {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	object-fit: cover;
	opacity: 1;
	will-change: opacity;
}

.md-device > a img.md-fadein {
	opacity: 0;
}

.md-device > a img.md-fadeout {
	opacity: 0;
}

/* reset box sizing for this demo */
.md-device,
.md-device div,
.md-device:before,
.md-device:after {
	-webkit-box-sizing: content-box;
	-moz-box-sizing: content-box;
	box-sizing: content-box;
}

/* Common pseudo elements' properties */
.md-device:before,
.md-device:after,
.md-base-element:after,
.md-border-element:after {
	position: absolute;
	content: '';
	z-index: 1000;
	left: 50%;
	top: 0;
}

.md-device:before,
.md-device:after {
	background: #0a0a0a;
}

/* Hidden base — camera / island stays scaled to 0 until a device enables it */
.md-device:before {
	-webkit-transform: translateY(12px) translateX(-50%) scale(0);
	-moz-transform: translateY(12px) translateX(-50%) scale(0);
	-ms-transform: translateY(12px) translateX(-50%) scale(0);
	transform: translateY(12px) translateX(-50%) scale(0);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	opacity: 0;
}

.md-device > div {
	position: absolute;
}

/* Decorative pieces start hidden so they morph in/out instead of popping */
.md-border-element,
.md-base-element,
.md-border-element:after {
	opacity: 0;
}

/* md-device:after — home indicator (tablet / phone) */
.md-device:after {
	width: 36px;
	height: 5px;
	top: 100%;
	border-radius: 3px;
	background: #0a0a0a;
	-webkit-transform-origin: 50% 100%;
	-moz-transform-origin: 50% 100%;
	transform-origin: 50% 100%;
	-webkit-transform: translateY(-12px) translateX(-50%) scale(0);
	-moz-transform: translateY(-12px) translateX(-50%) scale(0);
	-ms-transform: translateY(-12px) translateX(-50%) scale(0);
	transform: translateY(-12px) translateX(-50%) scale(0);
	opacity: 0;
}

/* md-border-element — chin / laptop base */
.md-border-element {
	height: 28px;
	border-radius: 0 0 12px 12px;
	top: 100%;
	width: 100%;
	background: #2c2c2e;
	left: 50%;
}

/* md-border-element:after — laptop trackpad */
.md-border-element:after {
	background: #141416;
	width: 120px;
	border-radius: 6px;
	height: 8px;
	opacity: 0;
}

.md-border-element,
.md-border-element:after {
	-webkit-transform: translateX(-50%);
	-moz-transform: translateX(-50%);
	-ms-transform: translateX(-50%);
	transform: translateX(-50%);
}

/* md-base-element — iMac stand neck (trapezoid) */
.md-base-element {
	top: 100%;
	left: 50%;
	width: 110px;
	height: 0;
	background: transparent;
	border-style: solid;
	border-color: transparent;
	border-width: 0 20px 52px 20px;
	border-bottom-color: #2c2c2e;
	-webkit-clip-path: none;
	clip-path: none;
	border-radius: 0;
	-webkit-transform: translateY(22px) translateX(-50%) translateY(-80%);
	-moz-transform: translateY(22px) translateX(-50%) translateY(-80%);
	-ms-transform: translateY(22px) translateX(-50%) translateY(-80%);
	transform: translateY(22px) translateX(-50%) translateY(-80%);
	z-index: -1;
}

/* md-base-element:after — iMac stand foot */
.md-base-element:after {
	background: #2c2c2e;
	border-radius: 100px;
	width: 190px;
	height: 8px;
	top: 52px;
	opacity: 0;
	-webkit-transform: translateX(-50%) scale(0.6);
	-moz-transform: translateX(-50%) scale(0.6);
	-ms-transform: translateX(-50%) scale(0.6);
	transform: translateX(-50%) scale(0.6);
}

/* Device 1 — dark Space Gray display */
.md-device-1 {
	padding: 14px 14px 14px;
	border-radius: 16px 16px 0 0;
	background-color: #1c1c1e;
}

.md-device-1 > a {
	width: 700px;
	height: 455px;
	border-radius: 4px;
}

.md-device-1 .md-border-element {
	opacity: 1;
	height: 22px;
	border-radius: 0 0 14px 14px;
	background: #2c2c2e;
}

.md-device-1 .md-base-element {
	opacity: 1;
	height: 0;
	width: 110px;
	-webkit-transform: translateY(22px) translateX(-50%) translateY(0);
	-moz-transform: translateY(22px) translateX(-50%) translateY(0);
	-ms-transform: translateY(22px) translateX(-50%) translateY(0);
	transform: translateY(22px) translateX(-50%) translateY(0);
}

.md-device-1 .md-base-element:after {
	opacity: 1;
	-webkit-transform: translateX(-50%) scale(1);
	-moz-transform: translateX(-50%) scale(1);
	-ms-transform: translateX(-50%) scale(1);
	transform: translateX(-50%) scale(1);
}

/* Device 2 — dark Space Gray laptop */
.md-device-2 {
	padding: 12px 12px 14px;
	border-radius: 14px 14px 0 0;
	background-color: #1c1c1e;
}

.md-device-2 > a {
	width: 600px;
	height: 390px;
	border-radius: 3px;
}

.md-device-2 .md-border-element {
	opacity: 1;
	width: 128%;
	height: 18px;
	background: #2c2c2e;
	border-radius: 0 0 18px 18px;
}

.md-device-2 .md-border-element:after {
	opacity: 1;
	width: 140px;
	height: 6px;
	border-radius: 0 0 8px 8px;
	top: 0;
	background: #141416;
}

/* Device 3 — dark Space Gray tablet */
.md-device-3 {
	padding: 36px 16px 28px;
	border-radius: 28px;
	background-color: #1c1c1e;
	-webkit-transform: translateY(36px);
	-moz-transform: translateY(36px);
	-ms-transform: translateY(36px);
	transform: translateY(36px);
}

.md-device-3 > a {
	width: 280px;
	height: 375px;
	border-radius: 6px;
}

.md-device-3:before {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #0a0a0a;
	opacity: 1;
	-webkit-transform: translateY(14px) translateX(-50%) scale(1);
	-moz-transform: translateY(14px) translateX(-50%) scale(1);
	-ms-transform: translateY(14px) translateX(-50%) scale(1);
	transform: translateY(14px) translateX(-50%) scale(1);
}

.md-device-3:after {
	width: 48px;
	height: 5px;
	border-radius: 3px;
	background: #0a0a0a;
	opacity: 1;
	-webkit-transform: translateY(-12px) translateX(-50%) scale(1);
	-moz-transform: translateY(-12px) translateX(-50%) scale(1);
	-ms-transform: translateY(-12px) translateX(-50%) scale(1);
	transform: translateY(-12px) translateX(-50%) scale(1);
}

/* Device 4 — dark Space Gray smartphone */
.md-device-4 {
	padding: 11px 8px 12px;
	border-radius: 44px;
	background-color: #1c1c1e;
	-webkit-transform: translateY(28px);
	-moz-transform: translateY(28px);
	-ms-transform: translateY(28px);
	transform: translateY(28px);
}

.md-device-4 > a {
	width: 210px;
	height: 432px;
	border-radius: 34px;
}

/* Dynamic Island — black cutout on the display */
.md-device-4:before {
	width: 78px;
	height: 24px;
	border-radius: 20px;
	background: #000;
	z-index: 1002;
	opacity: 1;
	-webkit-transform: translateY(16px) translateX(-50%) scale(1);
	-moz-transform: translateY(16px) translateX(-50%) scale(1);
	-ms-transform: translateY(16px) translateX(-50%) scale(1);
	transform: translateY(16px) translateX(-50%) scale(1);
}

/* Home indicator */
.md-device-4:after {
	width: 80px;
	height: 4px;
	border-radius: 4px;
	background: #0a0a0a;
	opacity: 1;
	-webkit-transform: translateY(-8px) translateX(-50%) scale(1);
	-moz-transform: translateY(-8px) translateX(-50%) scale(1);
	-ms-transform: translateY(-8px) translateX(-50%) scale(1);
	transform: translateY(-8px) translateX(-50%) scale(1);
}

/* Frame morph */
.md-device,
.md-device > a {
	-webkit-transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	-moz-transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1), -moz-transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Decorative pieces fade out faster than the frame morph so leftovers don't linger */
.md-device:before,
.md-device:after,
.md-border-element,
.md-base-element,
.md-border-element:after,
.md-base-element:after {
	-webkit-transition: -webkit-transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	-moz-transition: -moz-transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.md-device > a img {
	-webkit-transition: opacity 0.55s ease;
	-moz-transition: opacity 0.55s ease;
	transition: opacity 0.55s ease;
}

/* iPhone only — slight overall scale-down */
/* .md-slider.md-iphone {
	-webkit-transform: scale(0.9);
	-moz-transform: scale(0.9);
	-ms-transform: scale(0.9);
	transform: scale(0.9);
	-webkit-transform-origin: top center;
	-moz-transform-origin: top center;
	-ms-transform-origin: top center;
	transform-origin: top center;
} */

@media screen and (max-width: 850px) {
	.md-slider {
		height: 380px;
		padding-top: 72px;
		overflow: hidden;
	}

	.md-device-wrapper {
		width: 780px;
		left: 50%;
		-webkit-transform: translateX(-50%) scale(0.48);
		-moz-transform: translateX(-50%) scale(0.48);
		-ms-transform: translateX(-50%) scale(0.48);
		transform: translateX(-50%) scale(0.48);
		-webkit-transform-origin: top center;
		-moz-transform-origin: top center;
		-ms-transform-origin: top center;
		transform-origin: top center;
	}

	.md-slider > nav {
		gap: 20px;
	}

	.md-slider > nav a:nth-child(1):before {
		width: 40px;
		height: 36px;
	}

	.md-slider > nav a:nth-child(2):before {
		width: 44px;
		height: 28px;
	}

	.md-arrow::before {
		inset: -16px;
	}
}

@media screen and (max-width: 540px) {
	.md-slider {
		height: 320px;
		padding-top: 64px;
	}

	.md-device-wrapper {
		-webkit-transform: translateX(-50%) scale(0.38);
		-moz-transform: translateX(-50%) scale(0.38);
		-ms-transform: translateX(-50%) scale(0.38);
		transform: translateX(-50%) scale(0.38);
	}

	.md-arrow {
		display: none;
	}
}
