/* ============================================================
   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:     1024px;
  max-width: calc(100% - 160px); /* 80px × 2 — desktop */
  margin:    0 auto;
}

/* Tablet (≤991px): 60px × 2 = 120px */
@media (max-width: 991px) {
  .container {
    max-width: calc(100% - 120px);
  }
}

/* Landscape mobile (≤767px): 2rem × 2 = 4rem */
@media (max-width: 767px) {
  .container {
    max-width: calc(100% - 4rem);
  }
}



/* ============================================================
   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(1360px + 96px);   /* 1360px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet + landscape mobile (≤991px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 2rem;
  }

  .container-wide > * {
    margin-left:  -1rem;
    width:        calc(100% + 2rem) !important;
  }
}


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

/* 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: 100%.  .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
   (1360px): (1360 − 1024) / 2 = 168px.
   Shown only at ≥1488px — when the gutter is a fixed, predictable size. */

.hp-rail {
  display:        none;
  position:       absolute;
  right:          100%;
  top:            0;
  bottom:         0;
  width:          calc((1360px - 1024px) / 2);   /* 168px */
  pointer-events: none;
}

.hp-rail__sticky {
  position:        sticky;
  top:             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: 1488px) {
  .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: 1488px) {
  .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; <strong> inside uses bold. */

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

.hp-heading strong {
  font-weight: var(--font-weight-bold);
}


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

.hp-body strong {
  font-weight: var(--font-weight-bold);
}

@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);
}

/* ============================================================
   HumanLayerSection — Homepage "The human layer" section
   Shared section shell, rail, badge, heading, body → src/section.css
   ============================================================ */

.human-layer-section { background-color: var(--background); }


/* ============================================================
   Section header intro (heading + body block)
   ============================================================ */

.human-layer-section__intro {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--spacing-9);
  max-width:      800px;
}


/* ============================================================
   Cards wrapper — stacks both cards with 12px gap
   ============================================================ */

.human-layer__cards {
  display:        flex;
  flex-direction: column;
  gap:            12px;
  width:          100%;
}


/* ============================================================
   Percentages card — white card, 4-col grid
   ============================================================ */

.human-layer__card {
  display:               grid;
  grid-template-columns: repeat(5, 1fr);
  gap:                   12px;
  background:            var(--card);
  border-radius:         var(--radius-lg);
  padding:               var(--spacing-3);
  box-sizing:            border-box;
  width:                 100%;
}

.human-layer__card > * {
  min-width: 0;
}


/* ============================================================
   Left cell — big stat + copy + avatars
   ============================================================ */

.human-layer__total {
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  gap:             20px;
  padding:         var(--spacing-6);
  box-sizing:      border-box;
  grid-column:     1 / span 2;
}

.human-layer__total-stat {
  display:     flex;
  align-items: center;
  line-height: 2rem;
  height: 3.25rem;

}

.human-layer__big-number {
  font-size:   3rem;
  font-weight: var(--font-weight-regular);
  color:       var(--foreground);
}

.human-layer__big-percent {
  font-size:   3rem;
  font-weight: var(--font-weight-bold);
  color:       var(--foreground);
}

.human-layer__total-desc {
  margin:      0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
  color:       var(--foreground);
}

.human-layer__total-desc strong { font-weight: var(--font-weight-bold); }
.human-layer__total-sub         { color: var(--muted-foreground); }



/* ============================================================
   Right stat cells
   ============================================================ */

.human-layer__stat-cell {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-2);
  height:         auto;
  min-height:     245px;
  padding:        1.75rem;
  overflow:       hidden;
}

.human-layer__stat-header {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-6);
}

.human-layer__stat-number {
  margin:      0;
  font-size:   1.5rem;
  font-weight: var(--font-weight-regular);
  line-height: 2rem;
  color:       var(--muted-foreground);
}

.human-layer__stat-number strong { font-weight: var(--font-weight-bold); }

.human-layer__stat-label {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
  color:       var(--popover-foreground);
}

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


/* ============================================================
   Venn diagram card
   ============================================================ */

