:root {
  --team-bg: #f7f9ff;
  --team-ink: #121728;
  --team-muted: #5e6579;
  --team-accent: #2a6cff;
  --team-card: #ffffff;
  --team-shadow: 0 20px 55px rgba(20, 33, 81, 0.13);
  --team-radius: 22px;
  --team-border: rgba(255, 255, 255, 0.35);
}

body[data-page="team"] {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% 5%, rgba(42, 108, 255, 0.16), transparent 36%),
    radial-gradient(circle at 12% 32%, rgba(38, 195, 175, 0.12), transparent 34%),
    var(--team-bg);
  color: var(--team-ink);
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Decorative background shapes anchored in the document */
.team-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.team-bg-shape {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0.85;
}

.team-bg-shape--left-top {
  width: 500px;
  height: 500px;
  top: 780px;
  left: -400px;
  background: radial-gradient(circle at 35% 35%, #3a8bff 0%, #1d50b0 65%, #123c84 100%);
  /* box-shadow: 0 20px 60px rgba(29, 80, 176, 0.35); */
}

.team-bg-shape--right-mid {
  width: 800px;
  height: 800px;
  top: 1500px;
  right: -650px;
  background: radial-gradient(circle at 65% 35%, #2e7eed 0%, #0367c6 60%, #044b84 100%);
  /* box-shadow: 0 24px 70px rgba(3, 103, 198, 0.35); */
}

.team-bg-shape--left-bottom {
  width: 1200px;
  height: 1200px;
  top: 2100px;
  left: -1000px;
  background: radial-gradient(circle at 40% 40%, #4d9bff 0%, #2e7eed 60%, #1d50b0 100%);
  box-shadow: 0 18px 50px rgba(46, 126, 237, 0.3);
}

/* Keep page content above the decorative shapes */
body[data-page="team"] > nav,
body[data-page="team"] > section,
body[data-page="team"] > footer,
body[data-page="team"] > .scroll-top-to,
body[data-page="team"] > .cookie-banner {
  position: relative;
  z-index: 1;
}

body[data-page="team"] > nav {
  z-index: 1000;
}

.team-hero {
  padding: 0 0 34px 0;
}

.team-hero-media {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 640px;
  border-radius: 0;
  overflow: hidden;
  background: #0f162f url("/images/team/equipe2.jpg") center center / cover no-repeat;
}

.team-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 56px 44px 24px;
  padding: 30px 34px;
  color: #f7f9ff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.team-hero-content::after {
  content: "";
  position: absolute;
  left: 8px;
  right: -90px;
  top: 34px;
  bottom: 26px;
  z-index: -1;
  background: linear-gradient(110deg, rgba(8, 13, 28, 0.75) 0%, rgba(8, 13, 28, 0.36) 5%, rgba(8, 13, 28, 0) 100%);
  filter: blur(14px);
  border-radius: 20px;
  pointer-events: none;
}

.team-hero h1 {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.08;
  color: #ffffff;
}

.team-hero p {
  margin: 0;
  max-width: 620px;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.66;
  color: rgba(246, 249, 255, 0.96);
}

.team-section {
  padding: 44px 0 24px;
}

.team-section-header {
  margin-bottom: 26px;
}

.team-section-header h2 {
  margin-bottom: 8px;
  color: var(--team-ink);
  font-family: "Fraunces", serif;
  font-size: clamp(1.58rem, 2.8vw, 2.2rem);
  letter-spacing: 0.01em;
}

.team-section-header p {
  margin-bottom: 0;
  color: var(--team-muted);
  font-size: 1rem;
}

.founders-grid {
  display: grid;
  gap: 70px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.founder-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--team-radius);
  /* border: 1px solid rgba(31, 61, 155, 0.08); */
  /* background: rgba(255, 255, 255, 0.88); */
  /* box-shadow: 0 16px 34px rgba(21, 40, 95, 0.08); */
  overflow: visible;
  
}

.founder-card:hover {
  transform: translateY(-8px);
}

.member-photo {
  position: relative;
  background: var(--photo, linear-gradient(145deg, #253a70 0%, #4d6fb3 100%)) center center / cover no-repeat;
  overflow: hidden;
}

.member-photo::after {
  content: none;
}

.member-photo--founder {
  flex-shrink: 0;
  aspect-ratio: 1 / 1.1;
  border-radius: var(--team-radius) var(--team-radius) 14px 14px;
  z-index: 1;
}

.member-photo--employee {
  aspect-ratio: 0.88 / 1;
  border-radius: inherit;
  filter: grayscale(1) contrast(1.03) brightness(0.9);
  transition: filter 340ms ease, transform 340ms ease;
}

.founder-content {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: stretch;
  margin: -22px 10px 0;
  padding: 22px 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: white;
  /*background:
    radial-gradient(ellipse 115% 95% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 58%),
    radial-gradient(ellipse 140% 120% at 50% 120%, rgba(18, 28, 54, 0.12), transparent 52%),
    radial-gradient(ellipse 95% 85% at 50% 45%, rgba(248, 250, 255, 0.97), rgba(228, 234, 248, 0.94) 72%, rgba(198, 210, 236, 0.96) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(236, 241, 252, 0.55) 100%);
  background-color: rgba(252, 253, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 -8px 28px rgba(15, 30, 78, 0.08),
    0 14px 34px rgba(17, 34, 90, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);*/
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.founder-content:hover {
  transform: translateY(-8px);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.founder-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  /* box-shadow: inset 0 0 48px rgba(15, 24, 48, 0.08); */
}

.founder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.founder-content h3 {
  margin-bottom: 0;
  color: #182036;
  font-size: 1.02rem;
  font-weight: 700;
}

.founder-role {
  margin-bottom: 0;
  color: #37496f;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.45;
}

.linkedin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #111111;
  font-size: 20px;
  text-decoration: none;
  background: transparent;
  transition: transform 180ms ease, opacity 180ms ease;
}

.linkedin-btn:hover {
  transform: translateY(-1px);
  color: #111111;
  opacity: 0.72;
}

.employees-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  overflow: visible;
}

.employee-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(15, 30, 78, 0.13);
  position: relative;
  z-index: 1;
  transform: translateY(0);
  transition: transform 240ms ease, box-shadow 240ms ease, z-index 0s linear 60ms;
  /* background: #101423; */
}

.employee-card:hover,
.employee-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px rgba(16, 30, 70, 0.2);
  z-index: 26;
  transition-delay: 0s;
  overflow: visible;
}

