/* ==========================================================================
   Hibu Stories Page — Hero
   ========================================================================== */

/* Progress bar */
.hibu_stories_page_progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 76px;
  height: 3px;
  background-color: #FCB711;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 9999;
}
 
/* Fills as the page scrolls, where scroll-driven animations are supported */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes hibu_stories_page_progress_grow {
      to { transform: scaleX(1); }
    }
 
    .hibu_stories_page_progress {
      animation: hibu_stories_page_progress_grow linear both;
      animation-timeline: scroll(root);
    }
  }
}
 


/* ---------- Scoped base ---------- */
.hibu_stories_page_hero,
.hibu_stories_page_hero *,
.hibu_stories_page_hero *::before,
.hibu_stories_page_hero *::after {
  box-sizing: border-box;
}

.hibu_stories_page_hero {
  position: relative;
  margin: 0;
  background-color: #150B3E;
  color: #D3CFE3;
  font-family: var(--hibu-font-body), system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

.hibu_stories_page_hero :focus-visible {
  outline: 2px solid #FCB711;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
.hibu_stories_page_hero_wrap {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-top: clamp(40px, 6vw, 80px);
}

/* ---------- Back link ---------- */
.hibu_stories_page_hero_back {
  display: inline-block;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
  color: #D3CFE3;
  text-decoration: none;
  text-underline-offset: 3px;
}

.hibu_stories_page_hero_back:hover {
  color: #FFFFFF;
}

/* ---------- Eyebrow ---------- */
.hibu_stories_page_hero_eyebrow {
  margin: 0 0 1rem;
  font-family: var(--hibu-font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6FBA00;
}

/* ---------- Title ---------- */
.hibu_stories_page_hero_title {
  margin: 0;
  max-width: 21ch;
  font-family: var(--hibu-font-display), system-ui, sans-serif;
  font-size: clamp(2rem, 1.2rem + 3.1vw, 3.3rem);
  font-weight: 600;
  line-height: 1.1;
  color: #FFFFFF;
  text-wrap: balance;
}

/* ---------- Intro ---------- */
.hibu_stories_page_hero_intro {
  margin: 1.5rem 0 0;
  max-width: 42rem;
  font-size: clamp(1.075rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.625;
}

.hibu_stories_page_hero_highlight {
  font-weight: 600;
  color: #FCB711;
}

/* ---------- Tags ---------- */
.hibu_stories_page_hero_tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.hibu_stories_page_hero_tag {
  list-style: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  background-color: #241847;
  font-size: 0.8rem;
  font-weight: 600;
  color: #D3CFE3;
}

.hibu_stories_page_hero_tag--accent {
  color: #6FBA00;
}

/* ---------- Stats heading ---------- */
.hibu_stories_page_hero_stats_heading {
  margin: clamp(44px, 5vw, 68px) 0 0;
  font-family: var(--hibu-font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #A7A1C2;
  text-wrap: balance;
}

/* ---------- Stats grid ---------- */
.hibu_stories_page_hero_stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #3D3360;
}

.hibu_stories_page_hero_stat {
  list-style: none;
  border: 0 solid #3D3360;
}

/* Mobile (2 cols): right column gets a left divider, second row a top divider */
.hibu_stories_page_hero_stat:nth-child(2),
.hibu_stories_page_hero_stat:nth-child(4) {
  border-left-width: 1px;
  padding-left: 1.25rem;
}

.hibu_stories_page_hero_stat:nth-child(3),
.hibu_stories_page_hero_stat:nth-child(4) {
  border-top-width: 1px;
}

.hibu_stories_page_hero_stat_group {
  position: relative;
  display: block;
}

.hibu_stories_page_hero_stat_button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.75rem 1rem 1.75rem 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.hibu_stories_page_hero_stat_body {
  display: block;
}

.hibu_stories_page_hero_stat_value {
  display: block;
  font-family: var(--hibu-font-display), system-ui, sans-serif;
  font-size: clamp(2.3rem, 1.5rem + 2.7vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #FCB711;
  font-variant-numeric: tabular-nums;
}

.hibu_stories_page_hero_stat_unit {
  margin-left: 0.25rem;
  font-size: 0.45em;
  font-weight: 600;
}

.hibu_stories_page_hero_stat_label {
  display: block;
  max-width: 16rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.375;
  color: #D3CFE3;
}

.hibu_stories_page_hero_stat_hint {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-family: var(--hibu-font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #A7A1C2;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hibu_stories_page_hero_stat_group:hover .hibu_stories_page_hero_stat_hint {
  color: #FCB711;
}

/* ---------- Tooltip ---------- */
.hibu_stories_page_hero_tooltip {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 40;
  display: block;
  width: 18rem;
  max-width: calc(100vw - 40px);
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 1px solid #E1E5EC;
  border-radius: 8px;
  background-color: #FFFFFF;
  box-shadow: 0 18px 40px -12px rgba(21, 11, 62, 0.35);
  font-size: 0.9rem;
  line-height: 1.625;
  color: #2B2F36;
  text-align: left;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.25rem);
  transition-property: visibility, opacity, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.hibu_stories_page_hero_tooltip--end {
  left: auto;
  right: 0;
}

.hibu_stories_page_hero_stat_group:hover .hibu_stories_page_hero_tooltip,
.hibu_stories_page_hero_stat_group:focus-within .hibu_stories_page_hero_tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ---------- On-this-page nav ---------- */
.hibu_stories_page_hero_toc {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  margin: 0;
  padding: 1.25rem 0;
  list-style: none;
  border-top: 1px solid #3D3360;
}

.hibu_stories_page_hero_toc_item {
  list-style: none;
}

.hibu_stories_page_hero_toc_link {
  font-family: var(--hibu-font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #D3CFE3;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hibu_stories_page_hero_toc_link:hover {
  color: #FCB711;
}
.hibu_stories_page_hero {
  padding: 0 3rem;
}

/* ---------- Desktop (lg: 1024px) ---------- */
@media (min-width: 1024px) {
  .hibu_stories_page_hero_stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* 4 cols in one row: dividers between every item, no top borders */
  .hibu_stories_page_hero_stat:nth-child(n + 2) {
    border-left-width: 1px;
    padding-left: 1.5rem;
  }

  .hibu_stories_page_hero_stat:nth-child(3),
  .hibu_stories_page_hero_stat:nth-child(4) {
    border-top-width: 0;
  }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hibu_stories_page_hero_rise {
    from { transform: translateY(10px); }
    to { transform: none; }
  }

  .hibu_stories_page_hero_stat {
    animation: hibu_stories_page_hero_rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hibu_stories_page_hero_stat:nth-child(2) { animation-delay: 0.08s; }
  .hibu_stories_page_hero_stat:nth-child(3) { animation-delay: 0.16s; }
  .hibu_stories_page_hero_stat:nth-child(4) { animation-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
  .hibu_stories_page_hero *,
  .hibu_stories_page_hero *::before,
  .hibu_stories_page_hero *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .hibu_stories_page_hero {
    padding-inline: 1.5rem;
  }
}