/* Hero animation: the app window with its details greyed out, a large cursor
   and one pretend screen per step. The stage is drawn at 1120 x 596 and scaled
   to the window by the script; on a phone the window shows the 620 px wide
   middle of the stage, where every panel sits. */
.ha {
  --a-bg: #f2f5f7; --a-card: #ffffff; --a-ink: #151b23; --a-mute: #5d6672; --a-line: #e1e6eb; --a-bar: #dfe4e9;
  --a-green: #157e2c; --a-green-soft: #e2f4e6; --a-on-green: #ffffff; --a-red: #cf2f2f; --a-violet: #6d3fc0; --a-violet-soft: #ece4fa;
  --a-ember: #d9561a; --a-ember-soft: #fdeee6; --a-in: #eceff3; --a-dim: rgba(20, 28, 24, .36);
  width: 100%; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--a-bg);
  box-shadow: 0 30px 80px -20px rgba(10, 30, 18, .45), 0 0 0 1px rgba(0, 0, 0, .08);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--a-ink); text-align: left; line-height: 1.3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ha {
    --a-bg: #0a0e12; --a-card: #141a20; --a-ink: #eef1f4; --a-mute: #9aa4af; --a-line: #242c35; --a-bar: #242c35;
    --a-green: #4cc46a; --a-green-soft: #173222; --a-on-green: #0c1410; --a-red: #f0655f; --a-violet: #b99af0; --a-violet-soft: #2a2140;
    --a-ember: #f27a40; --a-ember-soft: #3a2316; --a-in: #222a33; --a-dim: rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] .ha {
  --a-bg: #0a0e12; --a-card: #141a20; --a-ink: #eef1f4; --a-mute: #9aa4af; --a-line: #242c35; --a-bar: #242c35;
  --a-green: #4cc46a; --a-green-soft: #173222; --a-on-green: #0c1410; --a-red: #f0655f; --a-violet: #b99af0; --a-violet-soft: #2a2140;
  --a-ember: #f27a40; --a-ember-soft: #3a2316; --a-in: #222a33; --a-dim: rgba(0, 0, 0, .55);
}
.ha *, .ha *::before, .ha *::after { box-sizing: border-box; }
.ha-top { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #16231d; }
.ha-top i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .24); }
.ha-view { position: relative; overflow: hidden; aspect-ratio: 1120 / 596; }
.ha.ha-narrow .ha-view { aspect-ratio: 620 / 596; }
.ha-stage { position: absolute; left: 0; top: 0; width: 1120px; height: 596px; transform-origin: 0 0; }
/* Until the script has sized the stage it stays hidden; without scripts a still picture of the app shows. */
.ha:not(.ha-ready) .ha-stage { visibility: hidden; }
.ha-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
.ha .b { display: block; height: 9px; border-radius: 5px; background: var(--a-bar); }

