/* ═══════════════════════════════════════════════════════════
   COLAB — howitworks.css
   Section 04 — HOW IT WORKS
   Theme:  .section--mid (warm lifted dark)
   Layout: Stacked mobile → 4-col horizontal 1024px+
   Animated by: howitworks.js via window.initHowItWorks()
   STATUS: DONE ✓
   ═══════════════════════════════════════════════════════════ */

/* ─── SECTION HEADER ────────────────────────────────────── */
.hiw__headline {
  margin-top: var(--space-sm);
}

.hiw__body {
  margin-top: var(--space-sm);
  max-width: 48ch;
}

/* ─── STEPS CONTAINER ───────────────────────────────────── */
.hiw__steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 1024px) {
  .hiw__steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

/* ─── INDIVIDUAL STEP ───────────────────────────────────── */
.hiw__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: rgba(249, 115, 22, 0.03);
  border: 1px solid rgba(249, 115, 22, 0.10);
  border-radius: var(--radius-md);

  /* reveal animation driven by howitworks.js */
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    background   var(--t-base) var(--ease-out);
}

.hiw__step.visible {
  opacity: 1;
  transform: translateY(0);
}

.hiw__step:hover {
  border-color: rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.05);
}

@media (min-width: 1024px) {
  .hiw__step {
    border: none;
    background: none;
    border-radius: 0;
    padding: var(--space-lg) var(--space-sm);
    align-items: center;
    text-align: center;
  }

  .hiw__step:hover {
    background: none;
    border: none;
  }
}

/* ─── STEP ICON SLOT ────────────────────────────────────── */
.hiw__step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  flex-shrink: 0;
}

.hiw__step-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Icon hides gracefully when src missing via onerror */
.hiw__step-icon:has(img[style*="display:none"]) {
  display: none;
}

/* ─── STEP NUMBER ───────────────────────────────────────── */
.hiw__step-num {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 2rem;
  font-weight: 500;
  color: var(--orange);
  text-shadow: var(--glow-text);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

/* ─── STEP TITLE ────────────────────────────────────────── */
.hiw__step-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

/* ─── STEP BODY ─────────────────────────────────────────── */
.hiw__step-body {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--mid-muted);
  line-height: 1.65;
  max-width: 24ch;
}

@media (min-width: 1024px) {
  .hiw__step-body {
    text-align: center;
  }
}

/* ─── CONNECTOR ─────────────────────────────────────────── */
.hiw__connector {
  display: none;
}

@media (min-width: 1024px) {
  .hiw__connector {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    margin-top: calc(var(--space-lg) + 36px);
    color: var(--orange);
    text-shadow: var(--glow-text);
    opacity: 0.45;
    font-size: 1rem;
  }

  .hiw__connector::before {
    content: '→';
  }
}

/* ─── SECTION FOOTER ────────────────────────────────────── */
.hiw__footer {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: center;
}

/* btn--outline on .section--mid */
.section--mid .btn--outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
}

.section--mid .btn--outline:hover {
  color: var(--orange);
  border-color: var(--orange);
  box-shadow: var(--glow-border);
}

/* ─── REDUCED MOTION ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hiw__step {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
