
.how-it-works {
  padding: var(--space-4xl) 0;
  background: var(--color-background);
  position: relative;
  overflow: hidden;
}

.how-it-works::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, hsla(28, 50%, 40%, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

[data-theme="dark"] .how-it-works::after {
  background-image: radial-gradient(circle, hsla(0, 0%, 100%, 0.02) 1px, transparent 1px);
}

.how-it-works .container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
}


.hiw-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  margin-bottom: var(--space-4xl);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hiw-step.hiw-visible {
  opacity: 1;
  transform: translateY(0);
}

.hiw-step:last-child {
  margin-bottom: 0;
}


.hiw-step--reverse {
  direction: rtl;
}
.hiw-step--reverse > * {
  direction: ltr;
}


.hiw-step-content {
  padding: var(--space-xl) 0;
}

.hiw-badge {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: var(--sp-color-hiw-badge-bg);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-md);
}

.hiw-step-number {
  font-family: var(--font-brand);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--sp-color-hiw-step-number);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
}

.hiw-step-title {
  font-family: var(--font-brand);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.hiw-step-description {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 440px;
}


.hiw-chat-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .how-it-works {
    padding: var(--space-2xl) 0;
  }

  .hiw-step,
  .hiw-step--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--space-xl);
    text-align: center;
  }

  .hiw-step-content {
    order: 1;
  }

  .hiw-step-mockup {
    order: 2;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .hiw-step-description {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .how-it-works {
    padding: var(--space-xl) 0;
  }

  .hiw-step-number {
    font-size: 3rem;
  }

  .hiw-step {
    margin-bottom: var(--space-2xl);
  }
}
