/* HouseScan · reveal: the flyover into the lot (report) and the orbiting sample tile (landing). Uses tokens from app.css. */

.rv { position: relative; margin: 18px 0 0; }
.rv[hidden] { display: none; }
.rv-stage { position: relative; height: 460px; border-radius: 28px; isolation: isolate;
  box-shadow: 0 50px 90px -46px rgba(14, 22, 30, 0.55), 0 16px 36px -20px rgba(14, 22, 30, 0.3); }
.rv-clip { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--bg-2); transform: translateZ(0); }
.rv-dots { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 18%, transparent) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent 85%); mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent 85%); }
.rv-scene { position: absolute; inset: 0; perspective: 1600px; }
.rv-rig { position: absolute; left: 0; top: 0; width: 1000px; height: 1000px; transform-origin: 500px 500px; opacity: 0; }
.rv-rig img { position: absolute; inset: 0; width: 1000px; height: 1000px; max-width: none; display: block; border-radius: 30px; user-select: none; -webkit-user-drag: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 70px 120px -40px rgba(12, 20, 28, 0.55);
  filter: saturate(0.78) brightness(1.04); transition: border-radius 0.9s cubic-bezier(.2, .8, .2, 1), filter 1.6s, box-shadow 0.9s; }
.rv.flat .rv-rig img { border-radius: 0; filter: none; box-shadow: none; }
.rv-rig svg { position: absolute; inset: 0; width: 1000px; height: 1000px; max-width: none; overflow: visible; --u: 1px; }
.rv-lotfill { fill: var(--mint); fill-opacity: 0; transition: fill-opacity 0.8s; }
.rv-lotglow { fill: none; stroke: var(--mint); stroke-width: calc(9 * var(--u)); opacity: 0; transition: opacity 0.8s; }
.rv-lot { fill: none; stroke: #e8fff6; stroke-width: calc(2.6 * var(--u)); stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.rv.lit .rv-lotfill { fill-opacity: 0.16; } .rv.lit .rv-lotglow { opacity: 0.85; }
.rv-pw { fill: none; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.rv-pw.core { stroke: var(--signal); stroke-width: calc(3 * var(--u)); }
.rv-pw.halo { stroke: var(--signal); stroke-width: calc(12 * var(--u)); opacity: 0.28; }
.rv-dh { stroke: rgba(8, 12, 16, 0.45); stroke-width: calc(5 * var(--u)); stroke-linecap: round; }
.rv-dl { stroke: #fff; stroke-width: calc(2.2 * var(--u)); stroke-dasharray: calc(8 * var(--u)) calc(6 * var(--u)); stroke-linecap: round; }
.rv-da { fill: var(--mint); stroke: #0c1013; stroke-width: calc(2 * var(--u)); }
.rv-db { fill: var(--signal); stroke: #fff; stroke-width: calc(2.5 * var(--u)); }
.rv-ping { fill: none; stroke: var(--signal); stroke-width: calc(2 * var(--u)); opacity: 0; transform-box: fill-box; transform-origin: center; }
.rv-ping.on { animation: rv-ping 1.8s ease-out infinite; }
@keyframes rv-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.4); opacity: 0; } }
.rv-haze { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(70% 60% at 50% 50%, transparent, color-mix(in srgb, var(--bg) 88%, transparent)); }
.rv-clouds { position: absolute; inset: 0; pointer-events: none; }
.rv-clouds i { position: absolute; width: 70%; aspect-ratio: 1.6; border-radius: 50%; opacity: 0; filter: blur(6px);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5) 45%, rgba(255, 255, 255, 0)); }
.rv-clouds i:nth-child(1) { left: -10%; top: 5%; } .rv-clouds i:nth-child(2) { left: 40%; top: 30%; } .rv-clouds i:nth-child(3) { left: 10%; top: 50%; width: 55%; }
.rv-rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55); }

