/* home-motion.css: the homepage's two moving parts and nothing else.

   1. The hero scope: a radar sweep over the opportunity sources the
      pipeline actually scans. Air Force heritage, and literally what the
      product does: sweep the market, light up contacts.
   2. The engagement sequence: four phases pinned beside a panel that
      changes as you scroll, so the page reads as one continuous flow.

   Everything else stays on the refined.css hairline system. Reduced
   motion gets a still scope and an unpinned, stacked sequence. */

/* ------------------------------------------------------------ hero */
body #tab0 .km-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: max(min(86vh, 760px), 640px);
    padding: 56px 24px 40px;
}
body #tab0 .km-hero > div { position: relative; z-index: 1; }
body #tab0 .km-hero h1 {
    font-size: clamp(44px, 5.6vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 500;
    margin: 0 0 28px;
    white-space: nowrap;
}
.km-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.km-line > span { display: block; }
.km-line > span {
    animation: km-rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both;
    animation-delay: calc(var(--i, 0) * 110ms + 80ms);
}
body #tab0 .km-hero .km-fade {
    animation: km-fade 0.9s ease both;
    animation-delay: 560ms;
}
@keyframes km-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes km-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

body #tab0 .km-hero .ki-dek { max-width: 40ch; }

.km-scope {
    position: absolute;
    right: 24px;
    top: 0;
    bottom: 0;
    height: fit-content;
    margin: auto 0;
    width: min(580px, 52%);
}
.km-scope canvas { display: block; width: 100%; aspect-ratio: 1 / 1; }
.km-readout {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--ki-line);
    font-size: 13px;
    color: var(--ki-muted);
    font-variant-numeric: tabular-nums;
}
.km-readout b { color: var(--ki-ink); font-weight: 500; }
.km-readout .km-contact { color: var(--ki-signal); transition: opacity 0.4s; }

/* ------------------------------------------------- capability strip */
body #tab0 .km-plate .ki-spec {
    max-width: none;
    margin: 0 0 8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--ki-line-strong);
    border-bottom: 1px solid var(--ki-line-strong);
    border-radius: 0;
}
body #tab0 .km-plate .ki-spec-title { padding: 14px 0 0; border: 0; margin: 0; }
body #tab0 .km-plate dl {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
}
body #tab0 .km-plate .ki-spec-row {
    display: block;
    padding: 12px 16px 16px 0;
    border: 0;
}
body #tab0 .km-plate .ki-spec-row dt { font-size: 12px; margin-bottom: 4px; }
body #tab0 .km-plate .ki-spec-row dd { font-size: 15px; }

/* ------------------------------------------------ engagement sequence */
.km-seq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.km-stage {
    position: sticky;
    top: 96px;
    align-self: start;
    height: min(560px, calc(100vh - 140px));
    display: grid;
    grid-template-columns: 2px minmax(0, 1fr);
    gap: 28px;
}
.km-rail { position: relative; background: var(--ki-line); }
.km-rail i {
    position: absolute;
    inset: 0 0 auto 0;
    height: calc(var(--km-progress, 0) * 100%);
    background: var(--ki-signal);
}
.km-screens { position: relative; }
.km-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1);
    pointer-events: none;
}
.km-screen.is-on { opacity: 1; transform: none; }
.km-screen .km-phase {
    font-size: clamp(56px, 7vw, 104px);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--ki-ink);
    margin: 0 0 28px;
}
.km-mock {
    background: var(--ki-surface);
    border: 1px solid var(--ki-line-strong);
    border-radius: 6px;
    padding: 18px 20px;
    font-size: 14px;
    color: var(--ki-body);
}
.km-mock-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--ki-muted); margin-bottom: 12px; }
.km-mock-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 9px 0;
    border-top: 1px solid var(--ki-line);
    font-variant-numeric: tabular-nums;
}
.km-mock-row b { color: var(--ki-ink); font-weight: 500; }
.km-bar { height: 4px; background: var(--ki-line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.km-bar i { display: block; height: 100%; width: var(--w); background: var(--ki-signal); transform-origin: left; transform: scaleX(0); transition: transform 0.9s 0.2s cubic-bezier(0.2, 0.7, 0.1, 1); }
.km-screen.is-on .km-bar i { transform: scaleX(1); }
.km-ok { color: var(--ki-signal); }
.km-flag { color: #e0b252; }

.km-steps { padding: 4vh 0 10vh; }
.km-step {
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid var(--ki-line);
    transition: opacity 0.5s ease;
}
.km-ready .km-step { opacity: 0.35; }
.km-ready .km-step.is-on { opacity: 1; }
#tab0:not(.km-ready) .km-stage { visibility: hidden; }
.km-step .n { font-size: 13px; color: var(--ki-muted); font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.km-step h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.02em; font-weight: 500; margin: 0 0 12px; }
.km-step p { font-family: var(--ki-serif); font-size: 18px; line-height: 1.65; color: var(--ki-body); margin: 0; max-width: 42ch; }

/* The pinned panel already names the phase in display type, so the step
   heading stays for screen readers only while the panel is showing. */
@media (min-width: 901px) {
    .km-ready .km-step h3 {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap;
    }
}

/* --------------------------------------------------------- platform */
body #tab0 .km-platform .ki-row { position: relative; transition: padding-left 0.35s cubic-bezier(0.2, 0.7, 0.1, 1), background 0.2s; }
body #tab0 .km-platform .ki-row::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 0; height: 2px;
    background: var(--ki-signal);
    transition: width 0.35s cubic-bezier(0.2, 0.7, 0.1, 1);
}
body #tab0 .km-platform .ki-row:hover, body #tab0 .km-platform .ki-row:focus-visible { padding-left: 28px; }
body #tab0 .km-platform .ki-row:hover::before, body #tab0 .km-platform .ki-row:focus-visible::before { width: 16px; }

/* ------------------------------------------------------- responsive */
@media (max-width: 900px) {
    body #tab0 .km-hero { display: block; min-height: 0; padding: 48px 24px 32px; }
    body #tab0 .km-hero h1 { white-space: normal; }
    .km-scope { position: relative; top: auto; transform: none; width: 100%; max-width: 420px; margin: 36px auto 0; }
    body #tab0 .km-plate dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .km-seq { grid-template-columns: 1fr; gap: 0; }
    .km-stage { display: none; }
    .km-step, .km-ready .km-step { min-height: 0; padding: 32px 0; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .km-line > span, body #tab0 .km-hero .km-fade { animation: none; }
    .km-screen, .km-bar i, .km-step, body #tab0 .km-platform .ki-row, body #tab0 .km-platform .ki-row::before { transition: none; }
}
