/* CleverHive motion system. Loaded after app.css and theme.css.
   One set of durations, easings and presets for the whole product; behaviour lives in /static/shared/js/motion.js.
   Rules: animate transform and opacity (GPU friendly), never hide content without JavaScript,
   and everything collapses to instant changes under prefers-reduced-motion. */

/* ------------------------------------------------------------------ tokens */
:root {
  /* durations */
  --dur-instant: 90ms;
  --dur-fast: 160ms;     /* hovers, presses, colour changes */
  --dur-base: 260ms;     /* menus, toggles, small panels */
  --dur-slow: 420ms;     /* entrances, dialogs */
  --dur-reveal: 680ms;   /* scroll reveals, hero */
  --dur-ambient: 24s;    /* background drift */

  /* easing */
  --ease-out: cubic-bezier(.22, 1, .36, 1);       /* default: quick start, soft landing */
  --ease-in: cubic-bezier(.55, 0, .75, .2);       /* exits */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);    /* things that move across the screen */
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1); /* small overshoot, fallback for the spring below */

  /* presets */
  --stagger: 55ms;
  --rise: 14px;          /* entrance travel */
  --lift: -3px;          /* hover lift for cards */
  --press: .97;          /* button press scale */
  --tilt-max: 5deg;
  --hover-shadow: 0 14px 30px -14px rgba(27, 30, 51, .28), 0 4px 10px -6px rgba(27, 30, 51, .12);
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);

  /* the older tokens follow the new curve */
  --ease: var(--ease-out);
  --fast: var(--dur-fast);
  --mid: var(--dur-base);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* critically damped spring with a 2–3% overshoot: lively, never bouncy */
    --ease-spring: linear(0, .009, .035 2.1%, .141 4.4%, .281 6.7%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.051 22.6%, 1.055 25.4%, 1.043 28.8%, 1.007 36.6%, .993 41.2%, .998 51.2%, 1.001 65%, 1);
  }
}

/* ------------------------------------------------------------------ keyframes (shared) */
@keyframes m-fade { from { opacity: 0; } }
@keyframes m-up { from { opacity: 0; transform: translate3d(0, var(--rise), 0); } }
@keyframes m-down { from { opacity: 0; transform: translate3d(0, calc(var(--rise) * -.6), 0); } }
@keyframes m-left { from { opacity: 0; transform: translate3d(-18px, 0, 0); } }
@keyframes m-scale { from { opacity: 0; transform: scale(.94); } }
@keyframes m-blur-up { from { opacity: 0; transform: translate3d(0, 10px, 0); filter: blur(8px); } }
@keyframes m-clip-up { from { clip-path: inset(0 0 100% 0); transform: translate3d(0, 8px, 0); } to { clip-path: inset(0 0 -10% 0); } }
@keyframes m-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -2% 0 0); } }
@keyframes m-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes m-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes m-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes m-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes m-route { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes m-drift-a { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(6%, 8%, 0) scale(1.08); } }
@keyframes m-drift-b { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-8%, -5%, 0) scale(.95); } }
@keyframes m-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -8px, 0); } }
@keyframes m-sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 60%, 100% { transform: translateX(320%) skewX(-18deg); } }
@keyframes m-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes m-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

/* The older names used across app.css / theme.css, upgraded in place. */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate3d(28px, 0, 0) scale(.96); filter: blur(2px); } }
@keyframes toast-out { to { opacity: 0; transform: translate3d(28px, 0, 0) scale(.96); } }
@keyframes pop-in { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); } }
@keyframes pop-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(.97); } }

/* ------------------------------------------------------------------ utility classes
   .m-fade .m-up .m-down .m-left .m-scale .m-blur  : play once on load
   style a delay with --d (e.g. set by data-stagger in motion.js) */
.m-fade, .m-up, .m-down, .m-left, .m-scale, .m-blur { animation: var(--m-name, m-up) var(--dur-slow) var(--ease-out) both; animation-delay: var(--d, 0ms); }
.m-fade { --m-name: m-fade; } .m-down { --m-name: m-down; } .m-left { --m-name: m-left; } .m-scale { --m-name: m-scale; } .m-blur { --m-name: m-blur-up; }

