/* Navigation */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
}

.site-nav a:not(.button) {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
}

@media (max-width: 56rem) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: var(--space-xs);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a:not(.button) {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-line);
  }

  .site-nav .button {
    margin-top: var(--space-sm);
    justify-content: center;
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 1rem 1.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.button--small {
  padding: 0.75rem 1.25rem;
}

/* Navy text: white on this blue is only about 2.6:1 */
.button--accent {
  background: var(--color-accent);
  color: var(--color-ink);
}

.button--accent:hover {
  color: var(--color-ink);
  filter: brightness(0.94);
}

/* A soft light sweeps across the main booking buttons once, shortly after the page loads */
.button--shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button--shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: button-shimmer 5s ease-in-out 0.6s infinite;
  pointer-events: none;
}

/* Buttons further down the page start shimmering when they scroll into view, not on page load */
.button--shimmer[data-reveal]::after {
  animation: none;
}

.button--shimmer[data-reveal].is-visible::after {
  animation: button-shimmer 5s ease-in-out 0.3s infinite;
}

/* A slow, soft sweep of light (about 2 seconds), then a pause of about 3 seconds before the next */
@keyframes button-shimmer {
  0% {
    transform: translateX(-100%);
  }

  40%,
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button--shimmer::after {
    animation: none;
  }
}

.button--outline {
  padding-block: 0.9rem;
  border: 1.5px solid var(--color-ink);
  color: var(--color-ink);
}

.button--outline:hover {
  background: var(--color-ink);
  color: var(--color-surface);
}

.button--navy {
  background: var(--color-ink);
  color: var(--color-surface);
}

.button--navy:hover {
  color: var(--color-surface);
  filter: brightness(1.25);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Labels */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
}

.eyebrow--on-dark {
  color: var(--color-on-navy-accent);
}

.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem 0.5rem 0.625rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

.pill__icon {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-surface);
}

.icon-tile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  padding-top: 0.25rem;
}

.chip {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-navy-line);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--color-surface);
}

/* Cards */
.card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card--white { background: var(--color-surface); }
.card--tint { background: var(--color-tint); }
.card--outline { border: 1px solid var(--color-line); }

.card h3 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.card p {
  font-size: 1rem;
}

/* Numbered list */
.numbered-list {
  display: flex;
  flex-wrap: wrap;
  border-top: 2px solid var(--color-ink);
  counter-reset: numbered;
}

.numbered-list__item {
  flex: 1 1 15rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: 2rem 1.75rem 2rem 0;
  border-bottom: 1px solid var(--color-line);
  counter-increment: numbered;
}

.numbered-list__item::before {
  content: counter(numbered, decimal-leading-zero);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.numbered-list__item h3 {
  font-size: 1.3125rem;
  letter-spacing: 0;
}

.numbered-list__item p {
  font-size: 1rem;
}

/* Steps */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.step {
  flex: 1 1 15rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Step numbers brighten from navy to brand blue, step by step, to show progression */
.step__number {
  --step-color: var(--color-ink);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  background: var(--step-color);
  color: var(--color-surface);
  font-weight: 800;
}

.step:nth-child(2) .step__number { --step-color: #17476a; }
.step:nth-child(3) .step__number { --step-color: #2a77a6; }

.step__number--accent,
.step:nth-child(4) .step__number--accent {
  --step-color: var(--color-accent);
  color: var(--color-ink);
}

/* Count-out: each card rises in, then its number pops (overshoots, then settles) while its colour
   brightens from navy to its own shade, one step after another.
   The script only adds .steps.reveal--ready when motion is welcome, so steps stay visible otherwise. */
.steps.reveal--ready .step {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.steps.reveal--ready.is-visible .step {
  opacity: 1;
  transform: none;
}

.steps.reveal--ready .step__number {
  opacity: 0;
}

.steps.reveal--ready.is-visible .step__number {
  animation: step-pop 0.7s ease-out both;
}

@keyframes step-pop {
  0% {
    opacity: 0;
    transform: scale(0);
    background: var(--color-ink);
  }

  55% {
    opacity: 1;
    transform: scale(1.3);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    background: var(--step-color);
  }
}

.steps.reveal--ready .step:nth-child(2) { transition-delay: 0.4s; }
.steps.reveal--ready .step:nth-child(3) { transition-delay: 0.8s; }
.steps.reveal--ready .step:nth-child(4) { transition-delay: 1.2s; }

.steps.reveal--ready .step:nth-child(1) .step__number { animation-delay: 0.25s; }
.steps.reveal--ready .step:nth-child(2) .step__number { animation-delay: 0.65s; }
.steps.reveal--ready .step:nth-child(3) .step__number { animation-delay: 1.05s; }
.steps.reveal--ready .step:nth-child(4) .step__number { animation-delay: 1.45s; }

/* Conditions */
/* Two columns of equal cards; an odd card out sits centred on the last row at the same width */
.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: flex-start;
  gap: var(--space-xs);
}

.condition {
  padding: 1.375rem 1.5rem;
  border-radius: var(--radius-md);
}

.condition:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - var(--space-xs)) / 2);
}

/* Water-flow reveal: cards rise in row by row, top pair first, when the section scrolls into view.
   Each card's delay is set in the page (row and column for two columns, one by one when stacked). */
.condition-grid.reveal--ready .condition {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--flow-delay, 0ms);
}

