/* ==========================================================================
   CSC-WORK — product pages (/products/<name>/)
   Builds on /styles.css (tokens, nav, hero, sections, buttons, kpis, footer).
   --pc is the product's colour tag, set on <body>. It marks the product
   (logo tile, workflow line, document chips); signal orange stays for action.
   ========================================================================== */

.pp-hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(48px, 7vw, 96px) var(--gut) clamp(48px, 6vw, 80px);
}
@media (max-width: 960px) { .pp-hero__inner { grid-template-columns: 1fr; } }

.pp-crumb { font-size: .86rem; color: var(--mist); margin: 0 0 18px; }
.pp-crumb a { color: var(--mist); }
.pp-crumb a:hover { color: var(--concrete); }
.pp-id { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pp-logo { background: var(--pc); color: var(--deep); }

/* ---- promo video ---- */
.promo {
  aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--rule-dark); border-radius: 6px; overflow: hidden;
  background: var(--deep);
  box-shadow: inset 0 3px 0 var(--pc);
}
.promo__video { width: 100%; height: 100%; display: block; object-fit: cover; background: var(--deep); }
.promo__soon { position: relative; width: 100%; height: 100%; }
.promo__soon img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.promo__soon span {
  position: absolute; left: 16px; bottom: 14px;
  font: 500 .78rem "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase;
  color: var(--concrete); background: var(--panel); border: 1px solid var(--rule-strong);
  padding: 6px 10px; border-radius: 6px;
}

/* ---- problem ---- */
.pp-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .pp-split { grid-template-columns: 1fr; } }
.pp-split .sec-head { margin-bottom: 0; }
.pp-pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pp-pains li {
  padding: 16px 18px 16px 20px; border: 1px solid var(--line); border-left: 3px solid var(--rule-strong);
  border-radius: 6px; background: var(--surface); color: var(--text); font-size: 1.02rem;
}

/* ---- workflow: an SVG spine with HTML steps beside it ----
   Each step is exactly one --wf-gap tall so its node on the spine lines up
   with the step's first line. flow.js sets --wf-p (0..1) from scroll and
   toggles .is-on; with no JS or reduced motion every step is on. */
.wf { --wf-gap: 132px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; max-width: 860px; }
.wf__svg { display: block; overflow: visible; }
.wf__track { stroke: var(--line); stroke-width: 2; fill: none; }
.wf__line {
  stroke: var(--pc); stroke-width: 3; fill: none; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--wf-p, 1));
}
.wf__node circle { fill: var(--surface); stroke: var(--line); stroke-width: 2; transition: fill .3s, stroke .3s; }
.wf__node text { font: 700 14px "Bricolage Grotesque", system-ui, sans-serif; fill: var(--text-muted); transition: fill .3s; }
.wf__node.is-on circle { fill: var(--pc); stroke: var(--pc); }
.wf__node.is-on text { fill: var(--deep); }

.wf__steps { list-style: none; margin: 0; padding: 0; }
.wf__step {
  height: var(--wf-gap); padding-top: 20px; box-sizing: border-box;
  transition: opacity .35s, transform .35s;
}
.wf--live .wf__step:not(.is-on) { opacity: .38; transform: translateX(6px); }
.wf__actor {
  font: 500 .72rem "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.wf__action { margin: 4px 0 8px; font-size: 1.06rem; color: var(--text); max-width: 56ch; }
.wf__obj {
  display: inline-block; font: 500 .8rem "JetBrains Mono", ui-monospace, monospace;
  color: var(--text); border: 1px solid var(--pc); border-radius: 6px; padding: 4px 9px;
  background: color-mix(in srgb, var(--pc) 10%, transparent);
}
@media (max-width: 560px) {
  .wf { --wf-gap: 168px; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .wf__svg { width: 40px; }
}

/* ---- business case ---- */
.kpis--1 { grid-template-columns: minmax(0, 340px); }
.kpis--2 { grid-template-columns: repeat(2, minmax(0, 340px)); }
@media (max-width: 560px) { .kpis--2 { grid-template-columns: 1fr; } }

.roi {
  margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px;
  border: 1px solid var(--rule-dark); border-radius: 6px; padding: clamp(18px, 3vw, 28px); background: var(--graphite);
}
@media (max-width: 820px) { .roi { grid-template-columns: 1fr; } }
.roi h3 { grid-column: 1 / -1; margin: 0; font-size: 1.2rem; color: var(--concrete); }
.roi__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 480px) { .roi__inputs { grid-template-columns: 1fr; } }
.roi label { display: grid; gap: 6px; font-size: .86rem; color: var(--mist); }
.roi input {
  font: 600 1rem "Figtree", system-ui, sans-serif; color: var(--concrete); background: var(--deep);
  border: 1px solid var(--rule-strong); border-radius: 6px; padding: 10px 12px; width: 100%; box-sizing: border-box;
}
.roi input:focus { outline: 2px solid var(--steel-hi); outline-offset: 1px; }
.roi__out { display: grid; gap: 12px; align-content: start; }
.roi__res { border-left: 3px solid var(--pc); padding: 6px 0 6px 14px; }
.roi__res span { display: block; font-size: .84rem; color: var(--mist); }
.roi__res strong { font: 800 clamp(1.5rem, 3vw, 2.1rem) "Bricolage Grotesque", system-ui, sans-serif; color: var(--concrete); }
.roi__note { grid-column: 1 / -1; margin: 0; font-size: .82rem; color: var(--dim); }

/* ---- screenshots ---- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  border: 1px solid var(--line); background: var(--graphite);
}
.shot--phone img { max-width: 300px; margin-inline: auto; }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--text-muted); text-align: center; }

/* ---- fit ---- */
.pp-fit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
@media (max-width: 860px) { .pp-fit { grid-template-columns: 1fr; } }
.pp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chips li {
  font-size: .92rem; color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 12px; background: var(--surface);
}
.pp-gap { margin-top: 28px; }
.pp-fits { color: var(--text-muted); margin: 0 0 18px; }

.footer__links a { white-space: nowrap; }

/* stage tags were designed for the light product grid; on the dark hero
   they need their own contrast */
.pp-hero .tag--live  { color: var(--concrete); border-color: var(--rule-strong); background: var(--panel); }
.pp-hero .tag--early { color: var(--next-ink);  border-color: var(--next-tint);   background: var(--next-tint); }
.pp-hero .tag--dev   { color: var(--mist);      border-color: var(--rule-strong); background: transparent; }
.roi__inputs, .roi label { align-content: start; }
