/* ==========================================================================
   WW Housing Development LLC — our-process.css
   Our Process page only. Shared components (.page-hero, .section-header,
   .check, .feature, .btn, contact, footer) live in global.css.

   MOBILE FIRST: base rules target the smallest viewport; min-width queries
   enhance for larger screens (handbook §12).
   ========================================================================== */

/* ==========================================================================
   The five steps — a rail that fills as you scroll

   The rail is two pseudo-elements on the list: ::before is the full-length
   grey track, ::after is the brass fill, scaled from the top by
   --steps-progress. js/our-process.js sets that custom property from scroll
   position, so the fill runs down as you scroll and back up when you reverse.
   ========================================================================== */
.steps {
  --steps-progress: 0;
  /* Where the rail sits: beside the markers on small screens, centred once
     the layout alternates */
  --rail-x: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.steps::before,
.steps::after {
  content: "";
  position: absolute;
  /* Stops at the centre of the first and last marker rather than the edges */
  top: 1.5rem;
  bottom: 1.5rem;
  left: var(--rail-x);
  width: 2px;
  margin-left: -1px;
  pointer-events: none;
}

.steps::before {
  background-color: var(--clr-line);
}

.steps::after {
  background-color: var(--clr-accent);
  transform-origin: top center;
  transform: scaleY(var(--steps-progress));
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-md) var(--space-lg);
}

/* Placed explicitly. Three children in a two-column grid auto-place as
   marker, media, body — which drops the body back into column one, directly
   under the marker, where the rail runs straight through the text, and starves
   column two so the photograph collapses to nothing. */
.step__marker {
  grid-column: 1;
  grid-row: 1;
}

.step__media {
  grid-column: 2;
  grid-row: 1;
}

.step__body {
  grid-column: 2;
  grid-row: 2;
}

.step__marker {
  position: relative;
  /* Above the rail, and opaque, so the line runs behind the numbers */
  z-index: 1;
  display: flex;
  justify-content: center;
  align-self: start;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  background-color: var(--clr-primary);
  color: var(--clr-accent-light);
  font-size: var(--fs-400);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  transition: background-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out);
}

/* Set by js/our-process.js once the rail has reached this step */
.step.is-reached .step__num {
  background-color: var(--clr-accent);
  color: var(--clr-primary);
}

.step__media {
  display: block;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: rgba(15, 42, 68, 0.08);
}

.step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step__body {
  min-width: 0;
}

/* The rail is drawn down the whole list. Here the last marker sits at the top
   of its step rather than beside its middle, so the line would carry on past
   it and dangle; this covers the overhang in the page ground. Not needed at
   64em, where the markers are centred and the rail already ends on one. */
.step:last-child::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 0;
  left: 0;
  width: 3rem;
  background-color: var(--clr-surface);
  pointer-events: none;
}