/* ------------------------------------------------------------------ page transitions (cross-document View Transitions)
   Supported browsers crossfade between pages without delaying navigation; others simply load the next page,
   where the entrance animations below take over. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: var(--dur-base); }
::view-transition-old(root) { animation: vt-out 180ms var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in 300ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translate3d(0, -6px, 0); } }
@keyframes vt-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
/* Frames that stay put between pages: the sidebar, the top bars and the sign-in story panel. */
.sidebar { view-transition-name: ch-sidebar; }
.appbar { view-transition-name: ch-appbar; }
.site-nav { view-transition-name: ch-site-nav; }
.auth-side { view-transition-name: ch-auth-side; }
.onb-top { view-transition-name: ch-onb-top; }
::view-transition-group(ch-sidebar), ::view-transition-group(ch-appbar), ::view-transition-group(ch-site-nav),
::view-transition-group(ch-auth-side), ::view-transition-group(ch-onb-top) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-out); }
::view-transition-old(ch-auth-side), ::view-transition-new(ch-auth-side) { animation-duration: var(--dur-slow); }
/* the phone drawer is off-canvas: never snapshot it */
@media (max-width: 900px) { .sidebar { view-transition-name: none; } }

/* ------------------------------------------------------------------ route progress (indeterminate: real progress is unknown) */
.route-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.route-progress::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--brass), var(--accent)); transform: translateX(-100%); }
.route-progress.is-active { opacity: 1; transition-delay: 120ms; } /* fast pages never flash it */
.route-progress.is-active::before { animation: m-route 1.15s var(--ease-in-out) infinite; }

/* ------------------------------------------------------------------ entrances on load */
.page-enter > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.page-enter > *:nth-child(2) { animation-delay: 50ms; } .page-enter > *:nth-child(3) { animation-delay: 100ms; }
.page-enter > *:nth-child(4) { animation-delay: 150ms; } .page-enter > *:nth-child(5) { animation-delay: 200ms; }
.page-enter > *:nth-child(n+6) { animation-delay: 240ms; }
.page-head > * { animation: m-up var(--dur-slow) var(--ease-out) both; }
.page-head > .actions { animation-delay: 70ms; }
.page-head h1 { animation: m-clip-up var(--dur-reveal) var(--ease-out) both; }

/* public hero (landing) */
.hero > div:first-child > * { animation: m-up var(--dur-reveal) var(--ease-out) both; }
.hero > div:first-child > .eyebrow { animation-name: m-down; }
.hero > div:first-child > h1 { animation-name: m-blur-up; animation-delay: 80ms; }
.hero > div:first-child > .lead { animation-delay: 180ms; }
.hero > div:first-child > .row { animation-delay: 260ms; }
.hero > div:first-child > .trust { animation-delay: 340ms; }
.hero h1 em { display: inline-block; animation: m-wipe 900ms var(--ease-in-out) 420ms both; }
.phone-demo { animation: hero-card 900ms var(--ease-out) 160ms both; }
@keyframes hero-card { from { opacity: 0; transform: perspective(1000px) translate3d(0, 28px, 0) rotateX(10deg) scale(.96); } }

/* page heroes (pricing, industries, about, contact) */
.page-hero > * { animation: m-up var(--dur-reveal) var(--ease-out) both; }
.page-hero > .eyebrow { animation-name: m-down; }
.page-hero > h1 { animation-name: m-blur-up; animation-delay: 70ms; }
.page-hero > .lead { animation-delay: 150ms; }

/* sign in / sign up */
.auth-panel.page-enter > * { animation-duration: var(--dur-slow); }
.auth-form > * { animation: m-up var(--dur-slow) var(--ease-out) both; }
.auth-form > *:nth-child(1) { animation-delay: 120ms; } .auth-form > *:nth-child(2) { animation-delay: 170ms; }
.auth-form > *:nth-child(3) { animation-delay: 220ms; } .auth-form > *:nth-child(4) { animation-delay: 270ms; }
.auth-form > *:nth-child(n+5) { animation-delay: 310ms; }
.auth-side-inner > * { animation: m-left var(--dur-reveal) var(--ease-out) both; }
.auth-side-inner > *:nth-child(2) { animation-delay: 80ms; } .auth-side-inner > *:nth-child(3) { animation-delay: 160ms; }
.auth-side-inner > *:nth-child(n+4) { animation-delay: 240ms; }
.auth-points li, .auth-steps li { animation: m-left var(--dur-slow) var(--ease-out) both; }
.auth-points li:nth-child(1) { animation-delay: 260ms; } .auth-points li:nth-child(2) { animation-delay: 320ms; }
.auth-points li:nth-child(3) { animation-delay: 380ms; } .auth-points li:nth-child(4) { animation-delay: 440ms; }
.auth-steps li:nth-child(1) { animation-delay: 520ms; } .auth-steps li:nth-child(2) { animation-delay: 580ms; } .auth-steps li:nth-child(3) { animation-delay: 640ms; }
.auth-demo .bubble, .auth-demo-result { animation: rise-in 520ms var(--ease-out) both; }
.auth-demo .bubble:nth-child(1) { animation-delay: .45s; } .auth-demo .bubble:nth-child(2) { animation-delay: 1.25s; }
.auth-demo .bubble:nth-child(3) { animation-delay: 2.05s; } .auth-demo-result { animation-delay: 2.85s; }
/* while signing in: the form settles back so the button's progress reads as the one thing happening */
.auth-form .field, .auth-form .agree { transition: opacity var(--dur-base) var(--ease-out); }
.auth-form[data-submitting] .field, .auth-form[data-submitting] .agree { opacity: .6; }

