/**
 * Hero em vídeo (home e Soluções Industriais): vídeo de fundo, gradiente de contraste, mensagem e botões.
 * Tokens, botões (.sto-btn) e container vêm de sections.css. Mobile first.
 */

/* ---------- Hero ---------- */

/* Ocupa a tela até o final, descontando o header (ajuste --sto-header-h se a altura mudar). */
.sto-hero {
	--sto-header-h: 83px;

	position: relative;
	width: 100%;
	height: calc(100vh - var(--sto-header-h));
	height: calc(100svh - var(--sto-header-h));
	min-height: 440px;
	overflow: hidden;
	/* Visual alternativo enquanto o vídeo não carrega ou se ele falhar. */
	background: linear-gradient(160deg, var(--sto-color-brown) 0%, var(--sto-color-ink) 100%);
}

/* Header flutuante fica sobre o banner: o vídeo ocupa a tela inteira. */
.sto-header--floating .sto-hero {
	height: 100vh;
	height: 100svh;
}

.sto-hero__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Contraste do texto: gradiente só na base (e na lateral esquerda no desktop), onde a mensagem fica. */
.sto-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(32, 20, 13, 0.82) 0%, rgba(32, 20, 13, 0.5) 40%, rgba(32, 20, 13, 0) 72%);
	pointer-events: none;
}

/* Fim do vídeo se funde ao fundo creme da seção seguinte (abaixo do texto e dos botões). */
.sto-hero::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	height: clamp(48px, 7vh, 80px);
	/* Curva suave (smoothstep) em vez de rampa linear, para não marcar a borda. */
	background: linear-gradient(
		to bottom,
		rgba(247, 243, 236, 0) 0%,
		rgba(247, 243, 236, 0.1) 20%,
		rgba(247, 243, 236, 0.35) 40%,
		rgba(247, 243, 236, 0.65) 60%,
		rgba(247, 243, 236, 0.9) 80%,
		var(--sto-color-cream) 100%
	);
	pointer-events: none;
}

.sto-hero__content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	padding: 0 var(--sto-gutter) 104px;
	font-family: var(--sto-font-heading, "Dosis", sans-serif);
	pointer-events: none;
}

.sto-hero__inner {
	width: 100%;
	max-width: var(--sto-container);
	margin: 0 auto;
}

.sto-hero__sentence {
	display: inline-block;
}

.sto-hero__headline {
	max-width: 14em;
	margin: 0;
	font-family: var(--sto-font-heading, "Dosis", sans-serif);
	font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.05;
	color: #fff;
	text-wrap: balance;
}

.sto-hero__text {
	max-width: 34em;
	margin: 16px 0 0;
	font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
	font-weight: 500;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.94);
}

.sto-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
	pointer-events: auto;
}

.sto-hero__toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sto-hero__toggle:hover {
	background: rgba(0, 0, 0, 0.8);
}

.sto-hero__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Ícone de pausa (duas barras) e de play (triângulo). */
.sto-hero__toggle-icon {
	display: block;
	width: 12px;
	height: 14px;
	border-left: 4px solid currentColor;
	border-right: 4px solid currentColor;
	box-sizing: border-box;
}

.sto-hero__toggle[aria-pressed="true"] .sto-hero__toggle-icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent currentColor;
}

@media (min-width: 768px) {
	.sto-hero::before {
		background:
			linear-gradient(to top, rgba(32, 20, 13, 0.78) 0%, rgba(32, 20, 13, 0.3) 45%, rgba(32, 20, 13, 0) 70%),
			linear-gradient(to right, rgba(32, 20, 13, 0.45) 0%, rgba(32, 20, 13, 0) 60%);
	}

	.sto-hero__content {
		padding-bottom: 136px;
	}

	.sto-hero__toggle {
		right: 24px;
		bottom: 24px;
	}
}

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