/* LeadPilot page — edkursiss.com
   Ink moves, words don't: the board's rules, the map's rings, the pipeline's connectors and
   the crosses of FIG 5 are drawn when `is-inked` lands (site.js). Without JS, and under
   reduced motion, everything below is simply drawn. */

.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px; margin-top: 32px; }

/* ─── Hero ─────────────────────────────────────────────────── */
.lp-hero { padding: var(--hero-pad) 0 clamp(56px, 7vw, 96px); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 44px clamp(32px, 6vw, 96px); align-items: end; }
.lp-hero .lede { margin-top: 22px; }
.lp-price-note { margin-top: 20px; max-width: 46em; }

.lp-board { margin: 0; border: 1px solid var(--ink); border-radius: 2px; background: var(--sheet); }
.lp-board-head { padding: 8px 14px; border-bottom: 1px solid var(--ink); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.lp-stat { position: relative; display: flex; flex-direction: column-reverse; gap: 4px; padding: 18px 16px 16px; }
.lp-stat dt { color: var(--ink-2); font-size: 0.9375rem; }
.lp-stat dd { margin: 0; font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.lp-board-note { position: relative; padding: 12px 16px 14px; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-3); }
/* the rows of the board are ruled one after another */
.lp-stat + .lp-stat::before, .lp-board-note::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--pen-1, 1px); background: var(--line-2);
  transform-origin: left center;
  transition: transform var(--t-rule, 700ms) var(--ease-pen, cubic-bezier(.65, 0, .35, 1)) calc(var(--i, 0) * var(--stagger, 55ms) + 150ms);
}
.lp-stat:nth-child(3) { --i: 0; } .lp-stat:nth-child(4) { --i: 2; } .lp-board-note { --i: 4; }
html.ink .lp-hero:not(.is-inked) :is(.lp-stat + .lp-stat, .lp-board-note)::before { transform: scaleX(0); }

/* ─── Map band ─────────────────────────────────────────────── */
.lp-band { padding: 0 0 clamp(48px, 6vw, 80px); }
.lp-map-pic { position: relative; aspect-ratio: 2.8 / 1; overflow: hidden; background: var(--paper-2); container-type: inline-size; }
.lp-map-pic picture, .lp-map-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-map-wash { position: absolute; inset: 0; background: rgba(246, 247, 244, 0.35); }
.lp-map-marks { position: absolute; inset: 0; pointer-events: none; }
.lp-map-marks > * { position: absolute; transform: translate(-50%, -50%); }
.lp-dot { width: 1.1cqw; height: 1.1cqw; min-width: 8px; min-height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--paper); }
.lp-ring {
  width: 2.4cqw; height: 2.4cqw; min-width: 16px; min-height: 16px; border-radius: 50%; border: var(--pen-2, 1.5px) solid var(--ink);
  transition: transform var(--t-set, 240ms) var(--ease-out), opacity var(--t-ui, 180ms) ease;
  transition-delay: calc(var(--i, 0) * 140ms + 250ms);
}
/* a verified address gets its ring drawn round it */
html.ink .lp-band:not(.is-inked) .lp-ring { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
.lp-found, .lp-ver { font-size: 0.6875rem; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 1px 6px; border-radius: 3px; margin-top: -26px; margin-left: 38px; white-space: nowrap; transform: none; }
.lp-ver { margin-top: 28px; margin-left: 0; transform: translateX(-50%); }
.lp-found { transform: translateX(-50%); margin-left: 0; margin-top: -30px; }
.lp-reply { display: flex; align-items: center; gap: 0; transform: none; margin-left: 0; }
.lp-reply-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 1px solid var(--ink); font-size: 0.6875rem; font-weight: 600; font-style: normal; color: var(--sheet); transform: translate(-50%, -50%); flex: none; }
.lp-reply b { position: absolute; left: 36px; top: -26px; padding: 1px 6px; font-size: 0.6875rem; font-weight: 600; background: var(--paper); border: 1px solid var(--ink); border-radius: 3px; white-space: nowrap; }
.lp-reply b::before { content: ""; position: absolute; left: -26px; top: 18px; width: 30px; height: 1px; background: var(--ink); transform-origin: 100% 50%; transform: rotate(-35deg) translate(8px, 7px); }

/* ─── Pipeline: five boxes, each joined to the next by a ruled line ─── */
.lp-flow { --gap: 44px; }
.lp-pipe { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--gap); }
.lp-pipe li {
  position: relative; display: grid; align-content: start; gap: 8px;
  padding: 18px 18px 22px; border: 1px solid var(--ink); border-radius: var(--r-md); background: var(--paper);
}
/* every box after the first draws the line that leads into it */
.lp-pipe li:not(:first-child)::after {
  content: ""; position: absolute; right: 100%; top: 34px; width: var(--gap); height: var(--pen-1, 1px); background: var(--ink);
  transform-origin: left center;
  transition: transform var(--t-lay, 320ms) var(--ease-pen, cubic-bezier(.65, 0, .35, 1)) calc(var(--i, 0) * 160ms + 150ms);
}
.lp-pipe li:not(:first-child)::before {
  content: ""; position: absolute; right: calc(100% + 2px); top: 31px; width: 6px; height: 6px;
  border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg); z-index: 1;
  transition: opacity var(--t-tap, 120ms) ease calc(var(--i, 0) * 160ms + 420ms);
}
html.ink .lp-pipe li[data-ink]:not(.is-inked)::after { transform: scaleX(0); }
html.ink .lp-pipe li[data-ink]:not(.is-inked)::before { opacity: 0; }
.lp-pipe li.is-end { background: var(--ink); color: var(--on-ink); }
.lp-pipe li.is-end h3 { color: var(--on-ink); }
.lp-pipe li.is-end p, .lp-pipe li.is-end .lp-n { color: var(--on-ink-2); }
/* plan view turns the ink box white: its words follow the navy the shared rule gives the box */
.plan-view .lp-pipe li.is-end :is(h3, p, .lp-n) { color: inherit; }
.lp-n { font-size: 0.75rem; color: var(--ink-3); }
.lp-pipe .h3 { font-size: 1.375rem; font-stretch: 108%; }
.lp-pipe p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }

