/* ════════════════════════════════════════════════════════════════════════
   Home page — templates/pages/home.html
   Loaded on the home page only. Every class is `hp-`, so nothing here can
   reach another page. Colours follow the home page design; the font (Inter)
   and the top bar come from styles.css.
   ════════════════════════════════════════════════════════════════════════ */
.hp {
  --hp-ink: #0D2A3D;
  --hp-text: #3B5568;
  --hp-muted: #5C7887;
  --hp-faint: #8CA0AC;
  --hp-line: #E7ECEF;
  --hp-blue: #1568A8;
  --hp-blue-dark: #0D4D80;
  --hp-blue-soft: #E6F1FA;
  --hp-green: #3FAE49;
  --hp-green-dark: #1E8A4C;
  --hp-green-soft: #E9F6EC;
  --hp-lime: #5DA82E;
  --hp-lime-soft: #EAF7E3;
  --hp-cyan: #2A9AC7;
  --hp-tint: #F6F9F7;
  --hp-on-dark: #B7CBD8;
  background: #FFFFFF;
  color: var(--hp-ink);
}

.hp .container { padding-left: 24px; padding-right: 24px; }

/* The site gives every <section> 4rem padding; each block here sets its own.
   :where() keeps this reset at element weight, so the classes below win. */
:where(.hp) section { padding: 0; }

.hp h1, .hp h2, .hp h3 { color: var(--hp-ink); letter-spacing: -0.02em; }

/* ── Shared pieces ─────────────────────────────────────────────────────── */
.hp-h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}
.hp-lede { font-size: 1rem; line-height: 1.6; color: var(--hp-muted); margin: 0; }
.hp-center { text-align: center; }

