/* "From chaos to calm" scroll-controlled video section (home page). */
.scrolly{position:relative;height:340vh;background:var(--bg)}
.scrolly-pin{position:sticky;top:68px;height:calc(100vh - 68px);height:calc(100svh - 68px);display:flex;align-items:center;overflow:hidden}
.scrolly-grid{width:100%;max-width:var(--max,1200px);margin-inline:auto;padding-inline:20px;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:48px;align-items:center}
.scrolly-stage{position:relative;aspect-ratio:16/9;border-radius:24px;overflow:hidden;background:#ece9fb;
  box-shadow:0 30px 60px -30px rgba(42,34,120,.45),0 0 0 1px rgba(20,18,51,.06)}
.scrolly-stage canvas{display:block;width:100%;height:100%}
.scrolly-copy{position:relative;min-height:17.5rem}
.scrolly-cap{position:absolute;inset:0 0 auto 0;opacity:0;transform:translateY(18px);transition:opacity .45s cubic-bezier(.23,1,.32,1),transform .6s cubic-bezier(.23,1,.32,1);pointer-events:none}
.scrolly-cap.on{opacity:1;transform:none;pointer-events:auto}
.scrolly-cap .k{display:block;font-family:var(--mono);font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:color-mix(in srgb,var(--accent) 80%,var(--ink));margin-bottom:12px}
.scrolly-cap h2{font-size:clamp(2rem,4vw,3rem);font-weight:800;line-height:1.05;margin:0 0 14px;letter-spacing:-.02em}
.scrolly-cap p{font-size:1.1rem;line-height:1.55;color:var(--muted);margin:0;max-width:30rem}
.scrolly-cap .btn{margin-top:22px}
.scrolly-final h2 .ai{color:#8B5CF6}
.scrolly-bar{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(20,18,51,.08)}
.scrolly-bar i{display:block;height:100%;width:100%;transform-origin:0 50%;transform:scaleX(0);background:linear-gradient(90deg,#8B5CF6,#22B8CF)}
.scrolly-dots{position:absolute;left:0;bottom:0;display:flex;gap:8px}
.scrolly-dots span{width:8px;height:8px;border-radius:50%;background:var(--line);transition:background .3s,transform .3s}
.scrolly-dots span.on{background:var(--accent);transform:scale(1.25)}

@media (max-width:820px){
  .scrolly{height:300vh}
  .scrolly-pin{align-items:flex-start;padding-top:18px}
  .scrolly-grid{grid-template-columns:1fr;gap:22px}
  .scrolly-stage{order:-1;border-radius:18px}
  .scrolly-copy{min-height:15rem}
  .scrolly-cap h2{font-size:clamp(1.7rem,7vw,2.2rem)}
  .scrolly-cap p{font-size:1rem}
}
/* Reduce motion: no pinning, show the calm desk and the final message */
@media (prefers-reduced-motion:reduce){
  .scrolly{height:auto;padding-block:64px}
  .scrolly-pin{position:static;height:auto}
  .scrolly-cap{display:none}
  .scrolly-cap.scrolly-final{display:block;position:static;opacity:1;transform:none}
  .scrolly-dots{display:none}
}

/* Computers: the video fills the screen; captions float in a frosted card over the wall, top right */
@media (min-width:821px) and (prefers-reduced-motion:no-preference){
  .scrolly-pin{display:block}
  .scrolly-grid{position:relative;height:100%;max-width:none;padding:0;display:block}
  .scrolly-stage{position:absolute;inset:0;aspect-ratio:auto;border-radius:0;box-shadow:none;background:#ece9fb}
  .scrolly-copy{position:absolute;z-index:2;top:clamp(20px,4vh,44px);right:clamp(20px,3vw,48px);width:min(400px,34vw);min-height:0;
    padding:26px 28px 52px;border-radius:22px;background:rgba(255,255,255,.72);
    -webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);
    box-shadow:0 20px 50px -24px rgba(42,34,120,.35),inset 0 0 0 1px rgba(255,255,255,.6)}
  .scrolly-cap{position:absolute;left:28px;right:28px;top:26px}
  .scrolly-cap.on{position:relative;left:auto;right:auto;top:auto}
  .scrolly-cap h2{font-size:clamp(1.7rem,2.6vw,2.4rem);color:#141a33}
  .scrolly-cap p{font-size:1rem;color:#4a5170}
  .scrolly-cap .k{color:#3c32b8}
  .scrolly-dots{left:28px;bottom:22px}
  .scrolly-dots span{background:rgba(20,26,51,.18)}
  .scrolly-dots span.on{background:#4a3fd6}
}

/* Welcome content inside the first caption (moved from the old opening section) */
.scrolly-hero .eyebrow{font-family:var(--mono);font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:#3c32b8;display:block}
.scrolly-hero .eyebrow::before{display:none}
.scrolly-hero h1{margin:14px 0 0;line-height:0}
.scrolly-hero .bai-logo.bai-hero{width:100%;max-width:520px;height:auto}
.scrolly-hero .sub{font-family:var(--display);font-weight:600;font-size:1.25rem;margin-top:14px;color:#141a33}
.scrolly-hero .lede{color:#4a5170;margin-top:10px;font-size:1rem;line-height:1.55}
.scrolly-hero .ctas{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.scrolly-cap.on{position:relative}
@media (max-width:820px){
  .scrolly-hero .lede{display:none}
  .scrolly-hero .ctas .btn{flex:1 1 auto}
}
@media (prefers-reduced-motion:reduce){ .scrolly-cap.scrolly-hero{display:block;position:static;opacity:1;transform:none} }
/* dots follow the caption instead of sitting on top of it */
.scrolly-dots{position:static;margin-top:20px}
@media (min-width:821px) and (prefers-reduced-motion:no-preference){
  .scrolly-copy{padding-bottom:24px;width:min(440px,36vw)}
  .scrolly-dots{position:static;margin-top:18px}
}
@media (prefers-reduced-motion:reduce){ .scrolly-cap.scrolly-final{margin-top:28px} }

.scrolly-dots{display:none!important}
.scrolly{height:260vh}
@media (max-width:820px){.scrolly{height:220vh}}
@media (prefers-reduced-motion:reduce){.scrolly{height:auto}}
/* Home "what do you need?" form inside the welcome card */
.hq{margin-top:18px;display:grid;gap:10px}
.hq-step{display:none;gap:10px}
.hq-step.on{display:grid}
.scrolly-cap .hq-q,.scrolly-cap .hq-q,.hq-q{font-family:var(--display);font-weight:700;font-size:1.05rem;color:#141a33;margin:0}
.hq-chips{display:flex;flex-wrap:wrap;gap:6px}
.hq-chips label{display:inline-flex;align-items:center;gap:6px;font-size:.84rem;font-weight:600;color:#232a48;padding:6px 11px;border:1.5px solid rgba(20,26,51,.16);border-radius:999px;background:rgba(255,255,255,.85);cursor:pointer;transition:border-color .15s,background-color .15s}
.hq-chips input{margin:0;width:15px;height:15px;accent-color:#4a3fd6}
.hq-chips label:has(input:checked){border-color:#4a3fd6;background:#ebe9ff;color:#2a2190}
.hq-chips label:has(input:focus-visible){outline:2px solid #4a3fd6;outline-offset:2px}
.hq-l{font-size:.85rem;font-weight:650;color:#232a48;margin-bottom:-4px}
.hq-l span{font-weight:500;color:#5a6180}
.hq input:not([type=checkbox]),.hq textarea{font:inherit;font-size:16px;width:100%;padding:10px 12px;border-radius:10px;border:1.5px solid rgba(20,26,51,.18);background:#fff;color:#141a33}
.hq textarea{resize:vertical;min-height:84px}
.hq input:focus,.hq textarea:focus{outline:none;border-color:#4a3fd6;box-shadow:0 0 0 3px rgba(74,63,214,.2)}
.hq-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px}
.hq-nav .btn{background:#4a3fd6;color:#fff;margin-left:auto}
.hq-back{background:none;border:0;font:inherit;font-size:.9rem;font-weight:600;color:#3c32b8;cursor:pointer;padding:8px 4px}
.hq-step-n{margin:0;font-size:.75rem;color:#5a6180;font-family:var(--mono);letter-spacing:.06em;text-transform:uppercase}
.hq-msg{margin:0;font-size:.88rem;font-weight:600}
.hq-msg:empty{display:none}
.hq-msg.err{color:#b3261e}
.hq-done{margin:0;font-size:1rem;color:#141a33;line-height:1.5;padding:14px 16px;border-radius:12px;background:#e8f6ee}
.hq-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.hq-send[disabled]{opacity:.6;cursor:wait}

/* Button under the video + the form window */
.hq-band{padding:56px 0 8px}
.hq-band-in{text-align:center;max-width:38rem;margin-inline:auto;padding:34px 24px;border-radius:24px;background:var(--surface);border:1px solid var(--line)}
.hq-band h2{margin:0 0 8px;font-size:clamp(1.6rem,3vw,2.1rem)}
.hq-band p{margin:0 0 20px;color:var(--muted)}
.hq-dlg{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:0;border-radius:22px;padding:24px;background:#fff;color:#141a33;
  box-shadow:0 30px 80px -20px rgba(20,18,51,.45)}
.hq-dlg::backdrop{background:rgba(20,18,51,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.hq-dlg[open]{animation:hqIn .22s cubic-bezier(.23,1,.32,1)}
@keyframes hqIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hq-dlg[open]{animation:none}}
.hq-dlg-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hq-dlg-head h2{margin:0;font-size:1.35rem;color:#141a33}
.hq-x{border:0;background:#f1f0fb;color:#141a33;width:36px;height:36px;border-radius:50%;font-size:1.4rem;line-height:1;cursor:pointer}
.hq-dlg .hq{margin-top:14px}
.hq{gap:8px}
.hq-step-n{order:-1}
.hq-nav .btn{padding:10px 20px}
.hq-dlg .hq-q{color:#141a33;margin:0}
.hq-dlg p{margin:0}
.scrolly-copy > .hq-open{margin-top:20px;position:relative;z-index:1}
/* narrow screens: pinned area fits its content (no empty space under the last message) */
@media (max-width:820px) and (prefers-reduced-motion:no-preference){
  .scrolly-pin{height:auto;padding-bottom:20px}
  .scrolly-copy{min-height:0}
  .scrolly-copy > .hq-open{margin-top:18px}
}
/* The video plays by itself now: no scroll pinning */
.scrolly,.scrolly[class]{height:auto}
.scrolly-pin{position:relative;top:auto}
.scrolly-stage video{display:block;width:100%;height:100%;object-fit:cover;background:#ece9fb}
.scrolly-bar i{transition:none}
@media (min-width:821px) and (prefers-reduced-motion:no-preference){
  .scrolly-pin{height:calc(100vh - 68px);height:calc(100svh - 68px)}
}
@media (max-width:820px){
  .scrolly-pin{height:auto;padding-bottom:20px}
  .scrolly-copy{min-height:0}
}
.section-head p:empty{display:none}
/* Brand logo in the video's top right corner */
.scrolly-logo{position:absolute;z-index:3;top:10px;right:10px;width:96px;height:auto;filter:drop-shadow(0 6px 14px rgba(42,34,120,.25));pointer-events:none}
@media (min-width:821px) and (prefers-reduced-motion:no-preference){
  .scrolly-logo{top:clamp(16px,3vh,28px);right:clamp(20px,3vw,48px);width:clamp(130px,12vw,180px)}
  .scrolly-copy{top:calc(clamp(16px,3vh,28px) + clamp(130px,12vw,180px)*.88 + 14px)}
}
.hq-wa{margin-top:12px;background:#25D366!important;color:#fff!important;border:0}
