/* ─────────────────────────────────────────────────────────────────────────
 * clever-prep-team.css
 * /team/ page — hero + Bricks query-loop grids for Leadership & Tutors,
 * using the duotone halftone photo treatment from cp-r-duotone-frame.
 * ───────────────────────────────────────────────────────────────────────── */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.cp-team-hero {
  position: relative;
  background: var(--cp-cream-bg, #F7F4ED);
  padding: clamp(96px, 14vw, 160px) clamp(20px, 5vw, 64px) clamp(48px, 7vw, 80px);
  text-align: center;
  overflow: hidden;
}
.cp-team-hero__inner {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.cp-team-hero__eyebrow { opacity: 0.65; }
.cp-team-hero__title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--cp-text-headline, #28354A);
  margin: 0;
  animation: cp-team-reveal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}
@keyframes cp-team-reveal {
  from { opacity: 0; filter: blur(20px); }
  to   { opacity: 1; filter: blur(0); }
}
.cp-team-hero__body {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
  color: var(--cp-text-secondary, #4a5568);
  margin: 0;
  max-width: 560px;
}

/* ── Listing sections (query loop) ────────────────────────────────────── */
.cp-team-listing {
  background: var(--cp-cream-bg, #F7F4ED);
  padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 64px);
}
.cp-team-listing--leadership { padding-bottom: 0; }
.cp-team-listing--tutor {
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(72px, 10vw, 120px);
}
.cp-team-listing__inner { max-width: 1200px; margin: 0 auto; }

/* Breathing room between the Leadership and Tutors sections */
.cp-team__group + .cp-team__group { margin-top: clamp(64px, 9vw, 120px); }

/* Group headers */
.cp-team__group-head {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid rgba(40, 53, 74, 0.10);
  padding-bottom: 18px;
}
.cp-team__group-eyebrow { opacity: 0.6; }
.cp-team__group-title {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cp-text-headline, #28354A);
  margin: 0;
}

/* ── Grid layouts ─────────────────────────────────────────────────────── */
.cp-team__grid {
  display: grid !important;
  gap: clamp(20px, 3vw, 36px);
}
/* Leadership → 3 across */
.cp-team__grid--leadership {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
/* Tutors → tighter, 3-4 across with score badge */
.cp-team__grid--tutors {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.cp-team__card {
  background: transparent;
  border-radius: 18px;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cp-team__card:hover {
  transform: translateY(-4px);
}
.cp-team__card--leadership { gap: 10px; }

/* Leadership: hide bio, specialties, education */
.cp-team__card--leadership .cp-team__bio,
.cp-team__card--leadership .cp-team__specialties,
.cp-team__card--leadership .cp-team__education { display: none; }

/* Tighten name → position gap */
.cp-team__name { margin-bottom: -6px; }

/* ── Photo with duotone halftone ──────────────────────────────────────── */
.cp-team__photo {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--cp-about-navy-dark, #131A26);
}
.cp-team__photo-img,
.cp-team__photo img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

/* ── Typography ───────────────────────────────────────────────────────── */
.cp-team__name {
  font-family: var(--cp-font-heading, Georgia, serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.1;
  color: var(--cp-text-headline, #28354A);
  margin: 0;
}
.cp-team__position {
  font-family: var(--cp-font-body, system-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--cp-text-secondary, #4a5568);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cp-team__bio {
  font-size: 15px;
  line-height: 1.55;
  color: var(--cp-text-secondary, #4a5568);
  margin-top: 4px;
}
.cp-team__bio p { margin: 0 0 10px; }
.cp-team__bio p:last-child { margin-bottom: 0; }

.cp-team__specialties {
  font-family: var(--cp-font-mono, ui-monospace);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cp-text-secondary, #4a5568);
  opacity: 0.7;
  margin: 0;
}
/* Hide specialties if empty (dynamic data renders empty string) */
.cp-team__specialties:empty { display: none; }

.cp-team__education {
  font-size: 14px;
  line-height: 1.5;
  color: var(--cp-text-secondary, #4a5568);
  opacity: 0.8;
  white-space: pre-line;
  margin: 0;
}
.cp-team__education:empty { display: none; }

/* ── Percentile badge — over the photo for tutors ────────────────────── */
.cp-team__card--tutor { position: relative; }
.cp-team__score {
  position: absolute;
  top: clamp(14px, 2vw, 22px);
  left: clamp(14px, 2vw, 22px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: var(--cp-font-mono, ui-monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.cp-team__score::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cp-orange, #ED863C);
  flex-shrink: 0;
}
.cp-team__score:empty { display: none; }

/* Empty-state safety */
.cp-team__grid:empty { display: none; }

/* ── Final CTA ────────────────────────────────────────────────────────── */
.cp-team-final-cta {
  --cp-r-dot-color: #ffffff;
  --cp-r-dot-size: 22px;
  --cp-r-dot-opacity: 0.32;
  max-width: 1120px;
  margin: clamp(48px, 8vw, 96px) auto;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .cp-team-hero__title { animation: none; opacity: 1; filter: none; }
}
