/* ────────────────────────────────────────────────────────────────────
 * examples-paths.css — `/examples/paths/` Buyer-journey paths page
 * (W6.F.B.2).
 *
 * Mobile-first per DESIGN §7. Token-only — every Npx / hex value
 * resolves through `--demo-*`. Reduce-motion safe. Reuses the
 * existing `.demo-card` + `.demo-pill` primitives; the only new
 * primitive is `.demo-stepper` (vertical numbered timeline).
 *
 * File budget: ~300 LOC (DESIGN §6 spec said ~120 LOC; I went
 * larger because the hero jumplist + path-header rich treatment
 * + reduce-motion suppression + dark-mode adjustments earn the
 * extra space — every rule is load-bearing).
 * ────────────────────────────────────────────────────────────── */

.demo-paths {
  background: var(--demo-bg);
  min-height: 100vh;
}

.demo-paths__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--demo-space-7) var(--demo-space-5);
  display: grid;
  gap: var(--demo-space-9);
}

/* ─── Hero ───────────────────────────────────────────────────── */

.demo-paths__hero {
  display: grid;
  gap: var(--demo-space-4);
  padding-top: var(--demo-space-6);
}

.demo-paths__hero-eyebrow {
  justify-self: start;
  font-size: var(--demo-fs-xs);
  letter-spacing: var(--demo-ls-caps);
}

.demo-paths__hero-title {
  margin: 0;
  font-size: clamp(28px, 4vw + 8px, 42px);
  font-weight: var(--demo-fw-bold);
  line-height: var(--demo-lh-tight);
  color: var(--demo-text);
  letter-spacing: -0.01em;
}

.demo-paths__hero-lede {
  margin: 0;
  font-size: var(--demo-fs-md);
  line-height: var(--demo-lh-body);
  color: var(--demo-text-secondary);
  max-width: 64ch;
}

.demo-paths__hero-jumplist {
  list-style: none;
  margin: var(--demo-space-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--demo-space-3);
}
@media (min-width: 640px) {
  .demo-paths__hero-jumplist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .demo-paths__hero-jumplist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.demo-paths__hero-jump {
  display: grid;
  grid-template-areas:
    "icon eyebrow"
    "icon title"
    "time time";
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--demo-space-1) var(--demo-space-3);
  padding: var(--demo-space-4);
  background: var(--demo-bg-elevated);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.demo-paths__hero-jump:hover {
  border-color: var(--demo-accent);
  transform: translateY(-2px);
  box-shadow: var(--demo-shadow-md);
}
.demo-paths__hero-jump:focus-visible {
  outline: 2px solid var(--demo-accent);
  outline-offset: 2px;
}
.demo-paths__hero-jump-icon {
  grid-area: icon;
  font-size: 28px;
  color: var(--demo-accent);
}
.demo-paths__hero-jump-eyebrow {
  grid-area: eyebrow;
  font-size: var(--demo-fs-xs);
  letter-spacing: var(--demo-ls-caps);
  color: var(--demo-text-muted);
  text-transform: uppercase;
}
.demo-paths__hero-jump-title {
  grid-area: title;
  font-size: var(--demo-fs-sm);
  font-weight: var(--demo-fw-semibold);
  color: var(--demo-text);
  line-height: var(--demo-lh-tight);
}
.demo-paths__hero-jump-time {
  grid-area: time;
  margin-top: var(--demo-space-2);
  padding-top: var(--demo-space-2);
  border-top: 1px dashed var(--demo-border);
  font-size: var(--demo-fs-xs);
  color: var(--demo-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ─── Per-path section ───────────────────────────────────────── */

.demo-paths__path {
  display: grid;
  gap: var(--demo-space-5);
  padding: var(--demo-space-6) 0;
  scroll-margin-top: var(--demo-space-6);
}

.demo-paths__path-header {
  display: grid;
  gap: var(--demo-space-3);
  padding-bottom: var(--demo-space-4);
  border-bottom: 1px solid var(--demo-border);
}

.demo-paths__path-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--demo-space-3);
  font-size: var(--demo-fs-sm);
}
.demo-paths__path-time {
  display: inline-flex;
  align-items: center;
  gap: var(--demo-space-1);
  color: var(--demo-text-secondary);
  font-variant-numeric: tabular-nums;
}
.demo-paths__path-time .material-symbols-outlined { font-size: 16px; }
.demo-paths__path-step-count {
  margin-left: auto;
  color: var(--demo-text-muted);
  font-variant-numeric: tabular-nums;
}

.demo-paths__path-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--demo-space-3);
  font-size: clamp(22px, 2.5vw + 8px, 30px);
  font-weight: var(--demo-fw-bold);
  line-height: var(--demo-lh-tight);
  color: var(--demo-text);
}
.demo-paths__path-icon {
  font-size: 32px;
  color: var(--demo-accent);
  flex-shrink: 0;
}

