/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 16px less than .container (60px → 44px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 44px;
  }
}

/* Landscape mobile (≤767px): 16px less than .container (2rem → 1rem) */
@media (max-width: 767px) {
  .container-wide {
    padding: 0 1rem;
  }
}


/* ============================================================
   HybridHowItWorksSection — Flowchart section for the /hybrid page

   Layout:
     Desktop (≥992px): 5 cards in a staggered 3-row flex layout
       with react-archer connector lines.
     Mobile (≤991px): horizontal scroll slider, one card at a time.

   "Flow / step section" and FW-1 (the new homepage's
   `HomeEndToEndSection`). White ground and the Rowan heading come from
   refresh.css. The flow sits on the homepage's column fill, a Blue 100 →
   Blue 50 gradient, radius 24, with white step cards, no outline, radius
   24; card text Blue 700. This flowchart has no columns, numbers or column
   titles, so it stays one panel. jsplumb measures the cards where they
   land, and its SVGs paint over the panel's background.
   ============================================================ */


/* ---- Section shell ----------------------------------------
   The animated snake draws in `--primary` (the overlay paths' `stroke`, set
   in the TSX): on the blue panel it goes Blue 700, so the panel stays one
   colour (Frank, 2026-11-12; owner, 2026-11-16). The 1px `--info`
   connectors stay its track. */

.hiw-section {
  --primary: var(--color-brand-blue-700);
}


/* ---- Content wrapper (intro → body gap) ------------------- */

.hiw__content {
  display:        flex;
  flex-direction: column;
  gap:            4rem;   /* 64px — intro → flowchart/slider */
}


/* ---- Body wrapper (flowchart/slider → footer gap) --------- */

.hiw__body {
  display:        flex;
  flex-direction: column;
  gap:            4rem;   /* 64px — flowchart/slider → footer */
  width:          100%;
}


/* ---- Section intro ----------------------------------------
   Uses the shared .section-header__text (36px heading→body, 800px cap).
   This section keeps 36px on mobile too (restored below). */


/* ---- Desktop / Mobile toggle ------------------------------ */

.hiw__desktop { display: block; }
.hiw__mobile  { display: none;  }


/* ============================================================
   Desktop staggered flow
   ============================================================ */

.hiw__desktop {
  position: relative;   /* jsplumb SVG lines are positioned within this */
  width:    100%;
}

/* Three-row flex column */
.hiw__flow {
  display:        flex;
  flex-direction: column;
  gap:            4rem;    /* 64px between rows */
  width:          100%;
  padding:        2.5rem 2rem 2rem;   /* 40 / 32 / 32, Frank's 20:2865 */
  background:     linear-gradient(to bottom, var(--color-brand-blue-100), var(--color-brand-blue-50));
  border-radius:  var(--radius-lg);
  box-sizing:     border-box;
}

/* Connectors: 1px `--info` (BL-7). Only jsplumb's own path, the first child of
   each connector SVG; the snake's overlay paths after it keep their colour. */
.hiw__desktop svg.jtk-connector > path:first-child {
  stroke:       var(--info);
  stroke-width: 1px;
}

/* Each row: flex with 64px gap, items aligned to their tops */
.hiw__row {
  display:     flex;
  gap:         4rem;       /* 64px */
  align-items: flex-start;
  width:       100%;
}

/* Row 1: Card 1 centered */
.hiw__row--1 { justify-content: center; }

/* Row 3: Cards 4+5 pushed to the right */
.hiw__row--3 { justify-content: flex-end; }


/* ---- Card ------------------------------------------------- */

.hiw__card {
  width:          100%;
  display:        flex;
  flex-direction: column;
  gap:            2rem;    /* 32px */
  background:     var(--card);
  border-radius:  var(--radius-lg);
  padding:        var(--spacing-6);   /* 24px, 20:2871 */
  overflow:       hidden;
  position:       relative;
  z-index:        1;       /* sit above the ArcherContainer SVG */
}


/* ---- Card content ----------------------------------------- */

.hiw__card-icon { flex-shrink: 0; }

.hiw__card-content {
  display:        flex;
  flex-direction: column;
  gap:            1.5rem;  /* 24px */
}

.hiw__card-top {
  display:        flex;
  flex-direction: column;
  gap:            0.5rem;  /* 8px */
}

/* Small card title: sans, Bold 18/28 (TY-10, C10). Card text is Blue 700,
   not `--info`: at 16px on white that reads 2.3:1 (owner, 2026-11-16). */
.hiw__card-heading {
  margin:      0;
  font-size:   var(--font-size-lg);
  line-height: var(--line-height-lg);
  font-weight: var(--font-weight-bold);
  color:       var(--color-brand-blue-700);
}

.hiw__card-body {
  margin:      0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-regular);
  color:       var(--color-brand-blue-700);
}

.hiw__card-muted {
  margin:      0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-regular);
  color:       var(--color-brand-blue-700);
}


