/**
 * eKrasnale homepage Hero — Płynny gradient (scoped).
 * Desktop gradient is baked into the supplied photo; no second desktop wash.
 * Mobile uses a dedicated product-focused photo below 1024px.
 *
 * Desktop height tracks the photo aspect ratio (2048×896 ≈ 43.75vw) so
 * object-fit:cover does not over-crop when the CSS viewport grows
 * (wide screens / browser zoom-out).
 */

.ek-hero {
	--ek-hero-paper: #f7f5f2;
	--ek-hero-ink: #211c1a;
	--ek-hero-muted: #64574f;
	--ek-hero-accent: #aa853e;
	--ek-hero-button: #986d4d;
	/* Intrinsic photo ratio 2048 / 896 */
	--ek-hero-photo-ratio: 2.285714;
	box-sizing: border-box;
	color: var(--ek-hero-ink);
	font-family: var(--font, Corbel, "Trebuchet MS", Arial, sans-serif);
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	width: 100%;
	background: var(--ek-hero-paper);
}

.ek-hero *,
.ek-hero *::before,
.ek-hero *::after {
	box-sizing: border-box;
}

.ek-hero__media {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: clamp(232px, 67vw, 420px);
	flex: 0 0 auto;
	overflow: hidden;
	margin: 0;
}

.ek-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 42%;
}

.ek-hero__media::after {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		transparent 67%,
		rgba(247, 245, 242, 0.12) 74%,
		rgba(247, 245, 242, 0.8) 91%,
		var(--ek-hero-paper) 100%
	);
}

.ek-hero__container {
	position: relative;
	z-index: 2;
	width: 100%;
	margin: -24px auto 0;
	padding: 0 clamp(20px, 6vw, 32px) 43px;
}

.ek-hero__content {
	max-width: 630px;
}

.ek-hero__title {
	margin: 0 0 19px;
	max-width: 620px;
	font-size: clamp(39px, 9.9vw, 56px);
	line-height: 1.075;
	letter-spacing: -0.052em;
	font-weight: 750;
	text-wrap: balance;
	color: var(--ek-hero-ink);
}

.ek-hero__title em {
	display: block;
	font-style: italic;
	font-weight: 500;
	color: var(--ek-hero-accent);
	letter-spacing: -0.045em;
}

.ek-hero__description {
	max-width: 590px;
	margin: 0 0 25px;
	color: var(--ek-hero-muted);
	font-size: 15px;
	line-height: 1.65;
	font-weight: 450;
	overflow-wrap: break-word;
}

.ek-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	min-height: 50px;
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--ek-hero-button);
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 750;
	text-decoration: none;
	box-shadow: 0 7px 24px rgba(64, 35, 14, 0.13);
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.ek-hero__arrow {
	display: block;
	flex: 0 0 auto;
}

.ek-hero__button:hover {
	background: #805639;
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(64, 35, 14, 0.18);
	color: #fff;
}

.ek-hero__button:focus-visible {
	outline: 3px solid var(--ek-hero-ink);
	outline-offset: 4px;
}

@media (max-width: 359px) {
	.ek-hero__media {
		height: 226px;
	}

	.ek-hero__container {
		padding-inline: 18px;
		margin-top: -19px;
	}

	.ek-hero__title {
		font-size: 36px;
	}

	.ek-hero__description {
		font-size: 14.5px;
	}
}

/* Mobile: center H1, description and CTA under the photo.
 * 767.98px avoids Chrome MQ rounding at the 767/768 boundary. */
@media (max-width: 767.98px) {
	.ek-hero__content {
		width: 100%;
		max-width: 560px;
		margin-inline: auto;
		text-align: center;
	}

	.ek-hero__title {
		max-width: none;
		margin-inline: auto;
		text-align: center;
	}

	.ek-hero__title em {
		display: block;
	}

	.ek-hero__description {
		margin-inline: auto;
		text-align: center;
	}

	.ek-hero__button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: fit-content;
		margin-inline: auto;
	}
}

@media (min-width: 600px) and (max-width: 1023px) {
	.ek-hero__media {
		height: clamp(370px, 53vw, 485px);
	}

	.ek-hero__image {
		object-position: 50% 43%;
	}

	.ek-hero__container {
		width: min(100% - 48px, 760px);
		padding: 0 0 64px;
		margin-top: -42px;
	}

	.ek-hero__title {
		font-size: clamp(53px, 6.5vw, 68px);
	}

	.ek-hero__description {
		font-size: 17px;
		line-height: 1.72;
	}
}

/*
 * Desktop: size the Hero to the baked-in photo aspect ratio.
 * 896/2048 = 43.75vw — matches native framing until extreme ultra-wide.
 * Previous max of 760px forced a much wider container AR under zoom-out
 * (CSS viewport grows), so cover cropped heavily and figurines looked huge.
 */
@media (min-width: 1024px) {
	.ek-hero {
		/*
		 * Height tracks photo AR (896/2048 = 43.75vw).
		 * Ceiling 1100px only for extreme ultra-wide; no vh cap —
		 * browser zoom-out expands CSS vw+vh together, and a vh cap
		 * would re-widen the box and recreate cover over-crop.
		 */
		height: clamp(520px, 43.75vw, 1100px);
		min-height: 0;
		justify-content: center;
		background: #eae5e1;
	}

	.ek-hero__media {
		position: absolute;
		inset: 0;
		z-index: 0;
		height: 100%;
	}

	.ek-hero__image {
		/* Keep left gradient behind copy; mild vertical bias for shelves */
		object-fit: cover;
		object-position: left 48%;
	}

	.ek-hero__media::after {
		display: none;
	}

	.ek-hero__container {
		width: min(100% - 112px, 1360px);
		margin: 0 auto;
		padding: 64px 0 72px;
	}

	.ek-hero__content {
		width: min(55%, 610px);
	}

	.ek-hero__title {
		font-size: clamp(59px, 5.1vw, 85px);
		margin-bottom: 29px;
	}

	.ek-hero__description {
		max-width: 590px;
		font-size: clamp(16px, 1.15vw, 19px);
		line-height: 1.85;
		margin-bottom: 29px;
	}

	.ek-hero__button {
		min-height: 55px;
		padding-inline: 26px;
	}
}

@media (min-width: 1024px) and (max-width: 1250px) {
	.ek-hero__container {
		width: calc(100% - 76px);
	}

	.ek-hero__content {
		width: min(57%, 525px);
	}

	.ek-hero__title {
		font-size: clamp(53px, 5vw, 67px);
	}

	.ek-hero__description {
		font-size: 16px;
		line-height: 1.75;
	}
}

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

	.ek-hero__button:hover {
		transform: none;
	}
}
