.woodcha-home-hero {
	background: var(--woodcha-section-background);
	/* Clip travel at the section edges, leaving the shell gutters around each card. */
	overflow: hidden;
	overflow: clip;
	/* The categories section adds 12px, giving a 64px gap below the scene. */
	padding-block: 32px 52px;
}

.woodcha-home-hero__inner {
	align-items: center;
	background: var(--woodcha-section-background);
	border-radius: var(--woodcha-radius-md);
	display: flex;
	/* Keep the side-by-side hero compact at every desktop/tablet window size. */
	height: 360px;
	isolation: isolate;
	position: relative;
}

.woodcha-home-hero__slide::after {
	background: linear-gradient(90deg, var(--woodcha-section-background) 0%, rgb(250 247 238 / 98%) 30%, rgb(250 247 238 / 88%) 46%, rgb(250 247 238 / 30%) 62%, transparent 74%);
	border-radius: var(--woodcha-radius-md);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 1;
}

/* Keep every slide in one grid cell so changing slides cannot change the scene height. */
.woodcha-home-hero__slides {
	display: grid;
	flex: 1 1 auto;
	grid-template-rows: minmax(0, 1fr);
	height: 100%;
	min-height: 0;
	min-width: 0;
	overflow: visible;
	touch-action: pan-y pinch-zoom;
	-webkit-user-select: none;
	user-select: none;
	width: 100%;
}

.woodcha-home-hero__slide {
	align-items: center;
	background: var(--woodcha-section-background);
	border-radius: var(--woodcha-radius-md);
	display: grid;
	grid-area: 1 / 1;
	min-height: 0;
	min-width: 0;
	position: relative;
	visibility: visible;
}

.woodcha-home-hero__slide[aria-hidden="true"] {
	pointer-events: none;
	visibility: hidden;
}

/* Only the outgoing and incoming whole slides are visible during travel. */
.woodcha-home-hero__slide.is-leaving,
.woodcha-home-hero__slide.is-dragging {
	visibility: visible;
}

.woodcha-home-hero__slides[data-hero-dragging="true"] { cursor: grabbing; }

/* Promote only the pair being scrubbed, not all three masked photos permanently. */
.woodcha-home-hero__slide.is-dragging { will-change: transform; }

.woodcha-home-hero__content {
	padding-block: 24px;
	padding-inline: 0 clamp(28px, 3vw, 48px);
	position: relative;
	width: min(660px, 64%);
	z-index: 2;
}

.woodcha-home-hero__title {
	font-size: clamp(42px, 4.4vw, 64px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.04;
	margin: 0;
}

.woodcha-home-hero__title > span { display: block; }

.woodcha-home-hero__copy {
	color: rgb(36 33 29 / 76%);
	font-family: var(--woodcha-font-serif);
	font-size: clamp(18px, 1.5vw, 21px);
	line-height: 1.4;
	margin: 20px 0 0;
	max-width: 460px;
}

.woodcha-home-hero__actions {
	display: flex;
	margin-top: 24px;
}

.woodcha-home-hero__actions .woodcha-button { padding-inline: 48px; }

.woodcha-home-hero__actions .woodcha-button:focus-visible {
	outline: 2px solid var(--woodcha-paper);
	outline-offset: -5px;
}

/* The wide source is scaled to the scene height and aligned to the right edge. */
.woodcha-home-hero__visual {
	border-radius: var(--woodcha-radius-md);
	inset: 0;
	/* Also dissolve the clipped edge when a tall scene makes the photo wider than its frame. */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 56px);
	mask-image: linear-gradient(90deg, transparent, #000 56px);
	overflow: hidden;
	touch-action: pan-y pinch-zoom;
	-webkit-user-select: none;
	user-select: none;
	position: absolute;
	z-index: 0;
}

.woodcha-home-hero__visual img {
	display: block;
	height: 100%;
	/* The original spoon asset had this alpha fade baked in. Anchor it to the photo,
	   not the whole slide: the photo's left edge moves with the viewport height. */
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 16%) 7.8125%, rgb(0 0 0 / 50%) 15.625%, rgb(0 0 0 / 84%) 23.4375%, #000 31.25%);
	mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 16%) 7.8125%, rgb(0 0 0 / 50%) 15.625%, rgb(0 0 0 / 84%) 23.4375%, #000 31.25%);
	max-width: none;
	position: absolute;
	right: 0;
	top: 0;
	width: auto;
	pointer-events: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}

.woodcha-home-hero__controls {
	align-items: center;
	background: rgb(250 247 238 / 94%);
	border: 1px solid rgb(99 75 55 / 14%);
	border-radius: var(--woodcha-radius-pill);
	display: flex;
	padding: 3px;
	position: absolute;
	right: 16px;
	top: 16px;
	width: auto;
	z-index: 3;
}

.woodcha-home-hero__controls[hidden] { display: none; }

.woodcha-home-hero[data-hero-loading="true"] .woodcha-home-hero__progress-controls::before {
	animation: woodcha-hero-loading 800ms linear infinite;
	border: 2px solid rgb(99 38 52 / 20%);
	border-top-color: var(--woodcha-ume);
	border-radius: 50%;
	content: "";
	height: 12px;
	left: -24px;
	position: absolute;
	width: 12px;
}

@keyframes woodcha-hero-loading { to { transform: rotate(360deg); } }

.woodcha-home-hero__notice {
	background: var(--woodcha-section-background);
	border: 1px solid var(--woodcha-line);
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	margin: 0;
	max-width: min(280px, calc(100% - 32px));
	padding: 10px 14px;
	position: absolute;
	right: 16px;
	top: 80px;
	z-index: 3;
}

