/* Start where the data starts. One idea, followed down the page: real logos send items along drawn lines into one list,
   then one record of that list gains its quote, order and invoice. Motion hides things only under .dat-armed or a live data-step, so with no script
   or reduced motion everything stands finished. */

.dat-grey { color: var(--ink-2); }

/* ---------------------------------------------------------------- hero: logos, lines, one list */
.dat-hero { isolation: isolate; }
.dat-hero .kit-hero-wash { height: 100%; background: radial-gradient(52% 46% at 50% 74%, color-mix(in srgb, var(--kit-accent) 15%, transparent), transparent 74%); }
.dat-hero .kit-lead { max-width: 30em; margin-top: 28px; }
.dat-hero .kit-scribble > svg { bottom: -.1em; }

.dat-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.dat-tiles li { display: flex; flex-direction: column; align-items: center; text-align: center; padding-inline: 8px; }
.dat-name { font: 500 15px/20px var(--font-text); color: var(--ink); }
.dat-cap { font: 400 13px/18px var(--font-text); color: var(--ink-2); margin-top: 2px; text-wrap: balance; }
.dat-logo { display: grid; place-items: center; width: 72px; height: 72px; margin-top: 14px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--kit-line), 0 14px 28px -14px rgb(16 24 40 / 24%); }
.dat-logo img { display: block; }
.dat-logo.is-duo { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dat-logo.is-duo img { width: 24px; height: 24px; }
.dat-logo.is-plain svg, .dat-ico.is-plain svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.dat-ico.is-plain svg { width: 20px; height: 20px; }

.dat-lines-box { position: relative; margin-top: -1px; }
.dat-lines-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.dat-lines-phone { display: none; }
.dat-lines-box .dat-runs { position: absolute; inset: 0; pointer-events: none; }
.dat-run, .dat-dot { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; }
.dat-dot { stroke-width: 7; opacity: 0; }

.dat-list { width: min(100%, 800px); margin-inline: auto; }
.dat-six-list { display: none; }
.dat-bar-note { color: var(--ink-2); font-weight: 400; }
.dat-rows { list-style: none; margin: 0; padding: 0; }
.dat-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 12px 20px; }
.dat-row + .dat-row { border-top: 1px solid var(--kit-line); }
.dat-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #f5f5f7; }
.dat-who { display: grid; gap: 2px; min-width: 0; }
.dat-who b { font: 500 15px/20px var(--font-text); color: var(--ink); }
.dat-who span { font: 400 14px/20px var(--font-text); color: var(--ink-2); }
.dat-tag { font: 500 12px/1 var(--font-text); color: var(--ink-2); padding: 6px 10px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--kit-line); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .dat-armed .dat-row > * { transition: opacity .5s var(--kit-ease-soft), transform .8s var(--kit-ease); }
  .dat-armed .dat-row:not(.is-landed) > * { opacity: 0; transform: translateY(-14px); }
  /* an empty row is a faint bar until its item lands */
  .dat-armed .dat-row::before { content: ""; position: absolute; left: 74px; top: 50%; width: min(38%, 240px); height: 10px; margin-top: -5px; border-radius: 5px; background: #f0f0f3; transition: opacity .35s var(--kit-ease-soft); }
  .dat-armed .dat-row.is-landed::before { opacity: 0; }
  .dat-flow.is-live .dat-dot { animation: dat-travel 10s cubic-bezier(.45, .05, .3, 1) infinite; animation-delay: calc(var(--i) * 1.6s); }
  @keyframes dat-travel {
    0% { stroke-dashoffset: 0; opacity: 0; }
    2% { opacity: 1; }
    15% { opacity: 1; }
    17%, 100% { stroke-dashoffset: -1; opacity: 0; }
  }
}

.dat-six { padding-block: 88px 104px; }
.dat-six .kit-p { font-size: 19px; line-height: 28px; }

/* ---------------------------------------------------------------- the record that fills in */
.dat-born { overflow: clip; }
.dat-born-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.dat-glow { position: absolute; right: -6%; top: 50%; width: 64vw; aspect-ratio: 1; pointer-events: none; transform: translateY(calc(-50% - var(--p, 0) * 48px));
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 68%, transparent), transparent); }