.condition-grid.reveal--ready.is-visible .condition {
  opacity: 1;
  transform: none;
}

@media (max-width: 30rem) {
  .condition-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .condition-grid.reveal--ready .condition {
    transition-delay: var(--flow-delay-stacked, 0ms);
  }

  .condition:last-child:nth-child(odd) {
    width: auto;
    justify-self: stretch;
  }
}

.condition h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.condition p {
  font-size: var(--text-sm);
}

/* Quotes */
.quote-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.quote {
  flex: 1 1 25rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 2.25rem;
  border-radius: var(--radius-xl);
}

.quote blockquote {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-ink);
}

.quote figcaption {
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Spotlight: section labels pop up large in the middle of the screen, then settle into place.
   The script adds .spotlight--ready only when motion is welcome, marks each label .is-landed as it lands,
   and adds .spotlight--done once every label in the section has landed. */
.spotlight--ready [data-spotlight] {
  position: relative;
  z-index: 20;
}

.spotlight--ready [data-spotlight]:not(.is-landed) {
  opacity: 0;
}

/* Whatever follows a label (heading, then text) fades up once that label has landed.
   Card grids are left out: they have their own flow-in. */
.spotlight--ready [data-spotlight] ~ :not([data-reveal]) {
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.spotlight--ready [data-spotlight]:not(.is-landed) ~ :not([data-reveal]) {
  opacity: 0;
  transform: translateY(1rem);
}

.spotlight--ready [data-spotlight] ~ :not([data-reveal]):not(h2) {
  transition-delay: 0.25s;
}

/* Follow-on labels pop up from their left edge, where they sit */
[data-spotlight="pop"] {
  transform-origin: left center;
}

/* Cards in the same section hold back until every label has landed, then flow in */
.spotlight--ready:not(.spotlight--done) .condition-grid.reveal--ready.is-visible .condition {
  opacity: 0;
  transform: translateY(1.5rem);
}

/* Five gold stars under the reviews heading */
.stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: calc(var(--space-sm) * -1);
  color: #f2b01e;
}

/* Reviews: a slow, endless sideways drift that pauses when hovered or focused */
.review-marquee {
  margin-top: var(--space-lg);
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.review-track {
  display: flex;
  width: max-content;
  animation: reviews-drift calc(var(--reviews) * 12s) linear infinite;
}

.review-marquee:hover .review-track,
.review-marquee:focus-within .review-track {
  animation-play-state: paused;
}

/* Spacing sits on each card (not a gap) so half the track is exactly one full set */
.review {
  display: flex;
  flex-shrink: 0;
  width: min(26rem, 80vw);
  margin-right: var(--space-sm);
}

.review .quote {
  flex: 1;
  justify-content: space-between;
  padding: 2rem;
}

/* Smaller text than the old two-card layout so longer reviews keep the cards a sensible height */
.review .quote blockquote {
  font-size: 1.125rem;
}

@media (max-width: 40rem) {
  .review .quote {
    padding: 1.5rem;
  }

  .review .quote blockquote {
    font-size: 1rem;
  }
}

@keyframes reviews-drift {
  to {
    transform: translateX(-50%);
  }
}

/* No motion: show one set as a row people can swipe or scroll through */
@media (prefers-reduced-motion: reduce) {
  .review-marquee {
    overflow-x: auto;
    mask-image: none;
    padding-inline: var(--space-sm);
  }

  .review-track {
    animation: none;
  }

  .review[aria-hidden="true"] {
    display: none;
  }
}

/* Payment options */
.payment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.payment-list__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.payment-list__item svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.payment-list__item strong {
  color: var(--color-ink);
}

.fund-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-accent-ink);
}

