/* Original technical studies and their progressive-enhancement controls. */
.hb-icon {
	display: inline-block;
	width: 1.35rem;
	height: 1.35rem;
	flex: 0 0 auto;
	vertical-align: -0.25em;
}

.hb-icon--accent {
	filter: invert(48%) sepia(62%) saturate(1183%) hue-rotate(333deg) brightness(91%) contrast(91%);
}

.hb-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.65rem 1rem;
	border: 1px solid #cdd5da;
	border-radius: 6px;
	background: #fff;
	color: #182b38;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.hb-control:hover {
	border-color: #8796a0;
	background: #f6f8f9;
}

.hb-control:focus-visible,
.hb-gallery__link:focus-visible {
	outline: 3px solid #d95c39;
	outline-offset: 3px;
}

.hb-control[hidden],
.hb-model__actions [hidden],
html:not(.hb-interactions-ready) [data-hb-model-load] {
	display: none !important;
}

.hb-process {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid #e0e5e8;
	border-radius: 12px;
	background: #f6f8f9;
}

.hb-process__visual {
	position: relative;
	width: 100%;
	min-width: 0;
	aspect-ratio: 1200 / 280;
	overflow: hidden;
}

.hb-process__fallback,
.hb-process__animation {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hb-process__fallback {
	object-fit: contain;
	transition: opacity 0.2s ease;
}

.hb-process__animation {
	opacity: 0;
	pointer-events: none;
}

.hb-process.is-animated .hb-process__animation {
	opacity: 1;
}

.hb-process.is-animated .hb-process__fallback {
	opacity: 0;
}

.hb-process__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.5rem;
}

.hb-process__hint,
.hb-model__status,
.hb-disclosure {
	margin: 0;
	color: #687782;
	font-size: 0.78rem;
	line-height: 1.55;
}

.hb-process-steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.hb-process-steps__item {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	padding: 1rem;
	border: 1px solid #e0e5e8;
	border-radius: 8px;
	background: #fff;
}

/* A connective line turns the four cards into a visible sequence. It is only
   correct in the four-across layout: in a two-column grid the third card starts
   a new row, so the line would hang outside the grid into the container padding. */
@media (min-width: 960px) {
	.hb-process-steps__item + .hb-process-steps__item::before {
		content: "";
		position: absolute;
		top: 1.85rem;
		left: -0.8rem;
		width: 0.8rem;
		height: 2px;
		background: #d7dde2;
	}
}

.hb-process-steps__number {
	display: block;
	margin-bottom: 0.25rem;
	color: #d95c39;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
}

.hb-process-steps h3 {
	margin: 0 0 0.25rem;
	font-size: 0.95rem;
}

.hb-process-steps p {
	margin: 0;
	color: #62717b;
	font-size: 0.82rem;
	line-height: 1.55;
}

.hb-study-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.hb-study-panel {
	min-width: 0;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid #e0e5e8;
	border-radius: 12px;
	background: #fff;
}

.hb-study-panel__heading {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.hb-study-panel__intro {
	margin: 0 0 1rem;
	color: #5c6c77;
	font-size: 0.88rem;
	line-height: 1.6;
}

.hb-comparison-figure {
	position: relative;
	margin: 0 0 0.8rem;
}

.hb-comparison {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: #f3f5f7;
	--divider-width: 2px;
	--divider-color: #fff;
	--default-handle-color: #fff;
	--default-handle-opacity: 1;
	--default-handle-shadow: 0 2px 12px rgba(13, 29, 39, 0.35);
}

.hb-comparison:not(.is-ready) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px;
	aspect-ratio: 4 / 3;
}

.hb-comparison img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hb-comparison:not(.is-ready) img {
	object-fit: contain;
}

.hb-comparison img.hb-surface--matte {
	filter: saturate(0.68) contrast(0.9) brightness(1.04);
}

.hb-comparison img.hb-surface--gloss {
	filter: saturate(1.12) contrast(1.1) brightness(1.02);
}

.hb-comparison__badge {
	position: absolute;
	top: 0.65rem;
	z-index: 2;
	padding: 0.3rem 0.55rem;
	border-radius: 4px;
	background: rgba(15, 31, 42, 0.82);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	pointer-events: none;
}

.hb-comparison__badge--first {
	left: 0.65rem;
}

.hb-comparison__badge--second {
	right: 0.65rem;
}

