/* Product motion: the alarm card (home hero) and the officer's phone (intrusion page hero).
   The markup is the final frame. js/motion.js adds .mo-run and plays the timeline while in view. */

/* Timeline engine */
.mo [data-off] { opacity: 0; }
.mo-run [data-at] { opacity: 0; transition: opacity .45s var(--ease), transform .5s var(--ease); }
.mo-run [data-at].on { opacity: 1; transform: none; }
.mo-run [data-fx="up"]:not(.on) { transform: translateY(8px); }
.mo-run [data-fx="down"]:not(.on) { transform: translateY(-16px); }
.mo-run [data-fx="left"]:not(.on) { transform: translateX(28px); }
.mo-run [data-fx="pop"]:not(.on) { transform: scale(.94); }
.mo-run.mo-out [data-at]:not([data-at="0"]) { opacity: 0; transition-duration: .5s; }
.mo .scenes { display: grid; }
.mo .scenes > .scene { grid-area: 1 / 1; min-width: 0; }
.mo:not(.mo-run) .scene.cur { opacity: 1; }
.mo .ring { width: 18px; height: 18px; flex: none; transform: rotate(-90deg); }
.mo .ring circle { fill: none; stroke-width: 3; }
.mo .ring .bg { stroke: rgba(163, 90, 0, .18); }
.mo .ring .fg { stroke: #E0821F; stroke-dasharray: 44; stroke-dashoffset: 0; }
.mo-run .ring:not(.on) .fg { stroke-dashoffset: 44; transition: none; }
.mo-run .ring.on .fg { stroke-dashoffset: 0; transition: stroke-dashoffset var(--len, 3s) linear; }

/* ---------- Alarm card (control room view) ---------- */
.alert-card.wa { width: 384px; padding: 0; overflow: hidden; font-size: 12.5px; line-height: 1.4; }
.wa-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(11, 19, 34, .1); background: #F4F6F9; }
.wa-app { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: #0B1322; font-size: 12px; }
.wa-app svg { width: 15px; height: 15px; color: #0F7F94; }
.wa-app span { color: #556178; font-weight: 500; }
.wa-st { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.wa-st b { font-weight: 600; display: none; }
.wa[data-state="new"] .wa-st { background: #FDF1E3; color: #A35A00; }
.wa[data-state="esc"] .wa-st { background: #FBE6E3; color: #A8281C; }
.wa[data-state="closed"] .wa-st { background: #E2F2E9; color: #157A4B; }
.wa[data-state="new"] .st-new, .wa[data-state="esc"] .st-esc, .wa[data-state="closed"] .st-closed { display: inline; }
.wa-main { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 12px 14px 10px; }
.wa-cam { position: relative; width: 112px; height: 63px; border-radius: 6px; overflow: hidden; background: #03060C; }
.wa-cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-cam i { position: absolute; left: 47%; top: 52%; width: 9%; height: 36%; border: 1.5px solid #E0821F; border-radius: 1px; }
.wa-what { font-weight: 600; font-size: 13.5px; color: #0B1322; line-height: 1.35; }
.wa-where { color: #556178; font-size: 11.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.wa-log { list-style: none; margin: 0; padding: 2px 14px 10px; display: grid; gap: 0; }
.wa-log > li { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 8px; padding: 5px 0 5px 14px; color: #33405A; border-top: 1px solid rgba(11, 19, 34, .07); }
.wa-log > li::before { content: ""; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: #0F7F94; }
.wa-log > li.warn::before { background: #E0821F; }
.wa-log > li.ok::before { background: #157A4B; }
.wa-log > li.ok { color: #0B1322; font-weight: 600; }
.wa-log .t { color: #556178; font-variant-numeric: tabular-nums; font-size: 11.5px; padding-top: 1px; }
.wa-log > li.swap { display: grid; grid-template-columns: 1fr; padding: 0; }
.wa-log > li.swap::before { display: none; }
.wa-log > li.swap > * { grid-area: 1 / 1; }
.wa-row { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 8px; padding: 5px 0 5px 14px; }
.wa-row::before { content: ""; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: #E0821F; }
.wa-wait { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 6px 10px; border-radius: 6px; background: #FDF6EC; color: #7A4400; font-weight: 600; align-self: center; }
.wa-wait .cd { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.wa-foot { padding: 8px 14px; border-top: 1px solid rgba(11, 19, 34, .1); color: #556178; font-size: 11px; background: #FAFBFC; }
@media (min-width: 961px) and (max-height: 820px) {
  .alert-card.wa { width: 372px; font-size: 12px; }
  .wa-main { padding: 9px 12px 8px; grid-template-columns: 96px 1fr; }
  .wa-cam { width: 96px; height: 54px; }
  .wa-log { padding: 0 12px 8px; }
  .wa-log > li, .wa-row { padding-top: 4px; padding-bottom: 4px; }
  .wa-top, .wa-foot { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 420px) {
  .alert-card.wa { width: 100%; }
  .wa-main { grid-template-columns: 92px 1fr; }
  .wa-cam { width: 92px; height: 52px; }
}

/* ---------- Officer phone ---------- */
.wf { position: relative; width: 236px; height: 470px; border-radius: 34px; background: #0B1322; padding: 7px; box-shadow: 0 30px 60px -24px rgba(3, 6, 12, .6), 0 0 0 1px rgba(11, 19, 34, .3); font-family: var(--body); color: #0B1322; text-align: left; }
.wf-scr { position: relative; width: 100%; height: 100%; border-radius: 27px; overflow: hidden; background: #F4F6F9; }
.wf-scr > section, .wf-scr > .scr { position: absolute; inset: 0; padding: 30px 10px 10px; }
.wf-sb { position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font: 600 11.5px var(--body); font-variant-numeric: tabular-nums; color: #0B1322; }
.wf-sb svg { width: 34px; height: 10px; }
.wf-sb .clk { display: grid; }
.wf-sb .clk > * { grid-area: 1 / 1; }
.wf[data-state="lock"] .wf-sb { color: #E9EEF5; }
.wf-notch { position: absolute; z-index: 6; left: 50%; top: 6px; width: 64px; height: 18px; margin-left: -32px; border-radius: 10px; background: #0B1322; }
/* lock screen */
.wf .lock { background: #0E1726; color: #E9EEF5; text-align: center; }
.lock-time { font: 500 46px/1 var(--head); letter-spacing: -.02em; margin-top: 24px; font-variant-numeric: tabular-nums; }
.lock-date { font-size: 11.5px; color: #B9C4D4; margin-top: 6px; }
.push { position: relative; margin-top: 26px; background: #F4F6F9; color: #0B1322; border-radius: 14px; padding: 9px 11px 10px; text-align: left; font-size: 11px; line-height: 1.35; }
.push-h { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #556178; margin-bottom: 4px; }
.push-h svg { width: 16px; height: 16px; border-radius: 4px; background: #0F7F94; color: #fff; padding: 2px; }
.push-h span:last-child { margin-left: auto; }
.push b { display: block; font-size: 11.5px; margin-bottom: 1px; }
.tap { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(15, 127, 148, .28); pointer-events: none; }
.mo-run .tap:not(.on) { transform: scale(.3); }
.mo-run .tap.on { transform: scale(1.15); transition: opacity .2s, transform .45s var(--ease); }
/* app screens */
.wf .app { background: #F4F6F9; }
.app-h { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; }
.app-h svg { width: 14px; height: 14px; color: #556178; flex: none; }
.app-h b { font: 600 13px/1.2 var(--head); }
.app-h small { display: block; font-size: 11px; color: #556178; font-family: var(--body); font-weight: 400; margin-top: 1px; }
.clipv { position: relative; border-radius: 8px; overflow: hidden; background: #03060C; aspect-ratio: 16 / 9; }
.clipv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clipv .osd2 { position: absolute; left: 6px; top: 4px; font-size: 11px; color: rgba(233, 238, 245, .9); font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.clipv .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); }
.clipv .bar span { display: block; height: 100%; width: 100%; background: #5ED3E6; }
.mo-run .clipv .bar span:not(.on) { width: 0; transition: none; }
.mo-run .clipv .bar span.on { width: 100%; transition: width 4s linear; }
.conf { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #33405A; margin: 7px 2px 6px; }
.conf::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E0821F; flex: none; }
.map { display: block; width: 100%; height: auto; border-radius: 8px; background: #E4EAF1; }
.map-cap { font-size: 11px; color: #556178; margin: 4px 2px 0; }
.wf .btnrow { position: absolute; left: 10px; right: 10px; bottom: 12px; display: grid; }
.wf .btnrow > * { grid-area: 1 / 1; }
.ack { display: block; text-align: center; font: 600 12px/1 var(--body); padding: 11px 0; border-radius: 10px; background: #0F7F94; color: #fff; position: relative; overflow: hidden; }
.ack.done { background: #E2F2E9; color: #157A4B; }
/* task screen */
.task-c { background: #fff; border: 1px solid rgba(11, 19, 34, .1); border-radius: 10px; padding: 10px; margin-top: 6px; }
.task-c .tt { font-weight: 600; font-size: 12px; line-height: 1.3; }
.task-c .tm { font-size: 11px; color: #556178; margin-top: 3px; }
.task-c .chip { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.chipswap { display: grid; justify-items: start; }
.chipswap > * { grid-area: 1 / 1; }
.chip.prog { background: #FDF1E3; color: #A35A00; }
.chip.closed { background: #E2F2E9; color: #157A4B; }
.tsteps { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid rgba(11, 19, 34, .08); }
.tsteps li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; padding: 6px 0 0; font-size: 11px; color: #33405A; line-height: 1.3; }
.tsteps li::before { content: ""; width: 9px; height: 9px; margin-top: 2px; border-radius: 50%; background: #157A4B; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #157A4B; }
.tsteps time { color: #556178; font-variant-numeric: tabular-nums; }
.att { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; margin-top: 8px; background: #fff; border: 1px solid rgba(11, 19, 34, .1); border-radius: 10px; padding: 7px; font-size: 11px; color: #556178; line-height: 1.3; }
.att img { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; display: block; }
.att b { color: #0B1322; font-size: 11px; display: block; }
/* placement on the intrusion page: phone stands at the bottom left of the camera view */
.ph-media .wf { margin: 18px auto 0; }
.ph-media .wf-cap { display: block; text-align: center; font-size: 12px; color: var(--mute); margin-top: 8px; }
@media (min-width: 961px) {
  .ph-media .wf { position: absolute; z-index: 3; right: -36px; bottom: -26px; margin: 0; transform-origin: 100% 100%; }
  .ph-media:has(.wf) .media-cap { right: auto; left: 12px; }
  .ph-media .wf-cap { display: none; }
}
/* round 5: the phone is never scaled down (mock-up text stays at 11 px or more); the hero column makes room for it */
@media (min-width: 961px) {
  .ph-media:has(.wf) { min-height: 452px; display: flex; flex-direction: column; justify-content: flex-end; }
  .ph-media:has(.wf) .media { width: calc(100% - 120px); }
}

/* Audit r3 (7 Nov 2026): steps still to come show as pending rows, so the card never shows an empty panel mid-loop */
.mo-run .scene.on .wa-log > li[data-at]:not(.on) { opacity: 1; transform: none; color: transparent; }
.mo-run .scene.on .wa-log > li[data-at]:not(.on) > * { visibility: hidden; }
.mo-run .scene.on .wa-log > li[data-at]:not(.on)::before { background: #D3DBE5; }
.mo-run .scene.on .wa-log > li[data-at]:not(.on)::after { content: ""; position: absolute; left: 82px; right: 22%; top: 9px; height: 8px; border-radius: 4px; background: #EEF1F5; }
.mo-run .scene.on .wa-log > li.swap:not(:has(.on)) { position: relative; min-height: 30px; }
.mo-run .scene.on .wa-log > li.swap:not(:has(.on))::after { content: ""; position: absolute; left: 82px; right: 30%; top: 11px; height: 8px; border-radius: 4px; background: #EEF1F5; }