.human-layer__venn-heading {
  margin:      0;
  padding:     1.5rem 1.5rem 0 1.5rem;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
  color:       var(--foreground);
}

.human-layer__venn-card {
  background:    var(--card);
  border-radius: var(--radius-lg);
  padding:       var(--spacing-3);
  box-sizing:    border-box;
  width:         100%;
  overflow:      hidden;
}

.human-layer__venn-wrapper {
  display:     flex;
  align-items: center;
  padding:     1rem 3rem 4rem 3rem;
  gap:         0;
}

.human-layer__venn-img-wrap {
  flex-shrink: 0;
  width:       53.0973451327%;
  max-width:   480px;
}

.human-layer__venn-img {
  display: block;
  width:   100%;
  height:  auto;
}

.human-layer__venn-copy {
  flex:           1;
  display:        flex;
  flex-direction: column;
  gap:            0.75rem;
  min-width:      0;
}

.human-layer__venn-item {
  display:        flex;
  flex-direction: column;
  gap:            12px;
  padding:        10px 12px 10px 64px;
}

.human-layer__venn-item-head {
  display:     flex;
  align-items: center;
  gap:         var(--spacing-3);
}

.human-layer__venn-pill {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           26px;
  height:          26px;
  border-radius:   100px;
  flex-shrink:     0;
  background:      var(--background);
  color:           var(--foreground);
}

.human-layer__venn-pill--hybrid {
  background: rgba(89, 183, 217, 0.4);
}

.human-layer__venn-title {
  margin:      0;
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
  color:       var(--foreground);
}

.human-layer__venn-desc {
  margin:         0;
  font-size:      var(--font-size-base);
  font-weight:    var(--font-weight-regular);
  line-height:    var(--line-height-base);
  color:          var(--muted-foreground);
  padding-bottom: 0;
  min-height: 48px;
  
}


/* ============================================================
   Large desktop (≤1280px) — tighten venn padding
   ============================================================ */

@media (max-width: 1280px) {
  .human-layer__venn-wrapper {
    padding:     1rem 2rem 3rem 2rem;
  }
}


/* ============================================================
   Tablet (≤991px) — 3-col
   ============================================================ */

@media (max-width: 991px) {
  .human-layer__card {
    grid-template-columns: repeat(3, 1fr);
  }

  .human-layer__total {
    grid-column: 1 / -1;
  }

  .human-layer__stat-cell {
    height:     auto;
    min-height: 200px;
  }
}


/* ============================================================
   Mobile (≤767px) — single column
   ============================================================ */

@media (max-width: 767px) {
  .human-layer-section__intro {
    gap: 2rem;
  }

  .human-layer__stat-cell {
    min-height: 0;
    padding:    1.5rem;
  }

  .human-layer__stat-header {
    gap: 1rem;
  }

  .human-layer__total {
    padding: 12px;
  }

  .human-layer__big-number,
  .human-layer__big-percent {
    font-size: 2.25rem; /* 36px */
  }

  .human-layer__total-stat {
    height: 40px;
  }

  .human-layer__card {
    grid-template-columns: 1fr;
  }

  .human-layer__venn-heading {
    padding: 0.75rem 0.75rem 0 0.75rem ;
  }

  .human-layer__venn-wrapper {
    flex-direction: column;
    padding:        0.75rem 0;
    gap: 0.75rem  ;
  }

  .human-layer__venn-img-wrap {
    width:     100%;
    max-width: 480px;
  }

  .human-layer__venn-item {
    padding: var(--spacing-3);
  }
  .human-layer__venn-desc {
    min-height: auto;
  }

  .human-layer__venn-copy{
    padding: 18px 0;
    max-width: 380px;
  }
}

/* ============================================================
   Button — Component Styles
   Scheme-aware: inherits data-scheme from a parent element.
   All color tokens flip automatically in dark context.
   ============================================================ */

.btn {
  /* Layout */
  align-items:     center;
  border:          1px solid transparent;
  box-sizing:      border-box;
  cursor:          pointer;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
  overflow:        hidden;
  text-decoration: none;
  user-select:     none;
  white-space:     nowrap;

  /* Typography */
  font-family: var(--font-family-default);
  font-weight: var(--font-weight-medium);

  /* Transition */
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}


