/* =============================================================================
   AdStar landing — process-steps.css
   "One flow, no friction." — left numbered steps (tablist) + right preview that
   swaps per active step. Crossfade between screenshots. Scoped under .process-steps.
   ========================================================================== */

.process-steps {
  background: var(--bg);
}

.process__head {
  margin-bottom: 40px;
}

.process__title {
  margin: 0;
  font-size: var(--fs-display-lg);
  line-height: var(--lh-display-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  color: var(--text-primary);
}

/* ---- Panel --------------------------------------------------------------- */
.process__panel {
  display: grid;
  grid-template-columns: minmax(0, 466px) minmax(0, 1fr);
  align-items: stretch;
  gap: 48px;
  background: var(--gray-900);
  border-radius: 20px;
  overflow: hidden;
}

/* ---- Left column: steps -------------------------------------------------- */
.process__steps {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 42px 0 42px 42px;
}

/* Lime indicator bar that slides to the active step. */
.process__marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 108px;
  background: var(--brand-900);
  border-radius: var(--radius-pill);
  transition: transform var(--dur) var(--ease-out);
  will-change: transform;
}

/* ---- A single step (button / tab) ---------------------------------------- */
.process-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 402px;
  margin: 0;
  padding: 32px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 17px;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}

.process-step:hover {
  opacity: 0.8;
}

.process-step.is-active {
  opacity: 1;
  background: var(--gray-800);
  cursor: default;
}

.process-step__heading {
  display: flex;
  gap: 6px;
  font-size: var(--fs-xl);
  line-height: var(--lh-xl);
  font-weight: 600;
}

.process-step__num {
  color: var(--text-muted);
}

.process-step__title {
  color: var(--gray-200);
  transition: color var(--dur) var(--ease-out);
}

.process-step.is-active .process-step__title {
  color: var(--text-primary);
}

.process-step__desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  color: var(--gray-200);
}

.process-step:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

/* ---- Right column: preview ----------------------------------------------- */
.process__preview {
  display: flex;
  align-items: center;
  padding: 42px 0 42px 28px;
}

.process__frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 516px;
  background: var(--gray-800);
  overflow: hidden;
}

/* Each screenshot is absolutely stacked and crossfaded. */
.process-shot {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}

.process-shot[hidden] {
  display: flex; /* keep stacked for crossfade; visibility via opacity */
}

.process-shot.is-active {
  opacity: 1;
}

.process-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  pointer-events: none;
  user-select: none;
}

/* =============================================================================
   Responsive
   ========================================================================== */

/* Tablet: keep the two-column layout — vertical steps on the left, preview on
   the right (matches Figma) — just narrower than desktop. */
@media (max-width: 1024px) {
  .process__head {
    margin-bottom: 32px;
  }

  .process__panel {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 20px;
  }

  .process__steps {
    gap: 8px;
    padding: 28px 0 28px 28px;
  }

  .process-step {
    max-width: none;
    padding: 24px;
  }

  .process__preview {
    padding: 28px 28px 28px 0;
  }
}

/* Mobile: single column — steps stacked above a full-width preview. The lime
   marker stays at the left edge next to the active step (matches Figma). */
@media (max-width: 767px) {
  .process__title {
    font-size: var(--fs-display-sm);
    line-height: var(--lh-display-sm);
  }

  .process__panel {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process__steps {
    gap: 8px;
    padding: 20px 16px 12px 24px;
  }

  .process-step {
    padding: 20px;
  }

  .process__preview {
    padding: 0 16px 20px;
  }

  .process__frame {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
  }

  .process-shot img {
    object-position: center;
  }
}

/* Respect reduced motion: no crossfade easing. */
@media (prefers-reduced-motion: reduce) {
  .process-step,
  .process-step__title,
  .process-shot,
  .process__marker {
    transition: none;
  }
}
