/* ===== HOW IT WORKS ===== */
.hiw-section {
  padding: 110px 0 90px;
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}

/* Decorative scribbles */
.hiw-scribble {
  position: absolute;
  pointer-events: none;
}
.hiw-scribble-1 { top: 8%; left: 5%; }
.hiw-scribble-2 { top: 15%; right: 8%; }
.hiw-scribble-3 { bottom: 12%; left: 12%; }

.hiw-header {
  text-align: center;
  margin-bottom: 60px;
}
.hiw-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  margin: 12px 0 0;
}
.hiw-subtitle {
  font-size: 16px;
  color: var(--gray-500);
  margin: 14px 0 0;
  font-weight: 400;
}

/* Steps grid */
.hiw-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Card */
.hiw-step {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 0 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow 0.4s, transform 0.4s;
  position: relative;
  overflow: hidden;
}
.hiw-step:hover {
  box-shadow: 0 12px 40px rgba(15,22,40,0.1);
  transform: translateY(-6px);
}

/* Colored accent strip at top of each card */
.hiw-step-accent {
  height: 4px;
  margin: 0 -28px 20px;
  border-radius: 0 0 4px 4px;
}
.hiw-step-1 .hiw-step-accent { background: linear-gradient(90deg, var(--blue-400), var(--blue-500)); }
.hiw-step-2 .hiw-step-accent { background: linear-gradient(90deg, #10B981, #34D399); }
.hiw-step-3 .hiw-step-accent { background: linear-gradient(90deg, #A855F7, #C084FC); }
.hiw-step-4 .hiw-step-accent { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

/* Icon + number badge */
.hiw-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
}
.hiw-icon {
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 16px;
}
/* Per-step icon colors */
.hiw-step-1 .hiw-icon { background: var(--blue-50); color: var(--blue-500); }
.hiw-step-2 .hiw-icon { background: #ecfdf5; color: #10B981; }
.hiw-step-3 .hiw-icon { background: #faf5ff; color: #A855F7; }
.hiw-step-4 .hiw-icon { background: #fffbeb; color: #F59E0B; }

.hiw-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hiw-step-1 .hiw-num { background: var(--blue-500); box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.hiw-step-2 .hiw-num { background: #10B981; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }
.hiw-step-3 .hiw-num { background: #A855F7; box-shadow: 0 2px 8px rgba(168,85,247,0.3); }
.hiw-step-4 .hiw-num { background: #F59E0B; box-shadow: 0 2px 8px rgba(245,158,11,0.3); }

/* Scribble arrows between cards */
.hiw-scribble-arrow {
  position: absolute;
  right: -42px;
  top: 36px;
  z-index: 2;
  opacity: 0.7;
}
.hiw-step:last-child .hiw-scribble-arrow { display: none; }

.hiw-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.hiw-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
  margin: 0;
}
.hiw-step-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray-500);
  margin: 0;
}

/* Tablet */
@media (max-width: 1080px) {
  .hiw-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .hiw-scribble-arrow { display: none; }
  .hiw-scribble { display: none; }
}
/* Mobile */
@media (max-width: 600px) {
  .hiw-section { padding: 64px 0; }
  .hiw-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hiw-step {
    flex-direction: row;
    align-items: flex-start;
    padding: 0 18px 20px;
    gap: 14px;
  }
  .hiw-step-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    margin: 0;
    border-radius: 20px 20px 0 0;
  }
  .hiw-step { padding-top: 20px; }
  .hiw-scribble-arrow { display: none; }
  .hiw-scribble { display: none; }
  .hiw-icon-wrap { width: 46px; height: 46px; flex-shrink: 0; }
  .hiw-icon { width: 46px; height: 46px; padding: 11px; border-radius: 13px; }
  .hiw-num { width: 20px; height: 20px; font-size: 10px; top: -4px; right: -4px; }
}
