/**
 * Leader Profile page template (views/templates/leader-profile.twig).
 *
 * Banner in the style of the other page banners (dark field from the left,
 * thin green frame), cut-out portrait on the right; career path as a row of
 * steps; biography beside the contact QR code.
 *
 * Plain CSS outside the Sass build; loaded by AssetsServiceProvider.
 */

.leader-page {
  --lp-content: 1100px; /* career path, bio and breadcrumbs */
  --lp-ink: #16201d;
  --lp-ink-rgb: 22, 32, 29;
  --lp-text: #3a4744;
  --lp-muted: #5f6b67;
  --lp-line: #d9dcd6;
  --lp-green: #00ce7c;
  --lp-green-text: #00744b;
  --lp-mist: #d6e6df;
}

/* ---- Banner ------------------------------------------------------------ */

.leader-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--lp-ink);
  color: #fff;
}

.leader-hero__bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(var(--lp-ink-rgb), 0.94) 0%,
      rgba(var(--lp-ink-rgb), 0.82) 35%,
      rgba(var(--lp-ink-rgb), 0.35) 62%,
      rgba(var(--lp-ink-rgb), 0.1) 100%),
    linear-gradient(180deg, rgba(var(--lp-ink-rgb), 0.6) 0%, rgba(var(--lp-ink-rgb), 0) 30%);
}

/* Thin green frame clear of the 94px header; the portrait sits over it. */
.leader-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 102px 24px 24px 24px;
  border: 1px solid rgba(0, 206, 124, 0.45);
  pointer-events: none;
}

.leader-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: end;
  gap: 32px;
  max-width: 1440px;
  min-height: clamp(460px, 38vw, 560px);
  margin: 0 auto;
  padding: 128px var(--global--container-horizontal-padding, 20px) 0;
  padding-left: max(var(--global--container-horizontal-padding, 20px), min(56px, calc(56px - (100vw - 1440px) / 2)));
}

.leader-hero__info { align-self: center; padding-bottom: 56px; }

.leader-page .leader-hero__name {
  max-width: none;
  margin: 0;
  font-family: "TradeGothicLT-BoldCondTwenty", "TradeGothicLT-Bold", "Arial Narrow", sans-serif;
  font-weight: normal;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #fff;
}

.leader-page .leader-hero__name::before {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-bottom: clamp(20px, 2.4vw, 28px);
  background: var(--lp-green);
}

.leader-page .leader-hero__role {
  max-width: none;
  margin: 12px 0 0;
  font-family: "TradeGothicLT-Light", "TradeGothicLT", sans-serif;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  color: var(--lp-mist);
}

.leader-hero__contact {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.leader-hero__contact li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.leader-hero__contact svg { flex: none; width: 18px; height: 18px; color: var(--lp-green); }

.leader-page .leader-hero__contact a {
  font-family: "TradeGothicLT", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.leader-page .leader-hero__contact a:hover { color: var(--lp-green); border-color: var(--lp-green); }

.leader-hero__links { display: flex; gap: 10px; margin-top: 24px; }

.leader-page .leader-hero__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.leader-page .leader-hero__links a:hover {
  border-color: var(--lp-green);
  background: var(--lp-green);
  color: var(--lp-ink);
}

.leader-hero__links svg { width: 18px; height: 18px; }

.leader-page .leader-hero a:focus-visible {
  outline: 3px solid var(--lp-green);
  outline-offset: 3px;
}

.leader-hero__photo { align-self: end; justify-self: center; }

.leader-hero__photo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: clamp(340px, 30vw, 440px);
}

/* Breadcrumbs (synced pattern, 900px wide elsewhere): line up with the page. */
.leader-page > .wp-block-group.has-background > * {
  max-width: var(--lp-content) !important;
}

/* ---- Career path ------------------------------------------------------- */

.leader-career {
  max-width: calc(var(--lp-content) + 2 * var(--global--container-horizontal-padding, 20px));
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--global--container-horizontal-padding, 20px) 0;
}

.leader-career__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.leader-career__list li {
  position: relative;
  flex: 1 1 180px;
  margin: 0;
  padding: 18px 28px 0 0;
  border-top: 2px solid var(--lp-line);
  font-family: "TradeGothicLT-Bold", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.35;
  color: var(--lp-ink);
}

/* A dot on the line for each step; the last (current) one is green. */
.leader-career__list li::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lp-ink);
}

.leader-career__list li:last-child { border-top-color: var(--lp-green); }
.leader-career__list li:last-child::before { background: var(--lp-green); }

/* ---- Biography --------------------------------------------------------- */

.leader-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px clamp(40px, 5vw, 72px);
  align-items: start;
  max-width: calc(var(--lp-content) + 2 * var(--global--container-horizontal-padding, 20px));
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--global--container-horizontal-padding, 20px) clamp(64px, 8vw, 112px);
}

.leader-body__bio { max-width: 72ch; }

.leader-page .leader-body__bio p {
  max-width: none;
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--lp-text);
}

.leader-page .leader-body__bio p:first-child:not(:only-child) {
  font-size: clamp(20px, 1.6vw, 23px);
  line-height: 1.55;
  color: var(--lp-ink);
}

.leader-body__qr {
  margin: 0;
  padding: 20px;
  border-top: 4px solid var(--lp-green);
  background: #f4f6f5;
  text-align: center;
}

.leader-body__qr img { display: block; width: 100%; height: auto; }

.leader-page .leader-body__qr figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--lp-muted);
}

/* ---- Smaller screens ---------------------------------------------------- */

@media (max-width: 900px) {
  .leader-hero__inner { grid-template-columns: 1fr; padding-top: 112px; padding-left: var(--global--container-horizontal-padding, 20px); }
  .leader-hero__info { padding-bottom: 8px; }
  .leader-hero__photo img { max-height: 320px; }
  .leader-hero::after { display: none; }
  .leader-hero::before { background: rgba(var(--lp-ink-rgb), 0.72); }
  .leader-body { grid-template-columns: 1fr; }
  .leader-body__qr { max-width: 240px; }
}

@media (max-width: 599px) {
  .leader-career__list { flex-direction: column; gap: 0; }
  .leader-career__list li { flex: none; padding: 0 0 18px 26px; border-top: 0; border-left: 2px solid var(--lp-line); }
  .leader-career__list li::before { top: 2px; left: -7px; }
  .leader-career__list li:last-child { border-left-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .leader-page * { transition: none !important; }
}

/* .entry-content > * rules in the theme reset these sections' width and
   margins; keep them centred at the content width. */
.leader-page > .leader-career,
.leader-page > .leader-body {
  width: 100%;
  max-width: calc(var(--lp-content) + 2 * var(--global--container-horizontal-padding, 20px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