/* onboarding */
.onb-steps li { animation: m-up var(--dur-slow) var(--ease-out) both; }
.onb-steps li:nth-child(2) { animation-delay: 50ms; } .onb-steps li:nth-child(3) { animation-delay: 100ms; } .onb-steps li:nth-child(4) { animation-delay: 150ms; }
.onb-bar i { transform-origin: left; animation: bar-grow 900ms var(--ease-out) 200ms both; }
@keyframes bar-grow { from { transform: scaleX(0); } }
.onb-steps .now .dot { box-shadow: 0 0 0 0 color-mix(in srgb, var(--indigo) 40%, transparent); animation: dot-ping 2.4s var(--ease-out) 1s 2; }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--indigo) 35%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.onb-card form.stack > *, .onb-card .onb-jobs > * { animation: m-up var(--dur-slow) var(--ease-out) both; }
.onb-card form.stack > *:nth-child(2) { animation-delay: 60ms; } .onb-card form.stack > *:nth-child(3) { animation-delay: 110ms; }
.onb-card form.stack > *:nth-child(4) { animation-delay: 160ms; } .onb-card form.stack > *:nth-child(n+5) { animation-delay: 200ms; }

/* tables: rows arrive in a short cascade on load */
.table-wrap tbody tr { animation: m-fade var(--dur-slow) var(--ease-out) both; }
.table-wrap tbody tr:nth-child(2) { animation-delay: 25ms; } .table-wrap tbody tr:nth-child(3) { animation-delay: 50ms; }
.table-wrap tbody tr:nth-child(4) { animation-delay: 75ms; } .table-wrap tbody tr:nth-child(5) { animation-delay: 100ms; }
.table-wrap tbody tr:nth-child(6) { animation-delay: 125ms; } .table-wrap tbody tr:nth-child(n+7) { animation-delay: 150ms; }

/* ------------------------------------------------------------------ scroll reveal (motion.js adds these only to content below the fold) */
.reveal { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out), clip-path var(--dur-reveal) var(--ease-out), filter var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.reveal[data-reveal="scale"] { transform: scale(.94); }
.reveal[data-reveal="left"] { transform: translate3d(-28px, 0, 0); }
.reveal[data-reveal="right"] { transform: translate3d(28px, 0, 0); }
.reveal[data-reveal="fade"] { transform: none; }
.reveal[data-reveal="clip"] { transform: translate3d(0, 12px, 0); clip-path: inset(0 0 96% 0); } /* not 100%: IntersectionObserver ignores fully clipped elements */
.reveal[data-reveal="blur"] { transform: translate3d(0, 12px, 0); filter: blur(8px); }
.reveal[data-reveal="tilt"] { transform: perspective(1000px) translate3d(0, 30px, 0) rotateX(8deg); }
.reveal.is-revealed { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); filter: none; }

