/* ============================================================
   PRAETOR — Automation / Data / AI spin
   Additive components. Brand chrome unchanged.
   ============================================================ */

/* -------------------------------------------------- MARQUEE / STACK STRIP */
.marquee {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-1);
  overflow: hidden;
  position: relative;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(48px, 10vw, 140px);
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink-1), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--ink-1), transparent); }
.marquee-row {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0;
  animation: marquee-slide 42s linear infinite;
}
.marquee-item {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 22px 34px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 34px;
}
.marquee-item::after {
  content: "";
  width: 5px; height: 5px;
  background: var(--gold-soft);
  transform: rotate(45deg);
  opacity: 0.6;
}
.marquee-lead {
  color: var(--gold-soft);
}
@keyframes marquee-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-row { animation: none; }
}

/* -------------------------------------------------- PIPELINE */
.pipe-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.pipe-head .sec-head { max-width: 50ch; }
.pipe-legend {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist-deep);
  display: flex;
  align-items: center;
  gap: 12px;
}
.pipe-legend .live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .pipe-legend .live { animation: none; } }

.pipe {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-1);
  overflow: hidden;
}
.pipe-canvas-wrap {
  position: relative;
  height: clamp(220px, 32vw, 340px);
}
.pipe-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

/* -------- staged metric visualization -------- */
.pipe-viz {
  position: relative;
  padding: clamp(34px, 4.5vw, 54px) 0 clamp(26px, 3vw, 38px);
}
.pv-rail {
  position: relative;
  height: 14px;
  margin: 0 0 clamp(24px, 3vw, 36px);
}
.pv-rail-line, .pv-rail-fill {
  position: absolute;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
}
.pv-rail-line { left: 12.5%; right: 12.5%; background: var(--line); }
.pv-rail-fill {
  left: 12.5%; width: 0%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-soft);
  transition: width 0.78s cubic-bezier(0.4,0,0.2,1);
}
.pv-rail-nodes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}
.pv-dot {
  justify-self: center;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s, transform 0.4s;
}
.pv-dot.done { background: var(--gold-soft); border-color: var(--gold-soft); }
.pv-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216,178,92,0.16), 0 0 10px var(--gold);
  transform: scale(1.25);
}

.pv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.pv-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 4px clamp(14px, 1.6vw, 24px) 0;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}
.pv-cell + .pv-cell { border-left: 1px solid var(--line-soft); }
.pv-cell.done { opacity: 0.66; }
.pv-cell.active { opacity: 1; }

