/* Homepage hero: animated product demo player (assets/js/home-demo.js). Pure HTML/CSS, no video file. */
.hd { --hd-ink: #10233f; --hd-muted: #5d6f82; --hd-line: #dbe7ee; --hd-soft: #f3f9fc; --hd-brand: #06a3da; --hd-brand-d: #087da7; --hd-ok: #1aa66b; --hd-warn: #e8a317; position: relative; width: 100%; max-width: 620px; margin-inline: auto; font-family: inherit; }
.hd-window { position: relative; overflow: hidden; border: 1px solid rgba(15, 42, 67, .12); border-radius: 18px; background: #fff; box-shadow: 0 30px 70px rgba(16, 35, 63, .16), 0 6px 18px rgba(16, 35, 63, .06); }
.hd-bar { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-bottom: 1px solid var(--hd-line); background: #f8fbfd; font-size: .74rem; color: var(--hd-muted); }
.hd-dots { display: inline-flex; gap: 5px; }
.hd-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d7e1ea; }
.hd-dots i:first-child { background: #f3a59c; } .hd-dots i:nth-child(2) { background: #f4d27a; } .hd-dots i:nth-child(3) { background: #8fd4a8; }
.hd-url { flex: 1; min-width: 0; overflow: hidden; padding: .22rem .6rem; border-radius: 999px; background: #fff; border: 1px solid var(--hd-line); white-space: nowrap; text-overflow: ellipsis; }
.hd-live { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--hd-brand-d); white-space: nowrap; }
.hd-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hd-ok); box-shadow: 0 0 0 0 rgba(26, 166, 107, .5); animation: hd-pulse 1.8s infinite; }
@keyframes hd-pulse { 70% { box-shadow: 0 0 0 7px rgba(26, 166, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 166, 107, 0); } }

.hd-tabs { display: flex; gap: .3rem; padding: .55rem .6rem 0; overflow-x: auto; scrollbar-width: none; }
.hd-tabs::-webkit-scrollbar { display: none; }
.hd-tab { position: relative; display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .45rem .7rem .55rem; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--hd-muted); font-size: .78rem; font-weight: 600; cursor: pointer; }
.hd-tab i { font-size: .95rem; }
.hd-tab[aria-selected="true"] { background: var(--hd-soft); color: var(--hd-ink); }
.hd-tab[aria-selected="true"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--hd-brand); }
.hd-tab:focus-visible { outline: 2px solid var(--hd-brand); outline-offset: 1px; }

.hd-stage { position: relative; height: 318px; background: var(--hd-soft); }
.hd-scene { position: absolute; inset: 0; padding: 1rem; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease, visibility 0s .45s; }
.hd-scene.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s ease; }
.hd-progress { height: 3px; background: var(--hd-line); }
.hd-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--hd-brand), #4cc3ec); }

/* Elements revealed step by step: [data-at] shows from that step, [data-only] only on that step */
.hd [data-at] { opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .4s ease, transform .4s ease; }
.hd [data-at].on { opacity: 1; transform: none; }
.hd [data-only], .hd [data-until] { display: none; }
.hd [data-only].on, .hd [data-until].on { display: inline; }
.hd .hd-toast[data-until].on, .hd .hd-toast[data-only].on { display: flex; }