/* ------------------------------------------------------------------ hover presets */
/* buttons: lift, glow, press */
.btn { transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); will-change: auto; }
.btn:active:not([disabled]), .btn.is-pressed { transform: scale(var(--press)); transition-duration: var(--dur-instant); }
.btn-primary, .btn-brass { overflow: hidden; isolation: isolate; }
.btn-primary:hover:not([disabled]) { box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--indigo) 75%, transparent); }
.btn-brass:hover:not([disabled]) { box-shadow: 0 8px 20px -8px rgba(138, 101, 40, .7); }
.btn-primary::before, .btn-brass::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); transform: translateX(-120%) skewX(-18deg); }
.btn-primary:hover:not([disabled])::before, .btn-brass:hover:not([disabled])::before { animation: m-sheen 1.1s var(--ease-out) 1; }
/* a trailing arrow nudges forward; leading icons stay put */
.btn > svg:last-child:not(:first-child) { transition: transform var(--dur-base) var(--ease-spring); }
.btn:hover > svg:last-child:not(:first-child) { transform: translateX(3px); }
.icon-btn { transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { transition: transform var(--dur-base) var(--ease-spring); }
.icon-btn:hover svg { transform: scale(1.08); }
/* magnetic elements (motion.js sets --mgx/--mgy) */
[data-magnetic] { translate: var(--mgx, 0) var(--mgy, 0); transition: translate var(--dur-slow) var(--ease-spring), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast); }
[data-magnetic].is-magnet { transition: translate 120ms linear, transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast); }

/* cards that link somewhere: lift with a soft shadow */
a.card, .item-card, .feature, .price-card, .ind-card, .contact-way, .onb-next-card, .how .card, .about-grid .card {
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast), background-color var(--dur-fast);
}
a.card:hover, .item-card:hover, .feature:hover, .price-card:hover, .ind-card:hover, a.contact-way:hover, .onb-next-card:hover, .how .card:hover, .about-grid .card:hover,
.tpl:hover, .emp:hover, .industry:hover, a.stat:hover {
  transform: translate3d(0, var(--lift), 0); box-shadow: var(--hover-shadow); border-color: var(--border-strong);
}
a.card:active, .tpl:active, .emp:active, a.stat:active { transform: translate3d(0, -1px, 0) scale(.99); transition-duration: var(--dur-instant); }
.emp.new:hover { box-shadow: none; border-color: var(--accent); }
.emp.new .plus { transition: transform var(--dur-base) var(--ease-spring); }
.emp.new:hover .plus { transform: rotate(90deg) scale(1.06); }
/* icons inside cards respond to the card */
.feature .ico, .industry .ico, .ind-card .ico, .tpl .ico, .stat .k .ico, .contact-way .ico, .onb-next-card .ico, .how .num, .face {
  transition: transform var(--dur-base) var(--ease-spring), background-color var(--dur-fast), color var(--dur-fast);
}
.feature:hover .ico, .industry:hover .ico, .ind-card:hover .ico, .tpl:hover .ico, a.stat:hover .k .ico, a.contact-way:hover .ico, .onb-next-card:hover .ico, .how .card:hover .num, .emp:hover .face {
  transform: translate3d(0, -2px, 0) scale(1.06);
}
.feature:hover .ico, .ind-card:hover .ico, .tpl:hover .ico, .industry:hover .ico { background: var(--indigo-tint); color: var(--accent); }
.ind-card .more svg { transition: transform var(--dur-base) var(--ease-spring); }
.ind-card:hover .more svg { transform: translateX(4px); }

/* cursor spotlight (motion.js sets --mx/--my on [data-spotlight]) */
[data-spotlight] { position: relative; }
[data-spotlight]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 45%);
  transition: opacity var(--dur-slow) var(--ease-out);
}
[data-spotlight]:hover::after { opacity: 1; }
[data-spotlight] > * { position: relative; z-index: 1; }

/* 3D tilt (motion.js sets --rx/--ry) */
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--ty, 0px), 0); transition: transform 600ms var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast); transform-style: preserve-3d; }
[data-tilt].is-tilting { transition: transform 120ms linear, box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast); --ty: -2px; box-shadow: var(--hover-shadow); }
[data-tilt]:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--ty, -2px), 0); }
/* layered depth inside the hero conversation */
.phone-demo[data-tilt] .demo-lines { transform: translateZ(18px); }
.phone-demo[data-tilt] .demo-result { transform: translateZ(34px); }
.phone-demo[data-tilt] .top { transform: translateZ(10px); }

