@charset "UTF-8";

.school-history {
  --history-gap: clamp(40px, 3.125vw, 60px);
  --history-reveal: 1.1s;
  --history-pad-x: clamp(20px, 7.81vw, 100px);
  --history-years: 145px;
  --history-gap-mid: clamp(40px, 12.5vw, 160px);
  --history-content-max: 559px;
  --history-entries-w: calc(var(--history-years) + var(--history-gap-mid) + var(--history-content-max));
  --history-image-gap: 3px;
  --history-image-w: 211px;
  --history-image-h: 150px;
  --history-group-gap: clamp(60px, 7.81vw, 100px);
  --history-entry-min-h: 50px;
  --history-year-gap: 22px;
  --history-line-color: #e9e9e9;
  --history-line-width: 4px;
  --history-line-gutter: clamp(52px, 6vw, 64px);
  --history-active-color: #053678;
  --history-text-muted: #666666;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--history-gap);
  max-width: var(--subpage-content-max-width);
  margin: 0 auto;
  width: 100%;
}

.school-history__intro-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 625px;
  text-align: center;
}

.school-history__eyebrow {
  margin: 0;
  color: var(--subpage-gold);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  word-break: keep-all;
}

.school-history__headline {
  margin: 0;
  color: var(--subpage-text);
  font-size: clamp(24px, 1.875vw, 36px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.school-history__timeline {
  width: 100%;
  padding: 0 var(--history-pad-x);
}

.school-history__timeline-body {
  position: relative;
  max-width: calc(var(--history-entries-w) + var(--history-image-gap) + var(--history-image-w));
  margin: 0 auto;
}

.school-history__rail {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: calc(var(--history-years) + (var(--history-gap-mid) * 0.5) - 18px);
  width: 36px;
  pointer-events: none;
  z-index: 2;
}

.school-history__line-base,
.school-history__line-active {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--history-line-width);
  transform: translateX(-50%);
}

.school-history__line-base {
  height: 100%;
  background: var(--history-line-color);
}

.school-history__line-active {
  height: 0;
  background: var(--history-active-color);
  will-change: height;
}

.school-history__marker {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border-radius: 50%;
  background: var(--history-active-color);
  transform: translateY(-18px);
  will-change: top;
}

.school-history__marker img {
  width: 13px;
  height: 9px;
}

.school-history__groups {
  display: flex;
  flex-direction: column;
  gap: var(--history-group-gap);
}

.school-history__group {
  display: grid;
  grid-template-columns: var(--history-entries-w) var(--history-image-w);
  gap: var(--history-image-gap);
  align-items: center;
}

.school-history__entries {
  display: flex;
  flex-direction: column;
  gap: var(--history-year-gap);
  min-width: 0;
}

.school-history__entry {
  display: grid;
  grid-template-columns: var(--history-years) var(--history-gap-mid) var(--history-content-max);
  align-items: center;
  min-height: var(--history-entry-min-h);
  padding: 10px 0;
}

.school-history__entry .school-history__desc {
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--history-line-color);
}

.school-history__entry:last-child .school-history__desc {
  padding-bottom: 0;
  border-bottom: 0;
}

.school-history__year {
  grid-column: 1;
  margin: 0;
  color: var(--history-text-muted);
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  text-align: right;
  word-break: keep-all;
  transition: color 0.25s var(--ease-out), font-weight 0.25s var(--ease-out);
}

.school-history__entry.is-active .school-history__year {
  color: var(--history-active-color);
  font-weight: 700;
}

.school-history__desc {
  grid-column: 3;
  margin: 0;
  color: var(--history-text-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  word-break: keep-all;
}

.school-history__figure {
  margin: 0;
  width: var(--history-image-w);
  height: var(--history-image-h);
  border-radius: 10px;
  overflow: hidden;
}

.school-history__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.school-history__figure--recent img {
  object-position: 50% 38%;
}

.school-history__figure--middle img {
  object-position: 42% 50%;
}

.school-history__figure--early img {
  object-position: 55% 45%;
}

/* Reveal */
.school-history__intro-header[data-reveal] [data-reveal-child],
.school-history__group[data-reveal] [data-reveal-child] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--history-reveal) var(--ease-out),
    transform var(--history-reveal) var(--ease-out);
}

.school-history__group[data-reveal] .school-history__figure[data-reveal-child] {
  transform: translateY(14px) scale(0.985);
}

.school-history__intro-header[data-reveal] [data-reveal-child="1"] { transition-delay: 0.08s; }
.school-history__intro-header[data-reveal] [data-reveal-child="2"] { transition-delay: 0.18s; }

.school-history__group[data-reveal] [data-reveal-child="1"] { transition-delay: 0.08s; }
.school-history__group[data-reveal] [data-reveal-child="2"] { transition-delay: 0.2s; }

.school-history__intro-header.is-visible [data-reveal-child],
.school-history__group.is-visible [data-reveal-child] {
  opacity: 1;
  transform: translateY(0);
}

.school-history__group.is-visible .school-history__figure[data-reveal-child] {
  transform: translateY(0) scale(1);
}

@media (min-width: 1101px) {
  .school-history {
    --history-gap-mid: 160px;
    --history-entries-w: calc(var(--history-years) + var(--history-gap-mid) + var(--history-content-max));
  }

  .school-history__year {
    font-size: 22px;
  }

  .school-history__desc {
    font-size: 16px;
  }

  .school-history__group--no-image {
    grid-template-columns: var(--history-entries-w);
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .school-history {
    --history-years: clamp(92px, 11vw, 128px);
    --history-gap-mid: var(--history-line-gutter);
  }

  .school-history__group {
    grid-template-columns: minmax(0, 1fr) clamp(120px, 16vw, var(--history-image-w));
    gap: clamp(16px, 2vw, 28px);
  }

  .school-history__entry {
    grid-template-columns: var(--history-years) var(--history-line-gutter) minmax(0, 1fr);
  }

  .school-history__rail {
    left: calc(var(--history-years) + (var(--history-line-gutter) * 0.5) - 18px);
  }

  .school-history__group--no-image {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .school-history {
    --history-mobile-gutter: 56px;
    --history-years: auto;
    --history-gap-mid: 0;
  }

  .school-history__timeline-body {
    max-width: none;
    padding-left: var(--history-mobile-gutter);
  }

  .school-history__rail {
    left: calc(var(--history-mobile-gutter) * 0.5 - 18px);
    top: 0;
    bottom: 0;
  }

  .school-history__group {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .school-history__entries {
    width: 100%;
  }

  .school-history__entry {
    display: block;
    min-height: 0;
    padding: 0;
    margin-bottom: 18px;
  }

  .school-history__entry .school-history__desc {
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--history-line-color);
  }

  .school-history__entry:last-child {
    margin-bottom: 0;
  }

  .school-history__entry:last-child .school-history__desc {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .school-history__year {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
    line-height: 1.4;
    text-align: left;
  }

  .school-history__desc {
    font-size: 17px;
    line-height: 1.75;
  }

  .school-history__figure {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 211 / 150;
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .school-history__line-active,
  .school-history__marker {
    will-change: auto;
  }

  .school-history__intro-header[data-reveal] [data-reveal-child],
  .school-history__group[data-reveal] [data-reveal-child] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


.school-history__group--no-image {
  grid-template-columns: var(--history-entries-w);
}

.school-history__entry .school-history__desc:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.school-history__empty {
  margin: 0;
  padding: 24px 0 40px;
  color: var(--history-text-muted);
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 767px) {
  .school-history__group--no-image {
    display: flex;
    flex-direction: column;
  }
}
