/* Animação da home: do caos à escolha. Sem imagens nem vídeo; tamanhos em cqw (acompanham a largura). */
.ofn-home {
	--ofn-h-marca: #d63500;
	--ofn-h-escuro: #0b2a3a;
	position: relative;
	container-type: inline-size;
	width: 100%; max-width: 960px; margin: 0 auto;
	aspect-ratio: 16 / 7;
	overflow: hidden; border-radius: 16px;
	background: #f4f9fb; color: var(--ofn-h-escuro);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
	isolation: isolate;
}
@media (max-width: 600px) { .ofn-home { aspect-ratio: 4 / 5; } }

.ofn-home-barras { position: absolute; inset: 10px 14px auto; z-index: 5; display: flex; gap: 4px; }
.ofn-home-barras i { flex: 1; height: 3px; border-radius: 2px; background: rgba(11, 42, 58, .15); overflow: hidden; }
.ofn-home-barras i::after { content: ""; display: block; height: 100%; width: 0; background: var(--ofn-h-marca); }
.ofn-home-barras i.feita::after { width: 100%; }
.ofn-home-barras i.agora::after { width: 100%; transition: width var(--dur, 3s) linear; }

.ofn-h-controle {
	position: absolute; right: 12px; bottom: 10px; z-index: 6;
	width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: rgba(11, 42, 58, .12); color: var(--ofn-h-escuro); cursor: pointer; font-size: 12px;
}
.ofn-h-controle:hover, .ofn-h-controle:focus-visible { background: rgba(11, 42, 58, .25); }

.ofn-h-cena {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqw;
	padding: 4cqw; text-align: center;
	opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s;
}
.ofn-h-cena.ativa { opacity: 1; visibility: visible; }

