@layer components {
	.has-sections .site-main { padding-top: 0; }
	:root:has(body.has-sections) { scroll-padding-top: var(--header-h); }

	/* Úvod */
	.hp-hero {
		position: relative;
		display: flex;
		align-items: flex-end;
		min-height: 100svh;
		padding-block: calc(var(--header-h) + 48px) clamp(56px, 10vh, 120px);
		overflow: hidden;
		background: var(--c-black);

		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(20deg, rgb(0 0 0 / 0.78) 10%, rgb(0 0 0 / 0.1) 60%);
		}
	}

	.hp-hero__bg {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: 90% 50%;
	}

	.hp-hero__content {
		position: relative;
		z-index: 1;

		.eyebrow { margin-bottom: 16px; }
	}

	.hp-hero__title {
		max-width: 14ch;
		font-size: clamp(40px, 6.4vw, 92px);
		line-height: 1;
		letter-spacing: -.01em;
		text-transform: uppercase;
	}

	/* Úvod bez nadpisu: logo a claim v černých pruzích jako na původním webu */
	.hp-hero--lockup {
		justify-content: center;
		text-align: center;

		&::after { background: linear-gradient(0deg, rgb(0 0 0 / 0.35) 0%, transparent 35%); }
		.hp-hero__content { display: flex; flex-direction: column; align-items: center; }
		.hp-hero__actions { justify-content: center; margin-top: 40px; }
	}

	.hp-hero__lockup {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		margin: 0;
	}

	.hp-hero__logo {
		width: clamp(170px, 18vw, 280px);
		height: auto;
		margin-bottom: clamp(16px, 2vw, 28px);
		animation: hero-in .9s var(--ease) both;
	}

	.hp-hero__line {
		display: block;
		padding: .08em .5em .22em;
		background: var(--c-black);
		color: #fff;
		font-size: clamp(20px, 2.8vw, 40px);
		font-weight: var(--fw-light);
		line-height: 1.1;
		letter-spacing: .2em;
		text-transform: none;
		animation: hero-in .9s var(--ease) both;

		&:nth-of-type(2) { animation-delay: .12s; }
		&:nth-of-type(3) { animation-delay: .24s; }
	}

	@keyframes hero-in {
		from { opacity: 0; translate: 0 12px; }
	}

	.hp-hero__text {
		max-width: 52ch;
		margin-top: 24px;
		color: rgb(255 255 255 / 0.82);
		font-size: clamp(17px, 1.4vw, 20px);
	}

	.hp-hero__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		margin-top: 32px;
	}

	/* Dlaždice kategorií */
	.hp-tiles {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 4px;
		background: var(--c-black);
	}

	.hp-tiles__item {
		position: relative;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		gap: 12px;
		aspect-ratio: 3 / 4;
		max-height: 78vh;
		width: 100%;
		padding: clamp(16px, 2vw, 28px);
		overflow: hidden;
		text-decoration: none;

		img {
			position: absolute;
			inset: 0;
			width: 100%;
			height: 100%;
			object-fit: cover;
			filter: grayscale(1) brightness(.8);
			transition: scale .8s var(--ease), filter .4s;
		}

		&::after {
			content: "";
			position: absolute;
			inset: 50% 0 0;
			background: linear-gradient(transparent, rgb(0 0 0 / 0.75));
		}

		&:hover, &:focus-visible {
			img { scale: 1.04; filter: none; }
			.hp-tiles__arrow { background: var(--c-gold); color: var(--c-black); translate: 4px 0; }
		}
	}

	.hp-tiles__label {
		position: relative;
		z-index: 1;
		display: grid;
		gap: 4px;

		strong { font-size: clamp(22px, 2.4vw, 34px); line-height: 1; text-transform: uppercase; }
		span { color: rgb(255 255 255 / 0.75); font-size: 15px; }
	}

	.hp-tiles__arrow {
		position: relative;
		z-index: 1;
		flex: none;
		width: 44px;
		height: 44px;
		padding: 11px;
		border: 1px solid var(--c-line-strong);
		transition: background-color .3s, color .3s, translate .3s var(--ease);
	}

	/* Vybrané produkty */
	.hp-products { padding-block: var(--section-space); }

	.hp-products__heading { justify-content: space-between; }

	.hp-products__more {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		color: var(--c-gold);
		font-weight: var(--fw-bold);
		text-decoration: none;

		svg { width: 18px; height: 18px; transition: translate .3s var(--ease); }
		&:hover svg { translate: 4px 0; }
	}

	.hp-products__list {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 16px;
		padding: 0;
		list-style: none;
	}

	/* Video po kliknutí */
	.video-facade {
		position: relative;
		display: block;
		width: 100%;
		aspect-ratio: 16 / 9;
		padding: 0;
		border: 0;
		background: #000;

		img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); transition: filter .3s; }
		&:hover img { filter: brightness(.9); }
	}

	.video-facade__play {
		position: absolute;
		inset: 50% auto auto 50%;
		display: grid;
		place-items: center;
		width: 76px;
		height: 76px;
		border-radius: 50%;
		background: var(--c-gold);
		color: var(--c-black);
		translate: -50% -50%;
		transition: scale .3s var(--ease);

		svg { width: 30px; height: 30px; margin-left: 4px; }
		.video-facade:hover & { scale: 1.08; }
	}

	.hp-text__image--video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

	/* Text s obrázkem */
	.hp-text {
		position: relative;
		padding-block: var(--section-space);
		overflow: hidden;
	}

	.hp-text__bg {
		position: absolute;
		inset: 0;

		img, .hp-text__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

		iframe {
			position: absolute;
			top: 50%;
			left: 50%;
			width: max(100%, 177.78vh);
			height: max(100%, 56.25vw);
			border: 0;
			translate: -50% -50%;
			pointer-events: none;
		}

		&::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.35)); }
	}

	.hp-text__inner {
		position: relative;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
		gap: clamp(24px, 5vw, 64px);
		align-items: center;
	}

	.is-pozadi .hp-text__inner { min-height: 60vh; }
	.is-vlevo .hp-text__image { order: -1; }

	.hp-text__content {
		max-width: 680px;

		h2 { margin-bottom: 20px; font-size: clamp(32px, 4vw, 48px); text-transform: uppercase; }
	}

	.hp-text__actions { margin-top: clamp(28px, 3vw, 40px); }

	/* Podklad přes celou šířku (jako Výhody a přímý prodej) */
	.hp-text.is-boxed { background: var(--c-black); }

	/* Výhody a přímý prodej */
	.hp-model {
		padding-block: var(--section-space);
		background: var(--c-black);
		text-align: center;
	}

	.hp-model__benefits {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
		gap: 24px;
		margin-bottom: var(--section-space);
		padding: 0;
		list-style: none;

		img { width: 100%; max-width: 140px; height: 160px; margin-inline: auto; object-fit: contain; }
		span { visibility: hidden; position: absolute; }
	}

	.hp-model__intro {
		max-width: 820px;
		margin: 0 auto 40px;

		h2 { margin-bottom: 12px; font-size: clamp(22px, 2.8vw, 32px); text-transform: uppercase; }
		p { color: var(--c-muted); font-size: 18px; }
	}

	.hp-model__scheme img { width: 100%; max-width: 980px; margin-inline: auto; }

	.hp-model__steps {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
		max-width: 980px;
		margin: 24px auto 0;
		padding: 0;
		list-style: none;

		h3 { color: var(--c-gold); font-size: 20px; }
		p { color: var(--c-muted); }
	}

	/* Blog */
	.hp-blog { padding-block: var(--section-space); }
	.hp-blog__more { margin-top: 32px; text-align: center; }

	/* Výroba – výrobní proces */
	.hp-process { padding-block: var(--section-space); background: var(--c-bg); }

	/* Motto na střed, stejně jako úvod sekce Výhody a přímý prodej */
	.hp-process__header {
		max-width: 820px;
		margin: 0 auto clamp(32px, 4vw, 48px);
		text-align: center;

	}

	/* Motto ve velikosti nadpisu sekce, nadpis „Výroba“ jen pro čtečky */
	.hp-process__claim {
		font-size: clamp(22px, 2.8vw, 32px);
		font-weight: var(--fw-bold);
		line-height: 1.25;
		text-transform: uppercase;
		text-wrap: balance;

		p { display: inline; margin: 0; }
		p + p { color: var(--c-gold); }
		p + p::before { content: " "; }

	}

	.hp-process__body.is-enhanced {
		display: grid;
		grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
		gap: clamp(24px, 4vw, 56px);
		align-items: start;
	}

	.hp-process__nav {
		position: sticky;
		top: calc(var(--header-h) + 24px);
		display: grid;
		border-top: 1px solid var(--c-line);

		button {
			padding: 11px 0;
			border: 0;
			border-bottom: 1px solid var(--c-line);
			background: none;
			color: var(--c-muted);
			font-size: 16px;
			line-height: 1.3;
			text-align: left;
			transition: color .2s, padding .3s var(--ease);

			&:hover { color: var(--c-text); }

			&[aria-selected="true"] {
				padding-left: 14px;
				color: var(--c-text);
				font-weight: var(--fw-bold);
				box-shadow: inset 3px 0 0 var(--c-gold);
			}
		}
	}

	.hp-process__panels { display: grid; gap: var(--section-space); }
	.is-enhanced .hp-process__panels { gap: 0; }

	.hp-process__panel[hidden] { display: none; }
	.is-enhanced .hp-process__panel { animation: process-in .5s var(--ease); }

	@keyframes process-in {
		from { opacity: 0; translate: 0 12px; }
	}

	.hp-process__image {
		position: relative;
		margin: 0;
		overflow: hidden;

		img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

		figcaption {
			position: absolute;
			inset: auto 0 0;
			padding: 48px clamp(16px, 3vw, 32px) clamp(16px, 2.5vw, 28px);
			background: linear-gradient(transparent, rgb(0 0 0 / 0.8));
		}

		h3 { font-size: clamp(24px, 3vw, 40px); line-height: 1.1; text-transform: uppercase; }
	}

	.hp-process__texts {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
		gap: 24px clamp(20px, 3vw, 40px);
		padding-top: 28px;
		color: var(--c-muted);
		font-size: 15px;

		h4 { margin-bottom: 8px; color: var(--c-text); font-size: 17px; }
		p { margin-block: 0 10px; }
	}

	/* Ambasadoři */
	.hp-riders { padding-block: var(--section-space); overflow: hidden; }

	.hp-riders__controls { display: flex; gap: 8px; }

	.hp-riders__arrow {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 1px solid var(--c-line-strong);
		background: none;
		transition: background-color .2s, color .2s, opacity .2s;

		svg { width: 20px; height: 20px; }
		&:hover:not(:disabled) { background: var(--c-gold); color: var(--c-black); border-color: var(--c-gold); }
		&:disabled { opacity: .3; cursor: default; }
	}

	.hp-riders__list {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: calc((100% - 3 * 16px) / 4);
		gap: 16px;
		padding: 0;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		list-style: none;

		&::-webkit-scrollbar { display: none; }
		> li { scroll-snap-align: start; }
	}

	.hp-riders__card {
		position: relative;
		display: flex;
		align-items: flex-end;
		width: 100%;
		aspect-ratio: 3 / 4;
		padding: 20px;
		overflow: hidden;
		border: 0;
		background: var(--c-panel);
		text-align: left;

		img {
			position: absolute;
			inset: 0;
			width: 100%;
			height: 100%;
			object-fit: cover;
			filter: grayscale(1);
			transition: filter .4s, scale .8s var(--ease);
		}

		&::after {
			content: "";
			position: absolute;
			inset: 40% 0 0;
			background: linear-gradient(transparent, rgb(0 0 0 / 0.85));
		}

		&:hover, &:focus-visible {
			img { filter: none; scale: 1.04; }
			.hp-riders__plus { background: var(--c-gold); color: var(--c-black); rotate: 90deg; }
		}
	}

	.hp-riders__name {
		position: relative;
		z-index: 1;
		display: grid;
		gap: 2px;

		strong { font-size: 22px; line-height: 1.15; }
		span { color: var(--c-gold); font-size: 13px; font-weight: var(--fw-bold); letter-spacing: .12em; text-transform: uppercase; }
	}

	.hp-riders__plus {
		position: absolute;
		top: 16px;
		right: 16px;
		z-index: 1;
		display: grid;
		place-items: center;
		width: 36px;
		height: 36px;
		border: 1px solid rgb(255 255 255 / 0.5);
		font-size: 22px;
		line-height: 1;
		transition: background-color .3s, color .3s, rotate .3s var(--ease);
	}

	.hp-rider {
		width: min(960px, 100% - 2 * var(--gutter));
		max-height: min(720px, 100% - 2 * var(--gutter));
		margin: auto;
		padding: 0;
		border: 0;
		background: var(--c-panel);
		color: var(--c-text);

		&[open] { display: grid; grid-template-columns: 1fr 1fr; animation: rider-in .35s var(--ease); }
		&::backdrop { background: rgb(0 0 0 / 0.8); }
		&:focus { outline: none; }
	}

	@keyframes rider-in {
		from { opacity: 0; translate: 0 16px; }
	}

	.hp-rider__media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }

	.hp-rider__body {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: clamp(24px, 4vw, 48px);
		overflow-y: auto;

		h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; text-transform: uppercase; }
		.btn { margin-top: auto; }
	}

	.hp-rider__portrait {
		width: 120px;
		height: 120px;
		margin-bottom: 8px;
		border-radius: 50%;
		background: var(--c-panel-2);
		object-fit: cover;
	}

	.hp-rider__info {
		margin-block: 8px 24px;
		color: var(--c-muted);

		ul { padding: 0; list-style: none; }
		li { padding-block: 8px; border-bottom: 1px solid var(--c-line); }
		strong, b { color: var(--c-text); }
		a { color: var(--c-gold); }
	}

	.hp-rider__close {
		position: absolute;
		top: 12px;
		right: 12px;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: rgb(0 0 0 / 0.6);

		svg { width: 22px; height: 22px; }
		&:hover { background: var(--c-gold); color: var(--c-black); }
	}

	@media (max-width: 900px) {
		.hp-process__body.is-enhanced { grid-template-columns: minmax(0, 1fr); }

		.hp-process__nav {
			position: static;
			display: flex;
			gap: 8px;
			margin-inline: calc(-1 * var(--gutter));
			padding: 0 var(--gutter) 4px;
			overflow-x: auto;
			border: 0;
			scrollbar-width: none;

			button, button[aria-selected="true"] {
				flex: none;
				padding: 8px 14px;
				border: 1px solid var(--c-line-strong);
				box-shadow: none;
				white-space: nowrap;
			}

			button[aria-selected="true"] { border-color: var(--c-gold); background: var(--c-gold); color: var(--c-black); }
		}

		.hp-riders__list { grid-auto-columns: calc((100% - 16px) / 2.3); }
	}

	@media (max-width: 700px) {
		.hp-riders__list { grid-auto-columns: 72%; }
		.hp-riders__controls { display: none; }

		.hp-rider[open] { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
		.hp-rider__media img { min-height: 0; aspect-ratio: 4 / 3; }
		.hp-rider__body { overflow: visible; }
		.hp-rider__portrait { position: relative; z-index: 1; width: 88px; height: 88px; margin-top: -68px; border: 4px solid var(--c-panel); }
	}

	@media (prefers-reduced-motion: reduce) {
		.is-enhanced .hp-process__panel, .hp-rider[open] { animation: none; }
	}

	/* Akce */
	.hp-events {
		position: relative;
		display: grid;
		place-items: center;
		padding: var(--section-space) var(--gutter);
		overflow: hidden;
		text-align: center;
	}

	.hp-events__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); }

	.hp-events__content {
		position: relative;
		max-width: 640px;

		h2 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 56px); text-transform: uppercase; }
		.prose { margin-inline: auto; }
	}

	.hp-events__dates {
		width: 100%;
		margin-top: 24px;
		border-collapse: collapse;
		font-size: 18px;

		td { padding: 8px 12px; border-bottom: 1px solid var(--c-line); text-align: left; }
		td:first-child { color: var(--c-gold); font-weight: var(--fw-bold); white-space: nowrap; }
	}

	/* Kontakty */
	.hp-contacts {
		position: relative;
		padding-block: var(--section-space);
		overflow: hidden;
	}

	.hp-contacts__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.35); }

	.hp-contacts__inner {
		position: relative;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
		gap: 16px;
	}

	.hp-contacts__panel {
		padding: clamp(24px, 4vw, 40px);
		background: rgb(0 0 0 / 0.82);

		h2 { margin-bottom: 20px; font-size: 28px; text-transform: uppercase; }
	}

	.hp-contacts__text { font-size: 16px; columns: 2 220px; column-gap: 32px; > * { break-inside: avoid; } }

	.hp-content { padding-block: var(--section-space); h2 { margin-bottom: 20px; } }

	@media (max-width: 1000px) {
		.hp-products__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	}

	@media (max-width: 700px) {
		.hp-tiles { grid-template-columns: repeat(2, 1fr); }
		.hp-tiles__item { aspect-ratio: 3 / 4; }
		.hp-tiles__label span { display: none; }
		.hp-tiles__arrow { display: none; }
		.hp-model__benefits { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
		.hp-model__benefits img { height: 64px; }
		.hp-model__steps { gap: 10px; margin-top: 12px; }
		.hp-model__steps h3 { font-size: 14px; line-height: 1.25; }
		.hp-model__steps p { font-size: 12px; line-height: 1.35; }
		.hp-model__intro p { font-size: 16px; }
	}
}