.hb-model__viewer {
	display: block;
	position: relative;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 1px solid #e2e7eb;
	border-radius: 8px;
	background:
		radial-gradient(circle at 50% 35%, #fff 0 22%, transparent 68%),
		linear-gradient(145deg, #f7f8f9, #e9eef1);
	--poster-color: transparent;
}

.hb-model__viewer img {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	object-fit: cover;
}

.hb-model__viewer:focus-visible {
	outline: 3px solid rgba(54, 111, 160, 0.55);
	outline-offset: 3px;
}

.hb-model__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.8rem 0 0.55rem;
}

.hb-model.is-loading .hb-model__viewer {
	cursor: progress;
}

.hb-model.is-loaded .hb-model__viewer {
	cursor: grab;
}

.hb-model.is-loaded .hb-model__viewer:active {
	cursor: grabbing;
}

.hb-model:fullscreen {
	padding: 1rem;
	overflow: auto;
	background: #fff;
}

.hb-model:fullscreen .hb-model__viewer {
	height: calc(100vh - 150px);
	aspect-ratio: auto;
}

/* Image-based 3D product preview. */
.hb-photo3d {
	--hb-glare-x: 50%;
	--hb-glare-y: 48%;
}

.hb-photo3d__stage {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 1px solid #e2e7eb;
	border-radius: 8px;
	background:
		radial-gradient(circle at 50% 35%, #fff 0 22%, transparent 68%),
		linear-gradient(145deg, #f7f8f9, #e9eef1);
	touch-action: none;
	cursor: grab;
	isolation: isolate;
}

.hb-photo3d__stage:active {
	cursor: grabbing;
}

.hb-photo3d__stage:focus-visible {
	outline: 3px solid rgba(54, 111, 160, 0.55);
	outline-offset: 3px;
}

.hb-photo3d__plate {
	position: absolute;
	inset: 5% 6%;
	transform-style: preserve-3d;
	will-change: transform;
	transition: transform 0.3s ease;
}

.hb-photo3d__plate.is-dragging {
	transition: none;
}

.hb-photo3d__plate img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	filter: drop-shadow(0 18px 18px rgba(16, 31, 42, 0.14));
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.hb-photo3d__plate img[data-hb-photo3d-back] {
	opacity: 0;
}

.hb-photo3d.is-back .hb-photo3d__plate img[data-hb-photo3d-front] {
	opacity: 0;
}

.hb-photo3d.is-back .hb-photo3d__plate img[data-hb-photo3d-back] {
	opacity: 1;
}

.hb-photo3d__glare {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: radial-gradient(
		circle at var(--hb-glare-x) var(--hb-glare-y),
		rgba(255, 255, 255, 0.62) 0,
		rgba(255, 255, 255, 0.12) 18%,
		transparent 42%
	);
	mix-blend-mode: screen;
	pointer-events: none;
}

.hb-photo3d__angle {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 3;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	background: rgba(15, 31, 42, 0.82);
	color: #fff;
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.hb-photo3d__hint {
	position: absolute;
	right: 0.65rem;
	bottom: 0.65rem;
	z-index: 3;
	padding: 0.3rem 0.55rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	color: #43525e;
	font-size: 0.68rem;
	letter-spacing: 0.04em;
	pointer-events: none;
}

html:not(.hb-interactions-ready) [data-hb-photo3d-switch],
html:not(.hb-interactions-ready) [data-hb-photo3d-reset] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.hb-photo3d__plate,
	.hb-photo3d__plate img {
		transition: none;
	}
}

.hb-technical-gallery {
	margin-top: 1.25rem;
}

.hb-technical-gallery .hb-gallery__link {
	background: #f3f6f7;
}

.hb-technical-gallery .hb-gallery__link::after {
	content: "+";
	position: absolute;
	right: 0.65rem;
	bottom: 0.65rem;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #182b38;
	font-size: 1.2rem;
	box-shadow: 0 3px 14px rgba(20, 39, 52, 0.15);
}

.hb-showcase:not(.is-swiper-ready) {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.hb-showcase:not(.is-swiper-ready) .swiper-wrapper {
	display: flex;
	gap: 1.25rem;
}

.hb-showcase:not(.is-swiper-ready) .swiper-slide {
	flex: 0 0 min(340px, 82vw);
	width: auto;
	scroll-snap-align: center;
}

.hb-showcase:not(.is-swiper-ready) .swiper-pagination {
	display: none;
}

/* Four across needs roughly 960px. At 700px the cards fall to ~137px and the
   body copy wraps to five lines, which turns the sequence into thin columns
   that are harder to read than the two-column arrangement. */
@media (min-width: 960px) {
	.hb-process-steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hb-study-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.hb-process__footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.hb-process-steps {
		grid-template-columns: minmax(0, 1fr);
	}

	.hb-comparison__badge {
		top: 0.4rem;
		font-size: 0.6rem;
	}

	.hb-comparison__badge--first {
		left: 0.4rem;
	}

	.hb-comparison__badge--second {
		right: 0.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hb-process__fallback,
	.hb-card,
	.hb-gallery__link img {
		transition: none !important;
	}

	.hb-gallery__link:hover img {
		transform: none;
	}
}
