/* Живой демо-макет из docs/assets/hero-demo.html.
   Селекторы обёрнуты в .whx машинно - у демо свои :root-переменные и классы
   .card/.eyebrow/.brand, совпадающие с сайтовыми. Правки вносить в исходник,
   затем перегенерировать (команда в site/README.md). */
.whx{
    --ground:#080a10; --ground2:#0d1018;
    --bg:rgba(18,20,26,0.92); --bg2:rgba(30,33,42,0.92);
    --fg:#e8ebf2; --muted:#9aa3b2; --accent:#6ea8fe; --ok:#4ade80;
    --hair:rgba(255,255,255,0.08);
    --ui:-apple-system,"Segoe UI",system-ui,sans-serif;
  }
  .whx *{box-sizing:border-box;}
  .whx{
    font-family:var(--ui); color:var(--fg);
    width:100%; margin:0 auto; padding:0;
  }
  .whx .stage{
    position:relative; width:100%; aspect-ratio:16/9; min-height:340px;
    border-radius:16px; overflow:hidden;
    background:radial-gradient(120% 90% at 78% 12%, #141a28 0%, var(--ground2) 42%, var(--ground) 100%);
    border:1px solid rgba(255,255,255,0.06);
    box-shadow:0 30px 80px -30px rgba(0,0,0,0.8);
  }
  .whx /* ambient drifting glow - very restrained, .whx single accent */
  .glow{position:absolute; inset:-20%; z-index:0; filter:blur(60px); opacity:.5; pointer-events:none;}
  .whx .glow b{position:absolute; border-radius:50%; display:block;}
  .whx .glow .g1{width:46%; height:46%; left:60%; top:-8%; background:rgba(110,168,254,0.22); animation:drift1 19s ease-in-out infinite;}
  .whx .glow .g2{width:38%; height:38%; left:-6%; top:58%; background:rgba(74,222,128,0.10); animation:drift2 23s ease-in-out infinite;}
  @keyframes drift1{50%{transform:translate(-8%,10%) scale(1.12);}}
  @keyframes drift2{50%{transform:translate(10%,-8%) scale(1.1);}}
  .whx .vign{position:absolute; inset:0; z-index:1; pointer-events:none;
    background:radial-gradient(130% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.5) 100%);}

  .whx /* faux shared screen hint behind glass, .whx so the dark panels read as "on top of something" */
  .desk{position:absolute; z-index:1; inset:0; opacity:.16; pointer-events:none;
    background:
      linear-gradient(transparent 0 27px, rgba(255,255,255,.05) 27px 28px) 40px 60px/100% 34px,
      linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.02) 40px);}

  .whx .win{
    position:relative; background:var(--bg);
    border:1px solid var(--hair); border-radius:12px; overflow:hidden;
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    box-shadow:0 20px 55px -18px rgba(0,0,0,0.75);
    transition:opacity .6s ease, filter .6s ease;
  }
  .whx /* both windows sit in one centered group → gap stays constant at any width, .whx and align-items:flex-start guarantees their top edges line up. */
  .scene{position:absolute; z-index:3; top:6%; left:50%; transform:translateX(-50%);
    display:flex; align-items:flex-start; gap:10px; width:min(94%, 960px);}
  .whx .win .bar{display:flex; align-items:center; gap:8px; padding:8px 10px; background:var(--bg2);}
  .whx .dot{width:9px; height:9px; border-radius:50%; background:var(--muted); flex:0 0 auto; transition:background .3s;}
  .whx .dot.on{background:var(--ok); box-shadow:0 0 0 0 rgba(74,222,128,.5); animation:pulse 1.4s infinite;}
  @keyframes pulse{70%{box-shadow:0 0 0 7px rgba(74,222,128,0);}100%{box-shadow:0 0 0 0 rgba(74,222,128,0);}}
  .whx .title{font-weight:600; font-size:13px; white-space:nowrap;}
  .whx .badge{font-size:10px; text-transform:uppercase; letter-spacing:.04em; padding:2px 6px;
    border-radius:6px; background:rgba(110,168,254,.18); color:var(--accent);}
  .whx .spacer{flex:1;}
  .whx /* toolbar = quiet Lucide line-icons: transparent, .whx muted ink, .whx light up on hover */
  .btn{background:transparent; color:var(--muted); border:1px solid transparent; border-radius:7px;
    padding:0; width:30px; height:28px; display:inline-flex; align-items:center; justify-content:center;
    flex:0 0 auto; font-size:15px;}
  .whx .btn svg{width:16px; height:16px; display:block; pointer-events:none;}
  .whx .btn:hover{background:rgba(255,255,255,.09); color:var(--fg);}
  .whx .btn.active{background:var(--accent); color:#06121f;}
  .whx /* listening is a RECORDING state → red, .whx not accent, .whx so it's unmistakable */
  .btn.listen.on{background:rgba(248,113,113,.20); color:#ff9a9a; border-color:rgba(248,113,113,.38);}
  .whx /* toolbar grouping: clusters (разговор · камера · OCR · управление) split by hairlines */
  .grp{display:flex; align-items:center; gap:3px;}
  .whx .grpdiv{width:1px; align-self:stretch; margin:4px 2px; background:rgba(255,255,255,.10); flex:none;}

  .whx /* overlay - main window, .whx fills the group */
  #ov{flex:1 1 auto; min-width:0;}
  .whx .answer{position:relative; padding:10px 13px;}
  .whx .lab{font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:5px;
    display:flex; align-items:center; gap:6px;}
  .whx .lab .tag{font-size:10px; color:var(--accent); text-transform:none; letter-spacing:0;}
  .whx /* fixed viewport + scroll: only the beginning shows, .whx a scrollbar proves the
     answer is long and complete (the rest sits below the fold). */
  .content{font-size:14.5px; line-height:1.5; height:200px; overflow-y:auto; padding-right:8px;}
  .whx .content .ph{color:var(--muted);}
  .whx .content p.lead{margin:0 0 10px; color:#e8ebf2;}
  .whx .content ul{margin:0; padding-left:18px;}
  .whx .content li{margin:2px 0; color:#d7dce6;}
  .whx .content li b, .whx .content p b{color:#fff; font-weight:600;}
  .whx .content p{margin:8px 0 0; color:#d7dce6;}
  .whx .content .dh{font-size:12.5px; font-weight:600; color:#fff; margin:13px 0 5px;}
  .whx .content::-webkit-scrollbar{width:5px;}
  .whx .content::-webkit-scrollbar-thumb{background:rgba(255,255,255,.24); border-radius:3px;}
  .whx .content::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.34);}
  .whx .content::-webkit-scrollbar-track{background:rgba(255,255,255,.05); border-radius:3px; margin:2px 0;}
  .whx .content .caret{display:inline-block; width:7px; height:15px; vertical-align:-2px;
    background:var(--accent); margin-left:1px; animation:blink .9s steps(1) infinite;}
  @keyframes blink{50%{opacity:0;}}
  .whx .fab{position:absolute; right:12px; bottom:10px; width:38px; height:38px; border-radius:50%;
    display:flex; align-items:center; justify-content:center; color:#fff; background:var(--accent);
    border:none; box-shadow:0 3px 11px rgba(0,0,0,.42);}
  .whx .fab svg{width:17px; height:17px;}
  .whx .actions{padding:0 12px 8px;}
  .whx .primary{width:100%; padding:10px; font-size:13.5px; font-weight:700; border:none; border-radius:9px;
    background:var(--accent); color:#06121f; display:inline-flex; align-items:center; justify-content:center;
    gap:7px; transition:box-shadow .2s, filter .2s;}
  .whx .primary svg{width:15px; height:15px; display:block;}
  .whx .primary.hit{box-shadow:0 0 0 4px rgba(110,168,254,.35); filter:brightness(1.12);}
  .whx .foot{display:flex; align-items:center; gap:8px; padding:6px 12px; background:var(--bg2);
    font-size:11px; color:var(--muted);}
  .whx .level{flex:1; height:4px; background:rgba(255,255,255,.08); border-radius:3px; overflow:hidden;}
  .whx .levelbar{height:100%; width:0%; background:var(--accent); border-radius:3px; transition:width .07s ease-out;}

  .whx /* transcript - left of the group */
  #tr{order:-1; flex:0 0 31%; min-width:0; height:360px;}
  .whx #tr .body{padding:10px 12px; font-size:13px; overflow:hidden; height:calc(100% - 37px);}
  .whx .empty{color:var(--muted); font-size:12px;}
  .whx .line{margin-bottom:8px; line-height:1.4; opacity:0; transform:translateY(4px); animation:rise .35s ease forwards;}
  @keyframes rise{to{opacity:1; transform:none;}}
  .whx .line .who{font-weight:600; margin-right:4px;}
  .whx .line.them .who{color:var(--accent);}
  .whx .line.me .who{color:var(--ok);}
  .whx .line.partial{opacity:.6; font-style:italic;}

  .whx /* screen-share stamp */
  .rec{position:absolute; z-index:5; left:5%; top:5%; display:flex; align-items:center; gap:7px;
    font-size:12px; color:#ffd7d7; background:rgba(30,12,12,.8); border:1px solid rgba(248,113,113,.5);
    padding:4px 10px; border-radius:20px; opacity:0; transform:translateY(-6px); transition:.4s;}
  .whx .rec.show{opacity:1; transform:none;}
  .whx .rec .rdot{width:8px; height:8px; border-radius:50%; background:#f87171; animation:pulse2 1.2s infinite;}
  @keyframes pulse2{50%{opacity:.35;}}
  .whx .stamp{position:absolute; z-index:6; inset:0; display:flex; align-items:center; justify-content:center;
    pointer-events:none; opacity:0; transition:opacity .45s;}
  .whx .stamp.show{opacity:1;}
  .whx .stamp .card{width:min(90%,540px); background:rgba(12,14,20,.82); border:1px solid rgba(255,255,255,.12);
    border-radius:16px; padding:22px 26px; backdrop-filter:blur(9px); -webkit-backdrop-filter:blur(9px);
    box-shadow:0 34px 80px -26px rgba(0,0,0,.85); transform:translateY(12px) scale(.985); transition:transform .45s ease;}
  .whx .stamp.show .card{transform:none;}
  .whx .stamp .eyebrow{display:inline-flex; align-items:center; gap:7px; font-size:11px; text-transform:uppercase;
    letter-spacing:.08em; color:var(--accent); margin-bottom:11px;}
  .whx .stamp .eyebrow svg{width:14px; height:14px;}
  .whx .stamp .head{font-size:clamp(17px,2.3vw,24px); font-weight:600; color:#fff; line-height:1.25; letter-spacing:.005em;}
  .whx .stamp .sub{font-size:13px; color:var(--muted); margin-top:6px; line-height:1.45;}
  .whx .stamp .feats{display:flex; flex-direction:column; gap:13px; margin-top:19px;}
  .whx .stamp .feat{display:flex; gap:13px; align-items:flex-start; opacity:0; transform:translateY(8px);
    transition:opacity .4s ease, transform .4s ease;}
  .whx .stamp.show .feat{opacity:1; transform:none;}
  .whx .stamp.show .feat:nth-child(1){transition-delay:.16s;}
  .whx .stamp.show .feat:nth-child(2){transition-delay:.30s;}
  .whx .stamp.show .feat:nth-child(3){transition-delay:.44s;}
  .whx .stamp .ic{width:36px; height:36px; border-radius:10px; background:rgba(110,168,254,.13);
    border:1px solid rgba(110,168,254,.28); color:var(--accent); display:flex; align-items:center;
    justify-content:center; flex:0 0 auto;}
  .whx .stamp .ic svg{width:19px; height:19px;}
  .whx .stamp .ft b{display:block; font-size:14px; font-weight:600; color:#eef2fb;}
  .whx .stamp .ft span{display:block; font-size:12.5px; color:var(--muted); line-height:1.42; margin-top:2px;}
  .whx .stage.sharing .win{opacity:.05; filter:grayscale(.4);}

  .whx /* closing CTA card - the selling beat that ends the loop */
  /* full opaque takeover so nothing behind (windows, .whx brand, .whx progress) bleeds through */
  .endcard{position:absolute; z-index:9; inset:0; display:flex; align-items:center; justify-content:center;
    pointer-events:none; opacity:0; transition:opacity .5s;
    background:radial-gradient(125% 95% at 50% 40%, #131826 0%, #0a0d14 55%, #07090e 100%);}
  .whx .endcard.show{opacity:1;}
  .whx .endcard .inner{text-align:center; transform:translateY(14px); transition:transform .55s cubic-bezier(.2,.7,.2,1);}
  .whx .endcard.show .inner{transform:none;}
  .whx .endcard .logo{display:inline-flex; align-items:center; gap:11px; margin-bottom:15px;}
  .whx .endcard .mark{width:40px; height:40px; border-radius:12px; background:var(--accent); color:#06121f;
    display:flex; align-items:center; justify-content:center; box-shadow:0 10px 28px -8px rgba(110,168,254,.7);}
  .whx .endcard .mark svg{width:22px; height:22px;}
  .whx .endcard .wm{font-size:clamp(26px,4vw,34px); font-weight:700; color:#fff; letter-spacing:-.015em;}
  .whx .endcard .tag{font-size:clamp(14px,2vw,18px); color:#cfd6e6; margin:0 auto 22px; max-width:30ch; line-height:1.4;}
  .whx .endcard .cta{display:inline-flex; align-items:center; gap:8px; font-size:15px; font-weight:700; color:#06121f;
    background:var(--accent); padding:12px 24px; border-radius:12px; box-shadow:0 16px 38px -12px rgba(110,168,254,.65);}
  .whx .endcard .cta svg{width:16px; height:16px;}
  .whx .endcard .url{margin-top:15px; font-size:13px; color:var(--muted); letter-spacing:.02em;}

  .whx /* progress */
  .prog{position:absolute; z-index:7; left:0; bottom:0; height:3px; width:0; background:var(--accent); opacity:.8;}
  .whx .brand{position:absolute; z-index:7; right:16px; bottom:14px; font-size:12px; font-weight:600;
    letter-spacing:.02em; color:var(--muted); display:flex; align-items:center; gap:6px;}
  .whx .brand .b{width:7px; height:7px; border-radius:50%; background:var(--accent);}

  @media (prefers-reduced-motion: reduce){
    .whx .glow, .whx .dot.on, .whx .levelbar, .whx .rdot{animation:none !important;}
  }
