/* ── DECISION ENGINE & ML SECTION ─────────────────────────── */
.dem { position: relative; overflow: hidden; padding: 120px 0 140px; border-top: 1px solid var(--hair); }
.dem__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(59,130,246,0.10), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(59,130,246,0.06), transparent 60%);
}
.dem .container { position: relative; z-index: 1; }

/* ── Part 1 · Hero ── */
.dem__hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 140px;
}
.dem__copy h2.dem__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink-100);
  margin: 18px 0 22px;
}
.dem__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-70);
  max-width: 560px;
  margin-bottom: 32px;
}
.dem__lead strong { color: var(--ink-100); font-weight: 600; }
.dem__sig {
  display: flex;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 22px 0;
  margin-bottom: 24px;
}
.dem__sig-item { flex: 1; padding-right: 22px; }
.dem__sig-item + .dem__sig-item { border-left: 1px solid var(--hair); padding-left: 22px; }
.dem__sig-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-100);
  line-height: 1;
}
.dem__sig-lab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-top: 8px;
}
.dem__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dem__chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-80);
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(255,255,255,0.015);
}
.dem__chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: dem-dot 1.8s ease-in-out infinite;
}
.dem__chip:nth-child(2) .dem__chip-dot { animation-delay: 0.3s; }
.dem__chip:nth-child(3) .dem__chip-dot { animation-delay: 0.6s; }
.dem__chip:nth-child(4) .dem__chip-dot { animation-delay: 0.9s; }
@keyframes dem-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Live ledger panel */
.dem__motion { position: relative; padding: 14px; zoom: 0.7; }
.dem__panel {
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8,13,24,0.96), rgba(8,13,24,0.86));
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.6),
    0 0 0 1px rgba(59,130,246,0.10),
    inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}
.dem__panel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hair);
  background: rgba(255,255,255,0.02);
}
.dem__panel-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dem__panel-dot--r { background: #ff5f57; }
.dem__panel-dot--y { background: #febc2e; }
.dem__panel-dot--g { background: #28c840; }
.dem__panel-name {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-70);
}
.dem__panel-pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #28c840;
  border: 1px solid rgba(40,200,64,0.4);
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.dem__panel-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #28c840; box-shadow: 0 0 8px #28c840;
  animation: dem-pulse 1.6s ease-out infinite;
}
@keyframes dem-pulse { 0%,100% {opacity:1;} 50% {opacity:0.4;} }

.dem__ledger { padding: 14px 18px; }
.dem__ledger-head,
.dem__row {
  display: grid;
  grid-template-columns: 72px 1.4fr 110px 1.5fr;
  gap: 14px;
  align-items: center;
}
.dem__ledger-head {
  padding: 6px 8px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-70);
  border-bottom: 1px dashed rgba(96,165,250,0.18);
}
.dem__row {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(96,165,250,0.06);
  font-size: 12.5px;
  color: var(--ink-80);
  opacity: 0;
  transform: translateY(6px);
  animation: dem-row-in 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
.dem__row:last-child { border-bottom: 0; }
.dem__row:nth-child(2) { animation-delay: 0.30s; }
.dem__row:nth-child(3) { animation-delay: 0.80s; }
.dem__row:nth-child(4) { animation-delay: 1.30s; }
.dem__row:nth-child(5) { animation-delay: 1.80s; }
.dem__row:nth-child(6) { animation-delay: 2.30s; }
@keyframes dem-row-in { to { opacity: 1; transform: translateY(0); } }

.dem__t { font-family: var(--font-mono); font-size: 11px; color: var(--ink-70); }
.dem__e { font-family: var(--font-mono); font-size: 12px; color: var(--ink-90, var(--ink-80)); }
.dem__s { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-100); display: flex; align-items: center; gap: 8px; }
.dem__bar {
  flex: 1;
  height: 4px;
  background: rgba(96,165,250,0.10);
  border-radius: 2px;
  overflow: hidden;
}
.dem__bar > span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.dem__row--high .dem__bar > span { background: #fda4af; }
.dem__row--med  .dem__bar > span { background: #fcd34d; }
.dem__row--low  .dem__bar > span { background: #93c5fd; }
.dem__row--high .dem__s { color: #fda4af; }
.dem__row--med  .dem__s { color: #fcd34d; }
.dem__row--low  .dem__s { color: #93c5fd; }
.dem__a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dem__panel-foot {
  display: flex; gap: 22px;
  padding: 14px 20px;
  border-top: 1px solid var(--hair);
  background: rgba(255,255,255,0.015);
  flex-wrap: wrap;
}
.dem__metric { display: flex; flex-direction: column; gap: 2px; }
.dem__metric-k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-70); }
.dem__metric-v { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-90, var(--ink-80)); }

.dem__float {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-80);
  background: rgba(8,13,24,0.92);
  border: 1px solid rgba(96,165,250,0.30);
  border-radius: 999px;
  padding: 6px 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.6);
  z-index: 2;
  animation: dem-float 5s ease-in-out infinite;
}
.dem__float--tl { top: -4px; right: -10px; }
.dem__float--tr { top: 38px; left: -14px; animation-delay: 1.6s; }
.dem__float--bl { bottom: 4px; right: -8px; animation-delay: 3s; }
@keyframes dem-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── Section heads ── */
.dem__section-head { margin: 0 0 56px; max-width: 880px; }
.dem__section-head--center { text-align: center; margin-left: auto; margin-right: auto; }

/* ── Part 2 · Pipeline ── */
.dem__pipe {
  list-style: none; padding: 0; margin: 0 0 140px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8,13,24,0.4), rgba(8,13,24,0.15));
  position: relative;
}
.dem__stage {
  padding: 28px 24px 28px;
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column;
  position: relative;
  transition: background 280ms ease;
}
.dem__stage:hover { background: rgba(59,130,246,0.04); }
.dem__stage:last-child { border-right: 0; }
.dem__stage-mark {
  width: 32px; height: 32px;
  border: 1px solid rgba(96,165,250,0.45);
  background: rgba(8,13,24,0.92);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.dem__stage-mark svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.5));
  transition: stroke 180ms ease;
}
.dem__stage-mark { transition: border-color 180ms ease, background 180ms ease; }
.dem__stage:hover .dem__stage-mark { border-color: rgba(125,211,252,0.85); }
.dem__stage:hover .dem__stage-mark svg { stroke: #7dd3fc; }
.dem__stage-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.dem__stage h4 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.005em;
  color: var(--ink-100);
  margin: 0 0 10px;
  line-height: 1.2;
}
.dem__stage p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-70);
  margin: 0;
}
.dem__stage p em { font-style: normal; color: var(--accent); font-family: var(--font-mono); font-size: 11.5px; }