.hd-card { padding: .75rem .85rem; border: 1px solid var(--hd-line); border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(16, 35, 63, .04); }
.hd-card h4 { margin: 0 0 .45rem; font-size: .82rem; font-weight: 700; color: var(--hd-ink); }
.hd-small { font-size: .72rem; color: var(--hd-muted); }
.hd-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .5rem; border-radius: 999px; background: #e3f5fb; color: var(--hd-brand-d); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.hd-pill.ok { background: #e6f7ef; color: #13824f; } .hd-pill.warn { background: #fff4dd; color: #a36a00; }
.hd-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .32rem 0; border-top: 1px solid #eef3f7; font-size: .76rem; color: var(--hd-ink); }
.hd-row:first-of-type { border-top: 0; }
.hd-grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: .7rem; height: 100%; }
.hd-col { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.hd-kpi { display: flex; flex-direction: column; gap: .15rem; }
.hd-kpi b { font-size: 1.15rem; color: var(--hd-ink); }
.hd-bar-track { height: 7px; border-radius: 7px; background: #e9f0f5; overflow: hidden; }
.hd-bar-fill { height: 100%; border-radius: 7px; background: var(--hd-brand); transition: width .8s ease; }
.hd-toast { position: absolute; right: .9rem; bottom: 1.7rem; display: flex; align-items: center; gap: .5rem; max-width: 70%; padding: .5rem .75rem; border-radius: 12px; background: var(--hd-ink); color: #fff; font-size: .74rem; box-shadow: 0 10px 24px rgba(16, 35, 63, .25); }
.hd-toast i { color: #7fd7f5; }

/* CRM pipeline */
.hd-pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; height: 100%; }
.hd-lane { position: relative; padding: .5rem .4rem; border-radius: 10px; background: #e9f2f7; }
.hd-lane > span { display: block; margin-bottom: .45rem; font-size: .68rem; font-weight: 700; color: var(--hd-muted); text-transform: uppercase; letter-spacing: .04em; }
.hd-ghost { height: 34px; margin-bottom: .4rem; border-radius: 8px; background: #fff; opacity: .7; }
.hd-lead { position: absolute; top: 2rem; left: .4rem; width: calc(25% - .8rem); padding: .45rem .5rem; border: 1.5px solid var(--hd-brand); border-radius: 9px; background: #fff; font-size: .7rem; color: var(--hd-ink); box-shadow: 0 8px 18px rgba(6, 163, 218, .18); transition: left .7s cubic-bezier(.4, 0, .2, 1); z-index: 2; }
.hd-lead b { display: block; font-size: .72rem; }
.hd-lead[data-pos="2"] { left: calc(25% + .2rem); } .hd-lead[data-pos="3"] { left: calc(50% + .1rem); } .hd-lead[data-pos="4"] { left: calc(75%); border-color: var(--hd-ok); }

/* POS */
.hd-pos { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; height: 100%; }
.hd-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; align-content: start; }
.hd-tile { padding: .55rem; border: 1px solid var(--hd-line); border-radius: 10px; background: #fff; font-size: .72rem; color: var(--hd-ink); text-align: center; transition: box-shadow .3s, border-color .3s; }
.hd-tile i { display: block; margin-bottom: .2rem; font-size: 1.1rem; color: var(--hd-brand-d); }
.hd-tile.on { border-color: var(--hd-brand); box-shadow: 0 0 0 3px rgba(6, 163, 218, .15); }
.hd-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: .4rem; padding-top: .45rem; border-top: 1px dashed var(--hd-line); font-weight: 700; color: var(--hd-ink); }
.hd-total b { font-size: 1.1rem; }

/* Logistics */
.hd-route { position: relative; height: 70px; margin: .5rem .4rem .9rem; }
.hd-route::before { content: ""; position: absolute; left: 4%; right: 4%; top: 22px; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, #b9d6e4 0 8px, transparent 8px 14px); }
.hd-stop { position: absolute; top: 14px; width: 18px; height: 18px; margin-left: -9px; border: 3px solid #b9d6e4; border-radius: 50%; background: #fff; transition: border-color .4s, background .4s; }
.hd-stop.on { border-color: var(--hd-brand); background: var(--hd-brand); }
.hd-stop span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: .66rem; color: var(--hd-muted); white-space: nowrap; }
.hd-mover { position: absolute; top: 0; width: 30px; height: 30px; margin-left: -15px; display: grid; place-items: center; border-radius: 50%; background: var(--hd-ink); color: #fff; font-size: .85rem; transition: left .8s cubic-bezier(.4, 0, .2, 1); z-index: 2; }

/* Mobile */
.hd-mobile { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; align-items: center; height: 100%; }
.hd-phone { position: relative; height: 290px; padding: .7rem .55rem; border: 6px solid var(--hd-ink); border-radius: 26px; background: #fff; overflow: hidden; }
.hd-phone::before { content: ""; position: absolute; top: 4px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 5px; background: var(--hd-ink); }
.hd-job { display: flex; align-items: center; gap: .4rem; padding: .4rem .35rem; border-bottom: 1px solid #eef3f7; font-size: .68rem; color: var(--hd-ink); }
.hd-job i { color: #c3d0db; transition: color .3s; } .hd-job.on i { color: var(--hd-ok); }
.hd-push { position: absolute; left: .4rem; right: .4rem; top: .9rem; padding: .45rem .5rem; border-radius: 10px; background: rgba(16, 35, 63, .94); color: #fff; font-size: .64rem; }
.hd-sample { position: absolute; right: 1rem; bottom: .55rem; font-size: .64rem; color: #8a9bb0; }

/* Caption + controls under the window */
.hd-caption { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; }
.hd-caption-text { flex: 1; min-width: 0; }
.hd-caption-text strong { display: block; font-size: 1rem; color: var(--hd-ink); }
.hd-caption-text p { margin: .2rem 0 .3rem; font-size: .88rem; line-height: 1.5; color: var(--hd-muted); }
.hd-caption-text a { font-size: .86rem; font-weight: 600; color: var(--hd-brand-d); text-decoration: none; }
.hd-caption-text a:hover { text-decoration: underline; }
.hd-play { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--hd-line); border-radius: 50%; background: #fff; color: var(--hd-ink); cursor: pointer; }
.hd-play:focus-visible { outline: 2px solid var(--hd-brand); outline-offset: 2px; }

@media (max-width: 575.98px) {
  .hd-stage { height: 300px; }
  .hd-scene { padding: .7rem; }
  .hd-grid2, .hd-pos { grid-template-columns: 1fr; }
  .hd-grid2 .hd-col:last-child, .hd-pos > :first-child { display: none; }
  .hd-mobile { grid-template-columns: 1fr; justify-items: center; }
  .hd-mobile > :last-child { display: none; }
  .hd-tab span { display: none; }
  .hd-tab[aria-selected="true"] span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .hd *, .hd *::before { transition: none !important; animation: none !important; }
}
