/**
 * Vende+ Landing — CSS de componentes.
 *
 * Regra do projeto: nenhuma cor/fonte/medida hardcoded — tudo referencia
 * os presets do theme.json (var(--wp--preset--*) e var(--wp--custom--*)).
 * Exceções pontuais: transparências derivadas via color-mix() sobre os
 * próprios tokens.
 */

html {
	scroll-behavior: smooth;
}

/* =============================================================
   Helpers tipográficos
   ============================================================= */

.vm-eyebrow {
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
}

.vm-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--2-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--tag);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--night);
	border-radius: var(--wp--custom--radius--sm);
	padding: 4px 12px;
}

.vm-text-soft {
	opacity: 0.72;
}

.vm-text-softer {
	opacity: 0.55;
}

/* =============================================================
   Botões
   ============================================================= */

.wp-block-button__link {
	transition: transform 0.15s ease, background-color 0.15s ease,
		box-shadow 0.15s ease;
}

/* Sombra laranja do CTA principal */
.vm-btn-brand .wp-block-button__link {
	box-shadow: 0 8px 20px -8px
		color-mix(in srgb, var(--wp--preset--color--brand) 60%, transparent);
}

.vm-btn-brand .wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* Variante ghost sobre fundo escuro */
.vm-btn-ghost-light .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--canvas);
	border: 1px solid
		color-mix(in srgb, var(--wp--preset--color--canvas) 30%, transparent);
	box-shadow: none;
}

.vm-btn-ghost-light .wp-block-button__link:hover {
	background: color-mix(
		in srgb,
		var(--wp--preset--color--canvas) 10%,
		transparent
	);
	color: var(--wp--preset--color--canvas);
}

/* Botão do formulário (fora do core/button) */
.vm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1;
	color: var(--wp--preset--color--night);
	background: var(--wp--preset--color--brand);
	border: 0;
	border-radius: var(--wp--custom--radius--lg);
	padding: 18px 28px;
	cursor: pointer;
	box-shadow: 0 8px 20px -8px
		color-mix(in srgb, var(--wp--preset--color--brand) 60%, transparent);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.vm-btn:hover {
	background: var(--wp--preset--color--brand-deep);
	transform: translateY(-1px);
}

.vm-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.vm-btn--full {
	width: 100%;
}

/* =============================================================
   Reveal-gate — oferta só aparece após o pitch da VSL
   ============================================================= */

body:not(.vm-offer-revealed) .vm-reveal-gate {
	display: none;
}

/* =============================================================
   Hero
   ============================================================= */

.vm-hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Largura da caixa do vídeo no hero: 820px antes da oferta, 1100px depois
   (vídeo + formulário lado a lado). O !important é necessário porque o
   WordPress gera uma regra própria de layout para .alignwide (1200px)
   que venceria esta por especificidade. */
.vm-hero__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: center;
	width: 100%;
	max-width: 820px !important;
	margin-inline: auto;
	transition: max-width 1.1s var(--wp--custom--easing--reveal);
}

body.vm-offer-revealed .vm-hero__grid {
	max-width: 1100px !important;
}

@media (min-width: 1024px) {
	body.vm-offer-revealed .vm-hero__grid {
		grid-template-columns: 1.2fr 0.8fr;
	}
}

.vm-hero__offer {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--night-soft);
	border: 1px solid transparent;
	max-height: 0;
	opacity: 0;
	transform: translateY(24px);
	pointer-events: none;
	transition: all 1.1s var(--wp--custom--easing--reveal);
}

body.vm-offer-revealed .vm-hero__offer {
	max-height: 680px;
	opacity: 1;
	transform: none;
	pointer-events: auto;
	border-color: var(--wp--preset--color--night-line);
}

.vm-hero__offer > .vm-hero__offer-inner {
	padding: var(--wp--preset--spacing--50);
	opacity: 0;
	transition: opacity 0.9s ease 0.4s;
}

body.vm-offer-revealed .vm-hero__offer > .vm-hero__offer-inner {
	opacity: 1;
}