.fund-list__links {
  columns: 2 12rem;
  column-gap: var(--space-lg);
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
}

.fund-list__links li {
  break-inside: avoid;
  padding-block: 0.2rem;
}

/* Forms */
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.field {
  flex: 1 1 11.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink);
}

.field input,
.field textarea {
  min-height: 2.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-input-line);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-surface);
}

.field textarea {
  resize: vertical;
}

/* Map */
.map {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 18rem;
  aspect-ratio: 21 / 8;
  border-radius: var(--radius-xl);
  background: var(--color-placeholder);
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Phones: a set height instead of the wide desktop shape, so the map can never push wider than the screen */
@media (max-width: 40rem) {
  .map {
    aspect-ratio: auto;
    min-height: 0;
    height: 16rem;
    border-radius: var(--radius-lg);
  }
}

/* GP referral: a button that opens a short upload form underneath */
.referral {
  margin-top: var(--space-xs);
}

.referral > summary {
  list-style: none;
  width: fit-content;
  transition: box-shadow 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

/* Same highlight as the price cards: lift slightly with a blue outline */
.referral > summary:hover,
.referral > summary:focus-visible {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-accent);
  transform: translateY(-2px);
}

.referral > summary::-webkit-details-marker {
  display: none;
}

.referral__form {
  margin-top: var(--space-sm);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* Fields stacked directly in the form shouldn't stretch taller */
.referral__form > .field {
  flex: none;
}

.referral__intro {
  font-size: var(--text-sm);
}

.field select {
  min-height: 2.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-input-line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-surface);
}

.field input[type="file"] {
  min-height: auto;
  padding: 0.625rem;
  font-size: var(--text-sm);
}

.referral__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-sm);
}

.referral__consent input {
  margin-top: 0.25rem;
}

.referral__consent a {
  color: var(--color-accent-ink);
}

/* Evening note: a small card that tells visitors the colours have been warmed for the evening */
.mood-note {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  max-width: min(22rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-tint-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.mood-note.is-shown {
  opacity: 1;
  transform: none;
}

.mood-note__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  color: #d98a3d;
}

.mood-note strong {
  display: block;
  color: var(--color-ink);
}

.mood-note__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: -0.25rem -0.25rem 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.mood-note__close:hover,
.mood-note__close:focus-visible {
  background: var(--color-tint);
  color: var(--color-ink);
}

@media (prefers-reduced-motion: reduce) {
  .mood-note { transition: none; transform: none; }
}

/* On phones, sit the note just under the header so it never covers the booking button */
@media (max-width: 40rem) {
  .mood-note {
    top: 5.25rem;
    bottom: auto;
    right: var(--gutter);
    max-width: none;
    transform: translateY(-1rem);
  }
}

/* Email choice menu: opens under an email link on laptops and desktops */
.email-picker {
  position: absolute;
  z-index: 70;
  display: flex;
  flex-direction: column;
  min-width: 13rem;
  padding: 0.5rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  animation: email-picker-in 0.18s ease-out both;
}

.email-picker__title {
  padding: 0.375rem 0.75rem 0.25rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
}

.email-picker__item {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: var(--color-ink);
  cursor: pointer;
}

.email-picker__item:hover,
.email-picker__item:focus-visible {
  background: var(--color-tint);
  color: var(--color-ink);
  outline: none;
}

.email-picker__item:last-child {
  margin-top: 0.25rem;
  border-top: 1px solid var(--color-line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  color: var(--color-accent-strong);
}

@keyframes email-picker-in {
  from { opacity: 0; transform: translateY(-0.25rem); }
}

@media (prefers-reduced-motion: reduce) {
  .email-picker { animation: none; }
}

/* Benefits list ("Strength, balance & confidence" etc.): when it scrolls into view, the dark line
   draws across, then each item follows left to right: its number rises up into place, the text
   fades up, and the thin line under it draws across. */
.numbered-list.reveal--ready {
  position: relative;
  border-top-color: transparent;
}

.numbered-list.reveal--ready::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

.numbered-list.reveal--ready .numbered-list__item {
  border-bottom-color: transparent;
  background: linear-gradient(var(--color-line), var(--color-line)) no-repeat left bottom / 0% 1px;
  transition: background-size 0.8s cubic-bezier(0.65, 0, 0.35, 1) var(--item-delay);
}

.numbered-list.reveal--ready .numbered-list__item::before {
  clip-path: inset(0 0 100% 0);
  transform: translateY(60%);
  transition:
    clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--item-delay),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--item-delay);
}

