/* ===========================================================
   Exemplar REITail — About Us page
   Faithful to Figma (node 59:1056, 1920x4416) at desktop,
   fully responsive / mobile-friendly below.
   Mobile-first: base styles = phone; media queries scale up.
   Requires exemplar-shared.css (base resets, nav, cards, footer).
   =========================================================== */

/* ============================ Dark section (hero) ============================ */
.ab-dark {
  position: relative;
  background-color: var(--bg);
  padding-top: 240px;
  padding-bottom: 60px;
}
.ab-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    url("/images/exemplar/about/hero-bg.jpg") top center / contain no-repeat,
    linear-gradient(
      180deg,
      rgba(1, 5, 18, 0.55) 0%,
      rgba(0, 0, 0) 55%,
      transparent 74%
    );
  z-index: 0;
  animation: abBgReveal 2.5s ease-out 0.8s both;
}
.ab-container {
  position: relative;
  z-index: 1;
}

/* hero head: heading + intro paragraph */
.ab-hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ab-hero__title {
  margin: 0;
  font-weight: 200;
  font-size: 44px;
  line-height: 1.05;
  color: #fff;
}
.ab-hero__title span,
.ab-hero__title b {
  display: inline-block;
  opacity: 0;
  animation: abFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.ab-hero__title span {
  animation-delay: 0.2s;
}
.ab-hero__title b {
  font-weight: 600;
  color: #fff;
  animation-delay: 0.4s;
}

.ab-hero__intro {
  margin: 0;
  max-width: 756px;
  opacity: 0;
  animation: abFadeIn 1s ease forwards;
  animation-delay: 0.6s;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: #fff;
}

/* collage ------------------------------------------------- */
.ab-collage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}

/* The concourse photo below the hero (Figma node 306:649). The design blends
   it into the dark ground with a soft elliptical vignette rather than a hard
   frame; reproducing that as a mask — fitted to the exported asset's alpha —
   keeps the blend whatever image the CMS serves into the slot. */
