/* ==========================================================================
   Management Team page
   1. Hero override
   2. Introduction
   3. Leadership wall — editorial portrait mosaic
   4. Executive profile drawer
   5. Quote banner
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero — different photography, same architecture (about.css .page-hero)
   -------------------------------------------------------------------------- */

.page-hero--management .page-hero__media {
  background-image: url("../../images/hero1.jfif");
  background-position: center 25%;
}

/* --------------------------------------------------------------------------
   2. Introduction — centered editorial
   -------------------------------------------------------------------------- */

.team-intro__inner {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.team-intro .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  letter-spacing: 0.16em;
}

.team-intro .section-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--clr-accent);
}

.team-intro h2 {
  max-width: 22ch;
  margin-inline: auto;
  margin-top: var(--space-md);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.team-intro__text {
  margin-top: var(--space-lg);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--clr-muted);
}

/* --------------------------------------------------------------------------
   3. Leadership wall
   One composed mosaic: the President anchors at double size, four
   executives tile beside him, two wide crops close the wall. All copy
   sits on the portraits — position in gold, name in white.
   -------------------------------------------------------------------------- */

.wall-section {
  background:
    radial-gradient(
      50rem 24rem at 12% -4rem,
      rgba(10, 110, 61, 0.045),
      transparent 62%
    ),
    linear-gradient(180deg, #f6faf7 0%, #f0f5f1 100%);
}

.wall {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

/* ----- Tile base ----- */

.wall-tile {
  position: relative;
  display: block;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 1px 1px rgba(16, 33, 24, 0.03),
    0 16px 40px -24px rgba(16, 33, 24, 0.22);
  transition:
    transform 320ms cubic-bezier(0.2, 0.6, 0.2, 1),
    box-shadow 320ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.wall-tile:hover {
  transform: translateY(-0.375rem);
  box-shadow:
    0 2px 3px rgba(16, 33, 24, 0.04),
    0 32px 64px -24px rgba(16, 33, 24, 0.34);
}

.wall-tile:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 4px;
}

.wall-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wall-tile:hover img {
  transform: scale(1.05);
}

/* Dark grounding gradient — the text's stage */
.wall-tile__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 26, 16, 0.86) 0%,
    rgba(5, 26, 16, 0.35) 32%,
    rgba(5, 26, 16, 0) 58%
  );
}

/* ----- Caption — position + name only ----- */

.wall-tile__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-lg);
  text-align: left;
}

.wall-tile__rule {
  width: 2rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--clr-accent);
  transition: width 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wall-tile:hover .wall-tile__rule {
  width: 3.25rem;
}

.wall-tile__role {
  margin-top: var(--space-sm);
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

.wall-tile__name {
  margin-top: var(--space-2xs);
  font-size: 1.1875rem;
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--clr-white);
}

/* ----- Composition — sizes carry the hierarchy ----- */

/* The President — double height anchor */
.wall-tile--1 {
  grid-column: 1 / span 6;
  grid-row: 1 / span 2;
  min-height: 30rem;
}

.wall-tile--1 .wall-tile__caption {
  padding: var(--space-xl);
}

.wall-tile--1 .wall-tile__name {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

/* Four executives beside him */
.wall-tile--2 {
  grid-column: 7 / span 3;
  aspect-ratio: 4 / 5;
}

.wall-tile--3 {
  grid-column: 10 / span 3;
  aspect-ratio: 4 / 5;
}

.wall-tile--4 {
  grid-column: 7 / span 3;
  aspect-ratio: 4 / 5;
}

.wall-tile--5 {
  grid-column: 10 / span 3;
  aspect-ratio: 4 / 5;
}

/* A centered portrait pair closes the wall — the middle size in the
   hierarchy: featured (6 cols) > this pair (4 cols) > the quartet (3 cols) */
.wall-tile--6 {
  grid-column: 3 / span 4;
  aspect-ratio: 4 / 5;
}

.wall-tile--7 {
  grid-column: 7 / span 4;
  aspect-ratio: 4 / 5;
}

.wall-tile--6 .wall-tile__name,
.wall-tile--7 .wall-tile__name {
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   4. Executive profile drawer — slides from the right
   -------------------------------------------------------------------------- */

.exec-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.exec-drawer[hidden] {
  display: none;
}

.exec-drawer__scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(6, 32, 20, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  animation: support-fade 300ms ease both;
}

.exec-drawer.is-closing .exec-drawer__scrim {
  animation: support-fade-out 240ms ease both;
}

.exec-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(27rem, 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--clr-white);
  box-shadow: -24px 0 64px -24px rgba(6, 32, 20, 0.4);
  animation: exec-drawer-in 420ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.exec-drawer.is-closing .exec-drawer__panel {
  animation: exec-drawer-out 260ms ease both;
}

@keyframes exec-drawer-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: none;
  }
}