.numbered-list.reveal--ready .numbered-list__item > * {
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity 0.6s ease calc(var(--item-delay) + 0.25s),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--item-delay) + 0.25s);
}

.numbered-list.reveal--ready .numbered-list__item:nth-child(1) { --item-delay: 0.45s; }
.numbered-list.reveal--ready .numbered-list__item:nth-child(2) { --item-delay: 0.7s; }
.numbered-list.reveal--ready .numbered-list__item:nth-child(3) { --item-delay: 0.95s; }
.numbered-list.reveal--ready .numbered-list__item:nth-child(4) { --item-delay: 1.2s; }

.numbered-list.is-visible::after {
  transform: scaleX(1);
}

.numbered-list.is-visible .numbered-list__item {
  background-size: 100% 1px;
}

.numbered-list.is-visible .numbered-list__item::before {
  clip-path: inset(0 0 -10% 0);
  transform: none;
}

.numbered-list.is-visible .numbered-list__item > * {
  opacity: 1;
  transform: none;
}

/* Medicare explainer at the top of the GP referral drop-down */
.referral__medicare {
  margin-top: var(--space-sm);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  scroll-margin-top: 6rem;
}

.referral__medicare h3 {
  margin-bottom: var(--space-2xs);
  font-size: 1.0625rem;
  color: var(--color-ink);
}

.referral__medicare ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.1rem;
  list-style: disc;
  font-size: var(--text-sm);
}

/* Small "How it works" button on the Medicare line */
.payment-list__more {
  flex: none;
  margin-left: auto;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-accent-strong);
  transition: background 0.15s ease, color 0.15s ease;
}

.payment-list__more:hover,
.payment-list__more:focus-visible {
  background: var(--color-accent);
  color: var(--color-ink);
}

/* "How it works" visuals: each step has a line icon in a white circle, its number badge sitting on the
   circle's top-left edge, and (on wide screens) double arrows leading from one step to the next */
.step__visual {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  margin: 0.25rem 0 0.25rem 0.25rem;
}

.step__icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-accent-strong);
}

.step__visual .step__number {
  position: absolute;
  top: -0.375rem;
  left: -0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.9375rem;
  box-shadow: 0 0 0 3px var(--color-tint);
}