/* ─── FIG 5: a detail hung from stage 02. Two unit grids, one square per letter ─── */
.lp-fig {
  position: relative; margin: var(--gap) 0 0 calc((100% - 4 * var(--gap)) / 5 + var(--gap)); padding-top: 26px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 56px); align-items: start;
}
.lp-fig::after {      /* leader: down from the Verify box */
  content: ""; position: absolute; left: 18px; bottom: 100%; width: var(--pen-1, 1px); height: var(--gap); background: var(--ink);
  transform-origin: center top;
  transition: transform var(--t-set, 240ms) var(--ease-pen, cubic-bezier(.65, 0, .35, 1));
}
.lp-fig::before {     /* then the rule the detail hangs from */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--pen-1, 1px); background: var(--ink);
  transform-origin: left center;
  transition: transform var(--t-rule, 700ms) var(--ease-pen, cubic-bezier(.65, 0, .35, 1)) 200ms;
}
html.ink .lp-fig[data-ink]:not(.is-inked)::after { transform: scaleY(0); }
html.ink .lp-fig[data-ink]:not(.is-inked)::before { transform: scaleX(0); }

.lp-units { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 28px; }
.lp-unit { display: grid; gap: 10px; align-content: start; }
.lp-unit svg { width: 100%; height: auto; overflow: visible; }
.lp-unit span { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.lp-sq { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.lp-x path, .lp-part {
  fill: none; stroke: var(--ink); stroke-width: var(--pen-2, 1.5px);
  transform-box: fill-box;
  transition: transform var(--t-set, 240ms) var(--ease-pen, cubic-bezier(.65, 0, .35, 1)) calc(var(--i, 0) * var(--stagger, 55ms) + 560ms);
}
/* each bounced letter is struck through with two strokes of the pen */
.lp-x path:first-child { transform-origin: 0 0; }
.lp-x path:last-child { transform-origin: 100% 0; transition-delay: calc(var(--i, 0) * var(--stagger, 55ms) + 660ms); }
.lp-part { --i: 12; stroke-dasharray: 2 2; transform-origin: 0 100%; }
html.ink .lp-fig[data-ink]:not(.is-inked) :is(.lp-x path, .lp-part) { transform: scale(0); }

.lp-fig figcaption { display: grid; gap: 8px; align-content: start; max-width: 34em; }
.lp-fig figcaption p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
.lp-fig figcaption .lp-fig-title { font-size: var(--step-1); font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.lp-fig figcaption .lp-fig-src { margin-top: 8px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  /* stacked: the boxes and the figure share one column, and the figure sits inside stage 02 */
  .lp-flow { --gap: 40px; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--gap); max-width: 520px; }
  .lp-pipe { display: contents; }
  .lp-pipe li { order: 3; }
  .lp-pipe li:nth-child(-n+2) { order: 1; }
  .lp-pipe li:not(:first-child)::after {
    right: auto; left: 50%; top: auto; bottom: 100%; width: var(--pen-1, 1px); height: var(--gap); transform-origin: center top; transition-delay: 150ms;
  }
  .lp-pipe li:not(:first-child)::before { right: auto; left: calc(50% - 3px); top: auto; bottom: calc(100% + 2px); transform: rotate(135deg); transition-delay: 420ms; }
  html.ink .lp-pipe li[data-ink]:not(.is-inked)::after { transform: scaleY(0); }

  .lp-pipe li:nth-child(2) { border-bottom: 1px dashed var(--line-2); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .lp-fig {
    order: 2; margin: calc(var(--gap) * -1) 0 0; padding: 20px 18px 22px; grid-template-columns: minmax(0, 1fr); gap: 20px;
    border: 1px solid var(--ink); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--paper);
  }
  .lp-fig::before, .lp-fig::after { display: none; }
  :is(.lp-x path, .lp-part) { transition-delay: calc(var(--i, 0) * var(--stagger, 55ms) + 150ms); }
  .lp-x path:last-child { transition-delay: calc(var(--i, 0) * var(--stagger, 55ms) + 250ms); }
}
@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .lp-map-pic { aspect-ratio: 16 / 9; }
  .lp-found, .lp-ver, .lp-reply b { font-size: 0.6875rem; }
}
@media (max-width: 360px) {
  .lp-units { gap: 20px; }
  .lp-fig { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-stat::before, .lp-board-note::before, .lp-ring, .lp-pipe li::before, .lp-pipe li::after,
  .lp-fig::before, .lp-fig::after, .lp-x path, .lp-part { transition: none !important; }
}
