/* Homepage — center timeline, content alternates left / right */
.home-flow {
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --flow-cream: var(--cream, #f7f5f0);
  --flow-ink: #111111;
  --flow-muted: #5c6460;
  --flow-emerald: #1f4d18;
  --flow-progress: #8a8a8a;
  --flow-line: rgba(17, 17, 17, 0.14);
  background: var(--flow-cream);
  color: var(--flow-ink);
  font-family: var(--sans);
  font-weight: 300;
  padding: clamp(3rem, 7vh, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 7vh, 4.5rem);
}

.home-flow__inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.home-flow__header {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  max-width: 34rem;
}

.home-flow__title {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 4.5vw, 3.35rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--flow-ink);
}

.home-flow__title em {
  font-style: italic;
  color: var(--flow-emerald);
}

.home-flow__lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.7;
  color: var(--flow-muted);
}

.home-flow__track {
  position: relative;
}

/* Center progress line — always visible */
.home-flow__rail {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(17, 17, 17, 0.16);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}

.home-flow__rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  border-radius: inherit;
  background: var(--flow-progress);
  transform-origin: top center;
}

.home-flow__rail-cap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--flow-muted);
  background: var(--flow-cream);
  padding: 0.15rem 0.35rem;
  z-index: 1;
}

.home-flow__rail-cap--start {
  top: 0;
}

.home-flow__rail-cap--end {
  bottom: 0;
}

.home-flow.is-engaged .home-flow__rail-cap--start,
.home-flow.is-engaged .home-flow__rail-cap--end {
  color: var(--flow-emerald);
}

.home-flow__steps {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 0 clamp(1.5rem, 4vh, 2.5rem);
}

.home-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: center;
  min-height: clamp(280px, 48vh, 420px);
  padding: clamp(0.75rem, 2vh, 1.25rem) 0;
}

.home-step__marker {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--flow-cream);
  border: 2px solid rgba(17, 17, 17, 0.18);
  z-index: 2;
  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.4s ease;
}

.home-step.is-passed .home-step__marker,
.home-step.is-active .home-step__marker {
  border-color: var(--flow-progress);
  background: var(--flow-progress);
}

.home-step.is-active .home-step__marker {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(138, 138, 138, 0.18);
}

/* Odd: copy left, visual right */
.home-step:nth-child(odd) .home-step__copy {
  grid-column: 1;
  text-align: right;
  align-items: flex-end;
}

.home-step:nth-child(odd) .home-step__visual {
  grid-column: 3;
}

/* Even: visual left, copy right */
.home-step:nth-child(even) .home-step__visual {
  grid-column: 1;
  grid-row: 1;
}

.home-step:nth-child(even) .home-step__copy {
  grid-column: 3;
  text-align: left;
  align-items: flex-start;
}

.home-step__copy,
.home-step__visual {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s;
}

.home-step:nth-child(odd) .home-step__copy {
  transform: translateX(-28px);
}

.home-step:nth-child(odd) .home-step__visual {
  transform: translateX(28px);
}

.home-step:nth-child(even) .home-step__copy {
  transform: translateX(28px);
}

.home-step:nth-child(even) .home-step__visual {
  transform: translateX(-28px);
}

.home-step.is-active .home-step__copy,
.home-step.is-active .home-step__visual {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.home-step__copy {
  display: flex;
  flex-direction: column;
  max-width: 22rem;
  width: 100%;
  justify-self: stretch;
}

.home-step:nth-child(odd) .home-step__copy {
  justify-self: end;
}

.home-step:nth-child(even) .home-step__copy {
  justify-self: start;
}

.home-step__num {
  display: block;
  margin-bottom: clamp(0.85rem, 2vw, 1.2rem);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--flow-muted);
  transition: color 0.4s ease;
}

.home-step.is-active .home-step__num {
  color: var(--flow-emerald);
}

.home-step__title {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--flow-ink);
}

.home-step__text {
  margin: 0;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.72;
  color: var(--flow-muted);
}

.home-step__visual {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 20rem;
}

.home-step:nth-child(odd) .home-step__visual {
  justify-self: start;
}

.home-step:nth-child(even) .home-step__visual {
  justify-self: end;
}

