/* ==========================================================================
   Policy travels with the call — AI Gateway page, below "How It Works".
   Content: a feature list + a live request/response demo. Layout borrows the
   home page's "left list + right console" idiom but with a DARK terminal card,
   so it's distinct from the collapsed matrix above and the essay before that.
   Blue primary (#0036FA → #4E87FC) on the terminal tokens + accents (no green).
   Motion: scroll-reveal rise + stagger, plus per-line reveal in the terminal.
   ========================================================================== */

.pg-pol {
  background-color: #fff;
  padding: 104px 0;
}

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

.pg-pol__title {
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: #12140f;
  max-width: 620px;
}

.pg-pol__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 72px;
  align-items: center;
  margin-top: 48px;
}

/* --- left feature list --- */
.pg-pol__list {
  border-top: 1px solid #ededed;
}

.pg-pol__item {
  padding: 24px 0;
  border-bottom: 1px solid #ededed;
  position: relative;
  padding-left: 18px;
  transition: padding-left 0.35s ease;
}

.pg-pol__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 27px;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #0036fa, #4e87fc);
  transition: height 0.35s ease;
}

.pg-pol__item:hover {
  padding-left: 24px;
}

.pg-pol__item:hover::before {
  height: 34px;
}

.pg-pol__item-title {
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: #12140f;
}

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

/* --- right terminal card --- */
.pg-pol__term {
  background-color: #0c1424;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 30px 60px rgba(4, 12, 30, 0.28);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 26px;
  color: #cdd6ea;
  overflow-x: auto;
}

.pg-pol__term-line {
  white-space: pre;
}

.pg-pol__term-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.12);
  margin: 16px 0;
}

.pg-pol__tok-method {
  font-weight: 700;
  background: linear-gradient(90deg, #4e87fc, #8fb4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pg-pol__tok-key {
  color: #7f92b8;
}

.pg-pol__tok-val {
  color: #fff;
  font-weight: 600;
}

.pg-pol__tok-accent {
  color: #6fa0ff;
  font-weight: 600;
}

.pg-pol__tok-arrow {
  color: #4e87fc;
}

/* --- scroll-reveal --- */
.pg-pol__title,
.pg-pol__item,
.pg-pol__term {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.pg-pol__title.is-in,
.pg-pol__item.is-in,
.pg-pol__term.is-in {
  opacity: 1;
  transform: none;
}

.pg-pol__item.is-in:nth-of-type(1) { transition-delay: 0.06s; }
.pg-pol__item.is-in:nth-of-type(2) { transition-delay: 0.16s; }
.pg-pol__item.is-in:nth-of-type(3) { transition-delay: 0.26s; }
.pg-pol__term.is-in { transition-delay: 0.12s; }

/* terminal lines reveal in sequence once the card is in */
.pg-pol__term .pg-pol__term-line,
.pg-pol__term .pg-pol__term-divider {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pg-pol__term.is-in .pg-pol__term-line,
.pg-pol__term.is-in .pg-pol__term-divider {
  opacity: 1;
}

.pg-pol__term.is-in .pg-pol__term-line:nth-child(1) { transition-delay: 0.2s; }
.pg-pol__term.is-in .pg-pol__term-line:nth-child(2) { transition-delay: 0.32s; }
.pg-pol__term.is-in .pg-pol__term-line:nth-child(3) { transition-delay: 0.44s; }
.pg-pol__term.is-in .pg-pol__term-divider { transition-delay: 0.56s; }
.pg-pol__term.is-in .pg-pol__term-line:nth-child(5) { transition-delay: 0.68s; }
.pg-pol__term.is-in .pg-pol__term-line:nth-child(6) { transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .pg-pol__title,
  .pg-pol__item,
  .pg-pol__term,
  .pg-pol__term .pg-pol__term-line,
  .pg-pol__term .pg-pol__term-divider {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- responsive --- */
@media (max-width: 1040px) {
  .pg-pol {
    padding: 80px 0;
  }
  .pg-pol__inner {
    padding: 0 24px;
  }
  .pg-pol__title {
    font-size: 30px;
  }
  .pg-pol__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .pg-pol__term {
    font-size: 12px;
    line-height: 23px;
    padding: 20px;
  }
}
