/* ============================================================
   Teb X — Guided Tour overlay
   Injected by public/js/tour.js. Scoped under .ax-tour, classes
   prefixed .axt-. Colors follow the Teb X brand (blue → cyan) and
   the site theme tokens. Teb X is LIGHT-first (dark via
   html[data-theme="dark"]), so this file mirrors that order.
   ============================================================ */

/* ---- theme tokens (light is the base, like the site) ---- */
.ax-tour{
  --t-ink:hsl(var(--foreground));
  --t-muted:hsl(var(--hero-sub));
  --t-faint:hsl(var(--hero-sub)/.72);
  --t-surface:#ffffff;
  --t-s2:#eef4fd;
  --t-line:rgba(20,45,90,.12);
  --t-line2:rgba(20,45,90,.2);
  --t-scrim:rgba(240,246,253,.8);
  --t-panel:#ffffff;
  --t-panel-brd:rgba(20,45,90,.1);
  --t-card:#ffffff;
  --grad:linear-gradient(135deg,#1b6ef3,#0ea5e9);
  --accent:#1b6ef3;            /* set per-slide by tour.js */
}
html[data-theme="dark"] .ax-tour{
  --t-surface:#0e1a2e;
  --t-s2:#13233c;
  --t-line:rgba(255,255,255,.1);
  --t-line2:rgba(255,255,255,.2);
  --t-scrim:rgba(5,12,22,.72);
  --t-panel:rgba(12,22,38,.9);
  --t-panel-brd:rgba(255,255,255,.1);
  --t-card:rgba(255,255,255,.05);
  --grad:linear-gradient(135deg,#38bdf8,#0ea5e9);
  --accent:#38bdf8;
}

/* ---- overlay ---- */
.ax-tour{
  position:fixed;inset:0;z-index:2147483200;  /* above the chat widget */
  display:flex;align-items:center;justify-content:center;
  padding:max(14px,env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) max(14px,env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px));
  background:var(--t-scrim);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  opacity:0;visibility:hidden;transition:opacity .35s ease,visibility .35s ease;
  direction:rtl;
}
.ax-tour.is-open{opacity:1;visibility:visible}
body.axt-lock{overflow:hidden}

/* ---- panel ---- */
.axt-panel{
  position:relative;width:100%;max-width:1060px;
  height:min(90vh,680px);max-height:92vh;
  display:flex;flex-direction:column;
  background:var(--t-panel);border:1px solid var(--t-panel-brd);border-radius:24px;
  box-shadow:0 40px 90px -40px rgba(10,30,60,.5),0 10px 30px -14px rgba(10,30,60,.3);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  overflow:hidden;
  transform:translateY(18px) scale(.985);transition:transform .4s cubic-bezier(.2,.75,.25,1);
}
.ax-tour.is-open .axt-panel{transform:none}
.axt-panel *{box-sizing:border-box}

/* ---- header ---- */
.axt-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px clamp(16px,3vw,26px) 8px}
.axt-brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:17px;letter-spacing:-.01em}
.axt-brand .axt-mark{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--grad)}
.axt-brand .axt-mark svg{width:17px;height:17px}
.axt-brand .axt-word b{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.axt-headmeta{display:flex;align-items:center;gap:12px}
.axt-counter{font-weight:600;color:var(--t-muted);font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.axt-counter .axt-cur{color:var(--accent)}
.axt-close{width:36px;height:36px;flex:none;border-radius:999px;display:grid;place-items:center;color:var(--t-muted);background:var(--t-card);border:1px solid var(--t-line);transition:color .2s,background .2s,transform .2s}
.axt-close:hover{color:var(--t-ink);transform:rotate(90deg)}
.axt-close svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round}

/* ---- stage ---- */
.axt-stage{position:relative;flex:1 1 auto;min-height:0}
.axt-slide{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;
  opacity:0;visibility:hidden;transform:translateY(14px) scale(.99);
  transition:opacity .5s ease,transform .5s cubic-bezier(.2,.7,.2,1),visibility .5s;
  pointer-events:none;padding:6px clamp(16px,3vw,30px) 14px}
.axt-slide.is-active{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.axt-inner{min-height:100%;max-width:1120px;margin-inline:auto;display:grid;grid-template-columns:1fr 1.02fr;gap:clamp(18px,3.4vw,46px);align-items:center}

.axt-fig{position:relative;width:100%;max-width:400px;margin-inline:auto;aspect-ratio:1/1}
.axt-fig svg{width:100%;height:100%;display:block;overflow:visible}

/* text side — editorial */
.axt-copy{max-width:34ch}
.axt-eyebrow{display:inline-flex;align-items:center;gap:10px;font-size:12.5px;font-weight:600;letter-spacing:.16em;color:var(--accent)}
.axt-eyebrow::before{content:"";width:26px;height:2px;border-radius:2px;background:var(--grad)}
.axt-h1{font-size:clamp(26px,4vw,42px);line-height:1.18;font-weight:800;margin:16px 0 0;letter-spacing:-.005em;text-wrap:balance}
.axt-lead{margin:14px 0 0;color:var(--t-muted);font-size:clamp(14.5px,2vw,16.5px);line-height:1.75;font-weight:400}
.axt-say{position:relative;margin:16px 0 0;padding-inline-start:16px;color:var(--t-ink);font-size:clamp(17px,2.6vw,22px);line-height:1.5;font-weight:600;text-wrap:balance}
.axt-say::before{content:"";position:absolute;inset-inline-start:0;top:5px;bottom:5px;width:3.5px;border-radius:999px;background:var(--grad)}
.axt-note{margin-top:18px;display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--t-faint);line-height:1.7}
.axt-note svg{flex:none;width:16px;height:16px;margin-top:3px;stroke:var(--t-faint);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.axt-points{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.axt-tag{font-size:12.5px;font-weight:600;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);padding:6px 12px;border-radius:999px}

/* reveal stagger */
.axt-rv{opacity:0;transform:translateY(12px)}
.axt-slide.is-active .axt-rv{animation:axt-rv .65s cubic-bezier(.2,.75,.25,1) forwards;animation-delay:calc(var(--d,0)*90ms + 120ms)}
@keyframes axt-rv{to{opacity:1;transform:none}}

/* CTA */
.axt-cta{display:flex;flex-wrap:wrap;gap:11px;margin-top:22px}
.axt-cta .axt-btn{display:inline-flex;align-items:center;gap:9px}
.axt-cta .axt-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.axt-btn{appearance:none;border:0;cursor:pointer;font-family:inherit;font-weight:700;font-size:15px;padding:13px 24px;border-radius:13px;transition:transform .18s ease,box-shadow .25s ease,filter .25s}
.axt-btn:active{transform:translateY(1px) scale(.99)}
.axt-btn-primary{color:#fff;background:var(--grad);box-shadow:0 14px 30px -14px rgba(27,110,243,.6)}
.axt-btn-primary:hover{transform:translateY(-2px);filter:brightness(1.05)}

/* footer nav */
.axt-nav{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px clamp(16px,3vw,26px) 16px}
.axt-navbtn{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-family:inherit;border:1.5px solid var(--t-line2);background:var(--t-card);color:var(--t-ink);font-weight:600;font-size:14.5px;padding:10px 17px;border-radius:12px;transition:border-color .2s,color .2s,background .2s,opacity .2s,transform .18s}
.axt-navbtn:hover{border-color:var(--accent);color:var(--accent)}
.axt-navbtn:active{transform:translateY(1px)}
.axt-navbtn[disabled]{opacity:0;pointer-events:none}
.axt-navbtn svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.axt-next{background:var(--grad);color:#fff;border-color:transparent}
.axt-next:hover{color:#fff;filter:brightness(1.05)}
.axt-dots{display:flex;gap:8px;align-items:center}
.axt-dot{width:8px;height:8px;border-radius:50%;background:var(--t-line2);border:0;padding:0;cursor:pointer;transition:all .3s}
.axt-dot.is-active{background:var(--accent);width:24px;border-radius:999px}

/* reopen pill (outside .ax-tour → own blue gradient, theme-aware) */
.axt-fab{position:fixed;z-index:9000;inset-block-end:max(18px,env(safe-area-inset-bottom,0px));inset-inline-start:max(18px,env(safe-area-inset-left,0px));
  display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-family:inherit;font-weight:700;font-size:14px;
  color:#fff;background:linear-gradient(135deg,#1b6ef3,#0ea5e9);border:0;padding:12px 18px;border-radius:999px;
  box-shadow:0 10px 26px -8px rgba(27,110,243,.55),0 1px 3px rgba(10,30,60,.25);
  transition:transform .2s ease,box-shadow .25s ease,filter .2s ease;direction:rtl}
.axt-fab:hover{transform:translateY(-2px);filter:brightness(1.07)}
.axt-fab svg{width:17px;height:17px;fill:#fff}
html[data-theme="dark"] .axt-fab{background:linear-gradient(135deg,#38bdf8,#0ea5e9);box-shadow:0 10px 26px -8px rgba(56,189,248,.5),0 2px 6px rgba(0,0,0,.3)}

/* ============================================================
   Intro / hook screen — the typographic welcome shown first,
   before the slides. Covers the panel while .axt-panel.is-intro.
   ============================================================ */
.axt-intro{position:absolute;inset:0;z-index:6;display:none;
  flex-direction:column;align-items:center;justify-content:center;text-align:center;
  padding:clamp(26px,6vw,56px);background:var(--t-panel);overflow-y:auto}
.axt-panel.is-intro .axt-intro{display:flex}
.axt-panel.is-intro .axt-head,
.axt-panel.is-intro .axt-nav{visibility:hidden}
.axt-intro::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(62% 48% at 50% 38%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 72%)}
.axt-intro-close{position:absolute;top:16px;inset-inline-start:clamp(16px,3vw,26px);z-index:2}
.axt-intro-in{position:relative;z-index:1;max-width:42ch;display:flex;flex-direction:column;align-items:center}
.axt-intro-mark{width:54px;height:54px;flex:none;border-radius:16px;display:grid;place-items:center;
  background:var(--grad);box-shadow:0 18px 38px -16px rgba(27,110,243,.6)}
.axt-intro-mark svg{width:29px;height:29px}
.axt-intro-eyebrow{margin-top:22px;font-size:12.5px;font-weight:700;letter-spacing:.2em;color:var(--accent)}
.axt-intro-title{margin:14px 0 0;font-weight:800;line-height:1.32;letter-spacing:-.01em;
  font-size:clamp(28px,5vw,48px);text-wrap:balance;color:var(--t-ink)}
.axt-intro-title em{font-style:normal;background:var(--grad);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.axt-intro-sub{margin:18px 0 0;max-width:38ch;color:var(--t-muted);
  font-size:clamp(15px,2.1vw,17.5px);line-height:1.85;font-weight:400}
.axt-intro-cta{margin-top:30px}
.axt-intro-go{display:inline-flex;align-items:center;gap:9px;font-size:16px;padding:15px 30px}
.axt-intro-go svg{width:18px;height:18px;fill:#fff}
/* typographic stagger, replayed each time the hook screen opens */
.axt-panel.is-intro .axt-intro-in>*{opacity:0;transform:translateY(14px);
  animation:axt-rv .7s cubic-bezier(.2,.75,.25,1) forwards}
.axt-panel.is-intro .axt-intro-mark{animation-delay:.08s}
.axt-panel.is-intro .axt-intro-eyebrow{animation-delay:.2s}
.axt-panel.is-intro .axt-intro-title{animation-delay:.32s}
.axt-panel.is-intro .axt-intro-sub{animation-delay:.48s}
.axt-panel.is-intro .axt-intro-cta{animation-delay:.62s}

/* ============================================================
   Figure primitives (only run while the slide is active)
   ============================================================ */
.ax-tour .axt-card{fill:var(--t-surface);stroke:var(--t-line2);stroke-width:2}
.ax-tour .axt-scr{fill:var(--t-s2)}
.ax-tour .ac{fill:var(--accent)}
.ax-tour .acs{stroke:var(--accent)}

/* cards gathering (dashboard) */
.ax-tour .ph{transform-box:fill-box;transform-origin:center}
.axt-slide.is-active .p1{animation:axt-g1 5s ease-in-out infinite}
.axt-slide.is-active .p2{animation:axt-g2 5s ease-in-out infinite}
.axt-slide.is-active .p3{animation:axt-g3 5s ease-in-out infinite}
.axt-slide.is-active .p4{animation:axt-g4 5s ease-in-out infinite}
.axt-slide.is-active .p5{animation:axt-g5 5s ease-in-out infinite}
.axt-slide.is-active .p6{animation:axt-g6 5s ease-in-out infinite}
@keyframes axt-g1{0%,12%{transform:translate(-120px,-80px) rotate(-18deg);opacity:0}30%,72%{transform:none;opacity:1}92%,100%{transform:translate(-120px,-80px) rotate(-18deg);opacity:0}}
@keyframes axt-g2{0%,12%{transform:translate(130px,-60px) rotate(16deg);opacity:0}32%,72%{transform:none;opacity:1}92%,100%{transform:translate(130px,-60px) rotate(16deg);opacity:0}}
@keyframes axt-g3{0%,12%{transform:translate(-140px,70px) rotate(12deg);opacity:0}34%,72%{transform:none;opacity:1}92%,100%{transform:translate(-140px,70px) rotate(12deg);opacity:0}}
@keyframes axt-g4{0%,12%{transform:translate(140px,90px) rotate(-14deg);opacity:0}36%,72%{transform:none;opacity:1}92%,100%{transform:translate(140px,90px) rotate(-14deg);opacity:0}}
@keyframes axt-g5{0%,12%{transform:translate(10px,-130px) rotate(22deg);opacity:0}38%,72%{transform:none;opacity:1}92%,100%{transform:translate(10px,-130px) rotate(22deg);opacity:0}}
@keyframes axt-g6{0%,12%{transform:translate(-10px,140px) rotate(-20deg);opacity:0}40%,72%{transform:none;opacity:1}92%,100%{transform:translate(-10px,140px) rotate(-20deg);opacity:0}}
.ax-tour .scan{opacity:0}
.axt-slide.is-active .scan{animation:axt-scan 5s ease-in-out infinite}
@keyframes axt-scan{0%,44%{opacity:0;transform:translateY(-14px)}52%{opacity:1}66%{opacity:1;transform:translateY(0)}74%,100%{opacity:0}}

/* orbit (return loop + CTA hub) */
.ax-tour .orbit{transform-origin:200px 200px}
.axt-slide.is-active .orbit{animation:axt-orbit 14s linear infinite}
@keyframes axt-orbit{to{transform:rotate(360deg)}}
.ax-tour .chip{transform-box:fill-box;transform-origin:center}
.axt-slide.is-active .chip{animation:axt-chip 14s linear infinite}
@keyframes axt-chip{to{transform:rotate(-360deg)}}
.ax-tour .pulse,.ax-tour .pulse2{transform-origin:200px 200px;opacity:0}
.axt-slide.is-active .pulse{animation:axt-pulse 3s ease-out infinite}
.axt-slide.is-active .pulse2{animation:axt-pulse 3s ease-out infinite 1.5s}
@keyframes axt-pulse{0%{transform:scale(.7);opacity:.5}100%{transform:scale(1.6);opacity:0}}
.ax-tour .corelogo{transform-origin:200px 200px}
.axt-slide.is-active .corelogo{animation:axt-breathe 3s ease-in-out infinite}
@keyframes axt-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}

/* sales bars (grow) + trend line */
.ax-tour .bar{transform-box:fill-box;transform-origin:bottom;transform:scaleY(0)}
.axt-slide.is-active .bar1{animation:axt-bar .7s cubic-bezier(.2,.9,.3,1) forwards .25s}
.axt-slide.is-active .bar2{animation:axt-bar .7s cubic-bezier(.2,.9,.3,1) forwards .42s}
.axt-slide.is-active .bar3{animation:axt-bar .7s cubic-bezier(.2,.9,.3,1) forwards .59s}
.axt-slide.is-active .bar4{animation:axt-bar .7s cubic-bezier(.2,.9,.3,1) forwards .76s}
.axt-slide.is-active .bar5{animation:axt-bar .7s cubic-bezier(.2,.9,.3,1) forwards .93s}
@keyframes axt-bar{to{transform:scaleY(1)}}
.ax-tour .prog{stroke-dasharray:260;stroke-dashoffset:260}
.axt-slide.is-active .prog{animation:axt-prog 1.3s ease forwards 1s}
@keyframes axt-prog{to{stroke-dashoffset:0}}

/* chat bubbles pop (care) */
.ax-tour .pop{transform-box:fill-box;transform-origin:center;opacity:0}
.axt-slide.is-active .pp1{animation:axt-pop .55s cubic-bezier(.2,.9,.3,1) forwards .4s}
.axt-slide.is-active .pp2{animation:axt-pop .55s cubic-bezier(.2,.9,.3,1) forwards 1s}
.axt-slide.is-active .pp3{animation:axt-pop .55s cubic-bezier(.2,.9,.3,1) forwards 1.6s}
@keyframes axt-pop{from{opacity:0;transform:translateY(10px) scale(.9)}to{opacity:1;transform:none}}

/* sparkles / small accents */
.ax-tour .sprk{transform-box:fill-box;transform-origin:center;opacity:0}
.axt-slide.is-active .sprk{animation:axt-sprk 4.4s ease-in-out infinite}
@keyframes axt-sprk{0%,50%{opacity:0;transform:scale(0) rotate(0)}66%{opacity:1;transform:scale(1) rotate(45deg)}82%,100%{opacity:0;transform:scale(.3) rotate(90deg)}}
.ax-tour .ok{opacity:0;stroke-dasharray:40;stroke-dashoffset:40}
.axt-slide.is-active .ok{animation:axt-okin .6s ease forwards 1.4s,axt-okdash .6s ease forwards 1.4s}
@keyframes axt-okin{to{opacity:1}}
@keyframes axt-okdash{to{stroke-dashoffset:0}}

/* ---- responsive: mobile hero layout (big motion + text over scrim) ---- */
@media (max-width:720px){
  .ax-tour{padding:max(10px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px))}
  .axt-panel{height:min(90vh,640px);max-height:94vh;border-radius:20px}
  .axt-head{padding:12px 16px 4px}
  .axt-stage{flex:1 1 auto}
  .axt-slide{padding:0}
  /* fixed two-zone layout so the frame height never changes between slides, whatever the text length */
  .axt-inner{display:block;position:relative;height:100%}
  .axt-fig{position:absolute;top:0;left:50%;transform:translateX(-50%);width:auto;height:46%;max-height:none;max-width:72vw;margin:0;z-index:0;pointer-events:none}
  .axt-copy{position:absolute;left:0;right:0;bottom:0;height:56%;z-index:1;max-width:100%;overflow-y:auto;
    display:flex;flex-direction:column;justify-content:center;padding:14px 20px 16px;
    background:linear-gradient(to top,var(--t-panel) 64%,color-mix(in srgb,var(--t-panel) 80%,transparent) 82%,transparent)}
  .axt-eyebrow{font-size:12px}
  .axt-h1{font-size:clamp(21px,6vw,27px);line-height:1.22;margin:0}
  .axt-lead{margin-top:7px;font-size:14px;line-height:1.6}
  .axt-say{margin-top:11px;padding-inline-start:13px;font-size:16px;line-height:1.5}
  .axt-points{margin-top:12px;gap:6px}
  .axt-tag{font-size:11.5px;padding:5px 10px}
  .axt-note{margin-top:10px;font-size:12px;line-height:1.55}
  .axt-cta{margin-top:16px;gap:9px}
  .axt-btn{padding:12px 20px;font-size:14.5px}
  .axt-nav{padding:8px 16px 12px}
  .axt-navbtn{padding:9px 13px;font-size:13px}
  .axt-intro{padding:40px 22px}
  .axt-intro-mark{width:48px;height:48px}
  .axt-intro-title{font-size:clamp(24px,7.5vw,32px);line-height:1.34}
  .axt-intro-sub{margin-top:14px;font-size:14.5px;line-height:1.75}
  .axt-intro-cta{margin-top:24px}
  .axt-intro-go{font-size:15px;padding:14px 26px}
}
@media (max-width:400px){ .axt-navbtn .axt-opt{display:none} }
@media (max-width:720px) and (max-height:520px){
  .axt-fig{height:40%}
  .axt-copy{height:62%}
  .axt-say{font-size:15px}
}
@media (prefers-reduced-motion: reduce){
  .ax-tour *,.ax-tour *::before{animation:none!important;transition:opacity .2s ease!important}
  .axt-rv,.axt-intro-in>*{opacity:1!important;transform:none!important}
  .ax-tour .ph,.ax-tour .scan,.ax-tour .pop,.ax-tour .sprk{opacity:1!important}
  .ax-tour .bar{transform:scaleY(1)}
  .ax-tour .prog{stroke-dashoffset:0}
  .ax-tour .ok{opacity:1}
  .ax-tour.is-open .axt-panel{transform:none}
}