.employee-card.plumy-host {
  z-index: 26;
  transition-delay: 0s;
}

.employee-card:hover .member-photo--employee,
.employee-card:focus-within .member-photo--employee {
  filter: grayscale(0) contrast(1.05) brightness(1.02);
  transform: scale(1.03);
}

.employee-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  padding: 12px 14px;
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(242, 245, 252, 0.28), rgba(242, 245, 252, 0.15));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(3, 6, 17, 0.3);
  transition: padding 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.employee-label h4 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: #ffffff;
}

.employee-label p {
  margin: 3px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(245, 248, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 180ms ease;
}

.employee-card:hover .employee-label,
.employee-card:focus-within .employee-label {
  padding: 14px 16px 15px;
  background: linear-gradient(120deg, rgba(18, 24, 42, 0.72), rgba(18, 24, 42, 0.55));
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 14px 36px rgba(3, 6, 17, 0.45);
}

.employee-card:hover .employee-label p,
.employee-card:focus-within .employee-label p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.plumy-peek {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(100px, 10vw, 148px);
  height: auto;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(22px, 14px, 0) rotate(-8deg) scale(0.9);
  transform-origin: 25% 50%;
  filter: drop-shadow(0 12px 18px rgba(7, 19, 50, 0.28));
  will-change: transform, opacity;
  transition: transform 220ms cubic-bezier(0.2, 0.72, 0.18, 1.04), opacity 90ms linear 130ms;
}

.plumy-peek.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(-30deg) scale(1);
  transition: transform 220ms cubic-bezier(0.2, 0.72, 0.18, 1.04), opacity 70ms linear 0ms;
}

.team-footnote {
  margin-top: 16px;
  color: #66708a;
  font-size: 0.88rem;
  font-style: italic;
}

.mascot-wrap {
  padding: 28px 0 52px;
}

.mascot-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 20px;
  /* background: rgba(255, 255, 255, 0.86); */
  /* border: 1px solid rgba(34, 65, 150, 0.1); */
  /* box-shadow: 0 24px 48px rgba(17, 33, 84, 0.14); */
  text-align: center;
}

.mascot-art {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(42, 108, 255, 0.33), transparent 45%),
    radial-gradient(circle at 84% 88%, rgba(65, 220, 188, 0.32), transparent 52%),
    linear-gradient(145deg, #111831 0%, #24315b 100%);
}

.mascot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.mascot-fallback {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  display: none;
  place-items: center;
  font-size: 64px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(7px);
}

.mascot-title {
  margin: 16px 0 6px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  color: #171f39;
}

.mascot-subtitle {
  margin: 0;
  color: #5a647e;
  font-size: 0.95rem;
}

@media (max-width: 1599px) {
  .founders-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .founders-grid .founder-card:nth-child(-n+2) {
    grid-column: span 3;
  }

  .founders-grid .founder-card:nth-child(n+3) {
    grid-column: span 2;
  }
}

@media (max-width: 991.98px) {
  .team-hero-content {
    max-width: 680px;
    margin: 0 28px 30px 20px;
    padding: 24px 26px;
  }

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

  .employees-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/*
.team-bg-shape--left-top {
  width: 500px;
  height: 500px;
  top: 780px;
  left: -400px;
  background: radial-gradient(circle at 35% 35%, #3a8bff 0%, #1d50b0 65%, #123c84 100%);

*/

@media (max-width: 991.98px) {
  .team-bg-shape--left-top {
    width: 500px;
    height: 500px;
    top: 780px;
    left: -400px;
  }

  .team-bg-shape--right-mid {
    width: 400px;
    height: 400px;
    top: 1700px;
    right: -340px;
  }

  .team-bg-shape--left-bottom {
    width: 1500px;
    height: 1500px;
    top: 2500px;
    left: -1000px;
  }
}

@media (max-width: 767.98px) {
  .team-bg-shape--left-top {
    width: 400px;
    height: 400px;
    top: 800px;
    left: -340px;
  }

  .team-bg-shape--right-mid {
    width: 400px;
    height: 400px;
    top: 1500px;
    right: -350px;
  }

  .team-bg-shape--left-bottom {
    width: 1500px;
    height: 1500px;
    top: 3900px;
    left: -1200px;
  }

  .team-hero-media {
    min-height: 460px;
  }

  .team-hero-content {
    margin: 0 14px 16px;
    padding: 18px 18px 16px;
  }

  .team-hero-content::after {
    left: 4px;
    right: -24px;
    top: 18px;
    bottom: 14px;
    filter: blur(10px);
  }

  .founders-grid {
    grid-template-columns: 1fr;
  }

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

  .mascot-art {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .founder-card,
  .founder-card:hover {
    transform: none;
    transition: none;
  }

  .plumy-peek {
    transition: opacity 160ms ease;
    transform: none;
  }

  .plumy-peek.is-visible {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .team-hero-media {
    animation: teamHeroEnter 650ms ease-out both;
  }

  @keyframes teamHeroEnter {
    from {
      opacity: 0;
      transform: translateY(16px) scale(0.99);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
