/* ==========================================================================
   BIS Diagram System — one visual language for every framework
   Desktop: inline SVG. Mobile (<768px): vertical HTML stack (readable).
   ========================================================================== */

/* Tighter page rhythm — consulting report, not marketing sprawl */
.section { padding: 72px 0; }
@media (max-width: 767px) { .section { padding: 52px 0; } }

/* Desktop SVG wrappers */
.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  max-width: 780px;
}
.diagram-svg--wide { max-width: 860px; }

/* Refined SVG internals (applied via classes inside each SVG) */
.dg-node        { filter: url(#dgShadow); }
.dg-node-body   { fill: url(#dgFill); stroke: #0b1038; stroke-width: 1.5; }
.dg-node-accent { fill: url(#dgFillTeal); stroke: #0a746c; stroke-width: 1.5; }
.dg-node-solid  { fill: #0b1038; stroke: none; }
.dg-node-solidteal { fill: #0a746c; stroke: none; }
.dg-title  { fill: #0b1038; font-weight: 700; letter-spacing: 0.06em; }
.dg-sub    { fill: #6b7484; }
.dg-title-w { fill: #ffffff; font-weight: 700; }
.dg-sub-w  { fill: rgba(255,255,255,0.72); }
.dg-link   { stroke: #a8b0bf; stroke-width: 1.5; fill: none; }
.dg-link-teal { stroke: #0a746c; stroke-width: 1.5; fill: none; opacity: 0.55; }

/* ==========================================================================
   Mobile vertical stack (real HTML — readable at any width)
   ========================================================================== */
.diagram-stack { display: none; }

@media (max-width: 767px) {
  .diagram-desktop { display: none; }
  .diagram-stack {
    display: block;
    list-style: none;
    margin: 28px auto 0;
    padding: 0;
    max-width: 420px;
  }
  .diagram-stack li { position: relative; padding: 0 0 26px; }
  .diagram-stack li:last-child { padding-bottom: 0; }
  /* vertical connector */
  .diagram-stack li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 1.5px;
    height: 16px;
    background: #a8b0bf;
  }
  .diagram-stack li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(50% - 4px);
    bottom: 4px;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 6px solid #a8b0bf;
  }
  .ds-node {
    display: block;
    background: #ffffff;
    border: 1.5px solid #0b1038;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(11, 16, 56, 0.07);
  }
  .ds-node--accent { border-color: #0a746c; background: #f0fbf9; }
  .ds-node--solid  { border-color: #0b1038; background: #0b1038; }
  .ds-node--solid .ds-title { color: #ffffff; }
  .ds-node--solid .ds-sub   { color: rgba(255,255,255,0.72); }
  .ds-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    color: #0b1038;
    letter-spacing: 0.02em;
  }
  .ds-sub {
    display: block;
    margin-top: 3px;
    font-size: 0.8125rem;
    color: #6b7484;
    line-height: 1.45;
  }
  /* side-by-side pair (e.g. Cloud + Security) */
  .ds-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ds-row .ds-node { padding: 12px 10px; }
  .ds-row .ds-title { font-size: 0.9375rem; }
  /* group label between stages */
  .ds-label {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #8b90a1;
    text-transform: uppercase;
    padding-bottom: 14px;
  }
  /* capability pills (hero, mobile) */
  .ds-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .ds-pills li {
    padding: 0;
  }
  .ds-pills li::before, .ds-pills li::after { display: none; }
  .ds-pill {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
  }
  /* on dark hero, adapt stack colours */
  .hero .ds-node { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.35); box-shadow: none; }
  .hero .ds-title { color: #ffffff; }
  .hero .ds-sub { color: rgba(255,255,255,0.66); }
  .hero .ds-node--accent { background: rgba(45,212,191,0.14); border-color: rgba(45,212,191,0.7); }
  .hero .ds-node--accent .ds-title { color: #5eead4; }
  .hero .diagram-stack li:not(:last-child)::before { background: rgba(255,255,255,0.4); }
  .hero .diagram-stack li:not(:last-child)::after { border-top-color: rgba(255,255,255,0.4); }
  .hero .ds-label { color: rgba(255,255,255,0.55); }
}
