/* CallZenix motion layer — additive to site.css. Brand: violet #5b3df5, teal #0ea5a0, light theme. */
:root {
  --cz-violet: #5b3df5;
  --cz-teal: #0ea5a0;
  --cz-pink: #c026d3;
  --cz-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- page entrance (CSS so content paints before JS) ---------- */
@keyframes cz-page-in { from { opacity: 0.001; } to { opacity: 1; } }
/* (page fade-in removed: it delayed LCP; the curtain covers page changes) */

/* ---------- scroll progress ---------- */
.cz-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none; }
.cz-progress > i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--cz-violet), var(--cz-teal)); box-shadow: 0 0 10px rgba(91, 61, 245, 0.45); }

/* ---------- cursor glow (soft, light-theme friendly) ---------- */
.cz-glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.6s; background: radial-gradient(circle, rgba(91, 61, 245, 0.10), rgba(14, 165, 160, 0.06) 40%, transparent 70%); }

/* ---------- hero ---------- */
.hero { isolation: isolate; }
.hero > .wrap { position: relative; z-index: 2; }
.cz-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cz-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; will-change: transform; animation: cz-drift 18s ease-in-out infinite alternate; }
.cz-blob--a { width: 520px; height: 520px; left: -140px; top: -160px; background: radial-gradient(circle, rgba(91, 61, 245, 0.35), transparent 65%); }
.cz-blob--b { width: 460px; height: 460px; right: -120px; top: 10%; background: radial-gradient(circle, rgba(14, 165, 160, 0.30), transparent 65%); animation-duration: 22s; }
.cz-blob--c { width: 380px; height: 380px; left: 35%; bottom: -200px; background: radial-gradient(circle, rgba(192, 38, 211, 0.18), transparent 65%); animation-duration: 26s; }
@keyframes cz-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(60px, 40px, 0) scale(1.12); } }
.cz-particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 3D orb layer, positioned around the voice demo card by JS */
.cz-orb-layer { position: absolute; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--cz-ease); -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 70%); mask-image: radial-gradient(circle, #000 52%, transparent 70%); }
.cz-orb-layer.is-ready { opacity: 1; }
.czv { position: relative; z-index: 2; }

/* CSS orb fallback (mobile / no WebGL / reduced motion) */
.cz-orb-fallback { position: absolute; z-index: 1; pointer-events: none; border-radius: 50%; }
.cz-orb-fallback::before, .cz-orb-fallback::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.cz-orb-fallback::before { background: radial-gradient(circle at 35% 35%, rgba(14, 165, 160, 0.22), rgba(91, 61, 245, 0.18) 45%, transparent 70%); animation: cz-breathe 6s ease-in-out infinite; }
.cz-orb-fallback::after { border: 1px dashed rgba(91, 61, 245, 0.28); inset: 6%; animation: cz-spin 40s linear infinite; }
@keyframes cz-breathe { 50% { transform: scale(1.06); opacity: 0.85; } }
@keyframes cz-spin { to { transform: rotate(360deg); } }

/* ---------- kinetic headline (words wrapped at build time) ---------- */
.cz-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.05em 0.12em; margin: 0 -0.05em -0.12em; white-space: nowrap; }
.cz-w > span { display: inline-block; animation: cz-word-in 1.05s var(--cz-ease) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
@keyframes cz-word-in { from { opacity: 0; transform: translate3d(0, 105%, 0) rotate(3deg); } to { opacity: 1; transform: none; } }
.cz-w > .grad { background: linear-gradient(100deg, var(--cz-violet) 10%, var(--cz-teal) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- richer reveals (site.js toggles .in) ---------- */
.reveal { opacity: 0; transform: translate3d(0, 28px, 0) scale(0.985); filter: blur(6px); transition: opacity 0.9s var(--cz-ease), transform 0.9s var(--cz-ease), filter 0.9s var(--cz-ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.grid-4 > .reveal:nth-child(2), .steps > .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid-4 > .reveal:nth-child(3), .steps > .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid-4 > .reveal:nth-child(4), .steps > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- tilt + spotlight cards ---------- */
.cz-tilt { transform-style: preserve-3d; will-change: transform; position: relative; }
.cz-tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(91, 61, 245, 0.10), transparent 45%); }
.cz-tilt:hover::after { opacity: 1; }

/* ---------- magnetic buttons ---------- */
.cz-mag { will-change: transform; transition: transform 0.35s var(--cz-ease), box-shadow 0.3s; }
.btn-primary.cz-mag { position: relative; overflow: hidden; }
.btn-primary.cz-mag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%); background-size: 250% 100%; background-position: 120% 0; transition: background-position 0.8s var(--cz-ease); pointer-events: none; }
.btn-primary.cz-mag:hover::after { background-position: -20% 0; }

/* ---------- steps progress line ---------- */
.steps { position: relative; }
.cz-steps-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line, #e6e8f0); border-radius: 2px; overflow: hidden; }
.cz-steps-line > i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--cz-violet), var(--cz-teal)); }