.woodcha-home-hero__controls button,
.woodcha-home-hero__progress-controls button {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--woodcha-ink);
	cursor: pointer;
	display: inline-flex;
	flex-shrink: 0;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
}

.woodcha-home-hero__controls button:focus-visible {
	outline: 2px solid var(--woodcha-ume);
	outline-offset: 2px;
}

.woodcha-home-hero__progress-controls button:focus-visible { outline: none; }

.woodcha-home-hero__controls svg,
.woodcha-home-hero__progress-controls svg {
	fill: none;
	height: 20px;
	pointer-events: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
	width: 20px;
}

.woodcha-home-hero__counter {
	display: flex;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	gap: 6px;
	justify-content: center;
	min-width: 40px;
}

.woodcha-home-hero__counter-divider { opacity: 0.4; }

.woodcha-home-hero__arrows { align-items: center; display: flex; }

.woodcha-home-hero__progress-controls {
	align-items: center;
	display: flex;
	height: 44px;
	left: auto;
	max-width: 240px;
	position: absolute;
	right: 0;
	top: 100%;
	width: 100%;
	z-index: 3;
}

.woodcha-home-hero__progress-controls[hidden],
.woodcha-home-hero__progress-controls [hidden] { display: none; }

.woodcha-home-hero__progress {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	gap: 4px;
	min-width: 0;
}

.woodcha-home-hero__progress-button {
	flex: 1 1 0;
	min-width: 44px;
}

.woodcha-home-hero__progress-track {
	background: rgb(36 33 29 / 20%);
	border-radius: var(--woodcha-radius-pill);
	display: block;
	height: 4px;
	overflow: hidden;
	/* Feedback belongs to the track; the nested fill keeps its independent clock. */
	transform: scaleY(1);
	transform-origin: center;
	transition: transform 120ms ease, background-color 120ms ease;
	width: 100%;
}

.woodcha-home-hero__progress-button[aria-current="true"] .woodcha-home-hero__progress-track {
	background: rgb(36 33 29 / 30%);
}

.woodcha-home-hero__progress-button:focus-visible .woodcha-home-hero__progress-track {
	outline: 1px solid var(--woodcha-ume);
	outline-offset: 3px;
}

.woodcha-home-hero__progress-fill {
	background: var(--woodcha-ume);
	display: block;
	height: 100%;
	transform: scaleX(0);
	transform-origin: left;
	width: 100%;
}

@media (hover: hover) and (pointer: fine) {
	.woodcha-home-hero__controls button:hover { background: rgb(99 38 52 / 6%); }

	.woodcha-home-hero__progress-button:hover .woodcha-home-hero__progress-track {
		background: rgb(36 33 29 / 36%);
		transform: scaleY(1.25);
	}
}

/* Press wins over hover, including on touch, without shifting the row or hit area. */
.woodcha-home-hero__progress-button:active .woodcha-home-hero__progress-track {
	background: rgb(36 33 29 / 44%);
	transform: scaleY(0.75);
	transition-duration: 60ms;
}

@media (max-width: 1023px) and (min-width: 761px) {
	.woodcha-home-hero__content { width: 68%; }

	.woodcha-home-hero__title { font-size: clamp(38px, 4.6vw, 46px); }
}

@media (max-width: 760px) {
	.woodcha-home-hero {
		/* 16px clear space + 44px controls + 20px; categories add 12px for a 32px gap. */
		padding-block: 24px 80px;
	}

	.woodcha-home-hero__inner {
		align-items: stretch;
		background: transparent;
		border-radius: 0;
		flex-direction: column;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.woodcha-home-hero__slide::after { display: none; }

	.woodcha-home-hero__slides {
		grid-template-rows: auto;
		height: auto;
		min-height: 0;
	}

	.woodcha-home-hero__slide {
		align-content: start;
		align-items: start;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto;
		min-height: 0;
	}

	.woodcha-home-hero__visual {
		border-radius: var(--woodcha-radius-md);
		height: clamp(180px, 48vw, 280px);
		inset: auto;
		-webkit-mask-image: none;
		mask-image: none;
		overflow: hidden;
		position: relative;
		width: 100%;
	}

	.woodcha-home-hero__visual img {
		height: 100%;
		-webkit-mask-image: none;
		mask-image: none;
		object-fit: cover;
		object-position: right center;
		width: 100%;
	}

	.woodcha-home-hero__visual::after {
		border-radius: inherit;
		box-shadow: inset 0 0 0 1px rgb(99 75 55 / 24%);
		content: "";
		inset: 0;
		-webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 98%);
		mask-image: linear-gradient(90deg, #000 0%, transparent 98%);
		pointer-events: none;
		position: absolute;
	}

	.woodcha-home-hero__content {
		padding: 24px 0 0;
		width: 100%;
	}

	.woodcha-home-hero__title { font-size: clamp(34px, 8.8vw, 52px); }

	.woodcha-home-hero__copy {
		font-size: 18px;
		margin-top: 16px;
	}

	.woodcha-home-hero__actions { margin-top: 20px; }

	.woodcha-home-hero__controls {
		display: none;
		right: 12px;
		top: 12px;
	}

	.woodcha-home-hero__arrows { display: none; }

	.woodcha-home-hero__progress-controls {
		left: 0;
		margin-inline: auto;
		max-width: 192px;
		right: 0;
		top: calc(100% + 16px);
	}

	.woodcha-home-hero__progress { gap: 8px; }

	.woodcha-home-hero__notice {
		right: 12px;
		top: 76px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woodcha-home-hero__progress-track { transition: none; }

	.woodcha-home-hero[data-hero-loading="true"] .woodcha-home-hero__progress-controls::before { animation: none; }
}
