/* Hero — 100% da viewport, teto 850px */
.hero {
	--hero-max-h: 850px;
	--hero-h: min(100dvh, var(--hero-max-h));
	--hero-floor-h: 850px;
	position: relative;
	z-index: 9;
	padding-top: var(--hero-stack-h);
	height: var(--hero-h);
	min-height: var(--hero-h);
	max-height: var(--hero-max-h);
	background: var(--color-black);
	overflow: visible;
	max-width: 100%;
	box-sizing: border-box;
}

.hero img {
	user-select: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}

/* KV fixo — evita faixa vazia de background entre Home e Como Participar */
.hero:not(.hero--flow) .hero__media {
	position: absolute;
	top: var(--hero-stack-h);
	left: 0;
	right: 0;
	bottom: 0;
	height: auto;
	overflow: hidden;
	pointer-events: none;
}

.hero:not(.hero--flow) picture.hero__image--home,
.hero:not(.hero--flow) .hero__image--home {
	width: 100%;
	height: 100%;
	min-height: calc(var(--hero-h) - var(--hero-stack-h));
}

.hero:not(.hero--flow) picture.hero__image--home img,
.hero:not(.hero--flow) .hero__image--home img {
	width: 100%;
	height: 100%;
	max-width: none;
	min-height: calc(var(--hero-h) - var(--hero-stack-h));
	object-fit: cover;
	object-position: center top;
}

.hero:not(.hero--flow) .hero__image--cadastro {
	display: none !important;
}

.hero__media {
	position: relative;
	width: 100%;
	z-index: 0;
	line-height: 0;
}

picture.hero__image {
	display: block;
	width: 100%;
}

picture.hero__image img {
	display: block;
	width: 100%;
	max-width: 1920px;
}

.hero__image {
	width: 100%;
	height: auto;
}

.hero__overlay {
	position: absolute;
	top: var(--hero-stack-h);
	left: 0; right: 0;
	bottom: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(to left, rgba(8, 46, 53, 0.26) 0%, rgba(8, 46, 53, 0.08) 34%, transparent 58%);
}

/* Elementos decorativos — acima do background, abaixo do conteúdo */
.hero__elementos {
	display: none;
}

.hero__elemento {
	position: absolute;
	width: 14%!important;
	width: 250px;
	line-height: 0;
	z-index: 2;
}

.hero__elemento picture,
.hero__elemento img {
	display: block;
	width: 100%;
	height: auto;
}

.hero__elemento--1 img {
	animation: hero-elemento-spin 60s linear infinite;
}

.hero__elemento--2 img {
	animation: hero-elemento-spin 90s linear infinite;
}

.hero__elemento--hand img {
	animation: hero-elemento-pulse 1.4s ease-in-out infinite;
}

.hero__elemento--1 {
	top: calc(var(--hero-stack-h) + 1.2rem);
	right: -2rem;
}

.hero__elemento--2 {
	bottom: -2rem;
	left: 54%;
	transform: translateX(-50%);
}

.hero__elemento--hand {
	top: 61%;
	left: -2rem;
	width: 8% !important;
	max-width: 120px;
	transform: translateY(-50%);
}