/* rows, list items, nav */
.mini-call { transition: background-color var(--dur-fast), padding var(--dur-base) var(--ease-out); }
.mini-call .badge { transition: transform var(--dur-base) var(--ease-spring); }
.mini-call:hover .badge { transform: translateX(-2px); }
tbody tr.link td { transition: background-color var(--dur-fast); }
tbody tr.link td:first-child { box-shadow: inset 0 0 0 0 var(--accent); transition: background-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out); }
tbody tr.link:hover td:first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
.step { transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-base) var(--ease-out); }
.step:hover { transform: translateX(3px); }
.nav-link { transition: color var(--dur-fast), background-color var(--dur-fast); }
.nav-link .nav-ico { transition: transform var(--dur-base) var(--ease-spring), color var(--dur-fast); }
.nav-link:hover .nav-ico { transform: translateX(1px); }
.nav-indicator { transition: transform 420ms var(--ease-spring), height 420ms var(--ease-out), opacity var(--dur-fast); }
.status-pill { transition: border-color var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast); }
.status-pill.on i { animation: led 2.4s var(--ease-out) infinite; }
@keyframes led { 0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .35); } 70%, 100% { box-shadow: 0 0 0 6px rgba(18, 183, 106, 0); } }
.status-item .led.on { animation: led 2.4s var(--ease-out) infinite; }
.chip-row a, .chip, .pager .pg, .guide-chips .chip, .guide-matches a { transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.chip-row a:active, .pager .pg:active, .guide-chips .chip:active { transform: scale(.96); }
.guide-chips .chip:hover, .guide-matches a:hover { transform: translate3d(0, -1px, 0); }

/* public site nav: hover pill that glides between links (motion.js) */
  transform: translateX(var(--px, 0)); width: var(--pw, 0); transition: transform 380ms var(--ease-spring), width 380ms var(--ease-out), opacity var(--dur-fast); }

/* ------------------------------------------------------------------ sticky bars on scroll */
.site-nav { transition: box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base), padding var(--dur-base) var(--ease-out), border-color var(--dur-base); }
.site-nav.is-scrolled { background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); box-shadow: 0 6px 24px -12px rgba(16, 24, 40, .25); padding-top: 10px; padding-bottom: 10px; }
.appbar { transition: box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base); }
.appbar.is-scrolled { box-shadow: 0 8px 20px -16px rgba(16, 24, 40, .35); background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ------------------------------------------------------------------ menus, dropdowns, dialogs, drawers */
.menu { transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-spring), visibility 0s linear var(--dur-base); }
.dropdown.open .menu { transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-spring), visibility 0s; }
.dropdown.open .menu > a, .dropdown.open .menu > form, .dropdown.open .menu > .menu-head { animation: m-up var(--dur-base) var(--ease-out) both; --rise: 6px; }
.dropdown.open .menu > :nth-child(2) { animation-delay: 30ms; } .dropdown.open .menu > :nth-child(3) { animation-delay: 60ms; }
.dropdown.open .menu > :nth-child(4) { animation-delay: 90ms; } .dropdown.open .menu > :nth-child(n+5) { animation-delay: 110ms; }
.menu a svg, .menu button svg { transition: transform var(--dur-base) var(--ease-spring); }
.menu a:hover svg, .menu button:hover svg { transform: translateX(2px); }
dialog.modal[open] { animation: pop-in var(--dur-slow) var(--ease-spring) both; }
dialog.modal[open] .modal-ico { animation: m-pop 520ms var(--ease-out) 120ms both; }
dialog.modal::backdrop { animation: m-fade var(--dur-base) var(--ease-out) both; }
/* phone drawer: links cascade in when it opens */
@media (max-width: 900px) {
  .sidebar { transition: transform var(--dur-slow) var(--ease-out); }
  body.nav-open .sidebar .nav-link, body.nav-open .sidebar .nav-group-toggle { animation: m-left var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms + 80ms); }
}
/* public mobile menu (<details class="site-menu">) */
.site-menu summary { transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.site-menu[open] .site-menu-list { animation: menu-in var(--dur-base) var(--ease-spring) both; transform-origin: top right; }
.site-menu.closing .site-menu-list { animation: menu-out var(--dur-fast) var(--ease-in) both; }
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, -6px, 0) scale(.96); } }
@keyframes menu-out { to { opacity: 0; transform: translate3d(0, -6px, 0) scale(.97); } }
/* guide chat panel */
.guide.open .guide-panel { animation: panel-in var(--dur-slow) var(--ease-spring) both; transform-origin: bottom right; }
.guide-panel.closing { display: flex; animation: panel-out var(--dur-fast) var(--ease-in) both; transform-origin: bottom right; }
@keyframes panel-in { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.95); } }
@keyframes panel-out { to { opacity: 0; transform: translate3d(0, 10px, 0) scale(.97); } }
.guide-fab { transition: background-color var(--dur-fast), transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base); }
.guide-fab:hover { transform: translate3d(0, -2px, 0); }
.guide-fab:active { transform: scale(.95); }
.guide-msg { animation: msg-in var(--dur-base) var(--ease-out) both; }
.guide-msg.me { transform-origin: bottom right; } .guide-msg.bot { transform-origin: bottom left; }
@keyframes msg-in { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.96); } }
.guide-msg.typing::after { content: none; }
.guide-msg.typing { display: flex; align-items: center; justify-content: center; gap: 4px; }
.guide-msg.typing::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); box-shadow: 10px 0 0 var(--faint), -10px 0 0 var(--faint); animation: m-typing 1s ease-in-out infinite; }
.wa-fab { transition: background-color var(--dur-fast), transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base); animation: m-up var(--dur-slow) var(--ease-spring) 1.2s both; }
.wa-fab:hover { transform: translate3d(0, -2px, 0); }

