/* Demo pages (v3): demo-onderhoudshandleiding, demo-engineering, demo-uitvoerdersdagboek, demo-offerte-app.
   Linked from those fragments only. Colours come from the :root tokens in site.css. */

/* Four measured numbers in a section (same look as .hero-stats, four columns) */
.hero-stats.demo-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--s-6);
}
.demo-stats + .src {
  margin-top: var(--s-4);
}

/* A white figure card that holds a coded SVG */
.demo-fig {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-l);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}
.demo-fig .step-svg {
  max-width: 440px;
  margin: 0 auto;
}
.demo-fig figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
}

/* Two equal columns: a visual next to a visual or a number card */
.demo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}
.demo-pair > .frame {
  align-self: start;
}
.demo-pair > .stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Bars in the speech chart (dagboek) */
.step-svg .bar {
  fill: var(--violet);
}
.step-svg .bar-m {
  fill: var(--accent);
}
.step-svg .axis {
  fill: none;
  stroke: var(--hair-strong);
  stroke-width: 1;
}
.step-svg .t-num {
  font-size: 16px;
  font-weight: 700;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* "In de demo -> Jouw versie": one row per part, the demo value muted, the client value strong */
.demo-swap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: var(--s-7);
  align-items: center;
}
.swap {
  list-style: none;
  display: grid;
  gap: var(--s-2);
}
.swap-head,
.swap li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 28px minmax(0, 1.25fr);
  gap: var(--s-3);
  align-items: center;
}
.swap-head {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 var(--s-4) var(--s-1);
}
.swap-head span:last-child {
  grid-column: 4;
  color: var(--violet);
}
.swap li {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-m);
  padding: var(--s-3) var(--s-4);
}
.swap-k {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--violet);
}
.swap-a {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.4;
}
.swap-b {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.swap-arrow {
  position: relative;
  height: 2px;
  background: var(--tint-violet-line);
}
.swap-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  border: 5px solid transparent;
  border-left: 7px solid var(--violet);
  border-right: 0;
}
.demo-art img {
  width: 100%;
  height: auto;
  display: block;
}

/* Two lanes, "Zonder app" against "Met de app" (offerte-app) */
.lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.lane {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-l);
  padding: var(--s-5) var(--s-5) var(--s-4);
  box-shadow: var(--shadow-1);
}
.lane-old {
  background: var(--sunken);
  box-shadow: none;
}
.lane-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.lane-h h3 {
  font-size: var(--fs-h3);
}
.lane-n {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}
.lane-new .lane-n {
  color: var(--accent-ink);
}
.lane ol {
  list-style: none;
  display: grid;
  gap: 0;
}
.lane li {
  position: relative;
  padding: 0 0 var(--s-4) 36px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-2);
}
.lane li b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.lane li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--hair-strong);
}
.lane li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  bottom: 2px;
  width: 2px;
  background: var(--hair-strong);
}
.lane-new li::before {
  border-color: var(--violet);
}
.lane-new li:not(:last-child)::after {
  background: var(--tint-violet-line);
}
.lane-new li:last-child::before {
  background: var(--accent);
  border-color: var(--accent);
}
.lane li:last-child {
  padding-bottom: var(--s-1);
}

@media (max-width: 900px) {
  .demo-pair,
  .demo-swap,
  .lanes {
    grid-template-columns: minmax(0, 1fr);
  }
  .demo-swap {
    gap: var(--s-5);
  }
  .demo-art {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
  }
  .hero-stats.demo-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-stats.demo-stats > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}
@media (max-width: 600px) {
  .hero-stats.demo-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .swap-head,
  .swap li {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: var(--s-4);
    row-gap: var(--s-1);
  }
  .swap-head span:first-child,
  .swap-head span:nth-child(3) {
    display: none;
  }
  .swap-head span:last-child {
    grid-column: auto;
  }
  .swap-k {
    grid-column: 1 / -1;
  }
  .swap-arrow {
    display: none;
  }
  .swap-b {
    position: relative;
    padding-left: 14px;
  }
  .swap-b::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    border: 5px solid transparent;
    border-left: 7px solid var(--violet);
    border-right: 0;
  }
  .demo-fig {
    padding: var(--s-4);
  }
  .demo-fig .step-svg .t-badge {
    font-size: 16px;
  }
  /* the chart scales to about 0.8 on a phone: lift its caps label and row labels above 12 px on screen */
  .demo-fig .step-svg .lbl,
  .demo-fig .step-svg .t-sm {
    font-size: 16px;
  }
}

/* Magenta arrow head for a magenta path (engineering build loop) */
.step-svg .arrow-m {
  fill: var(--accent);
}

/* No one-word last lines in short labels and captions (detector: straggler) */
.demo-stats dt,
.frame figcaption,
.swap-b,
.swap-a,
.lane li,
.stat-card p {
  text-wrap: pretty;
}

/* Column name for screen readers in the .swap rows; the .swap-head row shows it to sighted readers */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "meer dan 1.000" (Tim): a small prefix keeps it on 1 line beside the 1-line stats; below 1180 px it does not fit its column, so it wraps */
.hero-stats .dd-pre {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0;
  margin-right: 2px;
}
@media (min-width: 1180px) {
  .hero-stats dd:has(.dd-pre) {
    white-space: nowrap;
  }
}