/* App chrome */
.ha-head { position: absolute; inset: 0 0 auto 0; height: 48px; display: flex; align-items: center; gap: 18px; padding: 0 18px; background: var(--a-card); border-bottom: 1px solid var(--a-line); }
.ha-logo { width: 172px; display: flex; align-items: center; gap: 8px; font-family: "Plus Jakarta Sans", "Geist", sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.ha-logo svg { width: 26px; height: 26px; }
.ha-logo .p { fill: var(--a-green); } .ha-logo .s { stroke: var(--a-green); }
.ha-ws { font-size: 14px; font-weight: 500; }
.ha-search { margin-left: auto; width: 250px; height: 30px; border-radius: 8px; border: 1px solid var(--a-line); background: var(--a-bg); display: flex; align-items: center; padding: 0 12px; }
.ha-me { width: 30px; height: 30px; border-radius: 50%; background: var(--a-bg); border: 1px solid var(--a-line); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--a-mute); }
.ha-side { position: absolute; left: 0; top: 48px; bottom: 0; width: 190px; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--a-card); border-right: 1px solid var(--a-line); }
.ha-side span { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; transition: background .3s, color .3s; }
.ha-side span i { width: 16px; height: 16px; border-radius: 5px; background: var(--a-bar); transition: background .3s; }
.ha[data-area="leads"] [data-nav="leads"], .ha[data-area="deals"] [data-nav="deals"], .ha[data-area="rentals"] [data-nav="rentals"], .ha[data-area="reports"] [data-nav="reports"] { background: var(--a-green-soft); color: var(--a-green); font-weight: 600; box-shadow: inset 3px 0 0 var(--a-green); }
.ha[data-area="leads"] [data-nav="leads"] i, .ha[data-area="deals"] [data-nav="deals"] i, .ha[data-area="rentals"] [data-nav="rentals"] i, .ha[data-area="reports"] [data-nav="reports"] i { background: var(--a-green); }
.ha-main { position: absolute; left: 190px; top: 48px; right: 0; bottom: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.ha-title { display: flex; align-items: center; gap: 12px; height: 38px; }
.ha-title b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.ha-title [data-a] { display: none; }
.ha[data-area="leads"] .ha-title [data-a="leads"], .ha[data-area="deals"] .ha-title [data-a="deals"], .ha[data-area="rentals"] .ha-title [data-a="rentals"], .ha[data-area="reports"] .ha-title [data-a="reports"] { display: inline-flex; }
.ha-actions { margin-left: auto; gap: 8px; }
.ha-tabs { display: flex; gap: 26px; padding-bottom: 12px; border-bottom: 1px solid var(--a-line); }
.ha-tabs .on { box-shadow: 0 14px 0 -11px var(--a-green); background: var(--a-mute); opacity: .55; }
.ha-grid { flex: 1; display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 18px; min-height: 0; }
.ha-g { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ha-g .gap { margin-top: 16px; }

/* Shared pieces */
.ha-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--a-line); background: var(--a-card); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.ha-btn.primary { background: var(--a-green); border-color: var(--a-green); color: var(--a-on-green); font-weight: 600; }
.ha-btn.danger { background: var(--a-red); border-color: var(--a-red); color: #fff; font-weight: 600; }
.ha-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ha-pill.green { background: var(--a-green-soft); color: var(--a-green); }
.ha-pill.violet { background: var(--a-violet-soft); color: var(--a-violet); }
.ha-pill.ember { background: var(--a-ember); color: #fff; }
.ha-dim { position: absolute; left: 190px; top: 48px; right: 0; bottom: 0; background: var(--a-dim); opacity: 0; transition: opacity .35s; }
.ha:not([data-step="idle"]) .ha-dim { opacity: 1; }
.ha-cap { position: absolute; left: 380px; width: 620px; top: 62px; display: flex; justify-content: center; opacity: 0; transition: opacity .3s; }
.ha-cap b { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 18px 0 14px; border-radius: 999px; background: #16231d; color: #fff; font-size: 17px; font-weight: 600; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.ha-cap svg { width: 20px; height: 20px; stroke: #f2a93b; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ha:not([data-step="idle"]) .ha-cap { opacity: 1; }

/* Panels */
.ha-panels { position: absolute; left: 380px; top: 112px; width: 620px; height: 470px; display: grid; place-items: center; }
.ha-p { grid-area: 1 / 1; width: 540px; padding: 26px 28px; border-radius: 18px; background: var(--a-card); border: 1px solid var(--a-line); box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 18px; font-size: 17px; opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.ha-p.on { opacity: 1; transform: none; }
.ha-p.center { align-items: center; text-align: center; padding-block: 44px; gap: 14px; }
.ha-row { display: flex; align-items: center; gap: 14px; }
.ha-row.spread { justify-content: space-between; }
.ha-h { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.ha-m { font-size: 15px; color: var(--a-mute); }
.ha-xl { font-family: "Plus Jakarta Sans", "Geist", sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.ha .green { color: var(--a-green); }
.ha-foot { display: flex; justify-content: flex-end; gap: 10px; }
.ha-foot .ha-btn { height: 42px; padding: 0 20px; font-size: 16px; }
.ha-av { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--a-green-soft); color: var(--a-green); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.ha-av.sq { width: 38px; height: 38px; border-radius: 10px; background: var(--a-violet-soft); color: var(--a-violet); }
.ha .ck { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--a-green); position: relative; }
.ha .ck::after { content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 10px; border: solid var(--a-on-green); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }

.ha-live { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--a-green); }
.ha-live i { width: 12px; height: 12px; border-radius: 50%; background: var(--a-green); animation: ha-pulse 1.2s ease-in-out infinite; }
.ha-live b { margin-left: auto; font-weight: 500; color: var(--a-ink); font-variant-numeric: tabular-nums; }
.ha-wave { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.ha-wave i { width: 9px; height: calc(var(--h) * 84px); border-radius: 5px; background: var(--a-green); animation: ha-wave .7s ease-in-out infinite alternate; animation-delay: var(--d); }
.ha-spin { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--a-bar); border-top-color: var(--a-green); animation: ha-spin .9s linear infinite; }
.ha-lines { display: flex; flex-direction: column; gap: 12px; }
.ha-lines p { margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--a-in); font-size: 16.5px; }
.ha-lines p b { display: block; font-size: 12.5px; font-weight: 600; color: var(--a-mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.ha-fields { display: flex; flex-direction: column; }
.ha-fields > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--a-line); }
.ha-fields > div:last-child { border-bottom: 0; }
.ha-fields span { width: 170px; flex: none; font-size: 15px; color: var(--a-mute); }
.ha-fields b { flex: 1; font-weight: 600; }
.ha-chat { display: flex; flex-direction: column; gap: 12px; }
.ha-chat div { max-width: 78%; padding: 12px 16px; border-radius: 18px; font-size: 17.5px; }
.ha-chat .out { align-self: flex-end; background: var(--a-green); color: var(--a-on-green); border-bottom-right-radius: 6px; }
.ha-chat .in { align-self: flex-start; background: var(--a-in); border-bottom-left-radius: 6px; transform-origin: 0 100%; font-weight: 500; }
.ha-doc { flex: none; width: 40px; height: 48px; border-radius: 6px; border: 2px solid var(--a-mute); position: relative; opacity: .8; }
.ha-doc::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 2px; background: var(--a-mute); box-shadow: 0 8px 0 var(--a-mute), 0 16px 0 var(--a-mute); }
.ha-check { width: 96px; height: 96px; border-radius: 50%; background: var(--a-green); display: grid; place-items: center; }
.ha-check svg { width: 56px; height: 56px; fill: none; stroke: var(--a-on-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ha-track { display: flex; flex-wrap: wrap; gap: 8px; }
.ha-track span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 7px; border-radius: 999px; border: 1px solid var(--a-line); font-size: 14.5px; font-weight: 500; }
.ha-track .done { background: var(--a-green); border-color: var(--a-green); color: var(--a-on-green); font-weight: 600; }
.ha-track .done .ck { background: var(--a-on-green); } .ha-track .done .ck::after { border-color: var(--a-green); }
.ha-two { display: flex; gap: 36px; }
.ha-two span, .ha-sum span, .ha-total span { display: block; font-size: 15px; color: var(--a-mute); }
.ha-two b { font-size: 22px; font-weight: 600; }
.ha-bars { display: flex; flex-direction: column; gap: 13px; }
.ha-bars > div { display: flex; align-items: center; gap: 14px; }
.ha-bars span { width: 104px; flex: none; font-size: 16px; }
.ha-bars em { flex: 1; height: 14px; border-radius: 7px; background: var(--a-bar); overflow: hidden; }
.ha-bars em i { display: block; width: var(--w); height: 100%; border-radius: 7px; background: var(--a-green); transform-origin: 0 50%; }
.ha-bars b { width: 76px; flex: none; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.ha-sum { display: flex; flex-direction: column; }
.ha-sum > div { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.ha-sum b { font-weight: 500; font-variant-numeric: tabular-nums; }
.ha-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 2px solid var(--a-line); }
.ha-total span { font-size: 19px; font-weight: 600; color: var(--a-ink); }
.ha-total b { font-family: "Plus Jakarta Sans", "Geist", sans-serif; font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ha-num { text-align: right; }
.ha-num.left { text-align: left; margin-top: 4px; }
.ha-num b { display: block; font-family: "Plus Jakarta Sans", "Geist", sans-serif; font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ha-num span { font-size: 14px; color: var(--a-mute); }
.ha-rows { display: flex; flex-direction: column; }
.ha-rows > div { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--a-line); }
.ha-rows > div > div { flex: 1; }
.ha-rows b { display: block; font-weight: 600; } .ha-rows div span { font-size: 14.5px; color: var(--a-mute); }
.ha-rows em { font-style: normal; font-weight: 500; font-variant-numeric: tabular-nums; }
.ha-chart { height: 190px; display: flex; align-items: flex-end; gap: 16px; padding-top: 6px; }
.ha-chart > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.ha-chart i { width: 100%; height: calc(var(--h) * .86); border-radius: 8px 8px 3px 3px; background: var(--a-green); opacity: .45; transform-origin: 50% 100%; }
.ha-chart i.now { opacity: 1; }
.ha-chart span { font-size: 14px; color: var(--a-mute); }

/* Sequenced reveals inside the open panel */
.ha-p .rv, .ha-p .pp { opacity: 0; }
.ha-p .gw { transform: scaleX(0); } .ha-p .gh { transform: scaleY(0); }
.ha-p.on .rv { animation: ha-in .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.ha-p.on .pp { animation: ha-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: var(--d, 0s); }
.ha-p.on .gw { animation: ha-grow-x .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.ha-p.on .gh { animation: ha-grow-y .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes ha-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ha-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ha-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ha-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ha-pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes ha-wave { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@keyframes ha-spin { to { transform: rotate(360deg); } }

/* The cursor */
.ha-cursor { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; transform: translate(720px, 360px); transition: transform .72s cubic-bezier(.3, .1, .2, 1), opacity .3s; }
.ha-cursor.off { opacity: 0; }
.ha-cursor svg { position: absolute; left: -4px; top: -4px; width: 40px; max-width: none; height: 50px; fill: #fff; stroke: #16231d; stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); transform-origin: 4px 4px; }
.ha-cursor i { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 4px solid #f2a93b; opacity: 0; }
.ha-cursor.click i { animation: ha-ring .5s ease-out; }
.ha-cursor.click svg { animation: ha-press .3s ease-out; }
@keyframes ha-ring { from { opacity: .95; transform: scale(.3); } to { opacity: 0; transform: scale(1.25); } }
@keyframes ha-press { 40% { transform: scale(.82); } }

/* Still picture for visitors who ask for less motion */
.ha.ha-static .rv, .ha.ha-static .pp { opacity: 1; animation: none; }
.ha.ha-static .gw, .ha.ha-static .gh { transform: none; animation: none; }
.ha.ha-static .ha-cursor { display: none; }
.ha.ha-static .ha-live i, .ha.ha-static .ha-wave i, .ha.ha-static .ha-spin { animation: none; }

/* On a phone the page title row would be cut at both edges, so it is left out. */
.ha.ha-narrow .ha-title > * { visibility: hidden; }