@keyframes exec-drawer-out {
  from {
    transform: none;
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes support-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes support-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.exec-drawer__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(6, 32, 20, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--clr-white);
  transition: background-color var(--transition);
}

.exec-drawer__close:hover {
  background-color: rgba(6, 32, 20, 0.75);
}

.exec-drawer__close:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

.exec-drawer__close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.exec-drawer__media {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
}

.exec-drawer__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.exec-drawer__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0) 22%
  );
}

.exec-drawer__body {
  padding: var(--space-md) var(--space-xl) var(--space-2xl);
}

.exec-drawer__role {
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-primary);
}

.exec-drawer__name {
  margin-top: var(--space-xs);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.exec-drawer__years {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--clr-text);
}

.exec-drawer__years::before {
  content: "";
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background-color: var(--clr-accent);
}

.exec-drawer__bio {
  margin-top: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--clr-muted);
}

.exec-drawer__subhead {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-primary);
}

.exec-drawer__subhead::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background-color: rgba(10, 110, 61, 0.35);
}

.exec-drawer__duties {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.exec-drawer__duties li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(16, 33, 24, 0.07);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--clr-text);
}

.exec-drawer__duties li::before {
  content: "";
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.5rem;
  border-radius: 50%;
  background-color: var(--clr-accent);
}

/* --------------------------------------------------------------------------
   5. Quote banner
   -------------------------------------------------------------------------- */

.quote-banner {
  padding-block: var(--space-4xl);
  background:
    radial-gradient(
      44rem 22rem at 80% -20%,
      rgba(233, 161, 59, 0.1),
      transparent 60%
    ),
    var(--clr-primary-deep);
}

.quote-banner__inner {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  padding-top: var(--space-xl);
  text-align: center;
}

.quote-banner__mark {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--clr-accent);
  opacity: 0.85;
}

.quote-banner__text {
  font-size: clamp(1.375rem, 2.8vw, 2rem);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--clr-white);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 64rem) {
  .wall {
    gap: var(--space-md);
  }

  /* Featured spans the full width; the rest pair up */
  .wall-tile--1 {
    grid-column: 1 / span 12;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .wall-tile--2,
  .wall-tile--4 {
    grid-column: 1 / span 6;
  }

  .wall-tile--3,
  .wall-tile--5 {
    grid-column: 7 / span 6;
  }

  .wall-tile--6 {
    grid-column: 1 / span 6;
    aspect-ratio: 4 / 5;
  }

  .wall-tile--7 {
    grid-column: 7 / span 6;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 40rem) {
  .wall {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 26rem;
    margin-inline: auto;
  }

  .wall-tile--1 {
    aspect-ratio: 4 / 4.4;
  }

  .wall-tile--2,
  .wall-tile--3,
  .wall-tile--4,
  .wall-tile--5,
  .wall-tile--6,
  .wall-tile--7 {
    aspect-ratio: 4 / 4.6;
  }

  .wall-tile__caption {
    padding: var(--space-md);
  }

  .exec-drawer__panel {
    width: 100%;
  }

  .quote-banner {
    padding-block: var(--space-3xl);
  }
}
