/* ============================================================
   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;
  }
}


/* ============================================================
   Shared homepage section patterns
   Import in any section component that uses the sticky badge rail.

   Provides: .hp-section shell, .hp-rail sticky rail,
   .hp-badge pill, .hp-heading, .hp-body
   ============================================================ */


/* ---- Section shell ----------------------------------------
   Background-color is intentionally omitted — each section
   sets its own via a single-rule override. */

.hp-section {
  position:       relative;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            4rem;      /* 64px */
  padding:        8rem 0;   /* 128px top + bottom */
  font-family:    var(--font-family-default);
  width:          100%;
  box-sizing:     border-box;
  scroll-margin-top: var(--nav-section-offset, 8rem);
}

/* Tablet (≤991px) */
@media (max-width: 991px) {
  .hp-section {
    padding: 6rem 0;
    gap:     3rem;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .hp-section {
    padding: 4rem 0;
    gap:     2rem;
  }
}


/* ---- Sticky badge rail ------------------------------------
   Absolutely positioned inside the first .container, pushed
   left via right: calc(100% - 80px).  The offset skips the
   container's left padding so the rail anchors to the content
   edge rather than the padding edge.  .container has
   position: relative so the rail is bounded to the container's
   height — badge stops when the container ends.
   Width = gutter between container (1024px) and container-wide
   (1384px): (1384 − 1024) / 2 = 180px.
   Shown only at ≥1480px — when container-wide is at max-width
   and the gutter is a fixed, predictable size. */

.hp-rail {
  display:        none;
  position:       absolute;
  right:          calc(100% - 80px);   /* 80px = container left padding */
  top:            0;
  bottom:         0;
  width:          calc((1384px - 1024px) / 2);   /* 180px */
  pointer-events: none;
}

.hp-rail__sticky {
  position:        sticky;
  top:             var(--nav-section-offset, 8rem);
  display:         flex;
  justify-content: flex-end;
  align-items:     flex-start;
  padding-right:   12px;   /* 12px gap from the container's left edge */
}

@media (min-width: 1480px) {
  .hp-rail {
    display:         flex;
    justify-content: flex-start;
    align-items:     flex-start;
  }
}


/* ---- Badge pill -------------------------------------------
   Base pill used in the sticky rail and as the inline badge.
   .hp-badge--inline controls visibility relative to breakpoint. */

.hp-badge {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             6px;
  height:          26px;
  padding:         0 var(--spacing-3);
  background:      var(--card);
  border-radius:   var(--radius-full);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  line-height:     var(--line-height-xs);
  color:           var(--foreground);
  white-space:     nowrap;
}

/* Inline variant — shown below 1488px, hidden at and above
   (matches the rail breakpoint so there is never a gap where
   neither badge is shown) */
.hp-badge--inline {
  margin-bottom: var(--spacing-6);
}

@media (min-width: 1480px) {
  .hp-badge--inline {
    display: none;
  }
}

@media (max-width: 767px) {
  .hp-badge--inline {
    margin-bottom: 1rem;
  }
}

/* Live indicator dot (DemoSection "Live demo" badge) */
.hp-badge__dot {
  display:          block;
  width:            6px;
  height:           6px;
  border-radius:    var(--radius-full);
  background-color: var(--primary);
  flex-shrink:      0;
}


/* ---- Section heading --------------------------------------
   36px regular weight; .fw-bold inside uses bold. */

.hp-heading {
  margin:      0;
  font-size:   2.25rem;
  font-weight: var(--font-weight-regular);
  line-height: 2.5rem;
  color:       var(--foreground);
}



/* ---- Section body text ------------------------------------
   20px regular — used in header intro blocks. */

.hp-body {
  margin:      0;
  font-size:   1.25rem;
  font-weight: var(--font-weight-regular);
  line-height: 1.75rem;
  color:       var(--foreground);
}

@media (max-width: 767px) {
  .hp-heading {
    font-size:   1.875rem;  /* 30px */
    line-height: 2.25rem;   /* 36px */
  }

  .hp-body {
    font-size:   1.125rem;  /* 18px */
    line-height: 1.75rem;   /* 28px */
  }
}


/* ---- Shared card shell ------------------------------------
   Secondary background + hairline border + 12px radius.
   Use alongside component class for layout-specific rules. */

.card-secondary {
  background:    var(--secondary);
  border:        0.5px solid var(--border);
  border-radius: 12px;
  box-sizing:    border-box;
}


/* ---- 26px number pill -------------------------------------
   Circular badge used for step numbers.
   Color (background) set per-component. */

.num-pill {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           26px;
  height:          26px;
  flex-shrink:     0;
  border-radius:   var(--radius-full);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  line-height:     1;
  color:           var(--foreground);
}


/* ---- Card typography --------------------------------------
   Base/bold title and base/regular muted body.
   Color overrides applied per-component as needed. */

.card-title {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
}

.card-body {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color:       var(--muted-foreground);
}


/* ---- Page H1 — shared display heading --------------------- */

.page-h1 {
  display:        flex;
  flex-direction: column;
  margin:         0;
  font-size:      3rem;    /* 48px */
  line-height:    1.15;
  font-weight:    var(--font-weight-light);
  color:          var(--foreground);
}

@media (max-width: 767px) {
  .page-h1 { font-size: 2.25rem; }
}

@media (max-width: 479px) {
  .page-h1 { font-size: 2rem; }
}

/* ============================================================
   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.
   ============================================================ */


/* ---- Section shell ---------------------------------------- */

.hiw-section { background: var(--accent); }


/* ---- 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 ---------------------------------------- */

.hiw__intro {
  display:        flex;
  flex-direction: column;
  gap:            2.25rem;   /* 36px */
  max-width:      800px;
}


/* ---- 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%;
}

/* 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:         0.5px solid var(--border);
  border-radius:  0.75rem; /* 12px */
  padding:        1.75rem; /* 28px */
  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 */
}

.hiw__card-heading {
  margin:      0;
  font-size:   var(--font-size-lg);
  line-height: var(--line-height-lg);
  font-weight: var(--font-weight-medium);
  color:       var(--foreground);
}

.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(--foreground);
}

.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(--muted-foreground);
}


/* ---- Icon badge (circle with icon inside) ----------------- */

.hiw__icon-badge {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            3.75rem; /* 60px */
  height:           3.75rem;
  border-radius:    var(--radius-full);
  border:           0.5px solid var(--border);
  background:       linear-gradient(to right, #fff 0%, #fff 100%);
  flex-shrink:      0;
  color:            var(--primary);
}


/* ---- 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(--muted);
  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(--primary);
}


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

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

  .hiw__body { gap: 2rem; }

  /* Bleed the slider past the container padding (60px) */
  .hiw__mobile {
    margin-left:  -60px;
    margin-right: -60px;
  }

  .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) {
  /* Bleed matches container padding (2rem) at mobile */
  .hiw__mobile {
    margin-left:  -2rem;
    margin-right: -2rem;
  }

  .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;
}

