/*
  How It Works 07 — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy these three
  files into any project and open index.html as-is.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --slate-900: #0f172a;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.5;
}

.hiw {
  padding: clamp(3rem, 2.5rem + 2vw, 5rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.hiw__inner {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.hiw__intro {
  text-align: center;
}

.hiw__heading {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.875rem, 1.5rem + 1.9vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hiw__description {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate-600);
}

.timeline {
  position: relative;
  margin-top: 3.5rem;
  padding-left: 2.5rem;
}

.timeline__line {
  position: absolute;
  top: 0.375rem;
  bottom: 0.375rem;
  left: 0.75rem;
  width: 1px;
  background-color: var(--slate-200);
  transform-origin: top;
}

.milestones {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.milestone {
  position: relative;
}

.dot {
  position: absolute;
  top: 0.25rem;
  left: -2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: var(--slate-900);
  box-shadow: 0 0 0 4px var(--white);
}

.dot__core {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background-color: var(--white);
}

.milestone__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.milestone__desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-600);
}

/* Motion — disabled entirely under reduced motion; the line renders fully
   drawn and every milestone already renders at its final, fully visible
   state outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-howitworks07-grow {
    from {
      transform: scaleY(0);
    }
    to {
      transform: scaleY(1);
    }
  }

  @keyframes al-howitworks07-dot {
    from {
      opacity: 0;
      transform: scale(0.5);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes al-howitworks07-text {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .timeline__line {
    animation: al-howitworks07-grow 1400ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }

  .dot {
    animation: al-howitworks07-dot 400ms cubic-bezier(0.34, 1.35, 0.64, 1) both;
  }

  .milestone__text {
    animation: al-howitworks07-text 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
