/* boqit "How it works" animation: 4 scenes, ~25 s, loops, no sound. Scales with its width (container units). */
.hiw { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0e1726;
  border-radius: 20px; overflow: hidden; color: #f5f4ee; font-family: Barlow, system-ui, sans-serif;
  box-shadow: 0 18px 50px rgba(14, 23, 38, .22); }
.hiw * { box-sizing: border-box; }
.hiw-top { position: absolute; top: 0; left: 0; right: 0; height: 8.5cqw; display: flex; align-items: center;
  justify-content: space-between; padding: 0 3.4cqw; }
.hiw-brand { display: flex; align-items: center; gap: .9cqw; font-weight: 700; font-size: 2.1cqw; }
.hiw-brand svg { width: 1.5cqw; height: 2.4cqw; }
.hiw-steps { display: flex; gap: 2.2cqw; font-size: 1.35cqw; color: #8b93a1; }
.hiw-steps button { all: unset; cursor: pointer; display: flex; align-items: center; gap: .6cqw; }
.hiw-steps i { font-style: normal; width: 2cqw; height: 2cqw; border-radius: 50%; display: grid; place-items: center;
  border: .12cqw solid #4a5466; font-family: "JetBrains Mono", monospace; font-size: 1.05cqw; }
.hiw-steps .on { color: #f5f4ee; }
.hiw-steps .on i { background: #e6ff3f; color: #0e1726; border-color: #e6ff3f; }
.hiw-steps .done i { border-color: #e6ff3f; color: #e6ff3f; }

.hiw-scene { position: absolute; inset: 8.5cqw 3.4cqw 4.6cqw; display: grid; grid-template-columns: 36% 1fr;
  gap: 3.2cqw; align-items: center; opacity: 0; transition: opacity .3s; pointer-events: none; }
.hiw-scene.on { opacity: 1; }
.hiw-scene h3 { font-size: 3.7cqw; line-height: 1.05; margin: 0 0 1.4cqw; font-weight: 700; letter-spacing: -.02cqw; }
.hiw-scene h3 em { font-style: normal; color: #e6ff3f; }
.hiw-scene p.sub { font-size: 1.55cqw; color: #aab1bd; margin: 0; line-height: 1.45; }
.hiw .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* appear animation, restarted each time a scene turns on */
.hiw-scene .a { opacity: 0; }
.hiw-scene.on .a { animation: hiwUp .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes hiwUp { from { opacity: 0; transform: translateY(1.4cqw); } to { opacity: 1; transform: none; } }

/* paper cards inside the video */
.hiw-card { background: #f5f4ee; color: #0e1726; border-radius: 1.4cqw; padding: 2cqw; box-shadow: 0 1cqw 3cqw rgba(0,0,0,.35); }
.hiw-card .t { font-weight: 700; font-size: 1.7cqw; margin: 0 0 1.2cqw; display: flex; justify-content: space-between; }
.hiw-drop { border: .18cqw dashed #9aa0aa; border-radius: 1cqw; padding: 1.2cqw; display: grid; gap: .8cqw; }
.hiw-file { display: flex; align-items: center; gap: 1cqw; background: #fff; border: .12cqw solid #dcdad0; border-radius: .8cqw;
  padding: .8cqw 1cqw; font-size: 1.35cqw; }
.hiw-file b { font-weight: 600; flex: 1; }
.hiw-file .pg { color: #6b7280; font-size: 1.15cqw; }
.hiw-file .ic { width: 2.2cqw; height: 2.6cqw; border-radius: .3cqw; background: #e8584f; color: #fff; font-size: .8cqw;
  display: grid; place-items: center; font-weight: 700; }
.hiw-price { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4cqw; font-size: 1.4cqw; }
.hiw-price b { font-size: 2.6cqw; }
.hiw-send { background: #0e1726; color: #e6ff3f; border-radius: .9cqw; padding: .9cqw 1.6cqw; font-weight: 700; font-size: 1.4cqw; }
.hiw-scene.on .press { animation: hiwUp .55s both, hiwPress .5s 2.9s both; animation-delay: var(--d, 0s), 2.9s; }
@keyframes hiwPress { 0% { transform: scale(1); } 45% { transform: scale(.92); box-shadow: 0 0 0 .5cqw rgba(230,255,63,.5); } 100% { transform: scale(1); } }

/* plan drawing */
.hiw-plan { position: relative; background: #f5f4ee; border-radius: 1.4cqw; padding: 1.6cqw; overflow: hidden;
  box-shadow: 0 1cqw 3cqw rgba(0,0,0,.35); }
.hiw-plan svg { display: block; width: 100%; height: auto; }
.hiw-scan { position: absolute; top: 0; bottom: 0; width: 7cqw; left: -8cqw;
  background: linear-gradient(90deg, rgba(230,255,63,0), rgba(230,255,63,.55), rgba(230,255,63,0)); }
.hiw-scene.on .hiw-scan { animation: hiwScan 2.6s .3s ease-in-out both; }
@keyframes hiwScan { from { left: -8cqw; } to { left: 100%; } }
.hiw-checks { list-style: none; margin: 1.8cqw 0 0; padding: 0; display: grid; gap: .9cqw; font-size: 1.5cqw; }
.hiw-checks li { display: flex; gap: .9cqw; align-items: center; color: #d8dce3; }
.hiw-checks li span { width: 1.9cqw; height: 1.9cqw; border-radius: 50%; background: #e6ff3f; color: #0e1726; display: grid;
  place-items: center; font-size: 1.1cqw; font-weight: 700; }

/* measure scene */
.hiw-wall { stroke: #c4d600; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 230; stroke-dashoffset: 230; }
.hiw-scene.on .hiw-wall { animation: hiwDraw .8s .3s ease-out forwards; }
@keyframes hiwDraw { to { stroke-dashoffset: 0; } }
.hiw-big { font-family: "JetBrains Mono", monospace; font-size: 8.5cqw; font-weight: 600; line-height: 1; color: #f5f4ee; }
.hiw-big small { font-size: 3cqw; color: #aab1bd; margin-left: .6cqw; }
.hiw-calc { font-family: "JetBrains Mono", monospace; font-size: 1.9cqw; color: #e6ff3f; margin-top: 1.2cqw; }
.hiw-tag { display: inline-block; margin-top: 1.6cqw; font-size: 1.25cqw; color: #aab1bd; border: .12cqw solid #4a5466;
  border-radius: 99cqw; padding: .4cqw 1.2cqw; }

/* BOQ scene */
.hiw-boq { width: 100%; border-collapse: collapse; font-size: 1.32cqw; }
.hiw-boq th { background: #2f3b4c; color: #fff; text-align: left; padding: .8cqw 1cqw; font-weight: 700; font-size: 1.15cqw; }
.hiw-boq td { padding: .75cqw 1cqw; border-bottom: .1cqw solid #dcdad0; background: #fff; }
.hiw-boq td.n { text-align: right; font-family: "JetBrains Mono", monospace; }
.hiw-boq td b { font-weight: 700; }
.hiw-boq tr.a { display: table-row; }
.hiw-xlsx { display: flex; align-items: center; gap: 1.2cqw; margin-top: 1.4cqw; background: #0e1726; color: #f5f4ee;
  border: .14cqw solid #e6ff3f; border-radius: 1cqw; padding: 1cqw 1.4cqw; font-size: 1.45cqw; }
.hiw-xlsx .x { width: 2.6cqw; height: 3cqw; border-radius: .35cqw; background: #1f7a43; color: #fff; display: grid;
  place-items: center; font-weight: 700; font-size: 1.1cqw; }
.hiw-xlsx b { flex: 1; }
.hiw-xlsx .ok { color: #e6ff3f; font-weight: 700; }



/* scene 4: the live dashboard the client sees on the job page */
.hiw-live { padding: 2.2cqw 2.4cqw; }
.hl-top { display: flex; justify-content: space-between; align-items: center; font-size: 1.7cqw; }
.hl-dot { display: inline-flex; align-items: center; gap: .6cqw; font: 600 1.05cqw "JetBrains Mono", monospace; background: #0e1726;
  color: #e6ff3f; border-radius: 99cqw; padding: .4cqw .9cqw; }
.hl-dot i { width: .7cqw; height: .7cqw; border-radius: 50%; background: #e6ff3f; animation: hiwBlink 1.4s infinite; }
@keyframes hiwBlink { 50% { opacity: .25; } }
.hl-bar { position: relative; height: 1.7cqw; border: .18cqw solid #0e1726; border-radius: 99cqw; overflow: hidden; margin: 1.6cqw 0 .8cqw; background: #fff; }
.hl-bar b { position: absolute; inset: 0 auto 0 0; width: 40%; background: #e6ff3f; border-right: .18cqw solid #0e1726;
  background-image: repeating-linear-gradient(-45deg, rgba(14,23,38,.12) 0 .8cqw, transparent .8cqw 1.6cqw); transition: width .35s linear; }
.hl-nums { display: flex; justify-content: space-between; align-items: baseline; font: 1.2cqw "JetBrains Mono", monospace; color: #5d6573; }
.hl-nums strong { font-size: 2.6cqw; color: #0e1726; }
.hl-steps { list-style: none; margin: 1.4cqw 0 0; padding: 0; display: grid; gap: .2cqw; font-size: 1.4cqw; }
.hl-steps li { display: flex; align-items: center; gap: 1cqw; padding: .6cqw 0; border-top: .1cqw solid #dcdad0; color: #9aa0aa; font-weight: 600; flex-wrap: wrap; }
.hl-steps li:first-child { border-top: 0; }
.hl-steps li span { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; display: grid; place-items: center; font: 700 1cqw "JetBrains Mono", monospace;
  border: .16cqw solid #cfcdc2; background: #fff; flex: none; }
.hl-steps li.done { color: #0e1726; }
.hl-steps li.done span { background: #0e1726; border-color: #0e1726; color: #e6ff3f; }
.hl-steps li.now { color: #0e1726; }
.hl-steps li.now span { background: #e6ff3f; border-color: #0e1726; color: #0e1726; }
.hl-steps em { font-style: normal; font: 1.1cqw "JetBrains Mono", monospace; background: #f4ffc2; border-radius: .6cqw; padding: .3cqw .8cqw;
  margin-left: auto; color: #0e1726; display: none; }
.hl-steps li.now em { display: inline-block; }

/* scene 5: the pointer clicks the download, Excel opens on the BOQ sheet (client design) */
.hiw-xwrap { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.hiw-xbar { margin-top: 0; transition: opacity .4s; }
.hiw-xbar .ok { padding: .3cqw .8cqw; border-radius: .6cqw; transition: background .2s, color .2s; }
.hiw-xbar .ok.click { background: #e6ff3f; color: #0e1726; }
.hiw-xl { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: #fff; color: #1f2933; border-radius: 1cqw;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1.5cqw 4cqw rgba(0,0,0,.5);
  opacity: 0; transform: scale(.35); transform-origin: 92% 96%; transition: opacity .45s, transform .55s cubic-bezier(.2,.8,.2,1);
  font-family: Aptos, "Segoe UI", Calibri, sans-serif; }
.hiw-xl.open { opacity: 1; transform: none; }
.xl-title { background: #217346; color: #fff; font-size: 1.25cqw; padding: .7cqw 1.2cqw; display: flex; align-items: center; gap: .8cqw; }
.xl-title span:last-child { opacity: .8; }
.xl-logo { width: 1.8cqw; height: 1.8cqw; background: #fff; color: #217346; border-radius: .3cqw; display: grid;
  place-items: center; font-weight: 800; font-size: 1.1cqw; }
.xl-fx { display: flex; align-items: center; gap: 1cqw; border-bottom: .1cqw solid #d0d4da; font-size: 1.2cqw; padding: .45cqw 1cqw; }
.xl-ref { width: 5cqw; border-right: .1cqw solid #d0d4da; color: #444; }
.xl-fx i { color: #8a8f98; font-family: Georgia, serif; }
.xl-f { font-family: "JetBrains Mono", monospace; color: #1f2933; transition: background .3s; padding: 0 .4cqw; border-radius: .3cqw; }
.xl-f.hit { background: #e6ff3f; }
.xl-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.12cqw; flex: 1; }
.xl-grid td { border: .08cqw solid #c9ced6; padding: .35cqw .6cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle; height: 2.35cqw; }
.xl-grid td.n { text-align: right; font-variant-numeric: tabular-nums; }
.xl-grid td.rn, .xl-cols td { background: #f3f3f3; color: #6b6b6b; text-align: center; font-size: 1cqw; border-color: #dadada; }
.xl-cols td { height: 1.8cqw; padding: 0; }
.xl-hdr td:not(.rn) { background: #2f3b4c; color: #fff; font-weight: 700; text-align: center; font-size: 1cqw; border-color: #2f3b4c; }
.xl-bill td:not(.rn) { background: #e9eef4; color: #2f3b4c; font-weight: 700; }
.xl-sub td:not(.rn) { background: #f3f4f6; font-weight: 700; border-top: .14cqw solid #2f3b4c; }
.xl-sub td.vat { color: #6b7280; font-size: .95cqw; }
.xl-gap td:not(.rn) { border-left-color: transparent; border-right-color: transparent; height: 1.2cqw; }
.xl-grid td.sel { outline: .25cqw solid #217346; outline-offset: -.15cqw; background: #eaf4ee; }
.xl-tabs { display: flex; gap: .2cqw; background: #f3f3f3; border-top: .1cqw solid #d0d4da; padding: .3cqw .8cqw 0; font-size: 1cqw; }
.xl-tabs span { padding: .45cqw 1.1cqw; color: #555; }
.xl-tabs span.on { background: #fff; color: #217346; font-weight: 700; border-bottom: .25cqw solid #217346; }
.hiw-linked { opacity: 0; transition: opacity .35s; }
.hiw-linked.show { opacity: 1; border-color: #e6ff3f; color: #e6ff3f; }
.hiw-cursor { position: absolute; width: 2.6cqw; height: 2.6cqw; left: 105%; top: 105%; z-index: 5; pointer-events: none;
  transition: left .6s cubic-bezier(.3,.7,.2,1), top .6s cubic-bezier(.3,.7,.2,1), transform .15s; filter: drop-shadow(0 .3cqw .4cqw rgba(0,0,0,.4)); }
.hiw-cursor.click { transform: scale(.8); }

/* bottom: progress + play/pause */
.hiw-bar { position: absolute; left: 0; bottom: 0; height: .45cqw; background: #e6ff3f; width: 0; }
.hiw-ctl { all: unset; position: absolute; right: 2.4cqw; bottom: 1.2cqw; cursor: pointer;
  width: 3.2cqw; height: 3.2cqw; border-radius: 50%; border: .14cqw solid #4a5466; display: grid; place-items: center;
  color: #f5f4ee; font-size: 1.3cqw; }
.hiw-ctl:hover { border-color: #e6ff3f; color: #e6ff3f; }
.hiw-cap { position: absolute; left: 3.4cqw; bottom: 1.6cqw; font-size: 1.2cqw; color: #8b93a1; }
@media (prefers-reduced-motion: reduce) {
  .hiw-scene.on .a, .hiw-scene.on .hiw-scan, .hiw-scene.on .hiw-wall, .hiw-scene.on .press { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

/* phones: upright layout (title on top, picture below) and bigger text */
@media (max-width: 640px) { .hiw { aspect-ratio: 4 / 5.6; border-radius: 16px; } }
@container (max-width: 600px) {
  .hiw-top { height: 15cqw; padding: 0 5cqw; }
  .hiw-brand { font-size: 4.6cqw; gap: 2cqw; } .hiw-brand svg { width: 3.2cqw; height: 5.2cqw; }
  .hiw-steps { gap: 2.6cqw; font-size: 0; }                     /* numbers only on phones */
  .hiw-steps i { width: 5.6cqw; height: 5.6cqw; font-size: 2.8cqw; border-width: .3cqw; }
  .hiw-scene, .hiw-scene[style] { inset: 15cqw 5cqw 10cqw; grid-template-columns: 1fr !important; grid-template-rows: auto 1fr;
    align-items: start; gap: 4cqw; }
  .hiw-scene > .hiw-plan:first-child { order: 2; }              /* measure scene: title first on phones */
  .hiw-scene h3 { font-size: 8.4cqw; margin-bottom: 2.4cqw; }
  .hiw-scene p.sub { font-size: 3.6cqw; }
  .hiw-card { padding: 4cqw; border-radius: 3cqw; } .hiw-card .t { font-size: 3.8cqw; }
  .hiw-file { font-size: 3.1cqw; padding: 2cqw; gap: 2cqw; border-radius: 2cqw; } .hiw-file .pg { font-size: 2.7cqw; }
  .hiw-file .ic { width: 5cqw; height: 6cqw; font-size: 1.8cqw; } .hiw-drop { gap: 2cqw; padding: 2.6cqw; }
  .hiw-price { font-size: 3.2cqw; margin-top: 3cqw; } .hiw-price b { font-size: 6cqw; }
  .hiw-send { font-size: 3.2cqw; padding: 2cqw 3.4cqw; border-radius: 2cqw; }
  .hiw-checks { font-size: 3.6cqw; gap: 1.8cqw; grid-template-columns: 1fr 1fr; margin-top: 3cqw; }
  .hiw-checks li span { width: 4.4cqw; height: 4.4cqw; font-size: 2.6cqw; }
  .hiw-plan { padding: 3cqw; border-radius: 3cqw; }
  .hiw-big { font-size: 17cqw; } .hiw-big small { font-size: 6cqw; }
  .hiw-calc { font-size: 4cqw; } .hiw-tag { font-size: 3cqw; padding: 1cqw 2.6cqw; }
  .hiw-boq { font-size: 3cqw; } .hiw-boq th { font-size: 2.6cqw; padding: 1.8cqw 2cqw; } .hiw-boq td { padding: 1.7cqw 2cqw; }
  .hiw-xlsx { font-size: 3.2cqw; padding: 2.4cqw 3cqw; gap: 2.4cqw; margin-top: 3cqw; border-radius: 2.4cqw; }
  .hiw-xlsx .x { width: 6cqw; height: 7cqw; font-size: 2.4cqw; }
  .hiw-cap { font-size: 3cqw; left: 5cqw; bottom: 3.4cqw; }
  .hiw-ctl { width: 7.6cqw; height: 7.6cqw; font-size: 3cqw; right: 5cqw; bottom: 2cqw; border-width: .3cqw; }
  .hiw-bar { height: 1cqw; }
  .hiw-s5 { grid-template-rows: auto 1fr; }
  .hiw-s5 .sub { display: none; }
  .hiw-xbar { font-size: 3.2cqw; }
  .xl-title { font-size: 2.8cqw; padding: 1.6cqw 2.4cqw; } .xl-logo { width: 4cqw; height: 4cqw; font-size: 2.4cqw; }
  .xl-fx { font-size: 2.7cqw; padding: 1cqw 2cqw; } .xl-ref { width: 10cqw; }
  .xl-grid { font-size: 2.5cqw; } .xl-grid td { height: 5.4cqw; padding: .8cqw 1.2cqw; }
  .xl-grid td.rn, .xl-cols td, .xl-hdr td:not(.rn), .xl-tabs { font-size: 2.2cqw; }
  .xl-grid col:nth-child(3) { width: 38% !important; } .xl-grid col:nth-child(6) { width: 0 !important; }
  .xl-tabs span { padding: 1cqw 2cqw; }
  .hiw-cursor { width: 6cqw; height: 6cqw; }
  .hiw-live { padding: 4cqw; } .hl-top { font-size: 3.6cqw; } .hl-dot { font-size: 2.4cqw; padding: .8cqw 2cqw; }
  .hl-dot i { width: 1.6cqw; height: 1.6cqw; } .hl-bar { height: 4cqw; margin: 3cqw 0 1.6cqw; }
  .hl-nums { font-size: 2.8cqw; } .hl-nums strong { font-size: 6cqw; }
  .hl-steps { font-size: 3.2cqw; margin-top: 2.6cqw; } .hl-steps li { padding: 1.4cqw 0; gap: 2cqw; }
  .hl-steps li span { width: 5cqw; height: 5cqw; font-size: 2.4cqw; } .hl-steps em { font-size: 2.5cqw; padding: .6cqw 1.6cqw; margin-left: 7cqw; }
}
