/*-----------------------------------------------------------------------------------

	Klient:			T&F Autoservis, Velvary
	Tier:			T1 Prezentační web
	Postavil:		Riverlab (riverlab.cz)
	Verze:			0.1 (koncept)
	Dodáno:			Listopad 2026

-----------------------------------------------------------------------------------

	OBSAH

	01. Úvod: fasáda, štít a vrata dílny
	02. Pás se službami

	Vrstvy odzadu: fotka dílny (v otvoru, css/vrata.css), vrata, fasáda s textem, nápis štítu.
	Otvor je výřez (clip-path) přes celou scénu, jeho horní hranu dopočítá main.js
	pod text (proměnná --otvor-t), CSS má rozumnou výchozí hodnotu.
	Pohyb (třída .pohyb na <html>, jen bez prefers-reduced-motion) přidává výšku
	pro posun a zavírá vrata, animaci řídí animace.js.

-----------------------------------------------------------------------------------*/


/*-----------------------------------------------------------------------------------
	ZAČÁTEK: 01. Úvod
-----------------------------------------------------------------------------------*/

.hero {
	--otvor-t: 64%;
	--otvor-x: var(--gutter);
	--otvor-l: var(--gutter);
	position: relative;
	background: var(--color-accent);
	color: var(--color-on-accent);
}

.pohyb .hero {
	height: 230svh;
}

.hero__scena {
	position: relative;
	height: 100svh;
	min-height: 36rem;
	overflow: hidden;
}

.pohyb .hero__scena {
	position: sticky;
	top: 0;
}

.hero__fasada {
	position: relative;
	z-index: 2;
	height: 100%;
	padding: calc(var(--header-h) + 0.25rem) var(--gutter) 0;
	pointer-events: none;
}

.hero__fasada a {
	pointer-events: auto;
}

.hero__nadpis {
	font-weight: 800;
	text-transform: uppercase;
}

/* Nápis jako na štítu dílny, přes celou šířku. 6,01 em je šířka „AUTOSERVIS T&F“ v tomto písmu, po rozdělení na písmena (bez vyrovnání párů) 6,03 em (změřeno v prohlížeči). */
.hero__stit {
	display: block;
	width: fit-content;
	font-size: calc((100vw - 2 * var(--gutter)) / 6.04);
	font-weight: 900;
	line-height: 0.8;
	white-space: nowrap;
	letter-spacing: -0.005em;
	will-change: transform;
}

.hero__podtitul {
	display: block;
	max-width: 34rem;
	margin-top: clamp(1rem, 3svh, 2rem);
	font-size: clamp(2rem, 1.5rem + 2.6vw, 4rem);
}

.hero__text {
	max-width: 34rem;
}

.hero__perex {
	margin-top: 1rem;
	max-width: 30rem;
	font-size: var(--step-1);
	line-height: 1.4;
}

/* Písmena štítu rozdělí animace.js kvůli vstupu, jinak je štít obyčejný text. */
.hero__stit .pismeno {
	display: inline-block;
}

.hero__akce {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-top: 1.5rem;
}

.hero__doba {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.875rem;
	margin-top: 1rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Jestli je teď otevřeno: tečka a text, doplní main.js podle tabulky v Kontaktu. */
.stav {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.75rem 0.25rem 0.625rem;
	background: rgb(0 0 0 / 0.2);
	border-radius: 999px;
}

.stav[hidden] {
	display: none;
}

.stav__tecka {
	position: relative;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--c-grafit-300);
	border-radius: 50%;
}

.stav.je-otevreno .stav__tecka {
	background: var(--c-zelena);
}

.stav.je-otevreno .stav__tecka::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--c-zelena);
	animation: tepe 2.4s var(--ease-out) infinite;
}

@keyframes tepe {
	0% { transform: scale(1); opacity: 0.7; }
	70%, 100% { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.stav.je-otevreno .stav__tecka::after {
		animation: none;
	}
}


/* Desktop: text vlevo, vrata vpravo pod štítem. */
@media (min-width: 64rem) {
	.hero {
		--otvor-t: 31%;
		--otvor-l: 50%;
	}

	/* Text pod štítem o 20 px odsazený a větší, víc dole. */
	.hero__podtitul,
	.hero__text {
		max-width: min(44%, 42rem);
		margin-left: 1.25rem;
	}

	.hero__podtitul {
		margin-top: calc(clamp(2.5rem, 9svh, 5.5rem) - 15px);
		font-size: clamp(3rem, 1rem + 3.6vw, 5rem);
	}

	.hero__perex {
		max-width: 34rem;
		margin-top: 1.25rem;
		font-size: clamp(1.5rem, 1rem + 0.8vw, 2rem);
	}

	.hero__akce {
		margin-top: 2rem;
		gap: 0.75rem 1rem;
	}

	.hero__akce .tlacitko {
		min-height: 4.75rem;
		padding-inline: 1.75rem;
		font-size: 1.125rem;
	}

	.hero__akce .tlacitko:has(.tlacitko__ikona) {
		padding-left: 1.25rem;
	}

	.hero__akce .tlacitko__popis {
		font-size: 1rem;
	}

	.hero__akce .tlacitko__cislo {
		font-size: 2.25rem;
	}

	.hero__doba {
		margin-top: 1.25rem;
		font-size: 1.125rem;
	}
}

/*-----------------------------------------------------------------------------------
	KONEC: 01. Úvod
-----------------------------------------------------------------------------------*/


/*-----------------------------------------------------------------------------------
	ZAČÁTEK: 02. Pás se službami
-----------------------------------------------------------------------------------*/

/* Bez pohybu stojí, s pohybem ho animace.js posouvá do strany (obsah zdvojí, ať navazuje). */
.pas {
	overflow: hidden;
	background: var(--color-dark);
	color: var(--color-on-dark);
}

.pas__rada {
	display: flex;
	width: max-content;
	padding-block: 1.25rem;
	font-family: var(--font-display);
	font-size: var(--step-2);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.pas__rada span {
	display: inline-flex;
	align-items: center;
	gap: 2rem;
	padding-right: 2rem;
}

.pas__rada span::after {
	content: "";
	width: 0.625rem;
	height: 0.625rem;
	background: var(--color-accent);
	rotate: 45deg;
}

/*-----------------------------------------------------------------------------------
	KONEC: 02. Pás se službami
-----------------------------------------------------------------------------------*/
