/* ================= Cordlo hero visual ================= */
.cv {
	--ink: #0d1b2a; --blue: #2563eb; --blue-lt: #eff6ff;
	--slate: #52677d; --muted: #6b7f93; --border: #e4eaf0; --surface: #f7fafc;
	--green: #12805c; --green-lt: #e7f6ef; --amber: #96601f; --amber-lt: #fff4e0;
	--shadow: 0 1px 2px rgba(3,12,33,.05), 0 12px 32px rgba(3,12,33,.08);
	--shadow-lg: 0 2px 6px rgba(3,12,33,.05), 0 32px 80px rgba(3,12,33,.16);
	--ease: cubic-bezier(.22,.8,.24,1);
	position: relative; overflow: visible;
	/* 818x670 canvas: invoice in the exact centre, cards orbiting it.
	   Wider than its 760-unit column, it extends left into the space beside
	   the headline so nothing has to shrink. */
	aspect-ratio: 818 / 670; width: calc(100% * 818 / 760); margin-left: calc(100% * -29 / 760);
	font-family: "Poppins", system-ui, sans-serif; color: var(--ink);
	-webkit-font-smoothing: antialiased;
}
.cv, .cv *, .cv *::before, .cv *::after { box-sizing: border-box; }
.cv-canvas { position: absolute; left: 0; top: 0; width: 818px; height: 670px; transform-origin: 0 0; }
/* tablets: the visual sits below the text — cap its size so it is not scaled up past its design */
@media (max-width: 1024px) { .cv { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; } }
.cv-glow { position: absolute; inset: 40px 0 0 40px; border-radius: 40px;
	background: radial-gradient(60% 55% at 40% 45%, rgba(37,99,235,.10), transparent 70%); }

/* revolving spiral backdrop */
/* centred just right of the invoice centre (≈ 449,345) */
.cv-spiral { position: absolute; left: -1px; top: -105px; width: 900px; height: 900px; overflow: visible; pointer-events: none;
	-webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, #000 50%, transparent 88%); mask-image: radial-gradient(circle closest-side at 50% 50%, #000 50%, transparent 88%);
	animation: cvSpin 90s linear infinite; }