/* toasts: spring in, collapse out (motion in app.js) */
.toast { animation: toast-in var(--dur-slow) var(--ease-spring) both; }
.toast .ico { animation: m-pop 520ms var(--ease-out) 180ms both; }
.toast.ok .ico svg path { stroke-dasharray: 24; animation: m-draw 420ms var(--ease-out) 260ms both; }

/* tabs: a pill that slides to the chosen tab (motion.js) */
.tabs.has-indicator a[aria-selected=true] { background: transparent; box-shadow: none; }
.tabs-indicator { position: absolute; z-index: 0; top: 0; left: 0; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-xs); pointer-events: none;
  transform: translate(var(--tx, 0), var(--ty, 0)); width: var(--tw, 0); height: var(--th, 0); transition: transform 420ms var(--ease-spring), width 420ms var(--ease-out), height 420ms var(--ease-out); }
.tabs a { transition: color var(--dur-fast); }

/* accordions (<details>): height animated by motion.js, chevron and text here */
details > summary { transition: color var(--dur-fast); }
details > summary:hover { color: var(--accent); }
.faq details, details.card { transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out); }
.faq details[open], details.card[open] { border-color: var(--border-strong); }
.faq details summary, details.card > summary { position: relative; padding-right: 28px; }
.faq details summary::after, details.card:not(.faq) > summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg); transition: transform var(--dur-base) var(--ease-spring), border-color var(--dur-fast);
}
.faq details[open] summary::after, details.card:not(.faq)[open] > summary::after { transform: translateY(3px) rotate(225deg); border-color: var(--accent); }
details.faq.card > summary::after { content: none; }
details[open] > :not(summary) { animation: m-fade var(--dur-base) var(--ease-out) both; }

