/* Our History page (about/history) */


.history-section {
  padding: 80px 0;
}

.history-section--alt {
  background: var(--primary-lighter);
}

.history-section h2 {
  margin-bottom: var(--space-3);
}

.history-section .eyebrow {
  display: block;
  color: var(--teal);
}

.history-lead {
  max-width: 760px;
  margin-bottom: var(--space-6);
}

.history-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-6);
}

@media (max-width: 991.98px) {
  .history-columns {
    grid-template-columns: 1fr;
  }
}

.history-caption {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: var(--space-3) 0 0;
}

/* ── Infographic: 1985 to today, to scale ── */
.era-timeline {
  margin: var(--space-6) 0 0;
}

/* Labels sit above and below the bar, so the chart reserves room on both sides */
.era-timeline__chart {
  position: relative;
  padding: 104px 0;
}

.era-timeline__track {
  position: relative;
  display: flex;
  height: 12px;
  gap: 2px;
}

.era-timeline__band {
  height: 100%;
  border-radius: 6px;
}

.era-timeline__band--before {
  flex: 0 0 calc(var(--rebrand-at, 85%) - 1px);
  background: var(--primary-light);
}

.era-timeline__band--after {
  flex: 1 1 auto;
  background: var(--teal);
}

.era-timeline__events {
  list-style: none;
  margin: 0;
  padding: 0;
}

.era-event {
  position: absolute;
  left: var(--at);
  bottom: calc(104px + 12px + 14px);
  width: 170px;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1.35;
}

/* A short tick from each label down to the bar */
.era-event::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 2px;
  height: 10px;
  background: var(--text-muted);
}

.era-event--below {
  bottom: auto;
  top: calc(104px + 12px + 14px);
}

.era-event--below::after {
  bottom: auto;
  top: -14px;
}

.era-event:first-child {
  transform: none;
  text-align: left;
}
.era-event:first-child::after { left: 0; }

.era-event--end {
  transform: translateX(-100%);
  text-align: right;
}
.era-event--end::after { left: auto; right: 0; }

.era-event__year {
  display: block;
  font-weight: 700;
  color: var(--header-color);
}

.era-event__text {
  display: block;
  color: var(--text);
}

.era-event--turning .era-event__year {
  color: var(--teal);
}

.era-event--turning::after {
  background: var(--teal);
  width: 3px;
}

/* ── The turning point ── */
.turning-point {
  background: var(--teal);
  color: var(--white);
  padding: 72px 0;
}

.turning-point__inner {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.turning-point__date {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--text);
  text-align: center;
}

.turning-point__day {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.2;
}

.turning-point__year {
  font-family: 'Petrona', serif;
  font-size: 44px;
  line-height: 1;
}

.turning-point h2,
.turning-point p,
.turning-point li {
  color: var(--white);
}

.turning-point .eyebrow {
  display: block;
  color: var(--yellow);
}

.turning-point__body {
  max-width: 760px;
}

.commitments {
  list-style: none;
  padding: 0;
  margin: 0;
}

.commitments li {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-1);
}

.commitments__num {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--yellow);
}

/* ── Smaller screens ── */
@media (max-width: 991.98px) {



  .turning-point__inner {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* The scaled timeline needs width; on phones it becomes a vertical list */
@media (max-width: 767.98px) {
  .era-timeline__chart {
    padding: 0;
  }

  .era-timeline__track {
    display: none;
  }

  .era-timeline__events {
    border-left: 4px solid var(--primary-light);
    padding-left: var(--space-3);
  }

  .era-event,
  .era-event--below,
  .era-event:first-child,
  .era-event--end {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    width: auto;
    transform: none;
    text-align: left;
    margin-bottom: var(--space-2);
  }

  .era-event::after,
  .era-event--below::after,
  .era-event:first-child::after,
  .era-event--end::after {
    left: calc(-1 * var(--space-3) - 10px);
    right: auto;
    top: 6px;
    bottom: auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-light);
  }

  .era-event--turning::after,
  .era-event--end::after {
    background: var(--teal);
  }

}

/* Subtitle above the scaled timeline */
.era-timeline__title {
  font-family: 'Source Sans Pro', 'Lato', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--header-color);
  margin-bottom: var(--space-1);
}

/* ── How Qatalink has grown: features by year ── */
.feature-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The line linking the years */
.feature-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 43px;
  width: 2px;
  background: var(--primary-light);
}

.feature-year {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0 0 var(--space-4);
  position: relative;
}

.feature-year:last-child {
  margin-bottom: 0;
}

.feature-year__label {
  position: relative;
  z-index: 1;
  align-self: start;
  justify-self: center;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-family: 'Source Sans Pro', 'Lato', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 24px;
}

.feature-year__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
}

.feature {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.feature__name {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--header-color);
  margin-bottom: 2px;
}

.feature__text {
  display: block;
  color: var(--text);
}

/* Marks the features built with AI (from late 2023) */
.ai-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.04em;
}

@media (max-width: 767.98px) {
  .feature-timeline::before {
    left: 31px;
  }
  .feature-year {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: var(--space-2);
  }
  .feature-year__list {
    grid-template-columns: 1fr;
  }
}
/* ── Six years of building: chapters, alternating image and text ── */
.chapters {
  display: grid;
  gap: var(--space-8);
}

/* Every chapter has its image on the left, so the eye travels straight down the page */
.chapter {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  max-width: 920px;
}

.chapter__image img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
}

.chapter__year {
  display: block;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.chapter__body h3 {
  margin-bottom: var(--space-2);
}

.chapter__stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px var(--space-2);
  margin-bottom: var(--space-2);
}

.chapter__number {
  font-family: 'Petrona', serif;
  font-size: 44px;
  line-height: 1.1;
  color: var(--teal);
}

.chapter__label {
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-muted);
}

/* Keep the label on one line beside its number where there is room */
@media (min-width: 768px) {
  .chapter__label { white-space: nowrap; }
}

.chapter__body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .chapters {
    gap: var(--space-6);
  }
  .chapter {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .chapter__image img {
    width: 120px;
    height: 120px;
  }
  .chapter__number {
    font-size: 36px;
  }
}
/* ── Where we are today: the home page metrics layout, on white ── */
.history-metrics {
  background-color: var(--white);
  color: var(--text);
  padding: 80px 24px;
  text-align: center;
}

.history-metrics__row {
  display: flex;
  align-items: center;
  margin: 64px 0 0;
}

.history-metrics__item {
  flex: 1 1 0;
  padding: 16px;
}

.history-metrics__item:not(:first-child):not(:last-child) {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.history-metrics__eyebrow {
  font-size: 16px;
  line-height: 16px;
  color: var(--text-muted);
}

.history-metrics__number {
  font-family: 'Source Sans Pro', 'Lato', sans-serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 56px;
  margin-bottom: 8px;
  color: var(--teal);
}

.history-metrics__label {
  font-size: 24px;
  line-height: 28px;
}

@media (max-width: 991.98px) {
  .history-metrics__label {
    font-size: 16px;
    line-height: 20px;
  }
}

@media (max-width: 767.98px) {
  .history-metrics__row {
    flex-direction: column;
    margin: 32px auto 0;
  }
  .history-metrics__item,
  .history-metrics__item:not(:first-child):not(:last-child) {
    width: 80%;
    border-left: none;
    border-right: none;
  }
  .history-metrics__item:not(:first-child) {
    padding-top: 32px;
  }
  .history-metrics__item:not(:last-child) {
    border-bottom: 1px solid var(--border);
    padding-bottom: 32px;
  }
}