/* Âncora do menu Início: o topo da home já fica sob o header fixo. */
#inicio {
	scroll-margin-top: 0;
}

/* Hero — 100% da viewport, teto 850px (950px no desktop) */
.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(100%, 1820px);
	max-width: 1820px;
	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,
.hero.hero--flow .hero__art {
	display: none;
}

/* KV composto, conforme s-hero1_d (1920×850): fundo decorativo + foto (direita) + selo (sup. esq.) + prêmios (inf. esq.) */
.hero__art {
	position: absolute;
	top: var(--hero-stack-h);
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	pointer-events: none;
	overflow: hidden;
}

.hero__art-stage {
	position: absolute;
	inset: 0;
}

.hero__art-selo-frame {
	display: contents;
}

.hero__art-stage img {
	position: absolute;
	display: block;
	max-width: none;
	height: auto;
}

/* Foto KV (garrafas + festa) ancorada no canto inferior direito */
.hero__art-kv {
	right: clamp(0px, 6vw, 110px);
	bottom: 0;
	left: auto;
	top: auto;
	width: clamp(560px, 58vw, 1180px);
	z-index: 1;
}

/* Selo no topo-esquerda */
.hero__art-selo {
	left: clamp(1.5rem, 5.5vw, 7rem);
	top: 9%;
	right: auto;
	bottom: auto;
	width: clamp(260px, 29vw, 560px);
	z-index: 3;
}

/* Prêmios logo abaixo do selo, deslocados à direita para não cobrir o selo e ocupar o vão central */
.hero__art-premios {
	left: clamp(3rem, 9vw, 12rem);
	top: 62%;
	right: auto;
	bottom: auto;
	width: clamp(220px, 24vw, 470px);
	z-index: 3;
}

.chuvadeprata-scroll-ready .hero__art.chuvadeprata-scroll-reveal,
.chuvadeprata-scroll-ready .hero__art.chuvadeprata-scroll-reveal.is-in-view,
.chuvadeprata-scroll-ready .hero__art-selo,
.chuvadeprata-scroll-ready .hero__art-selo[data-chuvadeprata-parallax] {
	transform: none;
	filter: none;
	opacity: 1;
	will-change: auto;
}

.hero__art-concorra {
	left: 77.53%;
	top: 3.76%;
	width: 20.83%;
}

.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(253, 223, 113, 0.28);
	border-radius: 0.5rem;
	font-size: 1.45rem;
	color: var(--color-text-dark);
}

.hero__cpf-form .form-control:focus {
	border-color: rgba(253, 223, 113, 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:not(.hero--flow) .hero__content {
		justify-content: flex-end;
		align-items: center;
	}

	.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__art {
		position: relative;
		top: auto;
		right: auto;
		bottom: auto;
		order: 0;
		width: 100%;
		height: auto;
		container-type: normal;
		overflow: visible;
		padding-top: 0;
		padding-bottom: 3rem;
	}

	/* "Sorteio em" recolhido fica fixo logo abaixo do header: a arte desce para não ficar por baixo dele */
	body:has(wc-countdown-sorteio.is-after-header.is-visible.is-collapsed) .hero:not(.hero--flow) .hero__art {
		padding-top: 3.8rem;
	}

	.hero__art-stage {
		position: relative;
		inset: auto;
		left: auto;
		top: auto;
		translate: none;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		height: auto;
		aspect-ratio: auto;
		gap: 1.6rem;
		padding-left: 0;
	}

	.hero__art-stage img {
		position: relative;
		left: auto;
		top: auto;
	}

	.hero__art-kv {
		order: 3;
		width: min(100%, 520px);
		max-width: 100%;
		right: clamp(0px, 6vw, 0px);
	}

	.hero__art-stage .hero__art-kv.desktop {
		display: none;
	}

	.hero__art-stage .hero__art-kv.mobile {
		display: block;
	}

	.hero__art-concorra {
		order: -1;
		width: min(86vw, 340px);
		margin-top: 0;
	}

	.hero__art-selo {
		position: relative;
		order: 1;
		top: auto;
		right: auto;
		left: auto;
		bottom: auto;
		width: min(92%, 520px);
		height: auto;
		max-width: none;
		margin-inline: auto;
		align-self: center;
		aspect-ratio: 1000 / 748;
		object-fit: contain;
	}

	.hero__art-premios {
		position: relative;
		order: 2;
		left: auto;
		right: auto;
		top: auto;
		width: min(88vw, 420px);
		max-width: none;
		height: auto;
		margin-top: 0;
		aspect-ratio: 500 / 298;
		object-fit: contain;
	}

	.hero:not(.hero--flow):not(.hero--hub-collapsed):not(.hero--logged) {
		height: auto;
		max-height: none;
	}

	.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;
}

/* Chuva de Prata phase-1 overrides */
body {
	background: var(--gradient-page);
	color: var(--color-text);
}

.chuvadeprata-logo-wordmark {
	font-family: var(--font-heading);
	letter-spacing: 0.08em;
	font-size: 1.45rem;
	text-transform: uppercase;
	color: var(--color-chuvadeprata-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(136, 105, 36, 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) {
	/* Home (logado e deslogado): a sessão não passa de 950px. Cadastro, login e mobile seguem as regras atuais. */
	.hero {
		--hero-max-h: 950px;
	}

	.hero:not(.hero--flow):not(.hero--logged) {
		height: min(100dvh, 950px);
		min-height: min(100dvh, 950px);
		max-height: 950px;
		overflow: hidden;
	}

	.hero.hero--logged:not(.hero--flow) {
		min-height: min(100dvh, 950px);
		max-height: 950px;
	}

	/* Desktop — KV oficial Chuva de Prata */
	.hero:not(.hero--flow) {
		background-color: #e9d2b1;
		background-image: url("../assets/chuvadeprata/s-hero/s-heroBackground_d.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;
}

.chuva-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;
	}
}