.cv-spiral path { fill: none; stroke: #2563eb; stroke-width: 1.4; stroke-opacity: .38; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cv-spiral .cv-spiral-b { stroke-opacity: .22; stroke-dasharray: 2 7; }
@keyframes cvSpin { to { transform: rotate(360deg); } }
.cv.is-paused .cv-spiral { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .cv-spiral { animation: none; } }

.cv-card { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.cv-muted { font-size: 12px; color: var(--muted); }
.cv-num { font-variant-numeric: tabular-nums; }
.cv-fade { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.cv-fade.on { opacity: 1; transform: none; }

/* ---------- invoice ---------- */
.cv-inv { left: 175px; top: 60px; width: 468px; padding: 30px 32px 26px; box-shadow: var(--shadow-lg); }
.cv-inv-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cv-biz { display: flex; align-items: center; gap: 12px; }
.cv-logo { width: 42px; height: 42px; border-radius: 11px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.cv-biz b { display: block; font-size: 16px; font-weight: 700; }
.cv-title { text-align: right; }
.cv-title b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.cv-title span { font-size: 13px; color: var(--slate); }

.cv-status { position: relative; height: 28px; width: 92px; margin: 10px 0 0 auto; }
.cv-pill { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
	border-radius: 100px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
	opacity: 0; transform: scale(.85); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.cv-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cv-pill.on { opacity: 1; transform: none; }
.p-draft { background: var(--surface); color: var(--slate); }
.p-sent { background: var(--amber-lt); color: var(--amber); }
.p-viewed { background: var(--blue-lt); color: var(--blue); }
.p-paid { background: var(--green-lt); color: var(--green); }

.cv-meta { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin: 22px 0 20px; padding: 16px 18px; border-radius: 12px; background: var(--surface); }
.cv-meta .k { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.cv-meta .v { font-size: 13.5px; font-weight: 600; }

.cv-th, .cv-tr { display: grid; grid-template-columns: 1fr 44px 96px; align-items: center; }
.cv-th { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cv-tr { font-size: 13.5px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--slate); }
.cv-tr span:first-child { color: var(--ink); font-weight: 500; }
.cv-th span:not(:first-child), .cv-tr span:not(:first-child) { text-align: right; }

.cv-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.cv-total span { font-size: 13.5px; color: var(--slate); }
.cv-total b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

.cv-pay { position: relative; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px 12px 12px 16px; border-radius: 13px; border: 1px dashed #c9d6ea; }
.cv-pay small { font-size: 12px; color: var(--slate); line-height: 1.4; }
.cv-pay small b { color: var(--ink); font-weight: 600; }
.cv-btn { position: relative; overflow: hidden; flex: none; font-size: 13.5px; font-weight: 700; color: #fff; background: var(--blue);
	height: 40px; padding: 0 18px; border-radius: 10px; display: grid; place-items: center; transition: transform .18s var(--ease), background .3s; }
.cv-btn .lbl { grid-area: 1/1; transition: opacity .25s, transform .25s; }
.cv-btn .done { grid-area: 1/1; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.cv-btn.press { transform: scale(.95); }
.cv-btn.paid { background: var(--green-lt); color: var(--green); }
.cv-btn.paid .lbl { opacity: 0; transform: translateY(-8px); }
.cv-btn.paid .done { opacity: 1; transform: none; }
.cv-ripple { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: rgba(255,255,255,.5); transform: scale(0); opacity: 0; }
.cv-btn.press .cv-ripple { animation: cvRipple .6s var(--ease); }
@keyframes cvRipple { from { transform: scale(0); opacity: 1 } to { transform: scale(18); opacity: 0 } }

.cv-foot { margin-top: 16px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--slate); }

/* paper plane */
.cv-plane { position: absolute; left: 575px; top: 106px; opacity: 0; pointer-events: none; }
.cv-plane.fly { animation: cvFly 1.1s var(--ease) forwards; }
@keyframes cvFly { 0% { opacity: 0; transform: translate(0,0) rotate(0) } 15% { opacity: 1 } 100% { opacity: 0; transform: translate(150px,-70px) rotate(8deg) } }

/* ---------- toast ---------- */
	opacity: 0; transform: translateY(-14px) scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.cv-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--green-lt); }

/* ---------- step cards on the ring ---------- */
.cv-chip { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; border-radius: 14px; white-space: nowrap;
	opacity: .4; transition: opacity .45s var(--ease); animation: cvDriftY 7s ease-in-out infinite alternate; }
.cv-chip.on { opacity: 1; }
.cv-chip .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.cv-chip .d { font-size: 11px; line-height: 1.3; color: var(--muted); }
.cv-dot { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--border); transition: border-color .4s, background .4s; }
.cv-chip.pop .cv-dot { animation: cvPop .5s var(--ease); }
@keyframes cvPop { 50% { transform: scale(1.2) } }
.cv-chip.on.c1 .cv-dot, .cv-chip.on.c3 .cv-dot { border-color: var(--blue); background: var(--blue-lt); }
.cv-chip.on.c2 .cv-dot { border-color: var(--amber); background: var(--amber-lt); }
.cv-chip.on.c4 .cv-dot { border-color: var(--green); background: var(--green-lt); }
.cv-chip.c4 .t { color: var(--green); }
/* positions on the ring; each drifts along the ring's tangent */
.cv-chip.c1 { left: 0; top: 250px; animation-duration: 7s; }
.cv-chip.c2 { right: 0; top: 170px; width: 204px; }
.cv-chip.c3 { right: 0; top: 390px; width: 204px; }
.cv-chip.c4 { left: 0; top: 470px; animation-name: cvDriftX; animation-duration: 9s; animation-delay: -4s; }
@keyframes cvDriftY { from { transform: translateY(-9px) } to { transform: translateY(9px) } }
@keyframes cvDriftX { from { transform: translateX(-12px) } to { transform: translateX(12px) } }
.cv.is-paused .cv-chip { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .cv-chip { animation: none; } }

/* ---------- collected ---------- */
/* thin strip straddling the invoice's bottom edge */
.cv-stat { left: 204px; top: 608px; width: 410px; height: 44px; padding: 0 16px; border-radius: 100px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.cv-stat .k { font-size: 11.5px; color: var(--muted); }
.cv-stat .v { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.cv-stat .cv-bar { flex: 1; min-width: 64px; }
.cv-bar { height: 6px; border-radius: 8px; background: #e6ebf3; display: flex; gap: 3px; overflow: hidden; }
.cv-bar span { height: 100%; border-radius: 8px; transition: width .9s var(--ease); }
.cv-delta { display: inline-block; font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-lt); padding: 2px 8px; border-radius: 100px;
	opacity: 0; transform: translateY(4px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.cv-delta.on { opacity: 1; transform: none; }

/* loop reset */
.cv-layer { position: absolute; inset: 0; transition: opacity .6s ease; }
.cv-layer.out { opacity: 0; }

/* ---------- compact layout (phones): invoice + strip + status cards ---------- */
/* a narrower 420-unit canvas so phones render it larger and more readable */
.cv.cv--compact { aspect-ratio: 420 / 680; width: 100%; max-width: 460px; margin-left: auto; margin-right: auto; }
.cv--compact .cv-canvas { width: 420px; height: 680px; }
.cv--compact .cv-plane { display: none; }
.cv--compact .cv-inv { left: 0; top: 58px; width: 420px; padding: 28px 26px 24px; }
.cv--compact .cv-stat { left: 20px; width: 380px; top: 640px; }
.cv--compact .cv-stat .cv-bar { display: none; }
.cv--compact .cv-spiral { left: -190px; top: -50px; }
.cv--compact .cv-pay small { font-size: 11px; }
.cv--compact .cv-pay .cv-btn { padding: 0 14px; font-size: 12.5px; }
.cv--compact .cv-stat { justify-content: center; }


/* ---------- still state ----------
   The cards no longer animate: no drifting, no step-by-step story. */
.cv .cv-card.cv-chip { animation: none; opacity: 1; }
.cv-plane, .cv-ripple { display: none; }
/* .cv-title span (slate) would otherwise win over the pill colours */
.cv-title .p-draft { color: var(--slate); } .cv-title .p-sent { color: var(--amber); } .cv-title .p-viewed { color: var(--blue); } .cv-title .p-paid { color: var(--green); }

/* phones: the status cards sit in a 2x2 grid under the strip (tops set by hero-visual.js) */
.cv--compact .cv-chip { display: flex; width: 205px; right: auto; padding: 8px 12px 8px 8px; gap: 9px; }
.cv--compact .cv-chip.c1, .cv--compact .cv-chip.c3 { left: 0; }
.cv--compact .cv-chip.c2, .cv--compact .cv-chip.c4 { left: 215px; }
.cv--compact .cv-chip .t { font-size: 12px; }
.cv--compact .cv-chip .d { font-size: 10.5px; }