.rv-glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); color: var(--text); }
.rv-chips { position: absolute; inset: 0; pointer-events: none; }
.rv-chip { position: absolute; left: 0; top: 0; visibility: hidden; }
.rv-chip.show { visibility: visible; }
.rv-chip .in { border-radius: 14px; padding: 8px 12px 9px; white-space: nowrap; }
.rv-chip .big { display: block; font-family: var(--mono); font-weight: 600; font-size: 24px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rv-chip .big small { font-size: 14px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.rv-chip .k { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 5px; line-height: 1.3; }
.rv-chip .t { display: block; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; }
.rv-chip .t i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--mint); border: 1.5px solid #065f46; margin-right: 7px; vertical-align: 1px; }
.rv-chip.pill .in { padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.rv-chip.pill .in::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent); }
.rv-ret { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; }
.rv-ret i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.95); transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(8, 12, 16, 0.25); }
.rv-ret i:nth-child(1) { width: 150px; height: 150px; border-style: dashed; }
.rv-ret i:nth-child(2) { width: 64px; height: 64px; border-color: var(--mint); }
.rv-compass { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity 0.6s; color: #fff; font: 600 12px/1 var(--mono); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.rv-compass .sb { display: grid; gap: 5px; }
.rv-compass .bar2 { height: 5px; border-radius: 2px; background: linear-gradient(90deg, #fff 50%, rgba(12, 16, 19, 0.85) 50%); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 1px 3px rgba(0, 0, 0, 0.4); }
.rv-compass .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; text-shadow: none; }
.rv-compass .n svg path { fill: var(--text); }
.rv-tag { position: absolute; left: 16px; bottom: 14px; font: 500 11.5px/1 var(--mono); color: var(--text-2); padding: 7px 10px; border-radius: 999px; opacity: 0; transition: opacity 0.6s; }
.rv.done .rv-compass, .rv.done .rv-tag { opacity: 1; }

.rv-status { position: absolute; z-index: 3; left: 14px; top: 14px; max-width: calc(100% - 28px); display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 7px 7px 7px 14px; }
.rv-status .t { font: 500 13px/1.3 var(--mono); color: var(--accent); display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv-status .t::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; animation: rv-blink 1s infinite; }
.rv.done .rv-status .t::before { animation: none; }
:lang(zh) .rv-status .t { font-family: var(--font); font-size: 13.5px; font-weight: 600; }
@keyframes rv-blink { 50% { opacity: 0.3; } }
.rv-again { flex: none; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 70%, transparent); height: 34px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.rv-again:hover { background: var(--surface); }
.rv-again svg { width: 15px; height: 15px; }

/* the check dial: glass card riding the stage's lower edge */
.rv-dial { position: absolute; z-index: 4; right: 18px; bottom: -96px; width: 380px; border-radius: 24px; padding: 18px 20px 18px; opacity: 0; }
.rv-dtop { display: flex; align-items: center; gap: 18px; }
.rv-ring { position: relative; width: 112px; height: 112px; flex: none; }
.rv-ring svg { width: 100%; height: 100%; display: block; }
.rv-ring .seg { fill: none; stroke: color-mix(in srgb, var(--text) 14%, transparent); stroke-width: 13; transition: stroke 0.3s; }
.rv-ring .seg.ok { stroke: var(--accent); }
.rv-ring .seg.bad { stroke: var(--signal); }
.rv-ring .seg.pend { stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-dasharray: 3 3; }
.rv-ring .seg.head { stroke: var(--mint); }
.rv-ring .ctr { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rv-ring .num { font: 600 32px/1 var(--mono); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.rv-ring .of { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.rv-dinfo { min-width: 0; flex: 1; }
.rv-dey { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
:lang(zh) .rv-dey { font-family: var(--font); letter-spacing: 0.04em; font-size: 12.5px; }
.rv-dey::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.rv-tick { font-weight: 650; font-size: 16px; letter-spacing: -0.01em; min-height: 24px; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.rv-tick .s { font-weight: 500; font-size: 13px; color: var(--text-3); }
.rv-tick .s.bad { color: var(--bad); }
.rv-tick svg { flex: none; width: 18px; height: 18px; }
.rv-sum { font: 500 12.5px/1.45 var(--mono); color: var(--text-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
:lang(zh) .rv-sum { font-family: var(--font); font-size: 13px; }
.rv-sum .fl { color: var(--bad); }
.rv-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.rv-pills span { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); background: color-mix(in srgb, var(--surface) 55%, transparent); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.rv-pills span.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); background: var(--good-bg); }
.rv-pills span.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: var(--bad-bg); font-weight: 600; }
.rv-pills span.pend { border-style: dashed; }
.rv.has-dial { margin-bottom: 112px; }
.rv.nostage .rv-dial { position: relative; right: auto; bottom: auto; width: auto; max-width: 560px; margin: 0; }
.rv.nostage.has-dial { margin-bottom: 0; }
.rv-hold { opacity: 0; }

@media (max-width: 760px) {
  .rv { margin-top: 14px; }
  .rv-stage { height: 340px; border-radius: 22px; }
  .rv-dial { position: relative; right: auto; bottom: auto; width: auto; margin: -26px 8px 0; padding: 16px; }
  .rv.has-dial { margin-bottom: 0; }
  .rv-ring { width: 96px; height: 96px; }
  .rv-ring .num { font-size: 28px; }
  .rv-status { left: 10px; top: 10px; max-width: calc(100% - 20px); }
  .rv-tag { display: none; }
  .rv-compass { top: auto; bottom: 48px; right: 12px; }
  .rv-compass .sb { display: none; }
}

/* ---------- landing: the orbiting sample tile ---------- */
.fly { position: relative; height: 100%; min-height: 360px; perspective: 1500px; pointer-events: none; }
.fly-dots { position: absolute; inset: -10%; background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 16%, transparent) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000, transparent 80%); mask-image: radial-gradient(50% 50% at 50% 50%, #000, transparent 80%); }
.fly-tile { position: absolute; left: 50%; top: 50%; width: var(--fs, 440px); height: var(--fs, 440px); margin: calc(var(--fs, 440px) / -2) 0 0 calc(var(--fs, 440px) / -2);
  transform: rotateX(56deg) rotateZ(-30deg); animation: fly-orbit 16s ease-in-out infinite alternate; }
@keyframes fly-orbit { from { transform: rotateX(56deg) rotateZ(-36deg); } to { transform: rotateX(52deg) rotateZ(-12deg); } }
.fly-tile img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 6%; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 60px 100px -40px rgba(12, 20, 28, 0.55); filter: saturate(0.82); }
.fly-tile svg { position: absolute; inset: -40%; width: 180%; height: 180%; max-width: none; overflow: visible; }
.fly-tile .ring { fill: none; stroke: color-mix(in srgb, var(--text) 22%, transparent); stroke-width: 1.4; }
.fly-tile .ring.tk { stroke-dasharray: 1.4 16; stroke-width: 12; }
.fly-tile .lot { fill: color-mix(in srgb, var(--mint) 16%, transparent); stroke: var(--mint); stroke-width: 5; stroke-linejoin: round; animation: fly-pulse 2.4s ease-in-out infinite; }
@keyframes fly-pulse { 50% { opacity: 0.5; } }
.fly-sweep { position: absolute; inset: 0; border-radius: 6%; overflow: hidden; }
.fly-sweep::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, rgba(61, 245, 184, 0), rgba(61, 245, 184, 0.2) 80%, rgba(220, 255, 240, 0.7)); animation: fly-sweep 3.6s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes fly-sweep { 0% { transform: translateY(0); } 70%, 100% { transform: translateY(350%); } }

@media (max-width: 760px) { .rv.nostage .rv-dial { margin: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fly-tile, .fly-tile .lot, .fly-sweep::after, .rv-ping.on, .rv-status .t::before { animation: none; }
}