.ab-collage__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1109 / 1391;
  pointer-events: none;
  /* --ab-vignette: radial-gradient(
    64.4% 31.2% at 83.3% 53.6%,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.81) 18%,
    rgba(0, 0, 0, 0.68) 28%,
    rgba(0, 0, 0, 0.45) 43%,
    rgba(0, 0, 0, 0.23) 61%,
    rgba(0, 0, 0, 0.09) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: var(--ab-vignette);
  mask-image: var(--ab-vignette); */
}
.ab-collage__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ab-collage__top {
  width: 100%;
}
.ab-collage__top img,
.ab-collage__wide img,
.ab-collage__tall img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.ab-collage__row {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ab-collage__left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ab-collage__text {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-weight: 300;
  font-size: 16px;
  line-height: 26px;
  color: #fff;
}
.ab-collage__text p {
  margin: 0;
}

/* board heading — sits on the dark band, beside the executive photos */
.ab-board__heading {
  margin: 0 0 20px;
  font-weight: 200;
  font-size: 40px;
  line-height: 1.05;
  color: #fff;
}
.ab-board__heading b {
  font-weight: 500;
  color: #fff;
  display: block;
}

/* ============================ Light section ============================ */
/* The light section carries the dark->white split: the top band stays the
   same "blue" as the hero so the board heading + executive photos overlap it,
   exactly like the Figma design. --band = height of that dark band. */
.ab-light {
  position: relative;
  --band: 172px;
  background: linear-gradient(
    180deg,
    var(--bg) 0,
    var(--bg) var(--band),
    #fff var(--band),
    #fff 100%
  );
  padding-top: 0;
  /* padding-bottom: 64px; */
}

/* board groups */
.ab-group {
  margin-bottom: 8px;
}

.ab-group__label {
  margin: 0 0 28px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.ab-group__label--exec {
  color: var(--gold);
}
.ab-group__label--nonexec {
  color: var(--bg);
  margin-top: 40px;
}

/* member grid */
.ab-members {
  display: grid;
  /* minmax(0, …) rather than a bare 1fr: names come from the CMS and a long
     unbreakable surname would otherwise raise the track's automatic minimum
     and steal width from the other column, leaving the two photo sizes (and
     so the name baselines) mismatched. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
}

.ab-member {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* member cards are buttons that open the profile popup */
button.ab-member {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.ab-member .ab-member__photo img {
  transition: opacity 0.2s ease;
}
button.ab-member:hover .ab-member__photo,
button.ab-member:focus-visible .ab-member__photo {
  border-width: 10px;
}
button.ab-member:hover .ab-member__photo img,
button.ab-member:focus-visible .ab-member__photo img {
  opacity: 0.82;
}

.ab-member__photo {
  width: 100%;
  aspect-ratio: 329 / 371;
  overflow: hidden;
  background: #ececef;
  border: 1px solid #fff;
  transition: border-width 0.3s ease;
}
.ab-member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ab-member button.ab-member__photo {
  border: 0;
  padding: 0;
  cursor: pointer;
}

.ab-member__name {
  margin: 0;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.2;
  color: var(--bg);
}
.ab-member__role {
  margin: 8px 0 0;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 14px;
  color: var(--gold);
}

/* Narrow phones (320px is the WCAG 1.4.10 reflow width, and what a 1280px
   desktop becomes at 400% zoom). The 90% container leaves ~288px, so each
   member column is only ~132px — narrower than "Katzenellenbogen" at 18px.
   Equal tracks are guaranteed above; these rules keep the name itself
   inside its card instead of spilling across the gap. */
@media (max-width: 374.98px) {
  .ab-members {
    column-gap: 16px;
  }
  .ab-member__name {
    font-size: 16px;
    /* hyphenate by preference, hard-break only as a last resort */
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: break-word;
  }
}

/* board committees */
.ab-committees {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 48px;
  color: var(--bg);
}
.ab-committees__title {
  margin: 0;
  font-weight: 500;
  font-size: 20px;
  color: var(--gold);
}
.ab-committee__name {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: 16px;
}
.ab-committee__people {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
}

/* symbol watermark (desktop only) */
.ab-symbol {
  display: none;
}

/* CFG + BBBEE cards (structure in exemplar-shared.css) — page spacing only */
.ab-cards {
  margin-top: 64px;
}

/* =====================================================================
   TABLET  ≥ 768px
   ===================================================================== */
@media (min-width: 768px) {
  .ab-hero__title {
    font-size: 60px;
  }

  .ab-collage__row {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }
  .ab-collage__left {
    flex: 1 1 0;
  }
  .ab-collage__tall {
    flex: 1 1 0;
  }
  .ab-collage__top {
    margin-left: auto;
    justify-self: end;
    width: 55%;
  }
  /* photo starts leaning to the right, as it does in the design */
  .ab-collage__photo {
    width: 72%;
    margin-left: auto;
  }

  .ab-members {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
  }

  .ab-group__aside {
    padding-bottom: 40px;
  }
}

/* =====================================================================
   TABLET  ≥ 960px  — Hero Grid Layout
   ===================================================================== */
@media (min-width: 960px) and (max-width: 1199.98px) {
  .ab-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
  }
  .ab-hero__title {
    grid-column: 1 / -1;
    margin-bottom: 80px;
  }
  .ab-hero__intro {
    grid-column: 1;
    grid-row: 2;
  }
  .ab-collage__top {
    grid-column: 2;
    grid-row: 2;
  }
}

/* =====================================================================
   DESKTOP  ≥ 1200px  — pixel-accurate reproduction of the design
   ===================================================================== */
@media (min-width: 1200px) {
  .ab-dark {
    padding-top: 274px;
    /* deep enough for the concourse photo to fade out inside the dark band
       before the board heading, as in the design (y=2043 vs y=2160) */
    padding-bottom: 439px;
  }

  /* hero: heading left, intro right */
  .ab-hero {
    display: grid;
    /* grid-template-columns: 35% 60%; */
    grid-template-columns: 50% 50%;
    justify-content: space-between;
    align-items: flex-start;
  }
  .ab-hero__title {
    grid-column: 1;
    grid-row: 1;
    font-size: 70px;
    max-width: 500px;
    margin-bottom: 0;
  }
  .ab-hero__intro {
    grid-column: 2;
    grid-row: 1;
    font-size: 20px;
    line-height: 40px;
    max-width: 900px;
  }

  /* collage: the photo bleeds off the right edge of the viewport and the copy
     sits over the dark ground to its left. Offsets are the design's own
     geometry (1920 canvas) expressed in vw so the whole composition — photo
     size, photo top, copy top — scales together below 1920. */
  .ab-collage {
    gap: 0;
    align-items: flex-start;
    /* margin-top: 26.51vw; */
    margin-top: 10vw;
  }
  .ab-collage__photo {
    position: absolute;
    top: 0;
    right: calc(50% - 50vw); /* flush with the right edge of the viewport */
    width: 57.76vw; /* design: 1109 / 1920 */
    margin: 0;
  }
  .ab-collage__top {
    grid-column: 2;
    grid-row: 2;
    width: 400px;
    justify-self: end;
    margin-top: 28px;
  }
  .ab-collage__top img {
    height: 332px;
  }
  .ab-collage__row {
    flex-direction: row;
    align-items: flex-start;
    gap: 70px;
    width: 100%;
  }
  .ab-collage__left {
    width: 718px;
    flex: none;
    gap: 71px;
  }
  .ab-collage__left img {
    height: 404px;
  }
  .ab-collage__text {
    /* Figma spaces the paragraphs 32px apart between *trimmed* text boxes;
       with normal CSS half-leading (7.1px above the caps, 7.5px below the
       baseline) the equivalent flex gap is 17px. */
    gap: 17px;
    /* design: 845px wide; capped against the viewport so the copy stays clear
       of the photo's bright centre on narrower desktops */
    width: min(845px, 44vw);
    margin-top: 31.61vw; /* design: first line at y=1477 */
  }
  .ab-collage__tall {
    width: 751px;
    flex: none;
  }
  .ab-collage__tall img {
    height: 638px;
  }

  .ab-board__heading {
    font-size: 60px;
    margin: 0;
    color: #fff;
  }

  /* board two-column groups.
       Dark band reaches the bottom of the executive photos so that row
       overlaps the "blue" section, exactly like the design. */
  .ab-light {
    --band: 330px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .ab-group {
    display: grid;
    grid-template-columns: 340px 1fr;
    column-gap: 68px;
    margin-bottom: 140px;
  }
  .ab-group__aside {
    padding-top: 0;
  }
  .ab-group__label {
    font-size: 20px;
    margin: 0;
  }
  .ab-group__label--exec {
    margin-top: 150px;
  } /* sits low, beside the exec photos */
  .ab-group__label--nonexec {
    margin-top: 0;
  }

  .ab-members {
    /* grid-template-columns: repeat(3, 329px); */
    grid-template-columns: repeat(auto-fit, minmax(257px, 1fr));
    column-gap: 79px;
    row-gap: 56px;
    justify-content: start;
  }
  .ab-member__name {
    font-size: 20px;
  }

  .ab-committees {
    margin-top: 60px;
    width: 267px;
  }

  /* symbol watermark on the right edge of the board area */
  .ab-symbol {
    display: block;
    position: absolute;
    top: 430px;
    right: 0;
    width: 84px;
    height: 870px;
    object-fit: cover;
    pointer-events: none;
  }

  .ab-cards {
    margin-top: 0;
  }
}

/* ============================ Member profile popup ============================ */
/* Figma node 121:762 — dark modal, photo/name/role/quals left, bio right */
.ab-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ab-modal[hidden] {
  display: none;
}

.ab-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 18, 0.72);
}

.ab-modal__box {
  position: relative;
  z-index: 1;
  width: 1132px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg);
  padding: 72px 20px 40px;
}

.ab-modal__close {
  position: absolute;
  top: 25px;
  right: 27px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 217, 217, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.ab-modal__close:hover {
  border-color: #fff;
}
.ab-modal__close svg {
  display: block;
}

.ab-modal__content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.ab-modal__aside {
  width: 209px;
  flex: none;
}

.ab-modal__photo {
  width: 209px;
  height: 236px;
  object-fit: cover;
  object-position: top center;
  background: #ececef;
}

.ab-modal__name {
  margin: 13px 0 0;
  font-weight: 400;
  font-size: 22px;
  line-height: 22px;
  color: #fff;
}

.ab-modal__role {
  margin: 13px 0 0;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 20px;
  line-height: 22px;
  color: var(--gold);
}

.ab-modal__quals {
  margin-top: 32px;
}
.ab-modal__quals[hidden] {
  display: none;
}

.ab-modal__quals-label {
  margin: 0 0 9px;
  font-weight: 400;
  font-size: 14px;
  line-height: 27px;
  color: #fff;
}

.ab-modal__quals-list {
  font-size: 12px;
  line-height: 17px;
  color: rgba(255, 255, 255, 0.7);
}
.ab-modal__quals-list p {
  margin: 0;
}

.ab-modal__bio {
  flex: 1 1 0;
  min-width: 0;
  font-size: 16px;
  line-height: 27px;
  color: #fff;
}
.ab-modal__bio p {
  margin: 0;
}
.ab-modal__bio p + p {
  margin-top: 27px;
}

/* lock page scroll while the popup is open */
html.ab-modal-open,
html.ab-modal-open body {
  overflow: hidden;
}

@media (min-width: 1200px) {
  .ab-modal__box {
    min-height: 577px;
    padding: 98px 95px 64px;
  }
  .ab-modal__content {
    flex-direction: row;
    gap: 42px;
  }
}

/* ============================ Scroll Animations ============================ */
[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
    transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cascading for collage elements */
.ab-collage__top {
  transition-delay: 0.1s;
}
.ab-collage__photo {
  transition-delay: 0.1s;
}
.ab-collage__left {
  transition-delay: 0.1s;
}
.ab-collage__tall {
  transition-delay: 0.3s;
}

/* Cascading for board members */
.ab-member[data-animate] {
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}
.ab-members .ab-member:nth-child(1) {
  transition-delay: 0.1s;
}
.ab-members .ab-member:nth-child(2) {
  transition-delay: 0.2s;
}
.ab-members .ab-member:nth-child(3) {
  transition-delay: 0.3s;
}
.ab-members .ab-member:nth-child(4) {
  transition-delay: 0.4s;
}
.ab-members .ab-member:nth-child(5) {
  transition-delay: 0.5s;
}
.ab-members .ab-member:nth-child(6) {
  transition-delay: 0.6s;
}
.ab-members .ab-member:nth-child(7) {
  transition-delay: 0.7s;
}
.ab-members .ab-member:nth-child(8) {
  transition-delay: 0.8s;
}
.ab-members .ab-member:nth-child(9) {
  transition-delay: 0.9s;
}
.ab-members .ab-member:nth-child(10) {
  transition-delay: 1s;
}
.ab-members .ab-member:nth-child(n + 11) {
  transition-delay: 1.1s;
}

/* ============================ Animations ============================ */
@keyframes abBgReveal {
  from {
    filter: blur(10px);
    opacity: 0.2;
  }
  to {
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes abFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes abFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .ab-dark {
    padding-top: 150px;
  }
  .ab-dark::before {
    background:
      url("/images/exemplar/about/hero-bg.jpg") top left / 200% no-repeat,
      linear-gradient(
        180deg,
        rgba(1, 5, 18, 0.55) 0%,
        rgba(0, 0, 0) 55%,
        transparent 74%
      );
    opacity: 0.4 !important;
  }
  .ab-hero__intro {
    padding-top: 140px;
  }
}

@media (max-width: 980px) {
  .ab-light:has(.ab-group--exec) {
    transform: translateY(-2px);
  }
  .ab-light .ab-group:has(.ab-group__label--nonexec) {
    margin-top: 100px;
  }
}

@media (max-width: 500px) {
  .ab-hero__intro {
    font-size: 14px;
  }
  .ab-collage__top img {
    width: 70%;
  }
  .ab-collage__left {
    /* transform: translateY(-120px) !important; */
    margin-top: -100px;
  }
  .ab-collage__left img {
    width: 80%;
    margin-left: auto;
    margin-right: 0;
  }
  .ab-modal__bio {
    font-size: 14px;
    line-height: 22px;
  }
  .ab-collage__tall img {
    width: 65%;
    margin-left: auto;
    margin-right: 0;
  }
}