/* Quem já liberou a oferta em visita anterior não vê a animação de novo */
body.vm-reveal-instant .vm-hero__grid,
body.vm-reveal-instant .vm-hero__offer,
body.vm-reveal-instant .vm-hero__offer > .vm-hero__offer-inner {
	transition: none;
}

/* No editor não existe body.vm-offer-revealed — mostra o painel da oferta */
.editor-styles-wrapper .vm-reveal-gate {
	display: block;
}

.editor-styles-wrapper .vm-hero__offer {
	max-height: none;
	opacity: 1;
	transform: none;
	pointer-events: auto;
	border-color: var(--wp--preset--color--night-line);
}

.editor-styles-wrapper .vm-hero__offer > .vm-hero__offer-inner {
	opacity: 1;
}

/* =============================================================
   VSL (player Vturb)
   ============================================================= */

.vm-vsl {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
	border: 1px solid var(--wp--preset--color--night-line);
	background: var(--wp--preset--color--night);
}

/* =============================================================
   Countdown
   ============================================================= */

.vm-countdown {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.vm-countdown__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 58px;
	background: var(--wp--preset--color--night);
	color: var(--wp--preset--color--canvas);
	border: 1px solid var(--wp--preset--color--night-line);
	border-radius: var(--wp--custom--radius--lg);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.vm-countdown__value {
	font-family: var(--wp--preset--font-family--display);
	font-size: 28px;
	font-weight: 900;
	line-height: 1;
	color: var(--wp--preset--color--brand);
}

.vm-countdown__label {
	margin-top: 4px;
	font-family: var(--wp--preset--font-family--cta);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--tag);
	opacity: 0.7;
}

/* =============================================================
   Lead form
   ============================================================= */

.vm-lead-form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.vm-lead-form__field {
	display: block;
}

.vm-lead-form input {
	width: 100%;
	background: var(--wp--preset--color--canvas);
	color: var(--wp--preset--color--ink-soft);
	border: 1px solid var(--wp--preset--color--input-border);
	border-radius: var(--wp--custom--radius--md);
	padding: 12px 16px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
}

.vm-lead-form input::placeholder {
	color: var(--wp--preset--color--ink-muted);
}

.vm-lead-form input:focus {
	outline: none;
	border-color: var(--wp--preset--color--brand);
}

.vm-lead-form .has-error input {
	border-color: var(--wp--preset--color--error);
}

.vm-lead-form__error {
	display: block;
	margin-top: 4px;
	text-align: left;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--error);
}

.vm-lead-form__note {
	margin: 0;
	text-align: center;
	font-size: var(--wp--preset--font-size--2-xs);
	opacity: 0.7;
}

/* =============================================================
   Ícones em tiles
   ============================================================= */

.vm-icon-tile,
.vm-icon-tile--brand,
.vm-icon-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.vm-icon-tile {
	width: 56px;
	height: 56px;
	border-radius: var(--wp--custom--radius--lg);
	background: linear-gradient(
		135deg,
		var(--wp--preset--color--night),
		var(--wp--preset--color--night-soft)
	);
	box-shadow: 0 8px 20px -10px
		color-mix(in srgb, var(--wp--preset--color--brand) 50%, transparent);
}

.vm-icon-tile--brand {
	width: 64px;
	height: 64px;
	border-radius: var(--wp--custom--radius--xl);
	background: linear-gradient(
		135deg,
		var(--wp--preset--color--brand),
		var(--wp--preset--color--brand-deep)
	);
	box-shadow: 0 10px 24px -10px
		color-mix(in srgb, var(--wp--preset--color--brand) 70%, transparent);
}

.vm-icon-chip {
	width: 48px;
	height: 48px;
	border-radius: var(--wp--custom--radius--lg);
	background: color-mix(
		in srgb,
		var(--wp--preset--color--brand) 15%,
		transparent
	);
}

.vm-icon-tile img,
.vm-icon-tile--brand img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.vm-icon-tile--brand img {
	width: 32px;
	height: 32px;
}