@media (min-width: 64rem) {
  .steps {
    flex-wrap: nowrap;
    gap: 2.5rem;
  }

  .step {
    position: relative;
    flex: 1 1 0;
  }

  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(1.75rem + 2.875rem);
    right: -2.5rem;
    width: 2.5rem;
    height: 1.25rem;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' fill='none' stroke='%2351a9dc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2l4 4-4 4M13 2l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* The icon circle grows in just after its number pops */
.steps.reveal--ready .step__icon {
  opacity: 0;
  transform: scale(0.6);
}

.steps.reveal--ready.is-visible .step__icon {
  animation: step-icon-in 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes step-icon-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.steps.reveal--ready .step:nth-child(1) .step__icon { animation-delay: 0.15s; }
.steps.reveal--ready .step:nth-child(2) .step__icon { animation-delay: 0.55s; }
.steps.reveal--ready .step:nth-child(3) .step__icon { animation-delay: 0.95s; }
.steps.reveal--ready .step:nth-child(4) .step__icon { animation-delay: 1.35s; }

/* Arrows fade in with the step they lead to */
@media (min-width: 64rem) {
  .steps.reveal--ready .step::after {
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .steps.reveal--ready.is-visible .step::after {
    opacity: 1;
  }

  .steps.reveal--ready .step:nth-child(1)::after { transition-delay: 0.45s; }
  .steps.reveal--ready .step:nth-child(2)::after { transition-delay: 0.85s; }
  .steps.reveal--ready .step:nth-child(3)::after { transition-delay: 1.25s; }
}

/* "How it works" now flows in like the "Do you experience…" cards: the four cards rise in quickly one after
   another with the same smooth easing, and each card's number, icon and arrow follow just behind it */
.steps.reveal--ready .step {
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.steps.reveal--ready .step:nth-child(1) { transition-delay: 0ms; }
.steps.reveal--ready .step:nth-child(2) { transition-delay: 120ms; }
.steps.reveal--ready .step:nth-child(3) { transition-delay: 240ms; }
.steps.reveal--ready .step:nth-child(4) { transition-delay: 360ms; }

.steps.reveal--ready .step:nth-child(1) .step__icon { animation-delay: 0.15s; }
.steps.reveal--ready .step:nth-child(2) .step__icon { animation-delay: 0.27s; }
.steps.reveal--ready .step:nth-child(3) .step__icon { animation-delay: 0.39s; }
.steps.reveal--ready .step:nth-child(4) .step__icon { animation-delay: 0.51s; }

.steps.reveal--ready .step:nth-child(1) .step__number { animation-delay: 0.3s; }
.steps.reveal--ready .step:nth-child(2) .step__number { animation-delay: 0.42s; }
.steps.reveal--ready .step:nth-child(3) .step__number { animation-delay: 0.54s; }
.steps.reveal--ready .step:nth-child(4) .step__number { animation-delay: 0.66s; }

@media (min-width: 64rem) {
  .steps.reveal--ready .step:nth-child(1)::after { transition-delay: 0.35s; }
  .steps.reveal--ready .step:nth-child(2)::after { transition-delay: 0.47s; }
  .steps.reveal--ready .step:nth-child(3)::after { transition-delay: 0.59s; }
}

/* Slightly slower flow for "How it works", so each step catches the eye as it arrives */
.steps.reveal--ready .step {
  transition: opacity 0.9s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.steps.reveal--ready .step:nth-child(2) { transition-delay: 250ms; }
.steps.reveal--ready .step:nth-child(3) { transition-delay: 500ms; }
.steps.reveal--ready .step:nth-child(4) { transition-delay: 750ms; }

.steps.reveal--ready.is-visible .step__icon { animation-duration: 0.8s; }
.steps.reveal--ready.is-visible .step__number { animation-duration: 0.85s; }

.steps.reveal--ready .step:nth-child(1) .step__icon { animation-delay: 0.25s; }
.steps.reveal--ready .step:nth-child(2) .step__icon { animation-delay: 0.5s; }
.steps.reveal--ready .step:nth-child(3) .step__icon { animation-delay: 0.75s; }
.steps.reveal--ready .step:nth-child(4) .step__icon { animation-delay: 1s; }

.steps.reveal--ready .step:nth-child(1) .step__number { animation-delay: 0.45s; }
.steps.reveal--ready .step:nth-child(2) .step__number { animation-delay: 0.7s; }
.steps.reveal--ready .step:nth-child(3) .step__number { animation-delay: 0.95s; }
.steps.reveal--ready .step:nth-child(4) .step__number { animation-delay: 1.2s; }

@media (min-width: 64rem) {
  .steps.reveal--ready .step::after { transition-duration: 0.6s; }
  .steps.reveal--ready .step:nth-child(1)::after { transition-delay: 0.55s; }
  .steps.reveal--ready .step:nth-child(2)::after { transition-delay: 0.8s; }
  .steps.reveal--ready .step:nth-child(3)::after { transition-delay: 1.05s; }
}

/* Step 4 "Feel the difference": the rising line keeps drawing up and out past the edge of its circle,
   breaking out of the mould, then fades and repeats */
.step__icon--breakout svg {
  overflow: visible;
}

.step__icon--breakout .breakout__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: breakout-line 4.5s cubic-bezier(0.45, 0, 0.25, 1) 1.6s infinite;
}

.step__icon--breakout .breakout__head {
  opacity: 0;
  animation: breakout-head 4.5s ease 1.6s infinite;
}

@keyframes breakout-line {
  0% { stroke-dashoffset: 1; opacity: 1; }
  45% { stroke-dashoffset: 0; opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 1; }
  95%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes breakout-head {
  0%, 40% { opacity: 0; }
  46% { opacity: 1; }
  80% { opacity: 1; }
  95%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .step__icon--breakout .breakout__line { animation: none; stroke-dashoffset: 0; }
  .step__icon--breakout .breakout__head { animation: none; opacity: 1; }
}

/* Arrows between the steps: once all four cards have arrived, each arrow appears and swells up, then settles
   back, one after the other from left to right, to show the flow from step to step */
@media (min-width: 64rem) {
  .steps.reveal--ready .step::after {
    opacity: 0;
    transition: none;
  }

  .steps.reveal--ready.is-visible .step::after {
    opacity: 1;
    animation: step-arrow-pulse 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  }

  .steps.reveal--ready .step:nth-child(1)::after { animation-delay: 1.9s; }
  .steps.reveal--ready .step:nth-child(2)::after { animation-delay: 2.3s; }
  .steps.reveal--ready .step:nth-child(3)::after { animation-delay: 2.7s; }
}

@keyframes step-arrow-pulse {
  0% { opacity: 0; transform: translateY(-50%) scale(0.6); }
  45% { opacity: 1; transform: translateY(-50%) scale(1.6); }
  100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .steps .step::after { animation: none; }
}