/* ============================================================
   Sizes
   Heights: xs=26px  sm=32px  md=36px  lg=40px
   All use font-size-sm (14px) except xs which uses font-size-xs (12px).
   ============================================================ */

.btn[data-size="xs"] {
  font-size:   var(--font-size-xs);      /* 12px */
  line-height: var(--line-height-xs);    /* 16px */
  gap:         0.25rem;                  /* 4px  */
  padding:     0.3125rem 0.75rem;        /* 5px 12px → height 26px */
}

.btn[data-size="sm"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.375rem 1rem;            /* 6px 16px → height 32px */
}

.btn[data-size="md"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.5rem 1rem;              /* 8px 16px → height 36px */
}

.btn[data-size="lg"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.5rem;                   /* 8px  */
  padding:     0.625rem 1.5rem;          /* 10px 24px → height 40px */
}


/* ============================================================
   Shapes
   ============================================================ */

.btn[data-shape="rounded"] { border-radius: var(--radius-sm);   } /* 8px  */
.btn[data-shape="round"]   { border-radius: var(--radius-full); } /* pill */


/* ============================================================
   Variants
   ============================================================ */

.btn[data-variant="primary"] {
  background-color: var(--primary);
  border-color:     var(--primary);
  color:            var(--primary-foreground);
}

.btn[data-variant="secondary"] {
  background-color: transparent;
  border-color:     var(--border);
  color:            var(--brand-neutral-700);
}


.btn[data-variant="info"] {
  background-color: var(--info);
  border-color:     var(--info);
  color:            var(--info-foreground);
}

.btn[data-variant="success"] {
  background-color: var(--success);
  border-color:     var(--success);
  color:            var(--success-foreground);
}

.btn[data-variant="warning"] {
  background-color: var(--warning);
  border-color:     var(--warning);
  color:            var(--warning-foreground);
}

.btn[data-variant="destructive"] {
  background-color: var(--destructive);
  border-color:     var(--destructive);
  color:            var(--destructive-foreground);
}


/* ============================================================
   States
   ============================================================ */

/* Hover — default (card, info, success, warning, destructive) */
.btn:hover:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.88;
}

/* Primary hover — 20% dark overlay on background, full opacity */
.btn[data-variant="primary"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--primary) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--primary) 80%, #282825 20%);
  color:            var(--card);
  opacity:          1;
}

/* Secondary hover — darker border + foreground text, no fill */
.btn[data-variant="secondary"]:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--muted-foreground);
  color:        var(--foreground);
  opacity:      1;
}

/* Active / pressed */
.btn:active:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.76;
}

/* Focus */
.btn:focus-visible {
  outline:        2px solid var(--ring);
  outline-offset: 2px;
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor:         not-allowed;
  opacity:        0.4;
  pointer-events: none;
}


/* ============================================================
   Icon slot
   ============================================================ */

.btn__icon {
  align-items:     center;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
}

.btn[data-size="xs"] .btn__icon { height: 0.75rem; width: 0.75rem; } /* 12px */
.btn[data-size="sm"] .btn__icon,
.btn[data-size="md"] .btn__icon,
.btn[data-size="lg"] .btn__icon { height: 1rem;    width: 1rem;    } /* 16px */

.btn__icon svg {
  display: block;
  height:  100%;
  width:   100%;
}


/* ============================================================
   Badge slot — optional count pill inside the button
   ============================================================ */

.btn__badge {
  align-items:      center;
  background-color: var(--primary);
  border-radius:    var(--radius-full);
  color:            var(--primary-foreground);
  display:          inline-flex;
  font-size:        var(--font-size-xs);   /* 12px */
  font-weight:      var(--font-weight-medium);
  justify-content:  center;
  line-height:      var(--line-height-xs); /* 16px */
  min-width:        1.25rem;               /* 20px */
  padding:          0.125rem 0.375rem;     /* 2px 6px */
}

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

