/* =========================================================
   FLOWSENSE MODULES.CSS
   Reusable SaaS-style presentation modules.
   Loaded LAST (after system.css) — wins same-specificity ties.
   No messaging changes — pure presentation layer.
========================================================= */

/* ---------- FRAGMENT CHIP RAIL ----------
   Visualize "scattered evidence" as a chip cluster, paired
   with narrative copy. Used on homepage diagnosis section.
*/
.fragment-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 880px;
  margin: 2.5rem auto 0;
}
.fragment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1E2D3D;
  background: #fff;
  border: 1px solid rgba(15, 45, 69, 0.12);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 45, 69, 0.04);
}
.fragment-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0D9E7A;
  flex-shrink: 0;
}
.fragment-rail.on-dark .fragment-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #E8EEF3;
  box-shadow: none;
}

/* ---------- PROCESS RAIL (numbered horizontal workflow) ----------
   Use for "Capture → Align → Assemble" style 3-step flows.
*/
.process-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  position: relative;
}
.process-step {
  padding: 1.85rem 1.75rem 1.95rem;
  position: relative;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(15, 45, 69, 0.08);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 45, 69, 0.04), 0 8px 24px -16px rgba(15, 45, 69, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.process-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0D9E7A 0%, #11C896 100%);
}
.process-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(15, 45, 69, 0.04), 0 14px 32px -18px rgba(15, 45, 69, 0.28);
}
.process-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.process-step-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F2D45 0%, #163E5B 100%);
  border-radius: 12px;
  color: #11C896;
  box-shadow: 0 6px 18px -6px rgba(15, 45, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 0;
}
.process-step-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.process-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 0.55rem;
  background: rgba(13, 158, 122, 0.1);
  color: #0D9E7A;
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.12em;
  margin-bottom: 0;
}
.process-step h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: #0F2D45;
  margin: 0 0 0.6rem;
  text-transform: none;
}
.process-step p {
  font-size: 1rem;
  line-height: 1.65;
  color: #41566B;
  margin: 0;
}
.process-step h4 + p { margin-top: 0; }

/* ---------- COMPARE PANEL (two-up product comparison) ----------
   Used for Outbound vs Inbound product cards on homepage.
*/
.compare-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: var(--content-max);
  margin: 3rem auto 0;
  background: #fff;
  border: 1px solid rgba(15, 45, 69, 0.1);
  border-radius: 16px;
  overflow: hidden;
}
.compare-card {
  padding: 2rem 2rem 1.8rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.2s, transform 0.18s ease;
  border-right: 1px solid rgba(15, 45, 69, 0.08);
  position: relative;
}
.compare-card:last-child { border-right: none; }
.compare-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #0D9E7A;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.compare-card:hover { background: #FAFCFD; }
.compare-card:hover::before { opacity: 1; }
.compare-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.2rem;
}
.compare-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F2D45 0%, #163E5B 100%);
  color: #11C896;
  border-radius: 12px;
  box-shadow: 0 6px 18px -6px rgba(15, 45, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 0;
}
.compare-card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compare-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.4rem 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0D9E7A;
  background: rgba(13, 158, 122, 0.1);
  border-radius: 6px;
  margin: 0;
}
.compare-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.65rem;
  letter-spacing: 0.005em;
  color: #0F2D45;
  margin: 0;
  line-height: 1.2;
}
.compare-card p {
  font-size: 1rem;
  line-height: 1.65;
  color: #41566B;
  margin: 0;
}
.compare-card-arrow {
  margin-top: auto;
  padding-top: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0D9E7A;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.compare-card-arrow::after {
  content: '\2192';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(13, 158, 122, 0.12);
  color: #0D9E7A;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease;
}
.compare-card:hover .compare-card-arrow { color: #11C896; }
.compare-card:hover .compare-card-arrow::after {
  background: #0D9E7A;
  color: #fff;
  transform: translateX(3px);
}

/* ---------- SHIFT GRID (numbered argument cards) ----------
   Used for "Why teams are acting now" — 3 numbered shift cards.
*/
.shift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  text-align: left;
}
.shift-card {
  padding: 2rem 1.8rem;
  background: #fff;
  border: 1px solid rgba(15, 45, 69, 0.1);
  border-radius: 14px;
  border-top: 3px solid #0D9E7A;
}
.shift-card-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #0D9E7A;
  display: block;
  margin-bottom: 0.9rem;
}
.shift-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: #1E2D3D;
  margin: 0;
}

/* ---------- PILLAR ROW (used for who-we-serve verticals) ---------- */
.pillar-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  text-align: left;
}