.home-step__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: clamp(160px, 20vh, 200px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--flow-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.06);
}

.home-step__card--pills {
  align-items: stretch;
  justify-content: flex-start;
  min-height: clamp(12.5rem, 24vh, 15.5rem);
  padding: 0;
  overflow: hidden;
}

.home-step:has(.home-step__card--pills) .home-step__visual {
  max-width: min(100%, 38rem);
}

.home-step__card--pills .easy-pills {
  flex: 1;
  justify-content: center;
  gap: clamp(0.55rem, 1.2vw, 0.72rem);
  padding: clamp(1.2rem, 2.8vw, 1.6rem) clamp(1rem, 2.2vw, 1.35rem);
}

.home-step__card--pills .easy-pills__row {
  min-height: 2.5rem;
}

.home-step__card--pills .easy-pill {
  font-size: clamp(0.74rem, 1.5vw, 0.86rem);
  padding: clamp(0.44rem, 0.95vw, 0.54rem) clamp(0.82rem, 1.7vw, 1rem);
}

.home-step__card-label {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.02em;
  color: var(--flow-ink);
}

.home-step__card-hint {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--flow-muted);
}

/* Phone-style visual on alternating side */
.home-step__device {
  width: min(100%, 220px);
  padding: 0.55rem;
  border-radius: 2rem;
  background: linear-gradient(160deg, #2a2a2a 0%, #111 100%);
  box-shadow:
    0 12px 32px rgba(17, 17, 17, 0.14),
    0 24px 48px rgba(17, 17, 17, 0.1);
}

.home-step__device-screen {
  aspect-ratio: 9 / 19.5;
  border-radius: 1.55rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.25rem;
  text-align: center;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.75) 0%, rgba(240, 235, 227, 0.95) 100%);
}

.home-step__device-screen--shot {
  display: block;
  padding: 0;
  background: #111;
}

.home-step__device-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.home-step__device-label {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--flow-ink);
}

.home-step__device-hint {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--flow-muted);
}

@media (max-width: 767px) {
  .home-flow {
    --flow-line-x: 20px;
    --flow-content-start: 60px;
  }

  .home-flow__track {
    position: relative;
    display: block;
  }

  .home-flow__rail {
    position: absolute;
    left: var(--flow-line-x);
    top: 0;
    bottom: 0;
    width: 3px;
    margin: 0;
    transform: translateX(-50%);
    min-height: 100%;
  }

  .home-flow__rail-cap {
    display: none;
  }

  .home-flow__steps {
    padding:
      0.5rem
      clamp(1rem, 4vw, 1.5rem)
      1.5rem
      var(--flow-content-start);
    min-width: 0;
  }

  .home-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: clamp(240px, 52vh, 360px);
    padding: 1.25rem 0;
  }

  .home-step__marker {
    position: absolute;
    left: calc(var(--flow-line-x) - var(--flow-content-start));
    top: 1.35rem;
    transform: translateX(-50%);
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
    align-self: unset;
    margin: 0;
    transform-origin: center center;
    z-index: 2;
  }

  .home-step.is-active .home-step__marker {
    transform: translateX(-50%) scale(1.15);
  }

  .home-step__num {
    margin-bottom: 0.55rem;
  }

  .home-step__copy,
  .home-step__visual,
  .home-step:nth-child(odd) .home-step__copy,
  .home-step:nth-child(even) .home-step__copy,
  .home-step:nth-child(odd) .home-step__visual,
  .home-step:nth-child(even) .home-step__visual {
    grid-column: unset;
    grid-row: unset;
    text-align: left;
    align-items: flex-start;
    justify-self: stretch;
    max-width: none;
    visibility: visible;
    transition: none;
    transform: none;
  }

  .home-step__copy,
  .home-step:nth-child(odd) .home-step__copy,
  .home-step:nth-child(even) .home-step__copy {
    order: 1;
  }

  .home-step__visual,
  .home-step:nth-child(odd) .home-step__visual,
  .home-step:nth-child(even) .home-step__visual {
    order: 2;
    width: 100%;
  }

  .home-step.is-active .home-step__copy,
  .home-step.is-active .home-step__visual {
    transform: none;
    transition: none;
  }
}