/* ---------- soft sections get a living network ---------- */
.section-soft { position: relative; isolation: isolate; }
.section-soft > .wrap { position: relative; z-index: 1; }
.cz-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.55; -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%); }

/* ---------- CTA band: animated gradient border ---------- */
@property --cz-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.band { position: relative; isolation: isolate; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; background: conic-gradient(from var(--cz-angle), transparent, var(--cz-violet), var(--cz-teal), var(--cz-pink), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: cz-border 6s linear infinite; pointer-events: none; z-index: 1; }
@keyframes cz-border { to { --cz-angle: 360deg; } }
.band::after { content: ""; position: absolute; width: 340px; height: 340px; right: -80px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(91, 61, 245, 0.22), transparent 65%); animation: cz-drift 14s ease-in-out infinite alternate; z-index: -1; }

/* ---------- footer ---------- */
.footer { position: relative; overflow: hidden; isolation: isolate; }
.footer > .wrap { position: relative; z-index: 1; }
.cz-foot-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.7; pointer-events: none; }
.cz-wordmark { position: relative; z-index: 1; display: flex; justify-content: space-between; max-width: var(--wrap, 1200px); margin: 40px auto 0; padding: 0 var(--gutter, 24px); font-family: var(--display, sans-serif); font-weight: 800; font-size: clamp(3.2rem, 15vw, 13rem); line-height: 0.85; letter-spacing: -0.05em; user-select: none; }
.cz-wordmark span { display: inline-block; background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translate3d(0, calc((1 - var(--p, 1)) * 60%), 0); opacity: var(--p, 1); }