/* ---------- NARRATIVE SUBSECTION (text-shell paragraph block) ---------- */
.fork-narrative,
.section-narrative {
  max-width: 760px;
  margin: 1.6rem auto 0;
  text-align: left;
}
.fork-narrative p,
.section-narrative p {
  font-size: 1.06rem;
  line-height: 1.7;
  color: #1E2D3D;
  margin: 0 0 1.1rem;
}
.fork-narrative p:last-child,
.section-narrative p:last-child { margin-bottom: 0; }

/* Sub-section heading inside a major section (smaller than h2) */
.subsection-head {
  max-width: var(--content-max);
  margin: 3.5rem auto 0;
  text-align: center;
}
.subsection-head h3 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: 0.005em;
  color: #0F2D45;
  margin: 0;
  line-height: 1.2;
}

/* ---------- SECTION DIVIDER (in-section heading break) ---------- */
.module-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--content-max);
  margin: 3.5rem auto 1.5rem;
  text-align: center;
  justify-content: center;
}
.module-divider::before,
.module-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(15, 45, 69, 0.12);
  max-width: 80px;
}
.module-divider span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0D9E7A;
}

/* ---------- TRUST STRIP (homepage, below hero) ---------- */
.trust-strip {
  background: #fff;
  border-bottom: 1px solid rgba(15, 45, 69, 0.08);
  padding: 1.4rem 2rem;
}
.trust-strip-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  align-items: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1E2D3D;
  line-height: 1.4;
  letter-spacing: 0.005em;
}
.trust-item:nth-child(2) { justify-content: center; text-align: center; }
.trust-item:nth-child(3) { justify-content: flex-end; text-align: right; }
.trust-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: none;
  stroke: #0D9E7A;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust-item a {
  color: #0D9E7A;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(13, 158, 122, 0.3);
}
.trust-item a:hover { color: #11C896; border-color: #11C896; }

/* ---------- SYSTEMS CALLOUT (outbound: no rip-and-replace) ---------- */
.systems-callout {
  background: #0F2D45;
  color: #E8EEF3;
  padding: 5rem 2rem;
}
.systems-callout-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.systems-callout .eyebrow {
  color: #11C896;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}
.systems-callout h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0 0 1.6rem;
  color: #fff;
}
.systems-callout-body {
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(232, 238, 243, 0.86);
  max-width: 780px;
  margin: 0 auto 2rem;
}
.systems-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 0 auto 2rem;
  max-width: 760px;
}
.systems-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #E8EEF3;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(17, 200, 150, 0.25);
  border-radius: 999px;
}
.systems-chip[role="listitem"] { /* no-op, retained for clarity */ }
.systems-callout-kicker {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  margin: 0 auto;
  max-width: 760px;
}
.systems-callout-kicker .accent { color: #11C896; }

/* ---------- BOTH WORKFLOWS OPENER (who-we-serve) ---------- */
.both-opener {
  background: var(--cloud, #F5F7FA);
  padding: 5rem 2rem 3rem;
  border-top: 3px solid #0D9E7A;
}
.both-opener-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.both-opener .eyebrow {
  color: #0D9E7A;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}
.both-opener h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: 0.005em;
  line-height: 1.2;
  color: #0F2D45;
  margin: 0 0 1.4rem;
}
.both-opener p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: #1E2D3D;
  margin: 0 auto;
  max-width: 780px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .process-rail,
  .compare-panel {
    grid-template-columns: 1fr;
  }
  .compare-card {
    border-right: none;
    border-bottom: 1px solid rgba(15, 45, 69, 0.08);
  }
  .compare-card:last-child { border-bottom: none; }
  .process-rail { grid-template-columns: 1fr; }
  .shift-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .trust-strip-inner { grid-template-columns: 1fr; gap: 0.9rem; }
  .trust-item,
  .trust-item:nth-child(2),
  .trust-item:nth-child(3) { justify-content: flex-start; text-align: left; }
}

@media (max-width: 600px) {
  .fragment-rail { gap: 0.45rem; margin-top: 1.8rem; }
  .fragment-chip { font-size: 0.78rem; padding: 0.45rem 0.8rem; }
  .process-step,
  .compare-card { padding: 1.8rem 1.4rem; }
  .shift-card { padding: 1.6rem 1.4rem; }
  .systems-callout,
  .both-opener { padding: 3.5rem 1.4rem; }
  .systems-chip { font-size: 0.76rem; padding: 0.42rem 0.75rem; }
}