.step__label {
  display: inline-flex;
  margin: 0 0 var(--space-sm);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
  font-size: var(--fs-200);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.step__text {
  margin: 0 0 var(--space-md);
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.75;
}

.step__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ==========================================================================
   Financing pathways — expanding panels

   One set of markup, two behaviours:

     below 64em   a snap carousel. One route at a time, moved by swipe or by
                  the arrows underneath. Every panel is open.
     64em and up  a row of panels. The one under the cursor opens and the rest
                  compress to slivers carrying a vertical title. LIHTC is open
                  at rest, so the row has a focal point before anyone hovers.

   Each panel is a photograph with a solid block of colour sitting on it. The
   block is what holds the icon, title, copy and link, so text never sits
   directly on the image.

   Open and closed are two custom properties, --pw-open and --pw-closed, rather
   than two copies of every rule. They are plain numbers, so opacity, flex-grow
   and the transition delays can all be derived from them and every one of
   those is animatable — which is what makes the open and close read as a
   single movement rather than several.
   ========================================================================== */
.pathways {
  /* White, so its curves come from the white copy of the artwork */
  --curve-image: url("../images/svg-backgrounds/curve-divider-white.svg");
  background-color: var(--clr-surface-alt);
}

/* The track. Below 64em it scrolls; the negative margin lets the cards run out
   to the screen edges so the next one peeks in and the swipe reads as one
   continuous strip rather than a boxed-in widget.
   position: relative so card offsetLeft is measured against this element —
   js/our-process.js scrolls by those offsets. */
.pathways__viewport {
  position: relative;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  margin-inline: calc(var(--container-pad) * -1);
  padding: 0;
  padding-inline: var(--container-pad);
  /* Room under the cards for the panel shadow, which overflow-x would clip */
  padding-block: var(--space-2xs) var(--space-md);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pathways__viewport::-webkit-scrollbar {
  display: none;
}

.pathway {
  /* Open at this width: the carousel shows one whole card at a time */
  --pw-open: 1;
  --pw-closed: 0;
  --pw-grow: 1;

  position: relative;
  /* Contains the photograph's negative z-index and clips it to the corners */
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(20rem, 82%);
  min-height: 26rem;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  /* Shows through until the photograph loads, and behind any transparency */
  background-color: var(--clr-primary);
  scroll-snap-align: center;
}

/* --------------------------------------------------------------------------
   Photograph
   -------------------------------------------------------------------------- */
.pathway__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.pathway__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim. Much heavier while the panel is closed, because the vertical title
   then sits straight on the photograph with nothing behind it — a closed panel
   should read as a band of navy carrying a name, not as a busy photograph.
   The gradient itself never changes; only its opacity does, because gradients
   do not interpolate and two cross-fading layers would be a second element for
   no gain. */
.pathway__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(10, 30, 50, 0.62) 0%,
    rgba(10, 30, 50, 0.93) 100%
  );
  opacity: calc(1 - var(--pw-open) * 0.56);
  transition: opacity var(--t-slow) var(--ease-out);
}

/* --------------------------------------------------------------------------
   Vertical title — the closed state, 64em and up only
   Duplicated copy, so it is hidden from assistive tech in the markup; the
   panel title is the one that gets announced.
   -------------------------------------------------------------------------- */
.pathway__vert {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-sm);
  opacity: var(--pw-closed);
  transition: opacity var(--t-base) var(--ease-out);
  transition-delay: calc(var(--pw-closed) * 180ms);
  pointer-events: none;
}

.pathway__vert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: var(--radius-md);
  background-color: rgba(250, 247, 242, 0.14);
  color: var(--clr-accent-light);
}

.pathway__vert-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* vertical-rl plus the half turn reads bottom to top, which keeps the title
   the right way up beside a card that grows to the right */
.pathway__vert-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--clr-surface);
  font-size: var(--fs-300);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  /* Long titles are trimmed rather than allowed to push out of the sliver */
  max-height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   The solid block that carries the copy
   -------------------------------------------------------------------------- */
.pathway__panel {
  --pw-panel-bg: var(--clr-surface);
  --pw-title: var(--clr-primary);
  --pw-text: var(--clr-muted);
  --pw-icon-bg: var(--clr-accent-light);
  --pw-icon-fg: var(--clr-primary);
  --pw-rule: var(--clr-line);
  --pw-link: var(--clr-primary);

  position: relative;
  overflow: hidden;
  /* Pushed to the foot of the card, so the photograph frames it from above */
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background-color: var(--pw-panel-bg);
  box-shadow: 0 14px 30px rgba(10, 30, 50, 0.24);
  opacity: var(--pw-open);
  transform: translateY(calc(var(--pw-closed) * 0.75rem));
  transition: opacity var(--t-base) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
  /* Opening waits for the card to widen; closing starts at once */
  transition-delay: calc(var(--pw-open) * 180ms);
}

/* Brass hairline along the top, the same signature the callout carries */
.pathway__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background-image: linear-gradient(
    to right,
    var(--clr-accent) 0%,
    var(--clr-accent-light) 50%,
    var(--clr-accent) 100%
  );
}

.pathway__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-md);
  background-color: var(--pw-icon-bg);
  color: var(--pw-icon-fg);
}