.dat-doc { --ink: #1d1d1f; --ink-2: #6e6e73; color-scheme: light; color: var(--ink); max-width: 600px; margin-left: auto; box-shadow: 0 0 0 1px rgb(255 255 255 / 12%), 0 48px 96px -32px rgb(0 0 0 / 70%); }
.dat-doc-body { position: relative; padding: 0 24px 0 44px; }
.dat-thread { position: absolute; left: 20px; top: 0; width: 16px; height: 384px; overflow: visible; }
.dat-thread path { fill: none; stroke-width: 2; stroke-linecap: round; }
.dat-thread-base { stroke: #e4e4e9; }
.dat-thread-run { stroke: var(--kit-accent); }
.dat-doc-rows { list-style: none; margin: 0; padding: 0; }
.dat-doc-rows li { position: relative; display: flex; align-items: center; height: 96px; }
.dat-doc-rows li > div { transition: opacity .5s var(--kit-ease-soft), transform .8s var(--kit-ease); }
.dat-doc-rows li + li { border-top: 1px solid var(--kit-line); }
.dat-node { position: absolute; left: -22px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--kit-accent); box-shadow: 0 0 0 4px #fff; transition: background .35s var(--kit-ease-soft); }
.dat-doc-rows small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font: 400 13px/18px var(--font-text); color: var(--ink-2); }
.dat-doc-rows small b { font-weight: 500; margin: 0; color: var(--ink); transition: color .35s var(--kit-ease-soft); }
.dat-doc-rows small .kit-pill { padding: 3px 8px; font-size: 11px; }
.dat-doc-rows p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 0; font: 400 18px/26px var(--font-text); color: var(--ink); }
.dat-doc-rows b { font-weight: 500; margin-left: 4px; }
.dat-doc-rows p .num { font-size: 16px; }
.dat-doc-rows mark { padding: 0 6px; border-radius: 6px; color: inherit; background: color-mix(in srgb, var(--kit-accent) 11%, #fff); }

@media (min-width: 768px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
  .dat-born.kit-pin { height: calc(4 * 72vh + 40vh); }
  .dat-born[data-step="0"] .r0 small b, .dat-born[data-step="1"] .r1 small b, .dat-born[data-step="2"] .r2 small b, .dat-born[data-step="3"] .r3 small b { color: var(--kit-accent); }

  /* a row not reached yet is an empty line waiting: faint bars and a grey node */
  .dat-doc-rows li::before { content: ""; position: absolute; left: 0; top: 50%; width: 46%; height: 26px; margin-top: -13px; opacity: 0; transition: opacity .35s var(--kit-ease-soft);
    background: linear-gradient(#efeff2, #efeff2) 0 0 / 22% 8px no-repeat, linear-gradient(#f4f4f6, #f4f4f6) 0 100% / 100% 10px no-repeat; }
  .dat-born[data-step="0"] :is(.r1, .r2, .r3)::before, .dat-born[data-step="1"] :is(.r2, .r3)::before, .dat-born[data-step="2"] .r3::before { opacity: 1; }
  .dat-born[data-step="0"] :is(.r1, .r2, .r3) > div, .dat-born[data-step="1"] :is(.r2, .r3) > div, .dat-born[data-step="2"] .r3 > div { opacity: 0; transform: translateY(14px); }
  .dat-born[data-step="0"] :is(.r1, .r2, .r3) .dat-node, .dat-born[data-step="1"] :is(.r2, .r3) .dat-node, .dat-born[data-step="2"] .r3 .dat-node { background: #d9d9de; }
}
@media (max-height: 599px) and (min-width: 768px) {
  /* too short to pin: reads as a plain block */
  .dat-born.kit-pin { height: auto; }
  .dat-born .kit-pin-stage { position: static; height: auto; display: block; padding-block: 72px; }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .dat-born .kit-pin-stage { padding-block: 96px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .dat-born-grid { gap: 32px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .dat-doc-rows p { font-size: 16px; line-height: 24px; }
}

/* ---------------------------------------------------------------- one piece at a time */
.dat-head-wide { max-width: 960px; }
.dat-head-wide .dat-grey { display: block; }
.dat-swap { margin: 0; padding: 32px; border-radius: 24px; background: #f5f5f7; }
.dat-swap-states { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; }
.dat-swap-states li { padding: 7px 14px; border-radius: 99px; font: 400 14px/18px var(--font-text); color: var(--ink-2); transition: background .35s var(--kit-ease-soft), color .35s var(--kit-ease-soft); }
.dat-swap-states .p2, .dat-swap[data-piece="0"] .p0, .dat-swap[data-piece="1"] .p1 { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--kit-line); }
.dat-swap[data-piece="0"] .p2, .dat-swap[data-piece="1"] .p2 { background: none; color: var(--ink-2); box-shadow: none; }
.dat-pieces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dat-pieces li { position: relative; min-height: 176px; }
.dat-old, .dat-new { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border-radius: 18px; font: 400 15px/20px var(--font-text); }
.dat-old b, .dat-new b { font: 400 24px/30px var(--font-display); }
.dat-old { background: #fff; box-shadow: inset 0 0 0 1px var(--kit-line); color: var(--ink-2); }
.dat-old b { color: var(--ink); }
.dat-new { background: var(--kit-accent); color: #fff; box-shadow: 0 16px 28px -14px color-mix(in srgb, var(--kit-accent) 75%, transparent); transition: opacity .45s var(--kit-ease-soft), transform .9s var(--kit-ease); }
.dat-swap[data-piece="0"] .dat-new, .dat-swap[data-piece="1"] .c1 .dat-new { opacity: 0; transform: translateY(-24px) rotate(-1.2deg); }

/* ---------------------------------------------------------------- other software: no lines, on purpose */
.dat-other { padding-top: 0; }
.dat-other-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.dat-other .kit-p { font-size: 19px; line-height: 28px; }
.dat-other .link-arrow { display: inline-flex; margin-top: 20px; }
.dat-others { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 28px; }
.dat-others img { display: block; height: 36px; width: auto; aspect-ratio: var(--ar, auto); object-fit: contain; }

.dat-next { padding-bottom: 32px; }

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1023px) {
  .dat-other-grid { grid-template-columns: 1fr; gap: 40px; }
  .dat-pieces li { min-height: 148px; }
  .dat-logo { width: 60px; height: 60px; border-radius: 18px; }
  .dat-logo img { width: 32px; height: 32px; }
  .dat-logo.is-duo img { width: 22px; height: 22px; }
}
@media (max-width: 767px) {
  /* one row of six logos, a line from each; their words move under the heading */
  .dat-tiles { gap: 0; }
  .dat-tiles li { padding-inline: 0; }
  .dat-name, .dat-cap { display: none; }
  .dat-logo { margin: 0; width: 48px; height: 48px; border-radius: 15px; }
  .dat-logo img { width: 26px; height: 26px; }
  .dat-logo.is-duo { gap: 2px; }
  .dat-logo.is-duo img { width: 18px; height: 18px; }
  .dat-logo.is-plain svg { width: 24px; height: 24px; }
  .dat-lines-wide { display: none; }
  .dat-lines-phone { display: block; }

  .dat-row { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 12px 14px; }
  .dat-ico { width: 36px; height: 36px; }
  .dat-tag { position: absolute; top: 12px; right: 14px; padding: 4px 8px; font-size: 11px; }
  .dat-armed .dat-row::before { left: 62px; }

  .dat-six-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; }
  .dat-six-list dt { font: 500 15px/20px var(--font-text); color: var(--ink); }
  .dat-six-list dd { margin: 2px 0 0; font: 400 14px/20px var(--font-text); color: var(--ink-2); }

  .dat-six { padding-block: 56px 72px; }
  .dat-born { padding-block: 72px; }
  .dat-born-grid { grid-template-columns: 1fr; gap: 40px; }
  .dat-glow { width: 140vw; right: -40%; top: 72%; }
  .dat-doc { margin-inline: auto; max-width: none; }
  .dat-doc-body { padding: 0 16px 0 40px; }
  .dat-thread { display: none; }
  .dat-doc-rows li { height: auto; min-height: 84px; padding-block: 14px; }
  .dat-doc-rows li::after { content: ""; position: absolute; left: -17px; top: 0; bottom: 0; width: 2px; background: var(--kit-accent); }
  .dat-doc-rows li.r0::after { top: 50%; }
  .dat-doc-rows li.r3::after { bottom: 50%; }
  .dat-node { z-index: 1; }

  .dat-swap { padding: 16px; margin-inline: -8px; border-radius: 20px; }
  .dat-swap-states { margin-bottom: 16px; }
  .dat-swap-states li { padding: 6px 12px; font-size: 13px; }
  .dat-pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dat-pieces li { min-height: 120px; }
  .dat-old, .dat-new { padding: 14px; border-radius: 14px; font-size: 14px; }
  .dat-old b, .dat-new b { font-size: 21px; line-height: 26px; }
  .dat-others { flex-wrap: nowrap; gap: 12px; }
  .dat-others img { height: 28px; }
}

/* closing block: words and buttons start at the left edge, like every other page's closing */
.spine-close { align-items: flex-start; text-align: left; }
.spine-close .cluster { justify-content: flex-start; }
.spine-close > .lead { margin-inline: 0; }
.spine-close > .small { margin: 0; }
