/* About and Team share the warm paper, chalk and terracotta of the site's identity. */
.bambu-partnership {
  display: grid;
  align-content: center;
  min-width: 0;
  margin: clamp(.6rem, 2vw, 1.75rem);
  padding: clamp(2rem, 4.5vw, 4rem);
  border: 1px solid #d9c5ad;
  border-radius: clamp(2.5rem, 6vw, 6rem) 1rem clamp(2rem, 5vw, 5rem) 1.5rem;
  background: radial-gradient(ellipse at 95% 0%, #ebd9c4, transparent 65%), #f3eade;
  color: #272824;
}

.bambu-partnership h3 {
  margin: 0 0 1rem;
  color: #8c402d;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.12;
}

.bambu-partnership p { max-width: 49ch; color: inherit; }
.bambu-partnership p:last-child { margin-bottom: 0; }

#main.team-page {
  --team-ink: #272824;
  --team-paper: #f6f1e8;
  --team-rust: #93442f;
  --team-green: #315647;
  width: min(100%, 95rem);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  color: var(--team-ink);
  background: var(--team-paper);
}

#main.team-page .team-opening {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(1rem, 5vw, 6rem);
  /* The shared mobile first-section style uses a viewport-height minimum. */
  min-height: 0 !important;
  margin: 0;
  padding: clamp(3rem, 6vw, 6.2rem) var(--bambu-content-gutter, 5vw) clamp(2.6rem, 5vw, 5rem);
  overflow: hidden;
  background: radial-gradient(ellipse at 100% 8%, #e9dac5 0%, transparent 57%), var(--team-paper);
}

.team-opening-copy { position: relative; z-index: 1; }
.team-opening .kicker { margin: 0 0 .65rem; color: var(--team-rust); }

#main.team-page .team-opening h1 {
  margin: 0 0 1.1rem;
  color: var(--team-ink);
  font-size: clamp(3.25rem, 7.3vw, 7.1rem);
  line-height: .97;
  letter-spacing: -.065em;
}

.team-opening h1 em {
  color: var(--team-rust);
  font-style: normal;
}

.team-opening-copy > p:not(.kicker) {
  max-width: 37ch;
  margin: 0;
  color: #444139;
  font-size: clamp(1rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

.team-opening .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .55rem;
  color: var(--team-ink);
}

.team-opening-study {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.55;
  transform: rotate(-4deg);
}

.team-opening-study::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 4%;
  border: 1px solid #b18d68;
  border-radius: 42% 18% 43% 17% / 31% 27% 42% 47%;
  background: #eadbc7;
  content: "";
  transform: rotate(9deg);
}

.team-opening-study img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 36% 19% 37% 12% / 26% 31% 38% 43%;
  mix-blend-mode: multiply;
}

#main.team-page .team-section {
  min-height: 0;
  margin: 0;
  padding: clamp(2rem, 4.5vw, 5rem) var(--bambu-content-gutter, 5vw);
  border-top: 1px solid #d9cbb8;
  scroll-margin-top: 5rem;
}

#main.team-page .team-section:last-child {
  border-radius: clamp(1.8rem, 5vw, 5rem) 0 0 0;
  background: #eee5d6;
}

.team-section > h2 {
  margin: 0 0 clamp(1rem, 2.4vw, 2.25rem);
  color: var(--team-ink);
  font-size: clamp(1.8rem, 4.1vw, 3.65rem);
  line-height: 1.08;
  letter-spacing: -.054em;
}

.team-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 4.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.team-card {
  --card-surface: #e8deca;
  --card-radius: 14% 31% 18% 13% / 15% 23% 22% 16%;
  min-width: 0;
  align-self: start;
}