.pathway__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.pathway__title {
  margin: 0;
  color: var(--pw-title);
  font-size: var(--fs-400);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.pathway__text {
  margin: 0;
  color: var(--pw-text);
  font-size: var(--fs-300);
  line-height: 1.7;
}

/* Pinned to the foot, so the rule sits at the same place on every panel */
.pathway__foot {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--pw-rule);
}

.pathway .link-arrow {
  color: var(--pw-link);
}

/* The arrow stays brass against the cream panel */
.pathway .link-arrow svg {
  color: var(--clr-accent);
}

/* --------------------------------------------------------------------------
   Carousel controls. Below 64em only, and the arrows and dots are revealed by
   js/our-process.js — without it they would be furniture that does nothing,
   while the swipe carries on working on its own.
   -------------------------------------------------------------------------- */
.pathways__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.pathways__hint {
  margin: 0;
  color: var(--clr-muted);
  font-size: var(--fs-200);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.pathways__nav {
  display: none;
  align-items: center;
  gap: var(--space-md);
}

.pathways.is-ready .pathways__nav {
  display: flex;
}

.pathways__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  padding: 0;
  border: 1px solid var(--clr-line);
  border-radius: 50%;
  background-color: var(--clr-surface-alt);
  color: var(--clr-primary);
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out),
    opacity var(--t-base) var(--ease-out);
}

.pathways__arrow svg {
  width: 1.125rem;
  height: 1.125rem;
}

.pathways__arrow:hover,
.pathways__arrow:focus-visible {
  background-color: var(--clr-primary);
  border-color: var(--clr-primary);
  color: var(--clr-surface);
}

.pathways__arrow[disabled] {
  opacity: 0.32;
  cursor: default;
}

.pathways__arrow[disabled]:hover {
  background-color: var(--clr-surface-alt);
  border-color: var(--clr-line);
  color: var(--clr-primary);
}

.pathways__dots {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pathways__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--clr-line);
  cursor: pointer;
  transition: width var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out);
}

.pathways__dot.is-current {
  width: 1.5rem;
  background-color: var(--clr-accent);
}

/* --------------------------------------------------------------------------
   The honest note about what will not pencil.
   Photographic panel with the copy centred, because it is the most unusual
   thing the firm says and it should not read like a footnote.
   -------------------------------------------------------------------------- */
.callout {
  position: relative;
  /* Contains the background layer's negative z-index */
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding: var(--space-2xl) var(--space-lg);
  border-radius: var(--radius-lg);
  color: rgba(250, 247, 242, 0.88);
  text-align: center;
}

/* Picture element rather than a CSS background, so the mobile crop, lazy
   loading and async decoding all apply (handbook §4). The gradient is the
   empty state if the photograph is ever removed. */
.callout__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(
    140deg,
    var(--clr-primary) 0%,
    var(--clr-primary-deep) 100%
  );
}

.callout__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim. Heavier than the other bands because the copy is centred over the
   busiest part of the frame rather than sitting to one side. */
.callout__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(10, 30, 50, 0.82) 0%,
    rgba(10, 30, 50, 0.9) 100%
  );
}

/* Brass hairline along the top, fading out to both sides */
.callout::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background-image: linear-gradient(
    to right,
    transparent 0%,
    var(--clr-accent) 22%,
    var(--clr-accent-light) 50%,
    var(--clr-accent) 78%,
    transparent 100%
  );
}

.callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  border-radius: var(--radius-md);
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
}

