/*
  How It Works 04 — 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;
  --blue-600: #2563eb;
  --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__grid {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

.photo {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  border-radius: 1rem;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hiw__kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.hiw__heading {
  margin: 0.75rem 0 0;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.375rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  gap: 1rem;
}

.step__number {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background-color: var(--slate-900);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.step__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

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

@media (min-width: 1024px) {
  .hiw__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
  }

  .photo {
    min-height: 26rem;
  }
}

/* Motion — disabled entirely under reduced motion; every element already
   renders at its final, fully visible state outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-howitworks04-wipe {
    from {
      clip-path: inset(0 0 100% 0);
    }
    to {
      clip-path: inset(0 0 0% 0);
    }
  }

  @keyframes al-howitworks04-fade {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .wipe {
    animation: al-howitworks04-wipe 850ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }

  .fade {
    animation: al-howitworks04-fade 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
