/* This band (Figma "Section / CTA + Footer") is LIGHT — beige ground, dark
 * heading, navy button, centred — not the dark-navy/left/amber treatment
 * this shipped with, inherited from the prototype and matching nothing approved.
 */
:root {
	--move-cta-bg: var(--move-color-bg, #faf7f0);
	--move-cta-text: var(--move-color-dark-alt, #061b33);

	/* Heading does not step: 52px/-1px on both mobile (409:9062) and desktop (385:8988) — a literal, between the 40px and 56px steps. */
	--move-cta-font-heading: 3.25rem;                               /* 52px */
	--move-cta-font-text: var(--move-font-size-base, 1rem);         /* 16px, mobile */
	--move-cta-font-text-lg: var(--move-font-size-md, 1.125rem);    /* 18px, desktop */
	--move-cta-font-button: var(--move-font-size-base, 1rem);       /* 16px */
}

.move-cta-banner {
	container-type: inline-size;
	container-name: move-cta-banner;
	width: 100%;
	background: var(--move-cta-bg);
	color: var(--move-cta-text);
	font-family: var(--move-font-base);
	font-size: 1rem;
	font-weight: 400;
	--move-strong-weight: var(--move-font-weight-bold, 700);
	/* Recolours the shared .move-button (tokens.css) for this block only — scoped here, not :root, to avoid leaking. */
	/* brand/primary/brand-high-emphasis with text/inverse/label — 13.9:1, computed. */
	--move-button-bg: var(--move-color-dark, #0f2a4a);
	--move-button-text: #f1f4f7;
	--move-button-font-size: var(--move-cta-font-button);
	--move-button-focus-color: var(--move-color-focus, #315179);
}

.move-cta-banner__container {
	max-width: var(--move-container-max, 1312px);
	margin-inline: auto;
	padding: var(--move-section-padding-lg, 7.5rem) var(--move-container-gutter, 2rem);
	display: flex;
	flex-direction: column;
	/* 40px copy-to-button, 20px inside the group (node 385:8989) — not evenly spaced; both literals. */
	gap: 2.5rem;
	align-items: center;
	text-align: center;
}

/* Heading and paragraph are both margin: 0, so this gap is what separates them. */
.move-cta-banner__copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem; /* 20px */
	width: 100%;
}

.move-cta-banner__heading {
	font-size: var(--move-cta-font-heading);
	font-weight: var(--move-font-weight-light, 300);
	/* Absolute -1px, not the proportional step: Figma draws this exact value at 52px on both frames. */
	letter-spacing: -1px;
	line-height: var(--move-line-snug, 1.3);
	margin: 0;
	/* SemiBold at the roman's own size — the one place the design lifts weight without lifting size. */
	--move-em-weight: var(--move-font-weight-semibold, 600);
}
.move-cta-banner__text {
	margin: 0;
	max-width: 44rem;
	font-size: var(--move-cta-font-text);
	font-weight: var(--move-font-weight-light, 300);
	line-height: var(--move-line-relaxed, 1.5);
	letter-spacing: var(--move-letter-spacing-tight, -0.01em);
}
.move-cta-banner__text p:first-child {
	margin-top: 0;
}
.move-cta-banner__text p:last-child {
	margin-bottom: 0;
}

/* Box model/colour/focus come from shared .move-button; this only adds layout —
   full-width mobile, shrink-to-fit from 768px (this block's own step, not why-section's 1024px). */
.move-cta-banner__button {
	width: 100%;
}

/* Dark variant, opt-in — mirrors move-content-section's dark/has-image pattern. Scoped to this block's class, never :root. */
.move-cta-banner--dark {
	--move-cta-bg: var(--move-color-dark, #0f2a4a);
	--move-cta-text: var(--move-color-text-inverse, #f1f4f7);
	--move-button-bg: var(--move-color-surface, #ffffff);
	--move-button-text: var(--move-color-dark-alt, #061b33);
}
.move-cta-banner--has-image {
	position: relative;
	background-image:
		linear-gradient(rgba(6, 27, 51, 0.72), rgba(6, 27, 51, 0.72)),
		var(--move-cta-banner-image);
	background-size: cover;
	background-position: center;
}

@container move-cta-banner (min-width: 768px) {
	/* Stays a centred column at every width — Figma never puts the button beside the copy. */
	.move-cta-banner__button {
		width: fit-content;
		flex-shrink: 0;
	}
	.move-cta-banner__text {
		font-size: var(--move-cta-font-text-lg);
	}
}

/* Background animation, light variant — Figma "Scene 5 — Fluxo contínuo" (385:8978):
 * three flowing lines, each a static base with a comet, at 30% opacity.
 * Deviation: Figma anchors this scene to the top of the full "CTA + Footer"
 * composite, so its lowest line falls across the footer there. Here the footer
 * is chrome outside this block, so the scene is fitted to the band instead
 * (`slice` crops the sides, costless since the curves already run past both edges).
 */
.move-cta-banner--has-animation {
	position: relative;
	overflow: hidden;
}

.move-cta-banner__animation {
	position: absolute;
	inset: 0;
	opacity: 0.3;
	pointer-events: none;
	z-index: 0;
}

.move-cta-banner__animation svg {
	display: block;
	width: 100%;
	height: 100%;
	color: var(--move-color-accent, #689fdf); /* path d's currentColor */
}

/* Without this, the band's stacking context puts the absolutely positioned scene over the heading and button. */
.move-cta-banner--has-animation .move-cta-banner__container {
	position: relative;
	z-index: 1;
}

/* 9.2s linear, looping, one shared cycle (385:9126); b/c/d stagger via differing
   hold/travel splits (4.348% / 8.696% / 13.043%). Three keyframe sets, not one
   plus animation-delay, because a delay on an infinite animation drifts after the first pass. */
.move-cta-banner__flow {
	animation: 9.2s linear infinite both;
}

.move-cta-banner__flow--b {
	animation-name: move-cta-flow-b;
}
.move-cta-banner__flow--c {
	animation-name: move-cta-flow-c;
}
.move-cta-banner__flow--d {
	animation-name: move-cta-flow-d;
}

@keyframes move-cta-flow-b {
	0% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	4.348% {
		animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	89.13% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: -0.93;
	}
	100% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: -0.93;
	}
}

@keyframes move-cta-flow-c {
	0% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	8.696% {
		animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	91.304% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: -0.93;
	}
	100% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: -0.93;
	}
}

@keyframes move-cta-flow-d {
	0% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	13.043% {
		animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: 0;
	}
	100% {
		stroke-dasharray: 0.07 1;
		stroke-dashoffset: -0.93;
	}
}

/* Last in the file on purpose — @media adds no specificity, so source order decides.
   Dropping the animation restores the markup's own stroke-dasharray="1 1" (a fully drawn line). */
@media (prefers-reduced-motion: reduce) {
	.move-cta-banner__flow {
		animation: none;
	}
}