@keyframes ofn-h-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ofn-h-pop { 0% { opacity: 0; transform: scale(.85); } 70% { transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
.ofn-h-cena.ativa > *, .ofn-h-cena.ativa li, .ofn-h-cena.ativa .ofn-h-oferta > * { animation: ofn-h-entra .55s ease-out both; }

/* ---- Cena 1: cartões soltos, bagunçados ---- */
.ofn-h-nuvem { position: absolute; inset: 0; }
.ofn-h-nuvem b {
	position: absolute; left: var(--x); top: var(--y);
	width: 11cqw; height: 13cqw; border-radius: 8px; background: #fff;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
	transform: rotate(var(--r)); opacity: 0;
}
.ofn-h-nuvem b::before { content: ""; position: absolute; inset: 10% 14% 46%; border-radius: 5px; background: #d9e4ea; }
.ofn-h-nuvem b::after { content: ""; position: absolute; left: 14%; right: 38%; bottom: 14%; height: 8%; border-radius: 3px; background: #c4d0d8; box-shadow: 0 -2.2cqw 0 #d9e4ea; }
.ofn-h-c1.ativa .ofn-h-nuvem { animation: none; }
.ofn-h-c1.ativa .ofn-h-nuvem b { animation: ofn-h-cai .7s var(--d) ease-out forwards, ofn-h-bale 2.4s calc(.7s + var(--d)) ease-in-out infinite alternate; }
@keyframes ofn-h-cai { from { opacity: 0; transform: translateY(-30px) rotate(calc(var(--r) * 2)); } to { opacity: .9; transform: rotate(var(--r)); } }
@keyframes ofn-h-bale { to { transform: translate(1.2cqw, -1cqw) rotate(calc(var(--r) * -.6)); } }
.ofn-h-frase { position: relative; margin: 0; display: flex; flex-direction: column; gap: .4cqw; font-size: 5.4cqw; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.ofn-h-c1 .ofn-h-frase { padding: 2cqw 4cqw; border-radius: 14px; background: rgba(244, 249, 251, .88); }
.ofn-h-forte { color: var(--ofn-h-marca); }
.ofn-h-c1.ativa .ofn-h-frase span:nth-child(2), .ofn-h-c5.ativa .ofn-h-frase span:nth-child(2) { animation: ofn-h-entra .55s .7s ease-out both; }
.ofn-h-c1 .ofn-h-frase span:nth-child(2), .ofn-h-c5 .ofn-h-frase span:nth-child(2) { opacity: 0; }

/* ---- Passos: título com número ---- */
.ofn-h-passo { margin: 0; display: flex; align-items: center; gap: 1.6cqw; font-size: 4cqw; font-weight: 800; letter-spacing: -.01em; }
.ofn-h-passo em {
	display: grid; place-items: center; width: 6.4cqw; height: 6.4cqw; border-radius: 50%;
	background: var(--ofn-h-marca); color: #fff; font-style: normal; font-size: 3.6cqw;
}

/* ---- Cena 2: tipos ---- */
.ofn-h-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4cqw; margin: 0; padding: 0; list-style: none; }
.ofn-h-chips li { padding: .9cqw 2.4cqw; border-radius: 99px; background: #fff; border: 1px solid rgba(11, 42, 58, .2); font-size: 2.5cqw; font-weight: 600; }
.ofn-h-c2.ativa .ofn-h-chips li:nth-child(1) { animation-delay: .25s; } .ofn-h-c2.ativa .ofn-h-chips li:nth-child(2) { animation-delay: .35s; }
.ofn-h-c2.ativa .ofn-h-chips li:nth-child(4) { animation-delay: .55s; } .ofn-h-c2.ativa .ofn-h-chips li:nth-child(5) { animation-delay: .65s; }
.ofn-h-c2.ativa .ofn-h-chips li.sel { animation: ofn-h-entra .55s .45s ease-out both, ofn-h-escolhe .5s 1.2s ease-out forwards; }
@keyframes ofn-h-escolhe { to { background: var(--ofn-h-marca); color: #fff; border-color: var(--ofn-h-marca); transform: scale(1.12); opacity: 1; } }

/* ---- Cena 3: tabela ---- */
.ofn-h-tab { border-collapse: separate; border-spacing: 0; font-size: 2.5cqw; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 14px rgba(0, 0, 0, .1); }
.ofn-h-tab th, .ofn-h-tab td { padding: 1.1cqw 2.6cqw; border-bottom: 1px solid #e5eaee; }
.ofn-h-tab thead th { background: var(--ofn-h-escuro); color: #fff; }
.ofn-h-tab tbody th { text-align: left; background: #f4f9fb; }
.ofn-h-tab tr:last-child > * { border-bottom: 0; }
.ofn-h-tab td.top { font-weight: 800; }
.ofn-h-c3.ativa .ofn-h-tab td.top { animation: ofn-h-melhor .5s 1.3s ease-out forwards; }
@keyframes ofn-h-melhor { to { background: #dff5e3; color: #14692c; } }

/* ---- Cena 4: oferta ---- */
.ofn-h-oferta { display: flex; flex-direction: column; align-items: center; gap: .8cqw; padding: 2.6cqw 5cqw; border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .12); }
.ofn-h-oferta .ofn-h-nome { font-size: 2.4cqw; font-weight: 600; }
.ofn-h-preco { font-size: 6cqw; line-height: 1; letter-spacing: -.02em; }
.ofn-h-data { font-size: 2.1cqw; color: #5b6b76; }
.ofn-h-botao, .ofn-h-cta { display: inline-block; margin-top: 1cqw; padding: 1.1cqw 3.4cqw; border-radius: 99px; background: var(--ofn-h-marca); color: #fff; font-size: 2.6cqw; font-weight: 700; text-decoration: none; }
.ofn-h-c4.ativa .ofn-h-oferta > :nth-child(1) { animation-delay: .2s; } .ofn-h-c4.ativa .ofn-h-oferta > :nth-child(2) { animation-delay: .5s; }
.ofn-h-c4.ativa .ofn-h-oferta > :nth-child(3) { animation-delay: .9s; } .ofn-h-c4.ativa .ofn-h-oferta > :nth-child(4) { animation: ofn-h-pop .5s 1.3s ease-out both; }

/* ---- Cena 5: fecho ---- */
.ofn-h-c5 .ofn-h-frase { font-size: 6cqw; }
.ofn-h-c5.ativa .ofn-h-cta { animation: ofn-h-pop .5s 1.3s ease-out both; }
.ofn-h-cta:hover, .ofn-h-cta:focus-visible { background: #b22c00; }

/* Pausada fora da tela: congela as animações. */
.ofn-home.pausada .ofn-h-cena * { animation-play-state: paused !important; }

/* Quem prefere menos movimento: sem animação, só a cena final com a chamada. */
@media (prefers-reduced-motion: reduce) {
	.ofn-home { aspect-ratio: auto; min-height: 36cqw; }
	.ofn-h-cena, .ofn-h-cena * { animation: none !important; transition: none !important; }
	.ofn-h-cena { position: static; display: none; }
	.ofn-h-c5 { display: flex; opacity: 1; visibility: visible; }
	.ofn-h-c5 .ofn-h-frase span, .ofn-h-c5 .ofn-h-cta { opacity: 1 !important; }
	.ofn-home-barras, .ofn-h-controle { display: none; }
}