.team-card--nico { --card-surface: #d5e2d8; --card-radius: 29% 13% 12% 22% / 22% 16% 15% 23%; }
.team-card--glen { --card-surface: #cbd5d9; --card-radius: 25% 15% 12% 22% / 35% 19% 22% 24%; }
.team-card--roberto { --card-surface: #ebcfc5; --card-radius: 14% 26% 24% 12% / 19% 32% 23% 22%; }
.team-card--fiaz { --card-surface: #ddc9a9; }
.team-card--consultant { --card-surface: #e3ded2; --card-radius: 28% 15% 24% 13% / 23% 22% 29% 17%; }
.team-card--designer { --card-surface: #bed1c8; --card-radius: 14% 29% 18% 20% / 25% 24% 17% 21%; }

.team-detail { margin: 0; background: none; }
.team-detail > summary { display: block; cursor: pointer; list-style: none; }
.team-detail > summary::-webkit-details-marker { display: none; }

.team-detail > summary:focus-visible {
  outline: 2px solid var(--team-green);
  outline-offset: 5px;
  border-radius: .5rem;
}

.team-card-media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 2;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--card-radius);
  background: radial-gradient(ellipse at 28% 20%, #fffaf26e, transparent 72%), var(--card-surface);
}

.team-card-media:not(.team-card-media--portrait)::after {
  position: absolute;
  inset: 10% 7%;
  border: 1px solid #695e4930;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  transform: rotate(-7deg);
}

.team-profile .team-card-media { aspect-ratio: 1; }

.team-card-media img {
  display: block;
  width: min(56%, 14rem);
  height: auto;
  max-height: 76%;
  object-fit: contain;
}

.team-card-media--portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.team-card-title {
  position: relative;
  display: grid;
  gap: .28rem;
  padding: clamp(.82rem, 2vw, 1.45rem) .25rem .6rem;
}

.team-detail .team-card-title { padding-right: 3.2rem; }

.team-detail .team-card-title::after {
  position: absolute;
  top: clamp(.82rem, 2vw, 1.45rem);
  right: .2rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #8e7961;
  border-radius: 50%;
  color: var(--team-ink);
  font-size: 1.25rem;
  line-height: 1;
  content: "+";
  content: "+" / "";
}

.team-detail[open] .team-card-title::after {
  border-color: var(--team-green);
  background: var(--team-green);
  color: #fffaf2;
  content: "−";
  content: "−" / "";
}

.team-person-name {
  color: var(--team-ink);
  font-size: clamp(1.35rem, 2.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.04em;
}

.team-person-role { color: #694536; font-weight: 650; }

#main.team-page .team-role-description {
  max-width: 54ch;
  margin: .3rem 0 0;
  padding: .9rem 1.04rem 1rem;
  border-radius: .45rem 1.45rem .65rem .6rem;
  background: var(--team-green);
  color: #fffaf2;
  line-height: 1.55;
}

#main.team-page .team-partner-note { margin: -.55rem 0 1.5rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .team-card-media img { transition: transform .34s cubic-bezier(.2,.7,.2,1); }
  .team-card:hover .team-card-media img,
  .team-detail > summary:focus-visible .team-card-media img { transform: scale(1.045); }
  /* Retain the full portrait framing even while the card responds. */
  .team-card--ed:hover img { transform: scale(1.015); }
}

@media (prefers-reduced-motion: no-preference) {
  .team-detail[open] .team-role-description { animation: bambu-role-appear .18s ease-out; }
}

@keyframes bambu-role-appear {
  from { opacity: 0; transform: translateY(.35rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  #main.team-page .team-opening {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 2.3rem 1.65rem;
    background: radial-gradient(ellipse at 98% 0%, #e9dac5 0%, transparent 66%), var(--team-paper);
  }

  .team-opening-study {
    position: absolute;
    inset: .4rem -2.8rem auto auto;
    width: min(68%, 15rem);
    opacity: .2;
  }

  #main.team-page .team-section { padding-block: 1.6rem 2.25rem; }
  .team-grid--furniture { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .bambu-partnership {
    margin: .8rem var(--bambu-content-gutter, 1.25rem) 1.25rem;
    padding: 1.75rem 1.45rem;
    border-radius: 2.6rem .7rem 2rem 1.1rem;
  }

  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .team-card-media--portrait { max-width: 29rem; }
}
