/* =============================================================
   Our Team — page-specific styles   (public/css/our-team.css)
   Requires: shared styles.css (nav / footer / tokens / btn-green)
   =============================================================

   TABLE OF CONTENTS
   1. Hero Banner
   2. Team Grid Section
   3. Team Card
   4. Card Hover Colour Effect
   5. Join CTA Section
   6. Scroll Fade-in Animations
   7. Responsive Breakpoints
   ============================================================= */

/* ── 1. HERO BANNER ────────────────────────────────────────── */

.team-hero {
  position: relative;
  width: 100%;
  min-height: 56vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
}

.team-hero__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 80px 60px 80px 110px;
  width: 44%;
  flex-shrink: 0;
}

.team-hero__text h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 65px;
  font-weight: 700;
  line-height: 1.05;
  color: #000;
  margin: 0;
}

.team-hero__text p {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  max-width: 460px;
  margin: 0;
}

.team-hero__image {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.team-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

/* Fade mask: white on left, transparent on right */
.team-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff 38%,
    rgba(255, 255, 255, 0.7) 55%,
    rgba(255, 255, 255, 0) 72%
  );
}

/* ── 2. TEAM GRID SECTION ──────────────────────────────────── */

.team-grid-section {
  background: #fff;
  padding: 120px 0;
}

.team-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 25px;
}

/* ── 3. TEAM CARD ──────────────────────────────────────────── */

.team-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

/* Photo area — square, coloured bg from data-bg */
.team-card__photo {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* force square */
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  /* background-color set inline via style attribute */
  transition: background-color 0.35s ease;
}

.team-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.team-card:hover .team-card__photo img {
  transform: scale(1.04);
}

/* Info panel beneath the photo */
.team-card__info {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-radius: 0 0 20px 20px;
  transition: background-color 0.35s ease;
}

.team-card__info h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin: 0;
}

.team-card__info p {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #444;
  margin: 0;
}

/* ── 4. CARD HOVER COLOUR EFFECT ───────────────────────────── */
/*
  JS reads data-bg on each card and writes --card-hover-bg
  as a lightened pastel of that colour directly onto the card element.
*/
.team-card:hover .team-card__info {
  background-color: var(--card-hover-bg, #f5f5f5);
}

/* ── 5. JOIN CTA SECTION ───────────────────────────────────── */

.team-cta {
  background: #F0FAFB;
  padding: 100px 0;
}

.team-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.team-cta__text h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  margin: 0 0 16px;
}

.team-cta__text p {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
  margin: 0;
  max-width: 520px;
}

.team-cta__action {
  flex-shrink: 0;
}

/* ── 6. SCROLL FADE-IN ANIMATIONS ──────────────────────────── */

.fade-in,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in {
  transform: translateY(24px);
}

.fade-in-left {
  transform: translateX(-32px);
}

.fade-in-right {
  transform: translateX(32px);
}

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: none;
}

/* ── 7. RESPONSIVE BREAKPOINTS ─────────────────────────────── */

@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 40px;
  }

  .team-hero__text {
    padding: 80px 60px;
  }

  .team-hero__text h1 {
    font-size: 52px;
  }
}

@media (max-width: 1024px) {
  .team-hero__text {
    width: 52%;
    padding: 70px 50px 70px 60px;
  }

  .team-hero__text h1 {
    font-size: 48px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 60px;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .team-hero {
    flex-direction: column;
    min-height: auto;
  }

  .team-hero__text {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 50px 20px 40px;
    background: #fff;
  }

  .team-hero__text h1 {
    font-size: 38px;
  }

  .team-hero__image {
    position: relative;
    height: 55vw;
    min-height: 220px;
  }

  .team-hero__fade {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .team-grid-section {
    padding: 80px 0;
  }

  .team-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
    gap: 20px;
  }

  .team-card__photo {
    padding-bottom: 90%;
  }

  .team-cta__inner {
    padding: 0 20px;
  }

  .team-cta__text h2 {
    font-size: 30px;
  }
}