/* Finale (home section 8): the console reprise where a final sale lands, then the call to action over the lit crossroads X.
   Two layouts. STATIC (reduced motion, the Breakdance builder, no JS): everything stacked and readable, the X at its end
   state. LIVE, only after motion/scenes/finale.js adds .tx-finale--live: a pinned stage the scene scrubs (machines fly in,
   the last sale chip lands on the reprise card, the card lifts, the call to action rises). Header is 73px. */
body .tx-finale {
	--sea: #8ED2C3; --teal: #4A90A4; --d0: #0B0F1A; --mut: #8CA3BA; --edge: rgba(155,176,196,.16); --edge2: rgba(142,210,195,.28);
	--mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace; --sans: 'Archivo', system-ui, -apple-system, sans-serif;
	--gut: max(20px, 6vw); --u: calc((100svh - 73px) / 100);
	position: relative; background: var(--d0); color: #fff; font-family: var(--sans); overflow: clip;
}
body .tx-finale.bde-section { background-color: var(--d0); }
body .tx-finale.bde-section > .section-container { max-width: none; width: 100%; padding: 0; align-items: stretch; position: relative; }
body .tx-finale .bde-div { display: block; width: auto; max-width: none; flex-direction: row; align-items: stretch; }
body .tx-finale p { margin: 0; }
body .tx-finale .tx-finale-stage { position: relative; overflow: hidden; background: linear-gradient(180deg, #0A1424, var(--d0) 40%); }
body .tx-finale .tx-finale-glow { position: absolute; left: 50%; top: 50%; width: 100vmin; height: 100vmin; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(142,210,195,.16), rgba(27,77,184,.08) 60%, transparent); pointer-events: none; }
/* The mask keeps every stroke and its glow out of the copy: transparent inside the ellipse, full outside. */
body .tx-finale .tx-finale-xw { position: absolute; inset: 0; pointer-events: none; z-index: 0; -webkit-mask-image: radial-gradient(ellipse 34vw 46svh at 50% 50%, transparent 78%, #000 100%); mask-image: radial-gradient(ellipse 34vw 46svh at 50% 50%, transparent 78%, #000 100%); }
body .tx-finale .tx-finale-x { position: absolute; left: 50%; top: 50%; width: min(150vmin, 1300px); height: min(150vmin, 1300px); margin: calc(min(150vmin, 1300px) / -2) 0 0 calc(min(150vmin, 1300px) / -2); transform-origin: 50% 50%; }
body .tx-finale .tx-finale-x .breakdance-image, body .tx-finale .tx-finale-x figure { width: 100%; height: 100%; margin: 0; }
body .tx-finale .tx-finale-x img { width: 100%; height: 100%; max-width: none; display: block; }

/* the reprise card */
body .tx-finale .tx-finale-console { position: relative; z-index: 4; width: min(720px, 100%); text-align: left; }
/* The lift layer carries the card's look, so the whole card (not an empty frame) rises when the call to action arrives. */
body .tx-finale .tx-finale-lift { position: relative; border: 1px solid var(--edge2); border-radius: 18px; background: linear-gradient(180deg, #14233B, #0D1626); box-shadow: 0 0 90px rgba(142,210,195,.16); }
body .tx-finale .tx-finale-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--edge); }
body .tx-finale .tx-finale-org { display: flex; align-items: center; gap: 10px; font: 700 13px var(--sans); color: #fff; }
body .tx-finale .tx-finale-org img { width: 22px; height: 22px; display: block; }
body .tx-finale .tx-finale-online { font: 500 11px/1 var(--mono); color: var(--sea); white-space: nowrap; }
body .tx-finale .tx-finale-body { padding: 22px 26px 24px; }
body .tx-finale .tx-finale-kicker { font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
body .tx-finale .tx-finale-amount { margin: 12px 0 4px; font: 500 clamp(34px, 5vw, 64px)/1 var(--mono); letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; }
body .tx-finale .tx-finale-settled { font: 500 12px/1.3 var(--mono); color: var(--sea); }
body .tx-finale .tx-finale-grid { display: grid; grid-template-columns: repeat(24, 1fr); gap: 5px; margin-top: 20px; }
body .tx-finale .tx-finale-grid i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--sea); opacity: .9; box-shadow: 0 0 8px rgba(142,210,195,.35); }
body .tx-finale .tx-finale-grid i.d { background: var(--teal); box-shadow: none; }
body .tx-finale .tx-finale-cap { margin-top: 12px; font: 500 11px/1 var(--mono); letter-spacing: .03em; color: var(--mut); }
body .tx-finale .tx-finale-landring { position: absolute; inset: -2px; border-radius: 20px; border: 2px solid var(--sea); box-shadow: 0 0 60px rgba(142,210,195,.6), inset 0 0 40px rgba(142,210,195,.2); opacity: 0; pointer-events: none; }

/* machines and the landing sale chip */
body .tx-finale .tx-finale-sat { display: flex; flex-direction: column; align-items: center; gap: 12px; }
body .tx-finale .tx-finale-sat .art { width: var(--w, clamp(64px, 8vw, 112px)); }
body .tx-finale .tx-finale-sat .art :is(figure, .breakdance-image-container, .breakdance-image-clip) { margin: 0; }
body .tx-finale .tx-finale-sat .art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 16px 22px rgba(0,0,0,.4)); }
body .tx-finale .tx-finale-tag { display: flex; align-items: center; gap: 7px; width: max-content; max-width: none; font: 500 10.5px/1 var(--mono); color: var(--mut); white-space: nowrap; background: rgba(10,18,32,.86); border: 1px solid var(--edge); padding: 5px 8px; border-radius: 999px; }
body .tx-finale .tx-finale-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--sea); box-shadow: 0 0 8px var(--sea); display: block; }
body .tx-finale .tx-finale-chip { font: 500 11.5px/1 var(--mono); color: #0B0F1A; background: var(--sea); padding: 8px 11px; border-radius: 999px; box-shadow: 0 0 28px rgba(142,210,195,.7); white-space: nowrap; width: max-content; max-width: none; }

/* the call to action */
body .tx-finale .tx-finale-in { position: relative; z-index: 6; width: 100%; max-width: 940px; margin: 0 auto; text-align: center; }
body .tx-finale .tx-finale-in h2.bde-heading { margin: 0 auto; font: 800 clamp(36px, 5.6vw, 84px)/.96 var(--sans); letter-spacing: -.04em; word-spacing: .06em; color: #fff; max-width: 14ch; text-wrap: balance; }
body .tx-finale h2 em { font-style: normal; color: var(--sea); }
body .tx-finale .tx-finale-sub { margin: 18px auto 0; max-width: 46ch; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.5; color: #C5D3E0; }
body .tx-finale .tx-finale-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
body .tx-finale .button-atom.button-atom--secondary { color: #F5F8FA; border-color: rgba(245,248,250,.55); background-color: transparent; }
body .tx-finale .button-atom.button-atom--secondary:hover { background-color: rgba(245,248,250,.1); border-color: #F5F8FA; }

/* ---- static layout ---- */
body .tx-finale:not(.tx-finale--live) .tx-finale-stage { display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 4vw, 44px); min-height: 100svh; justify-content: center; padding: clamp(96px, 14svh, 150px) var(--gut) clamp(64px, 10svh, 110px); }
body .tx-finale:not(.tx-finale--live) .tx-finale-sats { order: 0; display: grid; grid-template-columns: repeat(6, auto); gap: 20px clamp(16px, 3vw, 40px); position: relative; z-index: 3; }
body .tx-finale:not(.tx-finale--live) .tx-finale-chip { order: 1; position: relative; z-index: 3; }
body .tx-finale:not(.tx-finale--live) .tx-finale-console { order: 2; }
body .tx-finale:not(.tx-finale--live) .tx-finale-in { order: 3; padding-top: 12px; }
body .tx-finale:not(.tx-finale--live) .tx-finale-landring { display: none; }

/* ---- live layout (pinned) ---- */
body .tx-finale.tx-finale--live.bde-section > .section-container { min-height: 300vh; }
body .tx-finale.tx-finale--live .tx-finale-stage { position: sticky; top: 73px; height: calc(100svh - 73px); }
body .tx-finale.tx-finale--live .tx-finale-xw { -webkit-mask-image: radial-gradient(ellipse 34vw 30svh at 50% 74%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse 34vw 30svh at 50% 74%, transparent 55%, #000 100%); }
body .tx-finale.tx-finale--live .tx-finale-sats { position: absolute; inset: 0; z-index: 2; }
body .tx-finale.tx-finale--live .tx-finale-sat { position: absolute; width: var(--w); }
body .tx-finale.tx-finale--live .tx-finale-sat .art { width: 100%; }
body .tx-finale.tx-finale--live .tx-finale-sat--a { --w: clamp(86px, 9.4vw, 136px); left: 4%; top: calc(7 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-sat--b { --w: clamp(72px, 7.4vw, 108px); left: 12%; top: calc(37 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-sat--c { --w: clamp(96px, 10vw, 146px); left: 3%; top: calc(64 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-sat--d { --w: clamp(86px, 9.4vw, 136px); right: 4%; top: calc(7 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-sat--e { --w: clamp(72px, 7.6vw, 110px); right: 12%; top: calc(37 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-sat--f { --w: clamp(96px, 10vw, 146px); right: 3%; top: calc(64 * var(--u)); }
body .tx-finale.tx-finale--live .tx-finale-console { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(720px, 92vw); }
body .tx-finale.tx-finale--live .tx-finale-chip { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 10; }
body .tx-finale.tx-finale--live .tx-finale-in { position: absolute; left: 0; right: 0; bottom: calc(7svh + 4px); max-width: none; padding: 0 20px; }
body .tx-finale.tx-finale--live .tx-finale-in h2 { max-width: 16ch; }

@media (max-width: 767px) {
	body .tx-finale { --mw: clamp(40px, calc(5.6 * var(--u)), 56px); --mh: calc(var(--mw) * 1.583); }
	body .tx-finale .tx-finale-xw { -webkit-mask-image: radial-gradient(ellipse 70vw 38svh at 50% 52%, rgba(0,0,0,.22) 55%, #000 100%); mask-image: radial-gradient(ellipse 70vw 38svh at 50% 52%, rgba(0,0,0,.22) 55%, #000 100%); }
	body .tx-finale .tx-finale-x { width: 170vw; max-width: none; height: 130svh; margin: -65svh 0 0 -85vw; }
	body .tx-finale .tx-finale-x img { object-fit: fill; }
	body .tx-finale .tx-finale-body { padding: 16px 16px 18px; }
	body .tx-finale .tx-finale-grid { gap: 3px; margin-top: 14px; }
	body .tx-finale h2 { font-size: clamp(34px, 10vw, 44px); }
	body .tx-finale .tx-finale-btns { flex-direction: column; margin-top: 24px; }
	body .tx-finale .tx-finale-btns .bde-button, body .tx-finale .tx-finale-btns .button-atom { width: 100%; justify-content: center; }
	body .tx-finale:not(.tx-finale--live) .tx-finale-sats { grid-template-columns: repeat(3, auto); }
	body .tx-finale.tx-finale--live.bde-section > .section-container { min-height: 190vh; }
	body .tx-finale.tx-finale--live .tx-finale-xw { -webkit-mask-image: radial-gradient(ellipse 90vw 24svh at 50% 82%, rgba(0,0,0,.08) 55%, #000 100%); mask-image: radial-gradient(ellipse 90vw 24svh at 50% 82%, rgba(0,0,0,.08) 55%, #000 100%); }
	body .tx-finale.tx-finale--live .tx-finale-sat { --w: var(--mw); }
	body .tx-finale.tx-finale--live .tx-finale-sat--c, body .tx-finale.tx-finale--live .tx-finale-sat--f { --w: calc(var(--mw) * 1.417); }
	body .tx-finale.tx-finale--live .tx-finale-sat--a, body .tx-finale.tx-finale--live .tx-finale-sat--b, body .tx-finale.tx-finale--live .tx-finale-sat--c { top: calc(50% - 150px - 30px - var(--mh)); bottom: auto; }
	body .tx-finale.tx-finale--live .tx-finale-sat--d, body .tx-finale.tx-finale--live .tx-finale-sat--e, body .tx-finale.tx-finale--live .tx-finale-sat--f { top: calc(50% + 150px + 14px); bottom: auto; }
	body .tx-finale.tx-finale--live .tx-finale-sat--a, body .tx-finale.tx-finale--live .tx-finale-sat--d { left: calc(16.67% - var(--w) / 2); right: auto; }
	body .tx-finale.tx-finale--live .tx-finale-sat--b, body .tx-finale.tx-finale--live .tx-finale-sat--e { left: calc(50% - var(--w) / 2); right: auto; }
	body .tx-finale.tx-finale--live .tx-finale-sat--c, body .tx-finale.tx-finale--live .tx-finale-sat--f { left: calc(83.33% - var(--w) / 2); right: auto; }
	body .tx-finale.tx-finale--live .tx-finale-in { bottom: 28px; }
	body .tx-finale .tx-finale-tag { font-size: 9.5px; padding: 4px 7px; }
}
/* Reduced motion: the X shows its end state. */
@media (prefers-reduced-motion: reduce) {
	body .tx-finale .tx-finale-x { opacity: 1 !important; transform: none !important; }
}