/* ---- Icon badge (circle with icon inside) -----------------
   A Blue 100 fill, not a white disc with a hairline, which would vanish on
   a white card (BL-4's chips, BD-1). */

.hiw__icon-badge {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            3.75rem; /* 60px */
  height:           3.75rem;
  border-radius:    var(--radius-full);
  background:       var(--color-brand-blue-100);
  flex-shrink:      0;
  color:            var(--color-brand-blue-500);
}


/* ---- Vertical offset wrappers (stagger cards down) -------- */

/* Direct card flex items in a row */
.hiw__row > .hiw__card,
.hiw__offset {
  flex: 0 0 calc(371 / 1024 * 100%);
}

.hiw__offset {
  display: flex;
}

.hiw__offset--3 { padding-top: 8rem;  } /* 128px */
.hiw__offset--4 { padding-top: 10rem; } /* 160px */


/* ============================================================
   Mobile slider
   ============================================================ */

.hiw__slider-track {
  display:                    flex;
  gap:                        0.75rem;
  cursor:                     grab;
  overflow-x:                 auto;
  scroll-snap-type:           x mandatory;
  scrollbar-width:            none;
  padding:                    0 1.5rem 0.5rem;
  scroll-padding-left:        1.5rem;
  -webkit-overflow-scrolling: touch;
}

.hiw__slider-track::-webkit-scrollbar { display: none; }

.hiw__slide {
  flex:              0 0 calc(100% - 3rem);
  max-width:         560px;
  scroll-snap-align: start;
}


/* Make mobile cards fill their slide */
.hiw__mobile .hiw__card {
  width:  100%;
  height: 100%;
}

.hiw__mobile .hiw__card-content { flex: 1; }
.hiw__mobile .hiw__card-muted   { margin-top: auto; }


/* ---- Pagination dots -------------------------------------- */

.hiw__dots {
  display:         flex;
  gap:             0.75rem;  /* 12px */
  align-items:     center;
  justify-content: center;
  margin-top:      2rem;     /* 32px */
}

.hiw__dot {
  width:         10px;
  height:        10px;
  border-radius: var(--radius-full);
  background:    var(--color-brand-blue-200);
  flex-shrink:   0;
  transition:    width 0.2s ease, background 0.2s ease;
  border:        none;
  padding:       0;
  cursor:        pointer;
}

.hiw__dot--active {
  width:      2rem;  /* 32px */
  background: var(--color-brand-blue-700);   /* BL-3 */
}


/* ============================================================
   Tablet (≤991px)
   ============================================================ */

@media (max-width: 991px) {
  .hiw__desktop { display: none;  }
  .hiw__mobile  { display: block; }

  .hiw__body { gap: 2rem; }

  /* The slider sits on the same panel, 16px from the viewport, with the
     cards on the text edge. */
  .hiw__mobile {
    margin-inline: -44px;              /* 60 − 44 = 16 from the viewport */
    padding-block: 2rem 1.5rem;
    background:    linear-gradient(to bottom, var(--color-brand-blue-100), var(--color-brand-blue-50));
    border-radius: var(--radius-lg);
  }

  .hiw__slider-track {
    padding:             0 44px 0.5rem;
    scroll-padding-left: 44px;
  }

  .hiw__slide {
    flex: 0 0 calc(100% - 88px);
  }
}


/* ============================================================
   Mobile (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .hiw__mobile {
    margin-inline: -1rem;              /* 32 − 16 = 16 from the viewport */
  }

  .hiw__slider-track {
    padding: 0 1rem 0.5rem;
    scroll-padding-left: 1rem;
  }

  .hiw__slide {
    flex: 0 0 calc(100% - 2rem);
  }

}


/* ============================================================
   AvatarGroup — horizontal overlapping avatar strip with fade
   Pass --avatar-bg on the container to match the parent background.
   ============================================================ */

.avatar-group {
  display:   flex;
  height:    60px;
  position:  relative;
  max-width: 100%;
  overflow:  hidden;
}

.avatar-group::after {
  content:        '';
  position:       absolute;
  top:            0;
  right:          0;
  bottom:         0;
  width:          80px;
  background:     linear-gradient(to right, transparent, var(--avatar-bg, var(--card)));
  pointer-events: none;
  z-index:        8;   /* above avatar z-indexes (7 → 1) */
}

.avatar-group__wrap {
  position:      relative;
  flex-shrink:   0;
  width:         60px;
  height:        60px;
  margin-left:   -16px;
  border:        2px solid var(--avatar-bg, var(--card));
  border-radius: var(--radius-full);
  overflow:      hidden;
}

.avatar-group__wrap:first-child { margin-left: 0; }

.avatar-group__img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

.avatar-group__fade {
  position:       absolute;
  inset:          0;
  border-radius:  var(--radius-full);
  pointer-events: none;
}