.callout__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.callout__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.callout__eyebrow {
  margin: 0;
  color: var(--clr-accent-light);
  font-size: var(--fs-200);
  font-weight: var(--fw-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.callout__title {
  margin: 0;
  max-width: 20ch;
  color: var(--clr-surface);
  font-size: clamp(1.5rem, 4.5vw, 2.125rem);
  font-weight: var(--fw-bold);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.callout__text {
  margin: 0;
  max-width: 58ch;
  font-size: var(--fs-300);
  line-height: 1.75;
}

.callout__link {
  margin-top: var(--space-2xs);
  color: var(--clr-surface);
}

.callout__link svg {
  color: var(--clr-accent-light);
}

/* ==========================================================================
   What we plan for
   ========================================================================== */
.guards__grid {
  display: grid;
  gap: var(--space-lg);
}

/* Light cards: an inset photograph at the head, a round badge straddling its
   lower edge, then centred copy. The photograph is in normal flow rather than
   behind the card, so nothing needs a scrim — the text sits on white and the
   picture keeps its own contrast. */
.guard {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Even inset on the three sides the photograph touches */
  padding: var(--space-md) var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  background-color: var(--clr-surface-alt);
  /* Wide and soft: the cards should look set down on the cream, not outlined */
  box-shadow: 0 16px 38px rgba(15, 42, 68, 0.07);
  text-align: center;
}

/* A set height rather than an aspect ratio. The grid goes from one column to
   four, so a ratio would swing the picture from letterbox to tower on the way;
   a height keeps every card's photograph the same depth at every width. */
.guard__media {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 13rem;
  border-radius: var(--radius-md);
  background-color: rgba(15, 42, 68, 0.06);
}

.guard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}

.guard:hover .guard__media img {
  transform: scale(1.04);
}

/* Pulled up by half its height, so it sits astride the foot of the picture */
.guard__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  margin-top: -1.75rem;
  margin-bottom: var(--space-lg);
  border-radius: 50%;
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
  transition: transform var(--t-base) var(--ease-out);
}

.guard:hover .guard__icon {
  transform: scale(1.06);
}

.guard__icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.guard__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-500);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  text-wrap: balance;
}

/* Capped and centred: centred copy stops being readable long before a wide
   card runs out of room */
.guard__text {
  margin: 0;
  max-width: 34ch;
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.7;
}

/* ==========================================================================
   Larger screens — min-width only
   ========================================================================== */
@media (min-width: 48em) {
  .guards__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guard {
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
  }

  .guard__media {
    height: 15rem;
  }

  .step {
    gap: var(--space-xl);
  }

}

