@import url("https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Outfit:wght@300;400;500;600&display=swap");

.team {
  background: #c63f00;
  color: #111;
  overflow: hidden;
}

.team-header {
  display: flex;
  justify-content: flex-end;
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1rem, 2vw, 2rem) clamp(8rem, 14vw, 14rem);
}

.team-header h2 {
  margin: 0;
  font-family: "Alfa Slab One", serif;
  font-size: clamp(3.8rem, 16vw, 11rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: #ececec;
}

.team-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1.2rem);
  padding: 0 clamp(0.75rem, 1.4vw, 1.2rem) clamp(0.8rem, 1.3vw, 1.2rem);
}

.team-member-meta h3 {
  margin: 0 0 0.25rem;
  font-family: "Alfa Slab One", serif;
  font-size: clamp(1rem, 1vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: 2px;
}

.team-member-meta p {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(0.9rem, 1vw, 2rem);
  line-height: 1.35;
  font-weight: 400;
}

.team-member-meta p+p {
  margin-top: 0.2rem;
}

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

.team-mobile-cards {
  display: none;
}

.team-member-photo {
  margin: 0;
  aspect-ratio: 512/760;
}

.team-member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .team-header {
    justify-content: center;
    padding: 3rem 1rem 5rem;
  }

  .team-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1rem;
  }

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

@media (max-width: 640px) {
  .team {
    background: #e5e5e5;
    padding: 0 0.95rem 1.1rem;
  }

  .team-header {
    justify-content: center;
    background: #c63f00;
    margin: 0 -0.95rem;
    padding: 0.9rem 0.7rem 1.7rem;
  }

  .team-header h2 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
    letter-spacing: 0.02em;
  }

  .team-meta,
  .team-gallery {
    display: none;
  }

  .team-mobile-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
    justify-items: stretch;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 0.3rem 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
  }

  .team-mobile-svg-path {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
  }

  .team-mobile-svg-path svg {
    width: 100%;
    height: 100%;
  }

  .team-mobile-card {
    position: relative;
    z-index: 1;
    width: min(92vw, 320px);
    max-width: 320px;
    margin-inline: auto;
    box-sizing: border-box;
    aspect-ratio: 9 / 14.5;
    border-radius: 30px;
    overflow: hidden;
    background: #1d1f24;
    box-shadow: 0 18px 35px rgba(8, 10, 15, 0.34);
    border: 4px solid rgba(255, 255, 255, 0.12);
  }

  .team-mobile-card img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center 15%;
    display: block;
  }

  .team-mobile-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 1rem 1rem 0.95rem;
    color: #fff;
    background: linear-gradient(180deg,
        rgba(8, 10, 14, 0) 8%,
        rgba(8, 10, 14, 0.82) 56%,
        rgba(8, 10, 14, 0.95) 100%);
  }

  .team-mobile-text h3 {
    margin: 0;
    font-family: "Outfit", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.78rem;
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
  }

  .team-mobile-text p {
    margin: 0.35rem 0 0;
    font-family: "Outfit", sans-serif;
    font-size: 0.98rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
  }

  .team-mobile-text p:first-of-type {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
  }

  .verified-badge {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
  }

  .team-mobile-footer {
    margin-top: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .team-mobile-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .team-mobile-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: "Outfit", sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
  }

  .team-mobile-stats svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
  }

  .team-mobile-follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #121212;
    height: 44px;
    min-width: 104px;
    padding: 0 1.15rem;
    text-decoration: none;
    font-family: "Outfit", sans-serif;
    font-size: 1.07rem;
    font-weight: 500;
    cursor: pointer;
  }
}

@media (max-width: 390px) {
  .team-mobile-card {
    width: min(92vw, 294px);
    border-radius: 26px;
  }

  .team-mobile-overlay {
    padding: 0.85rem 0.85rem 0.82rem;
  }

  .team-mobile-text h3 {
    font-size: 1.42rem;
  }

  .team-mobile-text p {
    font-size: 0.88rem;
  }

  .team-mobile-footer {
    margin-top: 0.8rem;
  }

  .team-mobile-follow {
    height: 40px;
    min-width: 95px;
    font-size: 0.98rem;
    padding: 0 0.9rem;
  }

  .team-mobile-stats span {
    font-size: 0.85rem;
  }

  .verified-badge {
    width: 18px;
    height: 18px;
    font-size: 0.73rem;
  }
}