/* ==========================================================================
   How It Works — AI Gateway page, below "Why a Gateway". A 6-step numbered
   process ("what happens to a single request"), laid out as a hairline-collapsed
   3x2 matrix (frame657/corporate idiom) — distinct from the two-column essay
   above and the single-column hero. Warm panel (#f7f6f2) echoes the hero band
   for page rhythm. Blue primary (#0036FA → #4E87FC) on the step labels + hover.
   Motion: scroll-reveal rise + per-cell stagger (~0.6s ease).
   ========================================================================== */

.pg-how {
  background-color: #f4f7fd;
  padding: 100px 0;
}

.pg-how__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

/* --- masthead --- */
.pg-how__kicker {
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #0036fa, #4e87fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pg-how__title {
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #12140f;
  margin-top: 18px;
}

/* --- 3x2 collapsed matrix --- */
.pg-how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: #e6e4db;
  border: 1px solid #e6e4db;
  margin-top: 44px;
}

.pg-how__cell {
  background-color: #fff;
  padding: 30px 30px 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background-color 0.35s ease;
}

.pg-how__cell:hover {
  background-color: #f6f9ff;
}

.pg-how__step-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pg-how__step-num {
  font-weight: 700;
  background: linear-gradient(90deg, #0036fa, #4e87fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pg-how__step-name {
  color: #8a8a8a;
}

.pg-how__cell:hover .pg-how__step-name {
  color: #0036fa;
}

.pg-how__step-title {
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 26px;
  color: #12140f;
  margin-top: 2px;
}

.pg-how__step-text {
  font-family: "Cabin", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #4d4d4d;
}

/* --- scroll-reveal (site motion language) --- */
.pg-how__head,
.pg-how__cell {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease, background-color 0.35s ease;
}

.pg-how__head.is-in,
.pg-how__cell.is-in {
  opacity: 1;
  transform: none;
}

.pg-how__cell.is-in:nth-child(1) { transition-delay: 0.04s; }
.pg-how__cell.is-in:nth-child(2) { transition-delay: 0.1s; }
.pg-how__cell.is-in:nth-child(3) { transition-delay: 0.16s; }
.pg-how__cell.is-in:nth-child(4) { transition-delay: 0.22s; }
.pg-how__cell.is-in:nth-child(5) { transition-delay: 0.28s; }
.pg-how__cell.is-in:nth-child(6) { transition-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  .pg-how__head,
  .pg-how__cell {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- responsive --- */
@media (max-width: 1040px) {
  .pg-how {
    padding: 80px 0;
  }
  .pg-how__inner {
    padding: 0 24px;
  }
  .pg-how__title {
    font-size: 32px;
  }
  .pg-how__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .pg-how__grid {
    grid-template-columns: 1fr;
  }
  .pg-how__title {
    font-size: 28px;
  }
}