@keyframes hero-elemento-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@keyframes hero-elemento-pulse {
	0%, 100% {
		transform: rotate(0deg) scale(1) translate(0, 0);
	}
	15% {
		transform: rotate(-4deg) scale(1.04) translate(-2px, 1px);
	}
	30% {
		transform: rotate(3deg) scale(1.08) translate(2px, -2px);
	}
	45% {
		transform: rotate(-3deg) scale(1.05) translate(-1px, 2px);
	}
	60% {
		transform: rotate(2deg) scale(1.1) translate(1px, -1px);
	}
	75% {
		transform: rotate(-1deg) scale(1.03) translate(-1px, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__elemento img,
	.hero__selo-img {
		animation: none;
	}
}

.hero__content {
	position: relative;
	top: auto;
	left: auto;
	right: auto;
	height: auto;
	min-height: calc(var(--hero-h) - var(--hero-stack-h));
	max-height: none;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(2.6rem, 5.85vw, 5.2rem);
	width: min(92%, 1560px);
	max-width: 1560px;
	margin: 0 auto;
	padding: clamp(1.2rem, 3vh, 2.4rem) clamp(2rem, 5vw, 5rem);
	box-sizing: border-box;
	pointer-events: none;
	overflow: visible;
}

/* Selo à esquerda — centrado no eixo Y, largura máx. = tamanho natural da imagem */
.hero__selo {
	position: relative;
	flex: 0 1 auto;
	align-self: center;
	width: auto;
	max-width: 600px;
	margin: 0;
	pointer-events: none;
	line-height: 0;
	z-index: 3;
}

.hero__selo picture {
	display: block;
	width: auto;
	max-width: 100%;
}

.hero__selo-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	transform-origin: center center;
}

.hero.hero--flow .hero__selo {
	display: none;
}

.hero--flow .hero__image--home { display: none !important; }
.hero--flow .hero__image--cadastro:not([hidden]) { display: block !important; }

.hero__logged-box,
.hero__logged-wrap {
	width: min(100%, 370px);
	margin: 0;
	pointer-events: auto;
}

.hero__hub {
	flex: 0 0 auto;
	width: min(100%, 370px);
	margin: 0;
	pointer-events: auto;
}

.hero__cpf-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.hero__cpf-form .form-control {
	min-height: 52px;
	padding: 1.2rem 1.5rem;
	background: rgba(255, 255, 255, 0.97);
	border: 1px solid rgba(206, 27, 130, 0.28);
	border-radius: 0.5rem;
	font-size: 1.45rem;
	color: var(--color-text-dark);
}

.hero__cpf-form .form-control:focus {
	border-color: rgba(206, 27, 130, 0.28);
	box-shadow: none;
	outline: none;
	color: var(--color-text-dark);
	caret-color: var(--color-text-dark);
}

.hero__cpf-form .btn-primary {
	margin-top: 0;
}

.hero__cpf-hint {
	margin-top: var(--space-2);
	font-size: 1.15rem;
	color: var(--color-text-soft);
	line-height: 1.45;
}

.hero__logged-title {
	font-family: var(--font-heading);
	font-size: clamp(2.2rem, 4vw, 3rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 var(--space-2);
	color: var(--color-primary-dark);
}

.hero__logged-lead {
	margin: 0 0 var(--space-4);
	font-size: 1.45rem;
	color: var(--color-gray-dark);
}

.hero__logged-actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.hero__logged-actions .btn-secondary {
	--bs-btn-color: var(--color-primary-dark);
	--bs-btn-hover-color: var(--color-primary-dark);
	--bs-btn-active-color: var(--color-primary-dark);
	--bs-btn-disabled-color: rgba(50, 28, 72, 0.45);
	color: var(--color-primary-dark);
}

.hero__logged-actions .btn-secondary:hover:not(:disabled),
.hero__logged-actions .btn-secondary:focus-visible:not(:disabled) {
	color: var(--color-primary-dark);
}

@media (min-width: 992px) {
	.hero__content {
		justify-content: space-evenly;
		gap: clamp(2.6rem, 5.85vw, 5.2rem);
	}

	.hero__selo {
		max-width: min(42vw, 600px);
	}
}

@media (min-width: 992px) and (max-width: 1400px) {
	.hero__selo {
		max-width: min(38vw, 520px);
	}
}

@media (max-width: 991px) {
	.hero:not(.hero--flow):not(.hero--hub-collapsed) {
		display: flex;
		flex-direction: column;
	}

	.hero__content {
		align-items: center;
		justify-content: flex-start;
		flex-direction: column;
		padding-top: var(--space-3);
		gap: var(--space-3);
		width: 100%;
		max-width: none;
		flex: 1 1 auto;
	}

	.hero__selo {
		position: relative;
		order: 0;
		margin: 0 auto;
		width: auto;
		max-width: min(78vw, 360px);
	}

	.hero__logged-wrap,
	.hero__logged-box,
	.hero__vitrine-box {
		margin: 0 auto;
	}

	.hero__elementos {
		display: none;
	}

	/* Desktop cover não se aplica ao KV mobile em fluxo natural */
	.hero:not(.hero--flow):not(.hero--hub-collapsed) .hero__image--home {
		object-fit: cover;
		min-height: 100%;
	}
}

/*
 * Fluxo cadastro/login — libera o teto de 850px para o formulário crescer.
 */
.hero.hero--flow,
.hero.hero--logged {
	height: auto;
	min-height: var(--hero-h);
	max-height: none;
}

/* Outback phase-1 overrides */
body {
	background: var(--gradient-page);
	color: var(--color-text);
}

.outback-logo-wordmark {
	font-family: var(--font-heading);
	letter-spacing: 0.08em;
	font-size: 1.45rem;
	text-transform: uppercase;
	color: var(--color-outback-cream);
}

.hero__planes {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.hero__plane {
	position: absolute;
	opacity: 0.85;
	filter: drop-shadow(0 12px 36px rgba(167, 217, 255, 0.35));
}

.hero__plane--left {
	width: clamp(240px, 34vw, 620px);
	left: clamp(-120px, -5vw, -40px);
	top: clamp(140px, 22vw, 320px);
}

.hero__plane--right {
	width: clamp(220px, 28vw, 560px);
	right: clamp(-120px, -3vw, -24px);
	top: clamp(110px, 16vw, 240px);
	transform: scaleX(-1) rotate(-14deg);
}

.hero__overlay {
	background: transparent;
}

.hero__image--home img,
.hero__image--cadastro img {
	object-position: center top;
}

@media (min-width: 992px) {
	/* Desktop — KV oficial Outbac-K */
	.hero:not(.hero--flow) {
		background-color: #2f1347;
		background-image: url("../assets/outback/bkg/bkg1.webp");
		background-position: center top;
		background-size: cover;
		background-repeat: no-repeat;
	}

	.hero:not(.hero--flow) .hero__media {
		top: 0;
		bottom: 0;
	}

	.hero:not(.hero--flow) picture.hero__image--home,
	.hero:not(.hero--flow) .hero__image--home,
	.hero:not(.hero--flow) picture.hero__image--home img,
	.hero:not(.hero--flow) .hero__image--home img {
		min-height: 100%;
		height: 100%;
		max-width: none;
	}
}

.hero__hub {
	max-width: 390px;
	margin: 0;
}

.outback-script {
	font-family: var(--font-script);
	font-weight: 400;
	font-style: normal;
}

@media (max-width: 991px) {
	.hero__selo,
	.hero__hub {
		margin-inline: auto;
	}

	.hero__selo {
		max-width: min(78vw, 300px);
	}

	.hero__hub {
		width: min(420px, 100%);
	}

	.hero__plane--left {
		width: clamp(160px, 52vw, 260px);
		left: -68px;
		top: 160px;
		opacity: 0.72;
	}

	.hero__plane--right {
		width: clamp(170px, 50vw, 260px);
		right: -74px;
		top: 240px;
		opacity: 0.72;
	}
}