/* Meet the Bloom Team only. Linked from src/pages/meet-the-bloom-team.astro.
   Profiles come from src/data/team.js. Each pairs an arch portrait with a name,
   role and biography; the grid holds two members now and more as the team
   grows. Until an approved portrait is supplied, the arch carries the
   authentic brand flower; no photograph stands in for a team member.

   The arch is 3:4, so a head-and-shoulders portrait keeps space above the
   hair and below the chin, and the curve never reaches the face. */

.team-page a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Header: the heading and introduction on the dark ground of the supplied
   photograph (learning tools and the brand flower on a desk). From 1280px the
   photograph fills the right of the header and its empty left edge fades into
   the same ground; narrower screens show it in full beneath the text. The
   photograph is cropped and resized only. */
.team-intro {
  --team-night: #0d1b29;
  --shell-gap: max(20px, (100vw - 1180px) / 2);
  position: relative;
  overflow: hidden;
  background: var(--team-night);
}

.team-intro__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.75rem, 5vw, 4rem);
}

.team-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.team-kicker::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--coral);
}

.team-intro h1 {
  max-width: 16ch;
  margin-top: 1.25rem;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.team-intro__lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: rgba(250, 246, 239, 0.88);
  font-size: clamp(1.05rem, 1.35vw, 1.18rem);
  line-height: 1.75;
}

.team-intro__media {
  margin: 0;
}

.team-intro__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 32rem;
  object-fit: cover;
  object-position: 50% 50%;
  /* The photograph's dark top edge meets the text above it without a seam. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%);
  mask-image: linear-gradient(180deg, transparent 0, #000 9%);
}

@media (min-width: 1280px) {
  .team-intro {
    display: flex;
    align-items: center;
    min-height: clamp(28rem, 33vw, 36rem);
  }

  .team-intro__inner {
    padding-block: clamp(3.5rem, 5vw, 4.5rem);
  }

  .team-intro__inner > * {
    max-width: 29rem;
  }

  .team-intro__media {
    position: absolute;
    inset: 0 0 0 calc(var(--shell-gap) + 31rem);
  }

  .team-intro__media img {
    height: 100%;
    max-height: none;
    object-position: 30% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%);
  }
}

/* Profiles, on paper beneath the dark header. */
.team-profiles {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(4rem, 8vw, 6.5rem);
  background: var(--paper);
}

.team-profiles__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 6vw, 5.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-profile {
  display: flex;
  flex-direction: column;
}

.team-profile__portrait {
  width: min(100%, 26rem);
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: 13rem 13rem 1.5rem 1.5rem;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.team-profile:nth-child(even) .team-profile__portrait--mark {
  background: var(--navy-soft);
}

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

/* Placeholder: the brand flower in a ringed medallion, as on About Us. */
.team-profile__portrait--mark {
  display: grid;
  place-items: center;
}

.team-profile__medallion {
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(237, 183, 53, 0.6), 0 0 0 0.85rem currentColor, 0 0 0 calc(0.85rem + 1px) rgba(237, 183, 53, 0.6);
  color: var(--navy);
}

.team-profile:nth-child(even) .team-profile__medallion {
  color: var(--navy-soft);
}

.team-profile__portrait--mark .team-profile__medallion img {
  width: 62%;
  height: auto;
  object-fit: contain;
}

.team-profile__copy {
  max-width: 34rem;
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
}

.team-profile__name {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.team-profile__role {
  margin-top: 0.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--coral-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.team-profile__bio p {
  margin-top: 1.1rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.8;
}

.team-profile__link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 0.3em;
}

.team-profile__link:hover {
  color: var(--coral-dark);
}

.team-join {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: var(--sage-pale);
}

.team-join__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  align-items: baseline;
}

.team-join h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 500;
}

.team-join p {
  color: var(--ink);
  font-size: 1.05rem;
}

.team-join__link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 0.3em;
}

@media (max-width: 760px) {
  .team-profile__portrait {
    width: min(100%, 20rem);
  }
}
