/* ============================================
   gs-milestones — static milestone timeline.

   Implements skills/sections/timeline-milestones/, which specified
   this module as a "reference module ... kept for reuse" but was
   never built: no stylesheet existed in the theme and no template
   used the classes. First real instance is the Agent Platform
   page's 4-week onboarding section.

   Static on purpose. The theme's other sequence component,
   .gs-wgs-stepper, is interactive (one panel at a time, JS-driven)
   and hard-scoped to dark sections, so it fits neither a light
   section nor a page whose copy has to be readable without JS.

   The eyebrow and dot are coral; the cards stay neutral. Coral
   carries the phase rhythm, which is brand-editorial marking, not
   an interactive cue: the cards are not links and nothing here has
   a hover state.
   ============================================ */

.gs-milestones {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--content-frame);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  align-items: stretch;
}

/* Horizontal connector, painted behind the markers. Insets by half
   a column on each side so the line starts and ends at the first
   and last dot rather than running past them. */
.gs-milestones::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  /* Quiet grey, not the coral dashes this had. With four coral dots
     already on it, a coral dashed rail made the track compete with its
     own markers - the dots are the milestones, the line is only there
     to say they are a sequence. */
  background: var(--color-border);
}

.gs-milestones__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Three-layer dot: coral fill, white inner ring, coral outer ring.
   Reads as "milestone" rather than "bullet". */
.gs-milestones__marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-brand-accent);
  border: 4px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-brand-accent);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Centred, matching the treatment on the VMware timeline. Defensible
   here where it was not in section 2: these are 3-line cards in a
   narrow column, not multi-line paragraphs in a wide one, so there is
   no long left edge for the eye to want. */
.gs-milestones__card {
  text-align: center;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
  /* Stretch so a longer title in one card does not leave the
     others short: the row reads as one band, not four sizes. */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gs-milestones__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand-accent);
  margin: 0;
}

.gs-milestones__title {
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
  margin: 0;
  text-wrap: balance;
}

.gs-milestones__desc {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-fg-body);
  margin: 0;
  text-wrap: pretty;
}

/* Tablet + mobile: the horizontal track becomes a vertical thread,
   markers move to the left of each card. */
@media (max-width: 1023px) {
  /* Cap the LIST, not just the items. With justify-items: center and a
     600px cap on the items alone, the items sat centred inside a
     full-width grid - so the rail, positioned at left: 9px against the
     grid, floated far to the left of the dots it is meant to thread.
     Capping the list here makes grid and item share a left edge. */
  .gs-milestones {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 600px;
    margin-inline: auto;
  }

  /* The single full-height rail is replaced by a per-item segment. The
     one rail could only run top-to-bottom of the whole list, so it
     started above the first dot and ran past the last one. A segment on
     each item except the last runs from that item's dot to the next
     one's, which is what a thread should do.

     32px is where the "WEEK n" eyebrow's line box centres (24px card
     padding + half a 17px line); -52px reaches the next dot's centre
     (that 32px plus the list's 20px gap). */
  .gs-milestones::before {
    display: none;
  }

  .gs-milestones__item {
    position: relative;
  }

  .gs-milestones__item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 32px;
    bottom: -52px;
    width: 2px;
    background: var(--color-border);
  }

  .gs-milestones__item {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
    max-width: 600px;
  }

  /* Dot pulled down to sit level with the "WEEK n" eyebrow rather than
     the top edge of the card: 32px to the eyebrow's centre, minus 10px
     for the dot's own half-height. */
  .gs-milestones__marker {
    margin-top: 22px;
  }

  /* Left-aligned here, unlike desktop. Stacked, each card is nearly
     full width, so the centring that suits a narrow 4-across column
     leaves long lines ragged on both edges with no left edge to return
     to. */
  .gs-milestones__card {
    margin-top: 0;
    text-align: left;
  }
}
