/* Timeline. Horizontal from data-stack (md 768, lg 1024). Vertical below.
   Line draw runs once when .is-drawn is added. Reduced motion and the
   motion token off show the line fully drawn. */

.cms-timeline {
  font-family: var(--font-body), Montserrat, "Segoe UI", sans-serif;
  color: inherit;
}

.cms-timeline-heading {
  margin: 0 0 2.75rem;
  max-width: none;
  font-family: var(--font-heading), "Noto Serif", serif;
  font-size: clamp(2.15rem, 4.6vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.cms-timeline-track {
  position: relative;
}

.cms-timeline-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.cms-timeline-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 1rem;
  min-width: 0;
}

.cms-timeline-mark {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.cms-timeline-node {
  display: grid;
  place-items: center;
  width: 18px;
  height: 20px;
  color: var(--brand-primary, #990000);
}

.cms-timeline-node svg {
  display: block;
  width: 18px;
  height: 20px;
}

.cms-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}

.cms-timeline-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--brand-primary, #990000);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.cms-timeline-day {
  margin: 0 0 0.7rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.62;
}

.cms-timeline-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading), "Noto Serif", serif;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.15;
}

.cms-timeline-body {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.86;
}

.cms-timeline-body p {
  margin: 0 0 0.65rem;
}

.cms-timeline-body p:last-child {
  margin-bottom: 0;
}

.cms-timeline-bullets {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  display: grid;
  gap: 0.55rem;
}

.cms-timeline-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.cms-timeline-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.cms-timeline-art {
  margin: 1rem 0 0;
}

.cms-timeline-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cms-timeline-rail,
.cms-timeline-line {
  position: absolute;
  left: 13px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  pointer-events: none;
}

.cms-timeline-rail {
  background: color-mix(in srgb, currentColor 28%, transparent);
}

.cms-timeline-line {
  background: var(--brand-primary, #990000);
}

.cms-timeline[data-line="draw"] .cms-timeline-line {
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform var(--motion-duration, 700ms) ease-out;
}

.cms-timeline[data-line="draw"].is-drawn .cms-timeline-line {
  transform: scaleY(1);
}

.cms-fold-spacer {
  min-height: 110vh;
}

@media (min-width: 768px) {
  .cms-timeline[data-stack="md"] .cms-timeline-steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .cms-timeline[data-stack="md"] .cms-timeline-step {
    flex: 1 1 0;
    display: block;
  }

  .cms-timeline[data-stack="md"] .cms-timeline-mark {
    display: flex;
    justify-content: flex-start;
    height: 20px;
    margin-bottom: 1.35rem;
  }

  .cms-timeline[data-stack="md"] .cms-timeline-rail,
  .cms-timeline[data-stack="md"] .cms-timeline-line {
    left: 9px;
    right: 9px;
    top: 9px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .cms-timeline[data-stack="md"][data-line="draw"] .cms-timeline-line {
    transform: scaleX(0);
    transform-origin: left center;
  }

  .cms-timeline[data-stack="md"][data-line="draw"].is-drawn .cms-timeline-line {
    transform: scaleX(1);
  }
}

@media (min-width: 1024px) {
  .cms-timeline[data-stack="lg"] .cms-timeline-steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .cms-timeline[data-stack="lg"] .cms-timeline-step {
    flex: 1 1 0;
    display: block;
  }

  .cms-timeline[data-stack="lg"] .cms-timeline-mark {
    display: flex;
    justify-content: flex-start;
    height: 20px;
    margin-bottom: 1.35rem;
  }

  .cms-timeline[data-stack="lg"] .cms-timeline-rail,
  .cms-timeline[data-stack="lg"] .cms-timeline-line {
    left: 9px;
    right: 9px;
    top: 9px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .cms-timeline[data-stack="lg"][data-line="draw"] .cms-timeline-line {
    transform: scaleX(0);
    transform-origin: left center;
  }

  .cms-timeline[data-stack="lg"][data-line="draw"].is-drawn .cms-timeline-line {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cms-timeline[data-line="draw"] .cms-timeline-line {
    transform: none !important;
    transition: none !important;
  }
}

@container cms-motion style(--motion: off) {
  .cms-timeline[data-line="draw"] .cms-timeline-line {
    transform: none !important;
    transition: none !important;
  }
}