/* ---------- page transition curtain ---------- */
.cz-curtain { position: fixed; inset: 0; z-index: 200; pointer-events: none; background: linear-gradient(120deg, #4527d6, #5b3df5 45%, #0ea5a0); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1); }
.cz-curtain.is-on { transform: scaleY(1); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  main, .cz-w > span, .cz-blob, .band::before, .band::after, .cz-orb-fallback::before, .cz-orb-fallback::after { animation: none !important; }
  .reveal { filter: none; transform: none; opacity: 1; transition: none; }
  .cz-glow, .cz-curtain { display: none; }
  .cz-wordmark span { transform: none; opacity: 1; }
}
.footer .wrap .cz-wordmark { padding: 0; max-width: none; margin: 36px 0 8px; }

/* ======================= Round 2 effects ======================= */

/* Section headings: words rise when their .reveal block enters */
.cz-w > .cz-s { display: inline-block; opacity: 0; transform: translate3d(0, 105%, 0); }
.reveal.in .cz-w > .cz-s, .cz-w > .cz-s.cz-now { animation: cz-word-in 1s var(--cz-ease) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }

/* Gradient text shimmer */
.grad, .cz-w > .grad { background-size: 200% 100%; animation: cz-shimmer 6s ease-in-out infinite alternate; }
.cz-w > span.grad { animation: cz-word-in 1.05s var(--cz-ease) both, cz-shimmer 6s ease-in-out 1.2s infinite alternate; animation-delay: calc(var(--i, 0) * 55ms + 120ms), 1.4s; }
@keyframes cz-shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Background videos (page heroes, CTA band) */
.cz-vbg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.cz-vbg img, .cz-vbg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cz-vbg video { opacity: 0; transition: opacity 1.2s; }
.cz-vbg video.is-on { opacity: 1; }
.page-hero { position: relative; isolation: isolate; overflow: hidden; }
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero .cz-vbg { opacity: 0.7; -webkit-mask-image: linear-gradient(180deg, transparent 35%, #000 75%); mask-image: linear-gradient(180deg, transparent 35%, #000 75%); }
.page-hero .cz-vbg img, .page-hero .cz-vbg video { transform: translateY(34%); }
.band .cz-vbg { opacity: 0.55; border-radius: inherit; z-index: -1; }
.band > * { position: relative; }
.band > .cz-vbg { position: absolute; }

/* Marquee strip */
.strip.cz-marquee ul { flex-wrap: nowrap; width: max-content; animation: cz-marquee 32s linear infinite; }
.strip.cz-marquee .cz-marquee-mask { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip.cz-marquee:hover ul { animation-play-state: paused; }
@keyframes cz-marquee { to { transform: translateX(-50%); } }

/* Icons draw themselves when cards reveal */
.reveal .card-ic svg, .reveal .cz-flow-ic svg { stroke-dasharray: 80; stroke-dashoffset: 80; }
.reveal.in .card-ic svg, .reveal.in .cz-flow-ic svg { animation: cz-draw 1.4s var(--cz-ease) 0.3s forwards; }
@keyframes cz-draw { to { stroke-dashoffset: 0; } }

/* Image wipe-in (founders etc.) */
.cz-wipe { clip-path: inset(0 0 100% 0 round 14px); transform: scale(1.08); transition: clip-path 1.1s var(--cz-ease), transform 1.4s var(--cz-ease); }
.cz-wipe.in { clip-path: inset(0 0 0 0 round 14px); transform: none; }

/* Mobile menu: links cascade in */
@media (max-width: 1023px) {
  .header.open .nav a { animation: cz-menu-in 0.45s var(--cz-ease) both; }
  .header.open .nav a:nth-child(2) { animation-delay: 0.05s; } .header.open .nav a:nth-child(3) { animation-delay: 0.1s; }
  .header.open .nav a:nth-child(4) { animation-delay: 0.15s; } .header.open .nav a:nth-child(5) { animation-delay: 0.2s; }
}
@keyframes cz-menu-in { from { opacity: 0; transform: translate3d(0, -8px, 0); } to { opacity: 1; transform: none; } }

/* Animated success check on the contact form */
.cz-check { width: 26px; height: 26px; flex-shrink: 0; vertical-align: middle; margin-right: 8px; }
.cz-check circle { stroke-dasharray: 76; stroke-dashoffset: 76; animation: cz-draw 0.6s var(--cz-ease) forwards; }
.cz-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: cz-draw 0.45s var(--cz-ease) 0.45s forwards; }
.form-msg.ok { display: flex; align-items: center; }

/* ---------- Ecosystem orbit ---------- */
.cz-eco-sec { background: linear-gradient(180deg, #fff, var(--bg-soft, #f7f8fc)); overflow: hidden; }
.cz-eco { position: relative; max-width: 1060px; margin: 24px auto 0; }
.cz-eco-stage { position: relative; transition: transform 0.7s var(--cz-ease); transform-style: preserve-3d; }
.cz-eco-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cz-eco-ring { fill: none; stroke: rgba(91, 61, 245, 0.14); }
.cz-eco-ring--dash { stroke: rgba(14, 165, 160, 0.25); stroke-dasharray: 6 12; animation: cz-dash 8s linear infinite; }
@keyframes cz-dash { to { stroke-dashoffset: -180; } }
.cz-eco-path { fill: none; stroke: rgba(91, 61, 245, 0.16); stroke-width: 1.2; transition: stroke 0.3s, stroke-width 0.3s; }
.cz-eco-path.is-on { stroke: url(#czCore); stroke: var(--cz-violet); stroke-width: 2; stroke-dasharray: 6 8; animation: cz-dash 3s linear infinite; }
.cz-eco-glow { transform-origin: 500px 300px; animation: cz-breathe 6s ease-in-out infinite; }
.cz-eco-core { fill: #fff; stroke: rgba(91, 61, 245, 0.45); stroke-width: 1.5; filter: drop-shadow(0 10px 24px rgba(91, 61, 245, 0.25)); }
.cz-eco-core-ring { fill: none; stroke: rgba(14, 165, 160, 0.5); stroke-dasharray: 4 6; transform-origin: 500px 300px; animation: cz-spin 30s linear infinite; }
.cz-eco-t1 { font: 700 17px var(--display, sans-serif); fill: #0f172a; }
.cz-eco-t2 { font: 600 9.5px var(--font, sans-serif); letter-spacing: 2px; fill: #64748b; }
.cz-eco-node { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line, #e6e8f0); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 600; color: #0f172a; text-decoration: none; white-space: nowrap; backdrop-filter: blur(8px); transition: transform 0.35s var(--cz-ease), box-shadow 0.35s, border-color 0.35s, opacity 0.35s; }
.cz-eco-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-soft, #ece8ff), var(--teal-soft, #d9f5f1)); color: var(--cz-violet); }
.cz-eco-ic .i { width: 16px; height: 16px; }
.cz-eco-node:hover, .cz-eco-node:focus-visible, .cz-eco-node.is-on { transform: translate(-50%, -50%) scale(1.08); border-color: rgba(91, 61, 245, 0.45); box-shadow: 0 14px 34px -12px rgba(91, 61, 245, 0.55); z-index: 2; }
.cz-eco.has-active .cz-eco-node:not(.is-on) { opacity: 0.5; }
.cz-eco-desc { margin: 18px auto 0; max-width: 560px; text-align: center; color: var(--ink-2, #334155); min-height: 3em; transition: opacity 0.25s; }
@media (max-width: 767px) {
  .cz-eco-svg { display: none; }
  .cz-eco-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cz-eco-node { position: static; transform: none; white-space: normal; font-size: 13px; }
  .cz-eco-node:hover, .cz-eco-node.is-on { transform: none; }
}

/* ---------- Call flow ---------- */
.cz-flow { position: relative; margin-top: 28px; padding: 28px; border-radius: var(--radius-lg, 22px); background: #fff; border: 1px solid var(--line, #e6e8f0); box-shadow: var(--shadow); }
.cz-flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; }
.cz-flow-line { position: absolute; left: calc(28px + 10%); right: calc(28px + 10%); top: 50px; height: 2px; background: var(--line, #e6e8f0); }
.cz-flow-line > i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--cz-violet), var(--cz-teal)); transition: transform 0.9s var(--cz-ease); }
.cz-flow-step { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cz-flow-step b { font-family: var(--display, sans-serif); font-size: 15px; color: #0f172a; }
.cz-flow-step > span:last-child { font-size: 13px; color: var(--muted, #64748b); line-height: 1.45; }
.cz-flow-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line-2, #d9dce8); color: var(--muted, #64748b); transition: all 0.5s var(--cz-ease); }
.cz-flow-step.is-done .cz-flow-ic { border-color: rgba(91, 61, 245, 0.45); color: var(--cz-violet); background: var(--brand-soft, #ece8ff); }
.cz-flow-step.is-on .cz-flow-ic { border-color: var(--cz-violet); color: #fff; background: linear-gradient(135deg, var(--cz-violet), var(--cz-teal)); box-shadow: 0 0 0 6px rgba(91, 61, 245, 0.12), 0 12px 28px -8px rgba(91, 61, 245, 0.6); transform: scale(1.08); }
.cz-flow-status { margin: 22px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; font: 500 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2, #334155); }
.cz-flow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-teal); box-shadow: 0 0 0 0 rgba(14, 165, 160, 0.5); animation: cz-ping 1.6s ease-out infinite; }
@keyframes cz-ping { 0% { box-shadow: 0 0 0 0 rgba(14, 165, 160, 0.5); } 100% { box-shadow: 0 0 0 12px rgba(14, 165, 160, 0); } }
@media (max-width: 767px) {
  .cz-flow ol { grid-template-columns: 1fr; gap: 18px; }
  .cz-flow-step { flex-direction: row; text-align: left; flex-wrap: wrap; column-gap: 12px; }
  .cz-flow-step > span:last-child { flex-basis: 100%; padding-left: 58px; margin-top: -14px; }
  .cz-flow-line { left: 50px; right: auto; top: 50px; bottom: 90px; width: 2px; height: auto; }
  .cz-flow-line > i { height: 100%; transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  .cz-w > .cz-s { opacity: 1; transform: none; animation: none !important; }
  .grad, .cz-w > .grad, .strip.cz-marquee ul, .cz-eco-ring--dash, .cz-eco-glow, .cz-eco-core-ring, .cz-flow-dot { animation: none !important; }
  .cz-wipe { clip-path: none; transform: none; }
  .reveal .card-ic svg, .reveal .cz-flow-ic svg { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
}

.foot-bottom a, .foot-about p a { text-decoration: underline; text-underline-offset: 2px; }

/* footer column titles: h3 for a valid heading order (same look as the old h4) */
.footer h3 { font-family: var(--font); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 16px; }
.group-line a { text-decoration: underline; text-underline-offset: 2px; }
.form-foot a { text-decoration: underline; text-underline-offset: 2px; }