.pv-visual {
  height: clamp(96px, 12vw, 124px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.pv-stat {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.pv-cell.active .pv-stat { color: var(--bone); }
.pv-unit {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist-deep);
  line-height: 1.5;
  max-width: 22ch;
}

/* Ingest — incoming ticks */
.pv-stream {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px 6px;
  width: clamp(78px, 9vw, 104px);
}
.pv-stream span {
  height: 7px;
  border-radius: 1.5px;
  background: var(--mist-deep);
  opacity: 0;
  transform: translateX(-7px);
  transition: opacity 0.4s, transform 0.4s, background 0.4s;
}
.pv-cell.filled .pv-stream span { opacity: 0.85; transform: none; }
.pv-cell.active .pv-stream span,
.pv-cell.done .pv-stream span { background: var(--gold-soft); }
.pv-stream span:nth-child(6n+1) { transition-delay: 0.02s; }
.pv-stream span:nth-child(6n+2) { transition-delay: 0.10s; }
.pv-stream span:nth-child(6n+3) { transition-delay: 0.18s; }
.pv-stream span:nth-child(6n+4) { transition-delay: 0.26s; }
.pv-stream span:nth-child(6n+5) { transition-delay: 0.34s; }
.pv-stream span:nth-child(6n)   { transition-delay: 0.42s; }

/* Transform — progress ring */
.pv-ringwrap { position: relative; width: clamp(92px, 11vw, 118px); aspect-ratio: 1; }
.pv-ring { width: 100%; height: 100%; transform: rotate(0deg); }
.pv-ring .rt { fill: none; stroke: var(--line); stroke-width: 5; }
.pv-ring .rp {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: butt;
  transition: stroke-dashoffset 1.9s cubic-bezier(0.3,0,0.2,1);
}
.pv-ringnum {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 30px);
  color: var(--mist);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.pv-ringnum i { font-style: normal; font-size: 0.55em; margin-left: 1px; color: var(--mist-deep); }
.pv-cell.active .pv-ringnum { color: var(--bone); }

/* Automate — bars */
.pv-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  width: clamp(80px, 9.5vw, 112px);
}
.pv-bars span {
  flex: 1;
  height: 0;
  border-radius: 2px 2px 0 0;
  background: var(--mist-deep);
  transition: height 1.6s cubic-bezier(0.2,0.7,0.2,1), background 0.4s;
}
.pv-cell.filled .pv-bars span { height: var(--h); }
.pv-cell.active .pv-bars span,
.pv-cell.done .pv-bars span { background: var(--gold); }
.pv-bars span:nth-child(2) { transition-delay: 0.06s; }
.pv-bars span:nth-child(3) { transition-delay: 0.12s; }
.pv-bars span:nth-child(4) { transition-delay: 0.18s; }
.pv-bars span:nth-child(5) { transition-delay: 0.24s; }
.pv-bars span:nth-child(6) { transition-delay: 0.30s; }

/* Decide — confidence */
.pv-decide { gap: 14px; }
.pv-conf {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.pv-conf i { font-style: normal; font-size: 0.42em; color: var(--mist-deep); margin-left: 2px; }
.pv-cell.active .pv-conf { color: var(--gold); }
.pv-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-deep);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s, transform 0.5s, color 0.4s, border-color 0.4s;
}
.pv-cell.filled .pv-verdict { opacity: 1; transform: none; }
.pv-cell.active .pv-verdict { color: var(--gold-soft); border-color: var(--gold-line, rgba(216,178,92,0.4)); }
.pv-verdict .vk {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 7px var(--gold-soft);
}
.pipe-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--line-soft);
  gap: 1px;
}
.pipe-stage {
  background: var(--ink-1);
  padding: 26px 28px 30px;
  transition: background 0.4s;
}
.pipe-stage:hover { background: var(--ink-2); }
.pipe-stage .sn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.pipe-stage h4 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 14px 0 9px;
}
.pipe-stage p {
  font-size: 13.5px;
  color: var(--mist);
  line-height: 1.55;
}

/* -------------------------------------------------- SERVICES / WHAT WE BUILD */
.svcs {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
}
.svc {
  background: var(--ink-1);
  padding: 40px 40px 42px;
  position: relative;
  transition: background 0.4s;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.svc:hover { background: var(--ink-2); }
.svc .svc-no {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  padding-top: 5px;
}
.svc h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 12px;
}
.svc p { color: var(--mist); font-size: 15px; line-height: 1.62; }
.svc .svc-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.svc .svc-tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist-deep);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 5px 9px;
}
.svc::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2,0.7,0.2,1);
}
.svc:hover::after { transform: scaleX(1); }

/* -------------------------------------------------- RESPONSIVE */
@media (max-width: 860px) {
  .pipe-stages { grid-template-columns: repeat(2, 1fr); }
  .pv-rail { display: none; }
  .pv-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .pv-cell { padding: 22px 14px; }
  .pv-cell:nth-child(3), .pv-cell:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .pv-cell:nth-child(3) { border-left: none; }
}
@media (max-width: 720px) {
  .svcs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pipe-stages { grid-template-columns: 1fr; }
  .pipe-stage { padding: 22px 22px 24px; }
  .pv-grid { grid-template-columns: 1fr; }
  .pv-cell + .pv-cell { border-left: none; border-top: 1px solid var(--line-soft); }
  .marquee-item { padding: 18px 24px; font-size: 12px; gap: 24px; }
  .svc { padding: 32px 26px; gap: 16px; }
}