/* ------------------------------------------------------------------ forms and micro-interactions */
.field > span, .field > .lbl { transition: color var(--dur-fast); }
.field:focus-within > span, .field:focus-within > .lbl { color: var(--accent); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=tel], input[type=number], input[type=time], select, textarea {
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast);
}
input:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled) { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--faint)); }
.field .err, .agree .err, fieldset .err { animation: err-in var(--dur-base) var(--ease-out) both; }
@keyframes err-in { from { opacity: 0; transform: translate3d(0, -4px, 0); } }
.shake { animation: m-shake 420ms var(--ease-out) both; }
/* checkboxes and radios: a small pop on change (class added by motion.js) */
input.just-changed { animation: m-pop 320ms var(--ease-out); }
.check, .radio-card, .industry-pick label, .voice-pick label, .mode-pick label, .mode-card, .number-row {
  transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.check:active, .radio-card:active, .industry-pick label:active, .voice-pick label:active, .mode-pick label:active, .mode-card:active { transform: scale(.985); }
.industry-pick svg, .mode-pick .ico, .mode-card .ico, .onb-jobs .radio-card .ico, .voice-pick .av { transition: transform var(--dur-base) var(--ease-spring), background-color var(--dur-fast), color var(--dur-fast); }
.industry-pick label:has(input:checked) svg, .mode-pick label:has(input:checked) .ico, .mode-card:has(input:checked) .ico,
.onb-jobs .radio-card:has(input:checked) .ico, .voice-pick label:has(input:checked) .av { transform: scale(1.1); }
/* switches: the knob stretches while pressed */
.switch .slider { transition: background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-fast); }
.switch .slider::after { transition: transform var(--dur-base) var(--ease-spring), width var(--dur-fast) var(--ease-out); }
.switch:active .slider::after { width: 27px; }
.switch:active input:checked + .slider::after { transform: translateX(17px); }
/* password eye: the new icon turns in (class added in app.js) */
.pw-toggle { transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.pw-toggle:active { transform: scale(.9); }
.pw-toggle.swapped svg { animation: eye-swap var(--dur-base) var(--ease-spring) both; }
@keyframes eye-swap { from { opacity: 0; transform: rotate(-30deg) scale(.7); } }
.strength i { transition: background-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-spring); transform-origin: left; }
.strength:not([data-score="0"]) i { animation: none; }
.strength-text { transition: color var(--dur-fast); }
/* copy buttons */
[data-copy] { transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
[data-copy].is-copied { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: var(--ok-tint); }
[data-copy].is-copied svg { animation: m-pop 360ms var(--ease-out) both; }
[data-copy].is-copied svg path { stroke-dasharray: 24; animation: m-draw 360ms var(--ease-out) both; }
/* button loading: the label fades out and the spinner fades in */
.btn.is-loading::after { animation: spin .8s linear infinite, m-fade var(--dur-fast) var(--ease-out); }
.btn.is-done { pointer-events: none; }
/* success states */
.sent .ico, .onb-done .ico { animation: m-scale 560ms var(--ease-spring) both; }
.sent .ico svg path, .onb-done .ico svg path { stroke-dasharray: 24; animation: m-draw 520ms var(--ease-out) 260ms both; }
.sent > :not(.ico), .onb-done > :not(.ico) { animation: m-up var(--dur-slow) var(--ease-out) 180ms both; }
.alert { animation: m-up var(--dur-base) var(--ease-out) both; --rise: 6px; }
.alert-error { animation: m-up var(--dur-base) var(--ease-out) both, m-shake 420ms var(--ease-out) 200ms; }
/* file read progress (real bytes read, from FileReader) */
.file-progress { display: block; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--subtle); overflow: hidden; }
.file-progress > i { display: block; height: 100%; width: 100%; background: var(--brass); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--dur-fast) linear; }

/* bars and meters fill on reveal (motion.js sets the width) */
.progress-bar span, .lead-bar .track span, .hbar .track span, .meter span { transition: width 1.1s var(--ease-out); }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: bar-up 800ms var(--ease-out) both; }
.chart .bar:nth-of-type(odd) { animation-delay: 60ms; } .chart .bar:nth-of-type(3n) { animation-delay: 120ms; }
@keyframes bar-up { from { transform: scaleY(0); } }
.chart .bar { transition: opacity var(--dur-fast); }

/* ------------------------------------------------------------------ skeleton loaders */
.skeleton { position: relative; overflow: hidden; background: var(--subtle); border-radius: var(--r-xs); color: transparent !important; }
.skeleton > * { visibility: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: m-shimmer 1.3s var(--ease-in-out) infinite; }
.skeleton-line { display: block; height: 12px; border-radius: 6px; }
.skeleton-line + .skeleton-line { margin-top: 8px; }
/* call recordings: a thin shimmer under the player while the audio is really buffering */
.audio-wrap { position: relative; }
.audio-wrap::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -8px; height: 3px; border-radius: 3px; pointer-events: none; opacity: 0; transition: opacity var(--dur-base);
  background: linear-gradient(90deg, transparent, var(--brass), transparent) no-repeat, var(--subtle); background-size: 40% 100%, 100% 100%; }
.audio-wrap.is-loading::after { opacity: 1; animation: audio-shimmer 1.2s var(--ease-in-out) infinite; }
@keyframes audio-shimmer { from { background-position: -60% 0, 0 0; } to { background-position: 160% 0, 0 0; } }