/* ── Part 3 · Capabilities ── */
.dem__caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 120px;
}
.dem__cap {
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 26px 24px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.005));
  transition: transform 280ms cubic-bezier(0.22,1,0.36,1), border-color 280ms ease, background 280ms ease;
}
.dem__cap:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.4);
  background: linear-gradient(180deg, rgba(59,130,246,0.06), rgba(59,130,246,0.015));
}
.dem__cap-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.dem__cap-mark {
  width: 28px; height: 28px;
  border: 1px solid rgba(96,165,250,0.4);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
}
.dem__cap-mark--sq { border-radius: 4px; }
.dem__cap-mark--tri { border: 0; }
.dem__cap-mark--tri::before {
  content: "";
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 24px solid rgba(96,165,250,0.4);
}
.dem__cap-mark--diamond { transform: rotate(45deg); border-radius: 2px; }
.dem__cap-mark--diamond .dem__cap-mark-fill { transform: rotate(-45deg); }
.dem__cap-mark-fill {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.dem__cap-mark--sq .dem__cap-mark-fill { border-radius: 1px; }
.dem__cap-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.dem__cap h4 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink-100);
  margin: 0 0 10px;
  line-height: 1.2;
}
.dem__cap p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0 0 16px;
}
.dem__cap-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--hair);
  padding-top: 14px;
}
.dem__cap-meta span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-70);
  padding: 4px 9px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
}

/* ── Part 4 · Business value ── */
.dem__value {
  border: 1px solid var(--hair);
  border-radius: 14px;
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(59,130,246,0.08), transparent 60%),
    linear-gradient(180deg, rgba(8,13,24,0.6), rgba(8,13,24,0.3));
  padding: 48px 48px 40px;
  margin-bottom: 32px;
}
.dem__value-head { margin-bottom: 36px; max-width: 720px; }
.dem__value-head h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-100);
  margin: 14px 0 0;
}
.dem__value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.dem__vcell {
  padding: 0 24px;
  border-right: 1px solid var(--hair);
}
.dem__vcell:last-child { border-right: 0; }
.dem__vcell:first-child { padding-left: 0; }
.dem__vnum {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink-100);
  margin-bottom: 10px;
}
.dem__vname {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.dem__vcell p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
}

.dem__closing {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-70);
  max-width: 900px;
  margin: 0;
}
.dem__closing strong { color: var(--ink-100); font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .dem__hero { grid-template-columns: 1fr; gap: 40px; }
  .dem__pipe { grid-template-columns: repeat(3, 1fr); }
  .dem__pipe::before { display: none; }
  .dem__stage:nth-child(3n) { border-right: 0; }
  .dem__stage { border-bottom: 1px solid var(--hair); }
  .dem__stage:nth-child(n+4) { border-bottom: 0; }
  .dem__caps { grid-template-columns: repeat(2, 1fr); }
  .dem__value-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .dem__vcell:nth-child(2) { border-right: 0; }
  .dem__vcell:nth-child(3), .dem__vcell:nth-child(4) { padding-left: 0; padding-top: 0; }
}
@media (max-width: 640px) {
  .dem { padding: 80px 0 90px; }
  .dem__pipe { grid-template-columns: 1fr; }
  .dem__stage { border-right: 0; border-bottom: 1px solid var(--hair); }
  .dem__stage:last-child { border-bottom: 0; }
  .dem__caps { grid-template-columns: 1fr; }
  .dem__sig { flex-wrap: wrap; gap: 20px 0; }
  .dem__sig-item + .dem__sig-item { border-left: 0; padding-left: 0; }
  .dem__ledger-head, .dem__row { grid-template-columns: 60px 1fr 88px; }
  .dem__ledger-head > :nth-child(4), .dem__a { display: none; }
  .dem__value { padding: 32px 24px 24px; }
  .dem__value-grid { grid-template-columns: 1fr; }
  .dem__vcell { border-right: 0; padding: 0 0 18px; border-bottom: 1px solid var(--hair); }
  .dem__vcell:last-child { border-bottom: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dem__row, .dem__chip-dot, .dem__panel-pill::before, .dem__float { animation: none !important; opacity: 1 !important; transform: none !important; }
}
