/* =============================================================
   COMPONENT — FAB STEPS  v2
   3-step custom fabrication process cards.
   Used on the home page and Custom Work page.
   ============================================================= */

.fab-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

/* Card */
.fab-step {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Step number badge */
.fab-step__num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.08);
  color: var(--color-gold);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: var(--space-6);
}

/* Step icon image */
.fab-step__img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  object-fit: contain;
  margin-bottom: var(--space-6);
}

/* Step title */
.fab-step__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

/* Step description */
.fab-step__body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* Footer CTA — home page only */
.fab-steps-footer {
  text-align: center;
  margin-top: var(--space-12);
}

/* --- Tablet (900px and below): 3 smaller columns --- */
@media (max-width: 900px) {
  .fab-steps {
    gap: var(--space-4);
  }

  .fab-step {
    padding: var(--space-6) var(--space-4);
  }

  .fab-step__img {
    max-width: 200px;
  }
}

/* --- Mobile: single column (overridden below) --- */
@media (max-width: 600px) {
  .fab-steps {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .fab-step {
    padding: var(--space-8) var(--space-6);
  }

  .fab-step__img {
    max-width: 260px;
  }
}

/* --- Mobile: compact 3-column side-by-side (overrides single-column above) ---
   Must come after the 600px block so the cascade wins at all mobile widths. */
@media (max-width: 767px) {
  .fab-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: var(--space-6);
  }

  .fab-step {
    padding: 10px 8px 12px;
    border-radius: var(--radius-md);
  }

  .fab-step__num {
    width: 26px;
    height: 26px;
    font-size: 11px;
    margin-bottom: 8px;
  }

  .fab-step__img {
    width: clamp(36px, 14vw, 64px);
    max-width: 100%;
    margin-bottom: 8px;
  }

  .fab-step__title {
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .fab-step__body {
    font-size: clamp(10px, 2.5vw, 11.5px);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .fab-steps-footer {
    margin-top: var(--space-5);
  }
}

/* --- Very narrow (320px): tighten further, clamp to 3 description lines --- */
@media (max-width: 340px) {
  .fab-steps {
    gap: 6px;
  }

  .fab-step {
    padding: 8px 6px 10px;
  }

  .fab-step__img {
    width: clamp(28px, 11vw, 42px);
  }

  .fab-step__body {
    -webkit-line-clamp: 3;
  }
}