/* ------------------------------------------------------------------ ambient backgrounds (decorative, aria-hidden) */
.ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; }
.ambient .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.ambient .orb.o1 { width: 520px; height: 520px; left: -140px; top: -180px; background: radial-gradient(circle, color-mix(in srgb, var(--indigo) 30%, transparent), transparent 70%); animation: m-drift-a var(--dur-ambient) var(--ease-in-out) infinite; }
.ambient .orb.o2 { width: 460px; height: 460px; right: -120px; top: 40px; background: radial-gradient(circle, color-mix(in srgb, var(--brass) 32%, transparent), transparent 70%); animation: m-drift-b calc(var(--dur-ambient) * 1.2) var(--ease-in-out) infinite; }
.ambient .orb.o3 { width: 380px; height: 380px; left: 35%; bottom: -220px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); animation: m-drift-a calc(var(--dur-ambient) * 1.4) var(--ease-in-out) infinite reverse; }
.ambient .grid { position: absolute; inset: -1px; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); }
.ambient canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.ambient canvas.is-on { opacity: 1; }
/* public pages: one ambient layer behind the top of every page, fuller on the landing hero */
.public-main { position: relative; isolation: isolate; }
.ambient-top { inset: 0 0 auto 0; height: 720px; z-index: -1;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.ambient-top:not(.is-hero) .orb { opacity: .32; }
.ambient-top:not(.is-hero) .orb.o1 { left: 6%; top: -300px; }
.ambient-top:not(.is-hero) .orb.o2 { right: 4%; top: -260px; }
.ambient-top:not(.is-hero) .orb.o3 { display: none; }
.ambient-top:not(.is-hero) .grid { -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 10%, transparent 70%); }
/* landing hero: floating chips around the example call, on their own depth layers */
.hero-visual { position: relative; }
.float-chip { position: absolute; z-index: 2; pointer-events: none; }
.float-chip > span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-lg); color: var(--graphite);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.float-chip i { width: 7px; height: 7px; border-radius: 50%; background: #12B76A; animation: led 2.4s var(--ease-out) infinite; }
.float-chip.c1 { top: -18px; right: 18px; animation: m-scale var(--dur-slow) var(--ease-spring) 1.1s both; }
.float-chip.c2 { bottom: -18px; left: -22px; animation: m-scale var(--dur-slow) var(--ease-spring) 1.3s both; }
.float-chip.c2 > span { animation-delay: -3s; }
@media (max-width: 960px) { .float-chip { display: none; } }
/* floating decoration */
.float { animation: m-float 6s var(--ease-in-out) infinite; }
.phone-demo .live i, .eyebrow .dot { animation: led 2.4s var(--ease-out) infinite; }

/* sign-in story panel: slowly moving light */
.auth-side { position: relative; overflow: hidden; isolation: isolate; }
.auth-side::before { content: ""; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 35% at 20% 20%, rgba(196, 154, 82, .28), transparent 70%), radial-gradient(45% 40% at 85% 80%, color-mix(in srgb, var(--paper) 12%, transparent), transparent 70%);
  animation: m-drift-a 30s var(--ease-in-out) infinite; }
.auth-side::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000, transparent 75%); }
.auth-demo { position: relative; overflow: hidden; }
.auth-demo::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent); transform: translateX(-120%) skewX(-18deg); animation: m-sheen 7s var(--ease-in-out) 3.5s infinite; }

/* home composer and CTA bands: a slow light reflection */
.composer { overflow: hidden; isolation: isolate; }
.composer::before { content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none; background: radial-gradient(35% 30% at 25% 25%, color-mix(in srgb, var(--brass-300) 16%, transparent), transparent 70%), radial-gradient(40% 35% at 80% 70%, color-mix(in srgb, var(--paper) 10%, transparent), transparent 70%); animation: m-drift-b 28s var(--ease-in-out) infinite; }
.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--brass) 10%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: m-gradient 14s var(--ease-in-out) infinite; }
.price-card.featured { background-image: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 55%); }

/* ------------------------------------------------------------------ phones and touch: no hover-only lifts that stick */
@media (hover: none) {
  a.card:hover, .item-card:hover, .feature:hover, .price-card:hover, .ind-card:hover, a.contact-way:hover, .onb-next-card:hover, .how .card:hover, .about-grid .card:hover,
  .tpl:hover, .emp:hover, .industry:hover, a.stat:hover, .step:hover { transform: none; box-shadow: var(--shadow-xs); }
  [data-spotlight]::after { display: none; }
}
@media (max-width: 600px) {
  .ambient .orb { filter: blur(48px); }
  .ambient .orb.o1 { width: 320px; height: 320px; } .ambient .orb.o2 { width: 280px; height: 280px; } .ambient .orb.o3 { display: none; }
}

/* ------------------------------------------------------------------ reduced motion: content appears at once, nothing drifts */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
  .ambient .orb, .ambient canvas, .auth-side::before, .auth-demo::after, .composer::before, .cta-band::before { animation: none !important; }
  .ambient canvas { display: none; }
  [data-tilt], [data-tilt]:hover { transform: none !important; }
  [data-magnetic] { translate: none !important; }
  .route-progress.is-active::before { animation: none; transform: none; width: 100%; opacity: .6; }
  .hero h1 em { clip-path: none; }
}
