/* binarrator.ai: animated product clips, the product tour and gentle reveals (homepage and product page).
   Loaded after site.css and uses its palette. The clips are screen recordings of the real report page on the fictional
   sample company (tools/site/film_screens.py). Everything here is progressive: without assets/site-motion.js the page
   shows each clip's still frame and every section as normal, and visitors who ask for reduced motion get still frames
   with a play button, no reveals and no auto-advancing tour. */

/* ---------- a clip in a window frame ---------- */
.shot.clip{background:#0A1626}
.win{display:flex;align-items:center;gap:12px;height:38px;padding:0 14px;background:linear-gradient(#14283F,#0F2136);border-bottom:1px solid var(--navy-line)}
.win .dots{display:flex;gap:6px;flex:none}
.win .dots i{width:10px;height:10px;border-radius:50%;background:#2B4664}
.win .addr{flex:1;min-width:0;max-width:440px;margin:0 auto;height:24px;padding:0 12px;border-radius:7px;background:rgba(255,255,255,.045);border:1px solid #22405F;color:#A9BCCF;font:600 .72rem/22px var(--sans);text-align:center;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.win .addr b{color:#DCE7F2;font-weight:700}
.win .live{flex:none;display:inline-flex;align-items:center;gap:6px;font:800 .64rem/1 var(--sans);letter-spacing:.09em;text-transform:uppercase;color:#7FE3D4}
.win .live::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 0 rgba(45,191,174,.55)}
.js-motion .clip.playing .win .live::before{animation:livepulse 1.8s ease-out infinite}
@keyframes livepulse{0%{box-shadow:0 0 0 0 rgba(45,191,174,.55)}70%{box-shadow:0 0 0 7px rgba(45,191,174,0)}100%{box-shadow:0 0 0 0 rgba(45,191,174,0)}}
.clip .stage{position:relative}
.clipv{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top left;background:#0A1626}
.shot.clip .shot-tag{top:50px}
.clip-ctl{position:absolute;right:12px;bottom:12px;z-index:3;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(255,255,255,.28);background:rgba(7,23,38,.78);color:#fff;cursor:pointer;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:background .15s,border-color .15s,transform .15s}
.clip-ctl:hover{background:rgba(7,23,38,.92);border-color:#fff}
.clip-ctl:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.clip-ctl svg{width:18px;height:18px}
.clip-ctl .i-play{display:none}
.clip.paused .clip-ctl .i-play,.clip.idle .clip-ctl .i-play{display:block}
.clip.paused .clip-ctl .i-pause,.clip.idle .clip-ctl .i-pause{display:none}
.clip.idle .clip-ctl{width:64px;height:64px;right:50%;bottom:50%;transform:translate(50%,50%);background:rgba(45,191,174,.92);border-color:#2DBFAE;color:var(--teal-ink)}
.clip.idle .clip-ctl:hover{background:#4FD1C1}
.clip.idle .clip-ctl svg{width:24px;height:24px}
.clip-ctl{display:none}.js-motion .clip-ctl,.no-auto .clip-ctl{display:grid}   /* the button needs the script */
.clip.noplay .clip-ctl{display:none}

/* ---------- the product tour: tabs with a progress line, one clip per view ---------- */
#demo .tabs{gap:4px}
#demo .tabs button{position:relative;padding:11px 16px 14px}
#demo .tabs .pg{position:absolute;left:12px;right:12px;bottom:5px;height:3px;border-radius:2px;background:rgba(23,43,64,.09);overflow:hidden;pointer-events:none}
#demo .tabs .pg i{display:block;width:100%;height:100%;border-radius:inherit;background:var(--teal);transform:scaleX(0);transform-origin:left center}
#demo .tabs button[aria-selected="true"] .pg{background:rgba(255,255,255,.2)}
#demo .tabs button.done .pg i{transform:scaleX(1);background:rgba(45,191,174,.45)}
#demo .tabs button[aria-selected="true"] .pg i{background:var(--teal)}
#demo .tabp{align-items:start}
#demo .tabp .cap{padding-top:clamp(4px,1.5vw,20px)}
#demo .step{font:800 .74rem/1 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
#demo .step b{color:var(--teal-dark)}
.js-motion #demo .tabp:not([hidden]) .cap>*{animation:capin .55s cubic-bezier(.2,.7,.2,1) both}
.js-motion #demo .tabp:not([hidden]) .cap>*:nth-child(2){animation-delay:.05s}
.js-motion #demo .tabp:not([hidden]) .cap>*:nth-child(3){animation-delay:.1s}
.js-motion #demo .tabp:not([hidden]) .cap>*:nth-child(4){animation-delay:.15s}
.js-motion #demo .tabp:not([hidden]) .cap>*:nth-child(n+5){animation-delay:.2s}
.js-motion #demo .tabp:not([hidden]) .fig{animation:figin .6s cubic-bezier(.2,.7,.2,1) both}
@keyframes capin{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes figin{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
#demo .tour-note{margin-top:18px;font-size:.84rem;color:var(--muted)}
@media(max-width:900px){#demo .tabp .fig{order:-1}#demo .tabp .cap{padding-top:0}}
@media(max-width:600px){#demo .tabs button{padding:10px 13px 14px;font-size:.9rem}.win{height:32px;padding:0 10px;gap:8px}.win .addr{font-size:.66rem;height:20px;line-height:18px}.win .live{display:none}.shot.clip .shot-tag{top:40px;right:8px;font-size:.58rem;padding:4px 7px}.clip-ctl{right:8px;bottom:8px;width:40px;height:40px}}

/* ---------- hero entrance ---------- */
.js-motion .hero h1,.js-motion .hero .lede,.js-motion .hero .cta-row,.js-motion .hero .trust-line,.js-motion .hero .eyebrow{animation:capin .7s cubic-bezier(.2,.7,.2,1) both}
.js-motion .hero .eyebrow{animation-delay:.02s}
.js-motion .hero h1{animation-delay:.08s}
.js-motion .hero .lede{animation-delay:.16s}
.js-motion .hero .lede+.lede{animation-delay:.22s}
.js-motion .hero .cta-row{animation-delay:.28s}
.js-motion .hero .trust-line{animation-delay:.34s}
.js-motion .hero .fig-wrap .fig{animation:herofig .7s cubic-bezier(.2,.7,.2,1) .1s both}
@keyframes herofig{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- reveals on scroll ---------- */
.js-motion .rv{opacity:0;transform:translateY(20px);transition:opacity .7s cubic-bezier(.2,.7,.2,1) var(--d,0ms),transform .7s cubic-bezier(.2,.7,.2,1) var(--d,0ms)}
.js-motion .rv.in{opacity:1;transform:none}
.card.rv.in:hover{transform:translateY(-3px)}
/* the verification steps draw their rule in order as they arrive */
.flow li{position:relative}
.js-motion .flow li.rv::after{content:"";position:absolute;left:0;right:0;top:-1px;height:2px;background:var(--teal);transform:scaleX(0);transform-origin:left;transition:transform .9s cubic-bezier(.2,.7,.2,1) calc(var(--d,0ms) + .15s)}
.js-motion .flow li.rv.in::after{transform:scaleX(1)}

/* ---------- reduced motion and print ---------- */
@media(prefers-reduced-motion:reduce){.js-motion .rv{opacity:1;transform:none}}
@media print{.win,.clip-ctl{display:none}.js-motion .rv{opacity:1;transform:none}}
