/* Static photographs retain the dimensions owned by the existing page styles. */
.has-site-image {
	position: relative;
	overflow: hidden;
	background: #15202d;
}
.site-image-hero-picture {
	display: contents;
}
.has-site-image > .site-image,
.has-site-image > .site-image-hero-picture > .site-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}
/* A responsive source keeps the same crop and header overlap as the bare home image. */
.home-hero.has-photo > .site-image-hero-picture > .site-image {
	position: absolute;
	z-index: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 18%;
}
@media (max-width: 767px) {
	.home-hero.has-photo > .site-image-hero-picture > .site-image {
		object-position: 69% 18%;
	}
}
html.jiaye-has-js .home-hero.has-photo > .site-image-hero-picture > .site-image {
	top: calc(var(--jiaye-header-clearance, 148px) - 16px);
	height: calc(100% - var(--jiaye-header-clearance, 148px) + 16px);
}
.home-photo-slot.has-site-image::after {
	content: none;
}
.business-hero__slot.has-site-image,
.manufacturing-hero__slot-wrap.has-site-image {
	position: absolute;
	z-index: 0;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	pointer-events: none;
}
.manufacturing-hero__slot-wrap.has-site-image .site-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.site-image-hero::after {
	position: absolute;
	inset: 0;
	background: rgba(6, 12, 18, 0.62);
	content: "";
}

[data-slot-key="home-engineering-brief-photo"].has-site-image {
	aspect-ratio: auto;
	padding: 0;
}
[data-slot-key="home-engineering-brief-photo"].has-site-image > .site-image {
	position: static;
	height: auto;
	object-fit: contain;
}

[data-slot-key="production-injection-step-5-photo"] .business-media__frame.has-site-image {
	aspect-ratio: 16 / 9;
}
[data-slot-key="production-injection-step-5-photo"] .has-site-image > .site-image {
	object-fit: contain;
}

/* Slot-specific focal points for mismatched viewport and image proportions. */
[data-slot-key="home-engineering-review-photo"] > .site-image {
	object-position: center 18%;
}
[data-slot-key="factory-hero-photo"] > .site-image,
[data-slot-key="factory-hero-photo"] > .site-image-hero-picture > .site-image,
[data-slot-key="oem-odm-hero-photo"] > .site-image,
[data-slot-key="oem-odm-hero-photo"] > .site-image-hero-picture > .site-image {
	object-position: 50% 60%;
}
[data-slot-key="production-metal-hero-photo"] > .site-image,
[data-slot-key="production-metal-hero-photo"] > .site-image-hero-picture > .site-image {
	object-position: 42% 51%;
	filter: brightness(1.45) contrast(0.8);
}
[data-slot-key="M01"] > .site-image,
[data-slot-key="M01"] > .site-image-hero-picture > .site-image {
	object-position: 50% 58%;
}
.manufacturing-page [data-slot-key="M04"] .site-image {
	filter: brightness(0.91);
}

@media (min-width: 1024px) {
	.oem-service__frame.has-service-preview {
		aspect-ratio: 3 / 2;
	}
}

[data-slot-key="oem-odm-odm-photo"] .oem-service__frame.has-service-preview {
	aspect-ratio: 1200 / 896;
	padding: 0;
}
[data-slot-key="oem-odm-odm-photo"] .has-service-preview > .site-image {
	object-fit: contain;
}

/* Factory sets the brightness reference. Concentrate shade behind the other hero titles. */
.factory-page [data-slot-key="factory-hero-photo"].site-image-hero::after {
	background: rgba(6, 12, 18, 0.28);
}
.business-hero--oem .site-image-hero::after {
	background: linear-gradient(180deg, rgba(6, 12, 18, 0.23), rgba(6, 12, 18, 0.52) 48%, rgba(6, 12, 18, 0.50) 62%, rgba(6, 12, 18, 0.24));
}
.business-hero--production .site-image-hero::after {
	background: linear-gradient(180deg, rgba(6, 12, 18, 0.23), rgba(6, 12, 18, 0.46) 50%, rgba(6, 12, 18, 0.42) 63%, rgba(6, 12, 18, 0.23));
}
.manufacturing-hero__slot-wrap.site-image-hero::after {
	background: linear-gradient(90deg, rgba(6, 12, 18, 0.54), rgba(6, 12, 18, 0.41) 44%, rgba(6, 12, 18, 0.23));
}
.manufacturing-hero:has(.manufacturing-hero__slot-wrap.site-image-hero)::after {
	background: none;
}
.factory-page .business-hero__inner,
.business-hero--oem .business-hero__inner,
.business-hero--production .business-hero__inner,
.manufacturing-hero__inner {
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Keep the existing communication grid; each figure owns its own track. */
.factory-page .factory-gallery__viewport {
	position: relative;
	display: block;
	padding: 0;
	overflow: hidden;
	background: #15202d;
	touch-action: pan-y pinch-zoom;
}
.factory-page .factory-gallery__track {
	position: absolute;
	inset: 0;
	display: flex;
	transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.factory-page .factory-gallery__slide {
	position: relative;
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: 100%;
}
.factory-page .factory-gallery:not(.is-enhanced) .factory-gallery__slide:not(:first-child) {
	display: none;
}
.factory-page .factory-gallery__slide > .site-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}
.factory-page .factory-gallery__control {
	position: absolute;
	z-index: 1;
	top: 50%;
	transform: translateY(-50%);
}
.factory-page .factory-gallery__control--prev { left: 4px; }
.factory-page .factory-gallery__control--next { right: 4px; }
.factory-page .factory-gallery__control::before {
	background: rgba(21, 32, 45, 0.48);
}
.factory-page .factory-gallery__control:disabled::before {
	background: rgba(154, 166, 178, 0.32);
}
.factory-page .factory-gallery__control:disabled {
	color: rgba(255, 255, 255, 0.5);
}
.factory-page .factory-gallery__control[hidden] { display: none; }
.factory-page .factory-gallery:focus-visible {
	outline: 2px solid var(--jiaye-blue);
	outline-offset: 4px;
}

@media (max-width: 767px) {
	.factory-page .factory-gallery__track {
		flex-direction: column;
	}
	.factory-page .factory-gallery__slide {
		min-height: 0;
	}
	.factory-page .factory-gallery__control {
		left: auto;
		right: 4px;
		transform: none;
	}
	.factory-page .factory-gallery__control--prev { top: calc(50% - 42px); }
	.factory-page .factory-gallery__control--next { top: calc(50% + 2px); }
	.factory-page .factory-gallery__control--prev .jiaye-gallery-control__icon { transform: rotate(135deg); }
	.factory-page .factory-gallery__control--next .jiaye-gallery-control__icon { transform: rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
	.factory-page .factory-gallery__track,
	.factory-page .factory-gallery__control::before { transition: none; }
}