.vm-icon-chip img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.vm-icon-tile .wp-block-image,
.vm-icon-tile--brand .wp-block-image,
.vm-icon-chip .wp-block-image {
	margin: 0;
}

/* =============================================================
   Cards
   ============================================================= */

.vm-card {
	position: relative;
	border-radius: var(--wp--custom--radius--xl);
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.vm-card--hover:hover {
	transform: translateY(-4px);
}

.vm-module-badge {
	position: absolute;
	top: -12px;
	left: 24px;
	margin: 0;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--night);
	border-radius: var(--wp--custom--radius--md);
	padding: 4px 12px;
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--2-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--tag);
}

/* =============================================================
   Listas com check
   ============================================================= */

.vm-check-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.vm-check-list li {
	position: relative;
	padding-left: 32px;
}

.vm-check-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--brand);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

@media (min-width: 640px) {
	.vm-check-list--cols-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.vm-check-list--cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Variante em caixas (conteúdos complementares) */
.vm-check-list--boxed li {
	border: 1px solid var(--wp--preset--color--night-line);
	background: var(--wp--preset--color--night-soft);
	border-radius: var(--wp--custom--radius--lg);
	padding: 12px 16px 12px 44px;
}

.vm-check-list--boxed li::before {
	left: 14px;
	top: 13px;
}

/* =============================================================
   Carrossel de treinamentos
   ============================================================= */

.vm-carousel__viewport {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--xl);
}

.vm-carousel .wp-block-gallery.vm-carousel__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	transition: transform 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.vm-carousel .wp-block-gallery.vm-carousel__track {
		transition: none;
	}
}

.vm-carousel .vm-carousel__track > figure {
	flex: 0 0 100%;
	width: 100% !important;
	margin: 0;
}

.vm-carousel .vm-carousel__track img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

.vm-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: color-mix(
		in srgb,
		var(--wp--preset--color--canvas) 90%,
		transparent
	);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 4px 12px
		color-mix(in srgb, var(--wp--preset--color--night) 20%, transparent);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.vm-carousel__arrow:hover {
	background: var(--wp--preset--color--canvas);
}

.vm-carousel__arrow--prev {
	left: 12px;
}

.vm-carousel__arrow--next {
	right: 12px;
}

.vm-carousel__dots {
	display: flex;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--40);
}

.vm-carousel__dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: color-mix(
		in srgb,
		var(--wp--preset--color--ink-muted) 40%,
		transparent
	);
	cursor: pointer;
	transition: all 0.2s ease;
}

.vm-carousel__dots button:hover {
	background: var(--wp--preset--color--ink-muted);
}

.vm-carousel__dots button.is-active {
	width: 24px;
	background: var(--wp--preset--color--brand);
}

/* =============================================================
   Depoimentos — balão de chat
   ============================================================= */

.vm-testimonials .wp-block-post {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--mist);
	border-radius: var(--wp--custom--radius--xl);
	padding: var(--wp--preset--spacing--40);
}

.vm-testimonials .wp-block-post-title {
	align-self: flex-start;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--canvas);
	border-radius: var(--wp--custom--radius--xl);
	border-bottom-left-radius: 4px;
	padding: 12px 16px;
	margin-bottom: var(--wp--preset--spacing--40);
	font-size: 19px;
	line-height: 1.15;
}

.vm-testimonials .wp-block-post-title::before {
	content: "“";
}

.vm-testimonials .wp-block-post-title::after {
	content: "”";
}

.vm-testimonials .wp-block-post-featured-image {
	margin-top: auto;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
}

/* =============================================================
   Bônus — numeração automática (+01, +02…)
   ============================================================= */

.vm-bonus-grid {
	counter-reset: vm-bonus;
}

.vm-bonus-grid .wp-block-post {
	counter-increment: vm-bonus;
	border: 1px solid
		color-mix(in srgb, var(--wp--preset--color--brand) 40%, transparent);
	background: var(--wp--preset--color--night-soft);
	border-radius: var(--wp--custom--radius--xl);
	padding: var(--wp--preset--spacing--50);
	transition: border-color 0.2s ease;
}

