/* ==========================================================================
   QUEST Pedagogy (academics.html, #quest only).
   Light cream section with five stage cards: three on the first row, two on
   the second. Typography follows index.html: .hp-script for "Methodologies"
   and the sub-line, DM Sans headings, and the shared --hp-* colour tokens.
   ========================================================================== */

#quest {
  position: relative;
  background: var(--hp-cream);
  padding: clamp(72px, 8vw, 112px) 0 clamp(80px, 8vw, 120px);
  overflow-x: clip;
}

#quest .qp-wrap {
  width: min(1200px, calc(100% - (var(--hp-gutter) * 2)));
  margin: 0 auto;
}

/* ---------- heading block ---------- */
#quest .qp-head {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 40px;
}

#quest .qp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--hp-nav);
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hp-orange);
  margin-bottom: 18px;
}

#quest .qp-kicker::before,
#quest .qp-kicker::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--hp-orange);
}

#quest .qp-h2 {
  font-family: var(--hp-sans);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.035em;
  color: var(--hp-navy);
  margin: 0;
  text-wrap: balance;
}

#quest .qp-h2 .hp-script {
  font-size: 1.05em;
  letter-spacing: 0;
  white-space: normal;
}

#quest .qp-sub {
  font-family: var(--hp-sans);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  margin: 12px 0 24px;
}

#quest .qp-lead {
  font-family: var(--hp-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--hp-ink);
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- QUEST line ---------- */
#quest .qp-title {
  font-family: var(--hp-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.3;
  text-align: center;
  color: var(--hp-navy);
  margin: 52px 0 26px;
}

#quest .qp-title span {
  color: var(--hp-navy);
}

#quest .qp-title .qp-q {
  color: var(--hp-orange);
  font-weight: 600;
}

/* ---------- cards: 3 + 2 ---------- */
#quest .qp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

#quest .qp-card {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 22px;
  background: #fff;
  border: 1px solid #ebe5d8;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(14, 42, 71, .05);
  transition: transform .3s ease, box-shadow .3s ease;
}

#quest .qp-card:nth-child(n + 4) {
  grid-column: span 3;
}

#quest .qp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(14, 42, 71, .10);
}

#quest .qp-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

#quest .qp-letter {
  position: static;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  background: var(--hp-orange);
  color: #fff;
  font-family: var(--hp-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

#quest .qp-stage {
  font-family: var(--hp-nav);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b8799;
}

#quest .qp-pill {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fdf0e7;
  color: var(--hp-orange);
  font-family: var(--hp-nav);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

#quest .qp-card h3 {
  font-family: var(--hp-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--hp-navy);
  margin: 6px 0 0;
}

#quest .qp-tag {
  font-family: var(--hp-nav);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--hp-orange);
  margin: 0;
}

#quest .qp-body {
  font-family: var(--hp-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--hp-ink);
  margin: 0;
}

#quest .qp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #ece7dc;
}

#quest .qp-method {
  font-family: var(--hp-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--hp-blue);
  margin: 0;
}

#quest .qp-range {
  font-family: var(--hp-nav);
  font-size: 13px;
  color: var(--hp-orange);
  white-space: nowrap;
}

/* ---------- tablet: two cards per row ---------- */
@media (max-width: 1024px) {
  #quest .qp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #quest .qp-card,
  #quest .qp-card:nth-child(n + 4) {
    grid-column: auto;
  }
  #quest .qp-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 11px);
    justify-self: center;
    width: 100%;
  }
}

/* ---------- phone: one card per row ---------- */
@media (max-width: 640px) {
  #quest .qp-head {
    margin-bottom: 28px;
  }
  #quest .qp-h2 {
    font-size: clamp(32px, 9vw, 40px);
  }
  #quest .qp-h2 .hp-script {
    font-size: 1.05em;
  }
  #quest .qp-lead {
    font-size: 16px;
  }
  #quest .qp-title {
    margin: 40px 0 22px;
  }
  #quest .qp-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  #quest .qp-card,
  #quest .qp-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    width: 100%;
    padding: 22px 20px 20px;
    border-radius: 18px;
  }
  #quest .qp-card h3 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #quest .qp-card {
    transition: none;
  }
  #quest .qp-card:hover {
    transform: none;
  }
}

