/* Hero timeline — trace graph below centered hero copy */

.hero-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 120px;
}

.hero-timeline {
  width: 100%;
  margin-top: 32px;
}

.hero-timeline__card {
  position: relative;
  overflow: visible;
}

.hero-timeline__desktop {
  display: none;
}

.hero-timeline__frame {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-timeline__mobile {
  display: block;
  position: relative;
  padding: 32px 0 48px;
}

.hero-timeline__fig {
  display: none;
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-transform: uppercase;
  text-align: right;
}

.hero-timeline__fig--mobile {
  display: block;
  text-align: right;
  padding-right: 0;
  margin-top: 20px;
}

/* Timeline blocks */
.hero-timeline__block {
  position: relative;
  height: 100%;
  min-height: 22px;
  border-radius: 2px;
  background: var(--highlight-pale);
  overflow: hidden;
}

.hero-timeline__block--signal {
  background: var(--highlight-soft);
}

.hero-timeline__block::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--highlight-pale);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
  pointer-events: none;
  opacity: 0;
}

.hero-timeline__block--signal::after {
  background: var(--highlight-soft);
}

.hero-timeline.is-sequencing .hero-timeline__block::after {
  opacity: 1;
}

.hero-timeline.is-sequencing .hero-timeline__block {
  background: var(--border);
}

.hero-timeline.is-sequencing .hero-timeline__mobile .hero-timeline__block::after {
  transform: scaleY(var(--fill, 0));
  transform-origin: top center;
}

.hero-timeline.is-complete .hero-timeline__callout.is-visible,
.hero-timeline.is-complete [data-hero-callout].is-visible {
  opacity: 1;
  visibility: visible;
}

.hero-timeline.is-sequencing .hero-timeline__callout {
  opacity: 0;
  visibility: hidden;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.hero-timeline.is-sequencing .hero-timeline__callout.is-visible {
  opacity: 1;
  visibility: visible;
}

.hero-timeline.is-sequencing [data-hero-callout] {
  opacity: 0;
  visibility: hidden;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.hero-timeline.is-sequencing [data-hero-callout].is-visible {
  opacity: 1;
  visibility: visible;
}

.hero-timeline__labels span.is-active {
  color: var(--highlight);
}

/* Callout cards */
.hero-timeline__callout-card {
  width: min(260px, 100%);
  border: var(--grid-line);
  border-radius: 4px;
  background: rgba(252, 252, 252, 0.98);
  box-shadow: 0 2px 8px rgba(24, 24, 24, 0.05);
}

.hero-timeline__callout-card--compact {
  width: 140px;
}

.hero-timeline__callout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: var(--grid-line);
}

.hero-timeline__callout-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--highlight);
  flex-shrink: 0;
}

.hero-timeline__callout-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--highlight);
}

.hero-timeline__callout-card--compact .hero-timeline__callout-head {
  padding: 6px 8px 4px;
  gap: 6px;
}

.hero-timeline__callout-card--compact .hero-timeline__callout-dot {
  width: 4px;
  height: 4px;
}

.hero-timeline__callout-card--compact .hero-timeline__callout-label {
  font-size: 8px;
}

.hero-timeline__callout-body {
  padding: 10px 12px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.hero-timeline__callout-card--compact .hero-timeline__callout-body {
  padding: 6px 8px 0;
  font-size: 9px;
  line-height: 1.4;
}

.hero-timeline__callout-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 10px;
  font-size: 11px;
  color: var(--text-light);
}

.hero-timeline__callout-meta-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: rgba(79, 112, 197, 0.55);
}

.hero-timeline__callout-meta-icon svg {
  display: block;
  width: 12px;
  height: 12px;
}

.hero-timeline__callout-card--compact .hero-timeline__callout-meta {
  padding: 4px 8px 8px;
  font-size: 8px;
  gap: 4px;
}

.hero-timeline__callout-card--compact .hero-timeline__callout-meta-icon svg {
  width: 10px;
  height: 10px;
}

.hero-timeline__callout-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 10px;
  border-top: var(--grid-line);
}

.hero-timeline__callout-btn {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border: var(--grid-line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

/* Mobile layout */
.hero-timeline__mobile-label {
  grid-column: 1 / -1;
  margin: 10px 0 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.hero-timeline__mobile-label:first-child {
  margin-top: 0;
}

.hero-timeline__mobile-row {
  display: grid;
  grid-template-columns: 1fr 1.2rem 1fr;
  gap: 2px;
  align-items: center;
}

.hero-timeline__mobile-row .hero-timeline__block {
  grid-column: 2;
  align-self: stretch;
}

.hero-timeline__mobile-row--sm {
  min-height: 25px;
}

.hero-timeline__mobile-row--md {
  min-height: 30px;
}

.hero-timeline__mobile-row--lg,
.hero-timeline__mobile-row--xl {
  min-height: 80px;
}

.hero-timeline__mobile-row--xl {
  min-height: 128px;
}

.hero-timeline__mobile-side {
  position: relative;
  min-height: 22px;
}

.hero-timeline__mobile-side--callout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.hero-timeline__mobile-side--callout-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.hero-timeline__mobile-dash {
  width: 10px;
  height: 0;
  border-top: 1px dashed rgba(79, 112, 197, 0.55);
  flex-shrink: 0;
}

/* Desktop layout */
@media (min-width: 768px) {
  .hero-layout {
    gap: 56px;
    padding-top: calc(var(--nav-height) + 112px);
    padding-bottom: 160px;
  }

  .hero-timeline {
    margin-top: 48px;
  }

  .hero-timeline__desktop {
    display: block;
    position: relative;
    padding: 172px 0 0;
  }

  .hero-timeline__mobile {
    display: none;
  }

  .hero-timeline__fig {
    display: block;
  }

  .hero-timeline__fig--mobile {
    display: none;
  }

  .hero-timeline__track {
    display: flex;
    align-items: stretch;
    gap: 12px;
    position: relative;
    isolation: isolate;
  }

  .hero-timeline__phase {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    flex: var(--phase) 1 0;
    min-width: 0;
  }

  .hero-timeline__block-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: var(--w) 1 0;
    min-width: 0;
    overflow: visible;
  }

  .hero-timeline__block-wrap .hero-timeline__block {
    position: relative;
    z-index: 2;
    height: 28px;
    min-height: 28px;
  }

  .hero-timeline__callout {
    position: absolute;
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    max-width: 260px;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .hero-timeline__callout--above {
    bottom: 100%;
  }

  .hero-timeline__callout--below {
    top: 100%;
  }

  .hero-timeline__callout-line {
    width: 0;
    height: 48px;
    border-left: 1px dashed rgba(79, 112, 197, 0.55);
    flex-shrink: 0;
  }

  .hero-timeline__callout--below .hero-timeline__callout-line {
    height: 56px;
  }

  .hero-timeline__callout--above .hero-timeline__callout-line {
    order: 1;
    margin: 0;
  }

  .hero-timeline__labels {
    display: flex;
    gap: 12px;
    margin-top: 10px;
  }

  .hero-timeline__labels span {
    flex: var(--phase) 1 0;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 400ms ease;
  }
}

@media (min-width: 1024px) {
  .hero-layout {
    padding-top: calc(var(--nav-height) + 140px);
    padding-bottom: 192px;
  }

  .hero-timeline {
    margin-top: 56px;
  }

  .hero-timeline__desktop {
    padding-top: 188px;
  }
}