.vm-bonus-grid .wp-block-post:hover {
	border-color: var(--wp--preset--color--brand);
}

.vm-bonus-grid .wp-block-post::before {
	content: "+0" counter(vm-bonus);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	min-width: 40px;
	margin-bottom: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--night);
	border-radius: var(--wp--custom--radius--md);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 900;
}

.vm-bonus-grid .wp-block-post-title {
	color: var(--wp--preset--color--canvas);
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.15;
}

/* =============================================================
   FAQ — accordion sobre o Query Loop
   ============================================================= */

.vm-faq .wp-block-post {
	border-top: 1px solid var(--wp--preset--color--night-line);
	padding: var(--wp--preset--spacing--40) 0;
}

.vm-faq .wp-block-post:first-child {
	border-top: 0;
}

.vm-faq .wp-block-post-title {
	position: relative;
	margin: 0;
	padding-right: 40px;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.4;
	color: var(--wp--preset--color--canvas);
}

.vm-faq .wp-block-post-title::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 1px solid
		color-mix(in srgb, var(--wp--preset--color--canvas) 30%, transparent);
	border-radius: 50%;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1;
	transition: transform 0.2s ease;
}

.vm-faq .wp-block-post.is-open .wp-block-post-title::after {
	transform: translateY(-50%) rotate(45deg);
}

.vm-faq .wp-block-post > .vm-faq__answer {
	display: none;
	margin-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.6;
	color: color-mix(
		in srgb,
		var(--wp--preset--color--canvas) 70%,
		transparent
	);
}

.vm-faq .wp-block-post.is-open > .vm-faq__answer {
	display: block;
}

/* No editor o accordion fica sempre aberto para facilitar a edição */
.editor-styles-wrapper .vm-faq .vm-faq__answer {
	display: block;
}

/* =============================================================
   Footer
   ============================================================= */

.vm-footer-credit {
	display: inline-block;
	border: 1px solid var(--wp--preset--color--night-line);
	border-radius: 999px;
	padding: 8px 16px;
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--2-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--tag);
	transition: border-color 0.15s ease;
}

.vm-footer-credit:hover {
	border-color: var(--wp--preset--color--brand);
}

/* =============================================================
   Editor — placeholders dos blocos dinâmicos e carrossel
   ============================================================= */

.vm-editor-placeholder {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px;
	border: 1px dashed
		color-mix(in srgb, var(--wp--preset--color--brand) 60%, transparent);
	border-radius: var(--wp--custom--radius--lg);
	background: color-mix(
		in srgb,
		var(--wp--preset--color--brand) 8%,
		var(--wp--preset--color--night-soft)
	);
	color: var(--wp--preset--color--canvas);
	font-family: var(--wp--preset--font-family--body);
}

.vm-editor-placeholder strong {
	font-size: var(--wp--preset--font-size--sm);
}

.vm-editor-placeholder span {
	font-size: var(--wp--preset--font-size--xs);
	opacity: 0.7;
}

/* No editor, as fotos do carrossel viram uma grade de miniaturas rotulada —
   no site publicado o JS do tema as transforma em slides rotativos. */
.editor-styles-wrapper .vm-carousel::before {
	content: "Fotos do carrossel · cada imagem é um slide no site publicado";
	display: block;
	margin-bottom: var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--cta);
	font-size: var(--wp--preset--font-size--2-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--tag);
	color: var(--wp--preset--color--brand);
}

.editor-styles-wrapper .vm-carousel .wp-block-gallery {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--20);
}

.editor-styles-wrapper .vm-carousel .wp-block-gallery figure.wp-block-image {
	margin: 0;
	width: 100% !important;
}

.editor-styles-wrapper .vm-carousel .wp-block-gallery img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--md);
}

/* =============================================================
   Foco acessível
   ============================================================= */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
	border-radius: 4px;
}