.hp-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hp-blue);
}
.hp-eyebrow--lime { color: #7BC142; }

.hp-pill {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #E7F5EB;
  color: var(--hp-green-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.hp-btn--lg { padding: 14px 28px; font-size: 1rem; }
.hp-btn--primary { background: var(--hp-blue); color: #FFFFFF; }
.hp-btn--primary:hover { background: var(--hp-blue-dark); color: #FFFFFF; }
.hp-btn--outline { background: #FFFFFF; color: var(--hp-blue); border-color: #C9DEEC; }
.hp-btn--outline:hover { border-color: var(--hp-blue); color: var(--hp-blue-dark); }
.hp-btn--green { background: var(--hp-green); color: #FFFFFF; }
.hp-btn--green:hover { background: var(--hp-green-dark); color: #FFFFFF; }
.hp-btn:focus-visible,
.hp-search__tab:focus-visible,
.hp-card:focus-visible {
  outline: 3px solid rgba(21, 104, 168, 0.35);
  outline-offset: 2px;
}

.hp-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hp-actions--center { justify-content: center; }

.hp-section { padding: 72px 0; }
.hp-section--flush-top { padding-top: 0; }
.hp-band { padding: 80px 0; }
.hp-band--tint { background: var(--hp-tint); }
.hp-band--dark { background: var(--hp-ink); }
.hp-band--dark .hp-h2 { color: #FFFFFF; }
.hp-band--dark .hp-lede { color: var(--hp-on-dark); margin-bottom: 28px; max-width: 480px; }

.hp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.hp-more { font-weight: 700; font-size: 0.95rem; color: var(--hp-blue); white-space: nowrap; }
.hp-more:hover { color: var(--hp-blue-dark); }

.hp-intro { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.hp-intro .hp-h2 { margin-bottom: 12px; }

/* ── Photo spots (pages/_home_photo.html) ──────────────────────────────── */
.hp-photo { width: 100%; border-radius: 16px; overflow: hidden; }
.hp-photo--landscape { aspect-ratio: 4 / 3; }
.hp-photo--square { aspect-ratio: 1 / 1; }
.hp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-photo__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 78% 22%, rgba(63, 174, 73, 0.18), transparent 45%),
    radial-gradient(circle at 18% 82%, rgba(21, 104, 168, 0.16), transparent 50%),
    linear-gradient(135deg, var(--hp-blue-soft) 0%, var(--hp-green-soft) 100%);
}
.hp-photo__placeholder i { font-size: clamp(3rem, 7vw, 5rem); color: rgba(21, 104, 168, 0.28); }
.hp-photo--dark .hp-photo__placeholder {
  background:
    radial-gradient(circle at 78% 22%, rgba(123, 193, 66, 0.22), transparent 45%),
    radial-gradient(circle at 18% 82%, rgba(42, 154, 199, 0.22), transparent 50%),
    linear-gradient(135deg, #12364E 0%, #163F38 100%);
}
.hp-photo--dark .hp-photo__placeholder i { color: rgba(255, 255, 255, 0.22); }

/* ── Search banner ─────────────────────────────────────────────────────── */
.hp-search {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #0D2A3D 0%, #12364E 100%);
}
.hp-search__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Keeps the tabs and the box readable over any photo. */
.hp-search::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 42, 61, 0.94) 0%, rgba(13, 42, 61, 0.8) 60%, rgba(13, 42, 61, 0.55) 100%);
  pointer-events: none;
}
.hp-search__inner { position: relative; z-index: 1; padding-top: 28px; padding-bottom: 28px; }
.hp-search__form { max-width: 920px; margin: 0 auto; }
.hp-search__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hp-search__tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--hp-on-dark);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.hp-search__tab:hover { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }
.hp-search__tab.is-active { background: var(--hp-green); color: #FFFFFF; }
.hp-search__row { display: flex; gap: 12px; }
.hp-search__box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 16px;
  border-radius: 8px;
  background: #FFFFFF;
}
.hp-search__box i { color: var(--hp-faint); }
.hp-search__box input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--hp-ink);
}
.hp-search__box:focus-within { box-shadow: 0 0 0 3px rgba(63, 174, 73, 0.45); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hp-hero { background: linear-gradient(180deg, #F4FAF7 0%, #FFFFFF 100%); }
.hp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 64px;
}
.hp-hero__title {
  font-size: clamp(2.1rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.hp-hero__lede {
  max-width: 540px;
  margin: 0 0 32px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #4B6373;
}
.hp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.hp-stats strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--hp-ink); line-height: 1.2; }
.hp-stats span { font-size: 0.82rem; color: #6B8494; }

/* ── Course / internship cards ─────────────────────────────────────────── */
.hp-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.hp-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  background: #FFFFFF;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hp-card:hover { color: inherit; box-shadow: 0 10px 28px rgba(13, 42, 61, 0.1); transform: translateY(-2px); }
.hp-card__media {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--hp-blue-soft) 0%, var(--hp-green-soft) 100%);
}
.hp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-card__icon { font-size: 2rem; color: rgba(21, 104, 168, 0.45); }
.hp-card__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hp-card__tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hp-tone-1 { color: var(--hp-green-dark); }
.hp-tone-2 { color: var(--hp-blue); }
.hp-tone-3 { color: var(--hp-lime); }
.hp-tone-4 { color: var(--hp-cyan); }
.hp-card__title { font-size: 0.95rem; font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: 0; }
.hp-card__meta { font-size: 0.82rem; color: var(--hp-faint); }

/* ── Who it's for ──────────────────────────────────────────────────────── */
.hp-audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.hp-audience__card { border: 1px solid var(--hp-line); border-radius: 12px; padding: 32px 28px; }
.hp-audience__card h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.hp-audience__card p { font-size: 0.95rem; line-height: 1.55; color: var(--hp-muted); margin: 0; }
.hp-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.2rem;
}
.hp-icon--blue { background: var(--hp-blue-soft); color: var(--hp-blue); }
.hp-icon--green { background: var(--hp-green-soft); color: var(--hp-green-dark); }
.hp-icon--lime { background: var(--hp-lime-soft); color: var(--hp-lime); }

/* ── Why CodeMetrix ────────────────────────────────────────────────────── */
.hp-why {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: center;
}
.hp-why .hp-h2 { margin-bottom: 16px; }
.hp-why__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-why__list li { display: flex; gap: 12px; align-items: flex-start; }
.hp-why__list i { color: var(--hp-green-dark); margin-top: 4px; }
.hp-why__list strong { display: block; font-size: 0.95rem; color: var(--hp-ink); margin-bottom: 2px; }
.hp-why__list span { display: block; font-size: 0.875rem; line-height: 1.5; color: var(--hp-muted); }

/* ── How it works ──────────────────────────────────────────────────────── */
.hp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.hp-steps h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; letter-spacing: 0; }
.hp-steps p { font-size: 0.875rem; line-height: 1.5; color: var(--hp-muted); margin: 0; }
.hp-steps__num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #FFFFFF;
  font-weight: 700;
}
.hp-steps__num--1 { background: var(--hp-blue); }
.hp-steps__num--2 { background: var(--hp-cyan); }
.hp-steps__num--3 { background: #2FA36B; }
.hp-steps__num--4 { background: var(--hp-lime); }

/* ── Mentor + internship splits ────────────────────────────────────────── */
.hp-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hp-split--media-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.hp-split .hp-h2 { margin-bottom: 16px; }
.hp-split .hp-lede { margin-bottom: 28px; max-width: 480px; }

/* ── Testimonials ──────────────────────────────────────────────────────── */
/* Centred, so one or two testimonials don't hug the left edge. */
.hp-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 380px));
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}
.hp-quote { margin: 0; padding: 28px; border: 1px solid var(--hp-line); border-radius: 12px; background: #FFFFFF; }
.hp-quote blockquote { margin: 0 0 20px; font-size: 0.95rem; line-height: 1.6; color: var(--hp-text); }
.hp-quote strong { display: block; font-size: 0.875rem; color: var(--hp-ink); }
.hp-quote span { display: block; font-size: 0.82rem; color: var(--hp-faint); }

/* ── Closing call to action ────────────────────────────────────────────── */
.hp-cta { padding: 72px 0; }
.hp-cta__inner { max-width: 1000px; text-align: center; }
.hp-cta .hp-h2 { margin-bottom: 14px; }
.hp-cta .hp-h2 em { font-style: normal; color: var(--hp-green-dark); }
.hp-cta .hp-lede { margin-bottom: 30px; }

/* ── Tablet ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-hero__grid,
  .hp-why,
  .hp-split,
  .hp-split--media-first { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hp-hero__grid { padding-top: 48px; padding-bottom: 48px; }
  .hp-hero .hp-photo,
  .hp-split .hp-photo { max-width: 640px; }
  .hp-split--media-first .hp-photo { max-width: 420px; }
}

/* ── Phone ─────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .hp .container { padding-left: 16px; padding-right: 16px; }
  .hp-section { padding: 48px 0; }
  .hp-section--flush-top { padding-top: 0; }
  .hp-band, .hp-cta { padding: 56px 0; }
  .hp-search__inner { padding-top: 20px; padding-bottom: 20px; }
  .hp-search__row { flex-direction: column; }
  .hp-search__row .hp-btn { width: 100%; }
  .hp-cards,
  .hp-audience,
  .hp-why__list,
  .hp-steps,
  .hp-quotes { grid-template-columns: minmax(0, 1fr); }
  .hp-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 24px; }
  .hp-actions .hp-btn { flex: 1 1 100%; }
  .hp-hero__lede { font-size: 1rem; }
  .hp-pill { font-size: 0.72rem; letter-spacing: 0.02em; }
  .hp-stats { gap: 16px 28px; }
  .hp-audience__card { padding: 24px 20px; }
}
