/* ==========================================================================
   Admission Process (admissions.html, #process only).
   Top: copy on the left, the counsellor photo in a framed card on the right.
   Bottom: five step cards on a timeline. The third step is highlighted, as in
   the design. Buttons are index.html's pill styles (set in the markup).
   ========================================================================== */

#process.ap-sec {
  position: relative;
  background: #f9f7f2;
  overflow-x: clip;
}

#process .ap-wrap {
  width: min(1240px, calc(100% - (var(--hp-gutter) * 2)));
  margin: 0 auto;
}

/* ---------- top: copy and photo ---------- */
#process .ap-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-bottom: clamp(48px, 6vw, 72px);
}

#process .ap-copy {
  position: relative;
}

#process .ap-head {
  text-align: left;
  max-width: none;
  margin: 0;
}

#process .ap-head .kicker {
  display: inline-block;
  font-family: var(--hp-nav);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hp-orange);
  margin-bottom: 16px;
}

#process .ap-head .kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1.5px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--hp-orange);
}

#process .ap-head .h2 {
  font-family: var(--hp-serif);
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--hp-navy);
  margin: 0;
  text-wrap: balance;
}

#process .ap-head .hp-script {
  font-size: 1.05em;
  letter-spacing: 0;
  white-space: normal;
}

#process .ap-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--hp-ink);
  max-width: 520px;
  margin: 18px 0 0;
}

#process .ap-btns {
  margin-top: 28px;
  gap: 14px;
}

/* the mascot is kept, placed at the top right of the copy column */
#process .ap-copy .tiger-pal {
  position: absolute;
  top: -70px;
  right: -64px;
  left: auto;
  bottom: auto;
  width: clamp(96px, 9vw, 120px);
  z-index: 2;
}

#process .ap-copy .tiger-pal .bubble {
  left: auto;
  right: 60%;
  bottom: 92%;
}

/* photo card */
#process .ap-media {
  position: relative;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

#process .ap-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 18px;
}

/* ---------- timeline of steps ---------- */
#process .ap-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

#process .ap-step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 26px 22px 20px;
  background: #fff;
  border: 1px solid #e7e2d6;
  border-radius: 20px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .3s ease;
}

#process .ap-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(14, 42, 71, .08);
}

/* on hover a line draws across the top of the card */
#process .ap-step::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: -1px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--hp-orange), var(--hp-blue));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

#process .ap-step:hover::after {
  transform: scaleX(1);
}

/* number badge */
#process .ap-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hp-blue);
  color: #fff;
  font-family: var(--hp-nav);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

#process .ap-step h3 {
  font-family: var(--hp-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--hp-navy);
  margin: 0 0 10px;
}

#process .ap-step p {
  font-family: var(--hp-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--hp-ink);
  margin: 0;
}

#process .ap-label {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eee9de;
  font-family: var(--hp-nav);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hp-orange);
}

/* ---------- tablet: photo under copy, steps in two columns ---------- */
@media (max-width: 1024px) {
  #process .ap-top {
    grid-template-columns: minmax(0, 1fr);
  }
  #process .ap-copy .tiger-pal {
    top: -60px;
  }
  #process .ap-media {
    max-width: 640px;
    width: 100%;
    justify-self: center;
  }
  #process .ap-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }
  #process .ap-step {
    min-height: 0;
  }
}

/* ---------- phone: one column, timeline on the left ---------- */
@media (max-width: 640px) {
  #process .ap-top {
    gap: 28px;
    margin-bottom: 40px;
  }
  #process .ap-head .h2 {
    font-size: clamp(30px, 8.8vw, 38px);
  }
  #process .ap-head .hp-script {
    font-size: 1.05em;
  }
  #process .ap-lead {
    font-size: 16px;
  }
  #process .ap-copy .tiger-pal {
    position: relative;
    top: auto;
    right: auto;
    width: 84px;
    margin: 0 0 10px auto;
  }
  #process .ap-copy .tiger-pal .bubble {
    display: none;
  }
  #process .ap-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  #process .ap-btns .hp-pill {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    font-size: 16px;
    justify-content: center;
  }
  #process .ap-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  #process .ap-step {
    padding: 20px 18px 16px;
    border-radius: 18px;
  }
  #process .ap-num {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
  }
  #process .ap-step h3 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #process .ap-step {
    transition: none;
  }
  #process .ap-step:hover {
    transform: none;
  }
}
