/* Small accessibility fixes layered on top of the original Webflow template. */
.ig .w-embed {
  position: relative;
  width: 100%;
}

.page-wrap :is(a, button, input, select, textarea, [role="button"]):focus-visible {
  outline: 2px solid #f0eeeb;
  outline-offset: 5px;
}

/* Keep the template's original h3 appearance after correcting heading levels. */
.section-title {
  font-size: 40px;
  line-height: 30px;
}

.work-item h3.heading-small {
  line-height: .9;
}

.instagram-media > .instagram-fallback {
  color: var(--primary-1);
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* Instagram injects a 326px minimum width; allow the original grid to shrink. */
.ig > .team-member-wrapper,
.ig .w-embed {
  min-width: 0;
}

.ig .instagram-media,
.ig iframe[src*="instagram.com"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media screen and (max-width: 991px) {
  .section-title {
    font-size: 32px;
  }
}

@media screen and (max-width: 479px) {
  .section-title {
    font-size: 20px;
  }
}

/* Keep long advisor names from changing individual grid track widths.
   This section shares template classes with Instagram; scope it by its ID. */
#advisors .grid-halves.team.advisors {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#advisors .team-member-wrapper,
#advisors .member-info,
#advisors .member-info > * {
  min-width: 0;
  max-width: 100%;
}

#advisors .member-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

#advisors .people-heading,
#advisors .text-style-alternative {
  overflow-wrap: anywhere;
}

/* Two generous columns until all four portraits and surnames fit comfortably. */
@media screen and (max-width: 1279px) {
  #advisors .grid-halves.team.advisors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 479px) {
  #advisors .grid-halves.team.advisors {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Match the founder image profile's equal slots even with long names. */
#team .grid-halves.team {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#team .team-member-wrapper,
#team .member-info,
#team .member-info > * {
  min-width: 0;
  max-width: 100%;
}

@media screen and (max-width: 479px) {
  #team .grid-halves.team {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Webflow reads the fixed semantic header for its own animated link clicks.
   Native direct-hash/no-script navigation needs a CSS scroll offset as well. */
:is(#slate, #team, #advisors, #contact) {
  scroll-margin-top: 96px;
}

/* Intrinsic HTML dimensions reserve the final About layout before lazy images
   load. Preserve Webflow's responsive widths and the overlay's positioning. */
.about-image-1,
.about-image-2 {
  height: auto;
}