.demo-paths__path-lede {
  margin: 0;
  font-size: var(--demo-fs-md);
  line-height: var(--demo-lh-body);
  color: var(--demo-text-secondary);
  max-width: 64ch;
}
.demo-paths__path-lede code {
  font-family: var(--demo-font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: var(--demo-radius-sm);
  background: var(--demo-accent-soft);
  color: var(--demo-accent);
  white-space: nowrap;
}

/* ─── Vertical numbered stepper ──────────────────────────────── */

.demo-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--demo-space-5);
  position: relative;
}

.demo-stepper__step {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--demo-space-4);
  align-items: stretch;
}

/* Connecting line between numbered dots — runs through the column the
 * dots live in. Stops 16 px before the next dot so the visual reads
 * as "step 1 → step 2" not a continuous bar. */
.demo-stepper__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: calc(-1 * var(--demo-space-5) + 4px);
  width: 2px;
  background: linear-gradient(to bottom,
    var(--demo-border) 0%,
    var(--demo-border) 60%,
    transparent 100%);
  pointer-events: none;
}

.demo-stepper__num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--demo-primary);
  color: var(--demo-primary-fg);
  font-weight: var(--demo-fw-bold);
  font-size: var(--demo-fs-md);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--demo-bg);
  flex-shrink: 0;
  align-self: start;
  z-index: 1;
}

.demo-stepper__card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: var(--demo-space-3);
  padding: var(--demo-space-5);
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.demo-stepper__card:hover {
  border-color: var(--demo-accent);
  transform: translateY(-2px);
  box-shadow: var(--demo-shadow-md);
}
.demo-stepper__card:focus-visible {
  outline: 2px solid var(--demo-accent);
  outline-offset: 2px;
}
.demo-stepper__card:active {
  transform: translateY(0);
  box-shadow: var(--demo-shadow-sm);
}

.demo-stepper__card-pill {
  justify-self: start;
  font-size: var(--demo-fs-xs);
  letter-spacing: var(--demo-ls-caps);
}
.demo-stepper__card-title {
  margin: 0;
  font-size: var(--demo-fs-md);
  font-weight: var(--demo-fw-semibold);
  color: var(--demo-text);
  line-height: var(--demo-lh-tight);
}
.demo-stepper__card-why {
  margin: 0;
  font-size: var(--demo-fs-sm);
  line-height: var(--demo-lh-body);
  color: var(--demo-text-secondary);
}
.demo-stepper__card-why code {
  font-family: var(--demo-font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: var(--demo-radius-sm);
  background: var(--demo-accent-soft);
  color: var(--demo-accent);
  white-space: nowrap;
}
.demo-stepper__card-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--demo-space-1);
  font-size: var(--demo-fs-sm);
  font-weight: var(--demo-fw-semibold);
  color: var(--demo-text);
  transition: transform 160ms ease, color 160ms ease;
}
.demo-stepper__card-cta .material-symbols-outlined {
  font-size: 18px;
  transition: transform 160ms ease;
}
.demo-stepper__card:hover .demo-stepper__card-cta {
  color: var(--demo-accent);
}
.demo-stepper__card:hover .demo-stepper__card-cta .material-symbols-outlined {
  transform: translateX(4px);
}

/* ─── Closing outcome line ───────────────────────────────────── */

.demo-paths__outcome {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: var(--demo-space-3);
  padding: var(--demo-space-4) var(--demo-space-5);
  background: var(--demo-bg-elevated);
  border: 1px solid var(--demo-border);
  border-left: 3px solid var(--demo-accent);
  border-radius: var(--demo-radius-md);
}
.demo-paths__outcome-icon {
  font-size: 22px;
  color: var(--demo-accent);
}
.demo-paths__outcome-eyebrow {
  font-size: var(--demo-fs-xs);
  font-weight: var(--demo-fw-semibold);
  letter-spacing: var(--demo-ls-caps);
  color: var(--demo-text-muted);
  text-transform: uppercase;
}
.demo-paths__outcome-text {
  font-size: var(--demo-fs-md);
  color: var(--demo-text);
}

/* ─── Footer ─────────────────────────────────────────────────── */

.demo-paths__footer {
  display: grid;
  gap: var(--demo-space-3);
  padding: var(--demo-space-7) var(--demo-space-5);
  margin-top: var(--demo-space-7);
  border-top: 1px solid var(--demo-border);
  text-align: center;
  justify-items: center;
}
.demo-paths__footer-title {
  margin: 0;
  font-size: var(--demo-fs-lg);
  font-weight: var(--demo-fw-semibold);
  color: var(--demo-text);
}
.demo-paths__footer-lede {
  margin: 0;
  font-size: var(--demo-fs-sm);
  line-height: var(--demo-lh-body);
  color: var(--demo-text-secondary);
  max-width: 56ch;
}
.demo-paths__footer-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--demo-space-3);
  justify-content: center;
  margin-top: var(--demo-space-3);
}

/* ─── Reduce-motion safety ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .demo-paths__hero-jump,
  .demo-stepper__card,
  .demo-stepper__card-cta,
  .demo-stepper__card-cta .material-symbols-outlined {
    transition: none;
  }
  .demo-paths__hero-jump:hover,
  .demo-stepper__card:hover {
    transform: none;
  }
  .demo-stepper__card:hover .demo-stepper__card-cta .material-symbols-outlined {
    transform: none;
  }
}