@media (min-width: 64em) {
  /* Rail to the centre, content alternating either side of it */
  .steps {
    --rail-x: 50%;
    gap: var(--space-2xl);
  }

  .step {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: center;
  }

  .step__marker {
    grid-column: 2;
    grid-row: 1;
  }

  /* The rail ends on the centred marker here, so the overhang cover is not
     needed — left on, it paints over the left edge of the last photograph */
  .step:last-child::before {
    content: none;
  }

  /* Odd steps: photograph left, copy right. Even steps: the reverse. */
  .step:nth-child(odd) .step__media {
    grid-column: 1;
    grid-row: 1;
  }

  .step:nth-child(odd) .step__body {
    grid-column: 3;
    grid-row: 1;
  }

  .step:nth-child(even) .step__body {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
  }

  .step:nth-child(even) .step__media {
    grid-column: 3;
    grid-row: 1;
  }

  /* Right-aligned copy needs its list markers to follow */
  .step:nth-child(even) .step__list .check {
    flex-direction: row-reverse;
    text-align: right;
  }

  .callout {
    padding: var(--space-2xl) var(--space-2xl) calc(var(--space-2xl) + var(--space-sm));
  }

  /* ------------------------------------------------------------------
     Financing pathways: the carousel becomes a row of expanding panels
     ------------------------------------------------------------------ */
  .pathways__viewport {
    /* No gap. The cards are separated by transparent side borders instead,
       so there is no dead strip between them — crossing from one card to
       the next hands the open state straight over rather than letting
       everything collapse for the width of a gutter. */
    gap: 0;
    margin-inline: 0;
    padding-inline: 0;
    padding-block: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .pathways__controls {
    display: none;
  }

  .pathway {
    /* Closed is the resting state at this width; --pw-grow drives the width */
    --pw-open: 0;
    --pw-closed: 1;
    --pw-grow: 1;

    flex: var(--pw-grow) 1 0;
    min-width: 0;
    height: 32rem;
    padding: var(--space-sm);
    border-inline: 0.3125rem solid transparent;
    /* Keeps the card's own ground out of the transparent borders */
    background-clip: padding-box;
    transition: flex-grow 620ms var(--ease-out);
  }

  .pathway:first-child {
    border-left-width: 0;
  }

  .pathway:last-child {
    border-right-width: 0;
  }

  .pathway__vert {
    display: flex;
  }

  /* A fixed panel width, so the copy does not rewrap line by line while the
     card is still growing — the block slides out already at its final size
     rather than reflowing through every width on the way there. Stepped up at
     the wider breakpoints below rather than tied to the card, for the same
     reason. */
  .pathway__panel {
    width: 20rem;
    /* Closed panels are invisible, so their link must not be clickable */
    pointer-events: none;
  }

  /* ---- Which card is open ----
     Three rules, read in order. The second and third share specificity, so
     the order is what settles them. */

  /* At rest: the featured card, so the row has a focal point untouched */
  .pathway--featured {
    --pw-open: 1;
    --pw-closed: 0;
    --pw-grow: 4;
  }

  /* It gives way the moment the row is hovered, or another card is tapped */
  .pathways__viewport:hover .pathway--featured,
  .pathways__viewport.has-open .pathway--featured {
    --pw-open: 0;
    --pw-closed: 1;
    --pw-grow: 1;
  }

  /* Whichever card is actually open wins — including the featured one, when
     it is the card being hovered */
  .pathways__viewport .pathway:hover,
  .pathways__viewport .pathway:focus-within,
  .pathways__viewport .pathway.is-open {
    --pw-open: 1;
    --pw-closed: 0;
    --pw-grow: 4;
  }

  /* pointer-events cannot be derived from a number, so it repeats the ladder */
  .pathway--featured .pathway__panel {
    pointer-events: auto;
  }

  .pathways__viewport:hover .pathway--featured .pathway__panel,
  .pathways__viewport.has-open .pathway--featured .pathway__panel {
    pointer-events: none;
  }

  .pathways__viewport .pathway:hover .pathway__panel,
  .pathways__viewport .pathway:focus-within .pathway__panel,
  .pathways__viewport .pathway.is-open .pathway__panel {
    pointer-events: auto;
  }
}

/* The open card has more room at these widths, so the panel takes some of it.
   Stepped rather than fluid: a fluid width would rewrap the copy mid-animation. */
@media (min-width: 75em) {
  .pathway__panel {
    width: 24rem;
  }

  /* Four across. Held back to this width rather than 64em because at 1024 the
     cards come out under 14rem wide, and centred copy in a column that narrow
     runs to ten or eleven lines. */
  .guards__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .guard__media {
    height: 13rem;
  }
}

@media (min-width: 90em) {
  .pathway__panel {
    width: 28rem;
  }
}

/* ==========================================================================
   Reduced motion — the rail is simply drawn, not scroll linked
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .steps::after {
    transform: scaleY(1);
  }

  .guard__media img {
    transition: none;
  }

  .guard:hover .guard__media img,
  .guard:hover .guard__icon {
    transform: none;
  }

  .guard__icon {
    transition: none;
  }

  .step__num {
    transition: none;
  }
}

/* The panels still open and close for anyone who would rather not have motion;
   they just arrive there rather than travelling. The carousel is left to the
   browser, which honours the preference for smooth scrolling on its own. */
@media (prefers-reduced-motion: reduce) {
  .pathway,
  .pathway__media::after,
  .pathway__panel,
  .pathway__vert,
  .pathways__dot,
  .pathways__arrow {
    transition: none;
  }

  .pathway__panel {
    transform: none;
  }
}

/* ==========================================================================
   Curve stacking

   A section's lower curve hangs down over the section beneath it. Both carry
   z-index: 1 from .curve-out, and where two sit side by side the later one
   wins on document order and paints its own ground straight over the curve
   reaching into it. So a run of solid sections counts down: each outranks the
   one it reaches into.
   ========================================================================== */
.stages {
  z-index: 3;
}

.pathways {
  z-index: 2;
}

.guards {
  z-index: 1;
}
