/* -------------------------------------------------------
   Leadership page (one-at-a-time showcase)
   Behaviour lives in assets/js/leadership-x.js.
------------------------------------------------------- */
.leadership-x {
  --ld-base: var(--base-color, #dd6531);
  --ld-peach: #f38c4b;
  --ld-ink: var(--dark-gray, #292d36);
  --ld-night: #15171c;
  --ld-paper: #f6f5f2;
  --ld-muted: var(--medium-gray, #808291);
  --ld-line: rgba(41, 45, 54, 0.1);
  --ld-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ld-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ld-ease-spring: cubic-bezier(0.2, 0.9, 0.25, 1.25);
  font-family: var(--alt-font);
  background: var(--ld-paper);
}

.leadership-x section {
  padding: 0;
}

/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */
.ld-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.4s var(--ld-ease-out), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}

.ld-btn i {
  font-size: 16px;
  transition: transform 0.4s var(--ld-ease-out);
}

.ld-btn:hover i {
  transform: translate(3px, -3px);
}

.ld-btn-dark {
  color: #fff;
  background: var(--ld-ink);
}

.ld-btn-dark:hover,
.ld-btn-dark:focus-visible {
  color: #fff;
  background: var(--c1, var(--ld-base));
  box-shadow: 0 14px 30px -12px var(--c1, var(--ld-base));
  transform: translateY(-2px);
}

.ld-btn-line {
  color: var(--ld-ink);
  border: 1px solid var(--ld-line);
}

.ld-btn-line:hover {
  color: var(--ld-ink);
  border-color: var(--ld-ink);
}

.ld-btn-light {
  color: var(--ld-ink);
  background: #fff;
}

.ld-btn-light:hover,
.ld-btn-light:focus-visible {
  color: var(--ld-base);
  transform: translateY(-2px);
}

.ld-btn-light:hover i {
  transform: translateX(4px);
}

.ld-btn:focus-visible,
.ld-tab:focus-visible,
.ld-arrow:focus-visible {
  outline: 2px solid var(--ld-base);
  outline-offset: 3px;
}

/* -------------------------------------------------------
   Intro band (dark so the transparent header stays legible)
------------------------------------------------------- */
.ld-intro {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  padding: 190px 0 230px !important;
  color: #fff;
  background: var(--ld-night);
}

.ld-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}

.ld-intro-glow {
  position: absolute;
  z-index: -1;
  right: -10%;
  top: -40%;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 101, 49, 0.45), transparent 65%);
  animation: ld-breathe 10s ease-in-out infinite;
}

@keyframes ld-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12) translate(-30px, 20px); opacity: 1; }
}

.ld-intro-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.ld-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ld-peach);
}

.ld-eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ld-title {
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 7vw, 104px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.ld-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ld-peach), #ffb37d 50%, var(--ld-base));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ld-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.ld-intro-lead {
  max-width: 340px;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

/* -------------------------------------------------------
   Showcase card
------------------------------------------------------- */
.ld-stage {
  position: relative;
  z-index: 1;
  margin-top: -150px;
  padding-bottom: 100px !important;
}

.ld-show {
  padding: 24px;
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 50px 100px -50px rgba(21, 23, 28, 0.45), 0 1px 3px rgba(21, 23, 28, 0.05);
}

.ld-slides {
  display: grid;
}

.ld-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 60px;
  align-items: center;
  visibility: hidden;
}

.ld-slide.is-active,
.ld-slide.is-leaving {
  visibility: visible;
}

/* Portrait */
.ld-portrait {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: min(100%, clamp(300px, 50vh, 420px));
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  clip-path: circle(0% at 50% 100%);
  transition: clip-path 0.9s var(--ld-ease-in-out);
}

.ld-slide.is-active .ld-portrait {
  clip-path: circle(50% at 50% 50%);
}

.ld-slide.is-leaving .ld-portrait {
  clip-path: circle(50% at 50% 50%);
  z-index: -1;
}

.ld-slide.is-leaving {
  z-index: 0;
}

.ld-slide.is-active {
  z-index: 1;
}

.ld-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(2px);
}

.ld-blob-1 {
  width: 70%;
  aspect-ratio: 1;
  left: -18%;
  top: -14%;
  animation: ld-orbit 16s ease-in-out infinite;
}

.ld-blob-2 {
  width: 46%;
  aspect-ratio: 1;
  right: -10%;
  bottom: -8%;
  background: rgba(0, 0, 0, 0.12);
  animation: ld-orbit 20s ease-in-out infinite reverse;
}

@keyframes ld-orbit {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14%, 10%) scale(1.08); }
}

.ld-dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 60%);
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 60%);
}

.ld-initials {
  font-size: clamp(90px, 10vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #fff;
  text-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
  transform: scale(1.25) translateY(30px);
  opacity: 0;
  transition: transform 1.2s var(--ld-ease-out) 0.25s, opacity 0.8s ease 0.25s;
}

.ld-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  transition: transform 1.4s var(--ld-ease-out);
}

.ld-slide.is-active .ld-initials {
  transform: none;
  opacity: 1;
}

.ld-slide.is-active .ld-photo {
  transform: none;
}

.ld-badge {
  position: absolute;
  left: 50%;
  bottom: 9%;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ld-ink);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.6s ease 0.7s, transform 0.8s var(--ld-ease-spring) 0.7s;
}

.ld-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.ld-slide.is-active .ld-badge {
  opacity: 1;
  transform: translateX(-50%);
}

/* Info column */
.ld-info {
  position: relative;
  padding: 20px 30px 20px 0;
}

.ld-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ld-count-now {
  font-size: 22px;
  color: var(--c1);
}

.ld-count-total {
  font-size: 15px;
  color: var(--ld-muted);
}

.ld-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ld-ink);
}

.ld-role::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 20%, transparent);
}

.ld-name {
  margin: 0 0 30px;
  font-size: clamp(48px, 6vw, 92px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: var(--ld-ink);
}

.ld-name-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.ld-name-line > .ld-in {
  display: inline-block;
}

.ld-name-line:nth-child(2) {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ld-ink);
}

.ld-rule {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 2px;
  margin-bottom: 30px;
  background: linear-gradient(90deg, var(--c1), var(--c2), transparent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s var(--ld-ease-out) 0.55s;
}

.ld-slide.is-active .ld-rule {
  transform: none;
}

.ld-bio {
  max-width: 480px;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ld-muted);
}

.ld-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Staggered text entrance inside the active slide */
.ld-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.9s var(--ld-ease-out);
  transition-delay: calc(var(--ld-s, 0) * 90ms + 300ms);
}

.ld-name-line > .ld-in {
  opacity: 1;
  transform: translateY(110%);
}

.ld-slide.is-active .ld-in {
  opacity: 1;
  transform: none;
}

.ld-slide.is-leaving .ld-in {
  opacity: 0;
  transform: translateY(-24px);
  transition-delay: 0s;
  transition-duration: 0.35s;
}

.ld-slide.is-leaving .ld-name-line > .ld-in {
  opacity: 1;
  transform: translateY(-110%);
}

.ld-slide.is-leaving .ld-rule {
  transform: scaleX(0);
  transform-origin: right;
  transition-delay: 0s;
  transition-duration: 0.4s;
}

/* -------------------------------------------------------
   Selector
------------------------------------------------------- */
.ld-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ld-line);
}

.ld-tabs {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 10px;
  min-width: 0;
}

.ld-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ld-tab:hover {
  background: var(--ld-paper);
}

.ld-tab.is-active {
  background: var(--ld-paper);
}

.ld-tab-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.4s ease, opacity 0.4s ease, transform 0.5s var(--ld-ease-spring), border-radius 0.4s ease;
}

.ld-tab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ld-tab:hover .ld-tab-avatar,
.ld-tab.is-active .ld-tab-avatar {
  filter: none;
  opacity: 1;
}

.ld-tab.is-active .ld-tab-avatar {
  border-radius: 50%;
  transform: scale(1.06);
}

.ld-tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ld-tab-name,
.ld-tab-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-tab-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ld-ink);
}

.ld-tab-role {
  font-size: 13px;
  color: var(--ld-muted);
}

.ld-tab-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
}

.ld-tab-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  transform-origin: left;
  transform: scaleX(0);
}

.ld-tab.is-active .ld-tab-bar span {
  transform: scaleX(1);
}

/* While autoplaying, the bar fills over the slide duration */
.ld-show.is-playing .ld-tab.is-active .ld-tab-bar span {
  animation: ld-fill var(--ld-duration, 7000ms) linear forwards;
}

.ld-show.is-paused .ld-tab.is-active .ld-tab-bar span {
  animation-play-state: paused;
}

@keyframes ld-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.ld-arrows {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

.ld-arrow {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  font-size: 19px;
  color: var(--ld-ink);
  background: #fff;
  border: 1px solid var(--ld-line);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ld-ease-spring);
}

.ld-arrow:hover {
  color: #fff;
  background: var(--ld-ink);
  border-color: var(--ld-ink);
}

.ld-arrow:active {
  transform: scale(0.92);
}

/* -------------------------------------------------------
   CTA
------------------------------------------------------- */
.ld-cta {
  padding-bottom: 120px !important;
}

.ld-cta-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 56px 60px;
  border-radius: 32px;
  color: #fff;
  background: var(--ld-night);
}

.ld-cta-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  top: -120%;
  width: 60%;
  height: 300%;
  background: radial-gradient(circle, rgba(221, 101, 49, 0.45), transparent 60%);
  animation: ld-breathe 9s ease-in-out infinite;
}

.ld-cta-card h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff;
}

.ld-cta-card p {
  margin: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.65);
}

/* -------------------------------------------------------
   Page entrance and scroll reveal (only hidden once JS runs)
------------------------------------------------------- */
.ld-js .ld-rise {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 1.1s var(--ld-ease-out);
  transition-delay: calc(var(--ld-d, 0) * 120ms + 100ms);
}

.ld-js .ld-line > .ld-rise {
  display: inline-block;
  opacity: 1;
  transform: translateY(105%);
}

.ld-js .ld-ready .ld-rise,
.ld-js .ld-ready.ld-rise,
.ld-js .ld-ready .ld-line > .ld-rise {
  opacity: 1;
  transform: none;
}

.ld-js .ld-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.9s var(--ld-ease-out);
}

.ld-js .ld-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 1199px) {
  .ld-slide {
    gap: 40px;
  }

  .ld-tab-role {
    display: none;
  }
}

@media (max-width: 991px) {
  .ld-intro {
    padding: 160px 0 200px !important;
  }

  .ld-intro-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .ld-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ld-portrait {
    width: min(100%, 280px);
  }

  .ld-info {
    padding: 0 12px 8px;
  }

  .ld-count {
    margin-bottom: 18px;
  }
}

@media (max-width: 767px) {
  .ld-intro {
    padding: 130px 0 170px !important;
  }

  .ld-intro-lead {
    font-size: 16px;
  }

  .ld-stage {
    margin-top: -120px;
    padding-bottom: 70px !important;
  }

  .ld-show {
    padding: 14px;
    border-radius: 26px;
  }

  .ld-badge {
    bottom: 8%;
    font-size: 12px;
  }

  .ld-name {
    margin-bottom: 22px;
  }

  .ld-rule {
    margin-bottom: 22px;
  }

  .ld-links .ld-btn {
    flex: 1 1 100%;
  }

  .ld-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .ld-tab {
    flex-direction: column;
    gap: 6px;
    padding: 10px 4px 12px;
    text-align: center;
  }

  .ld-tab-text {
    align-items: center;
    max-width: 100%;
  }

  .ld-tab-name {
    font-size: 12px;
    line-height: 1.25;
    max-width: 100%;
    white-space: normal;
  }

  .ld-tab-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .ld-arrows {
    justify-content: center;
  }

  .ld-arrow {
    width: 48px;
    height: 48px;
  }

  .ld-cta {
    padding-bottom: 80px !important;
  }

  .ld-cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 26px;
    border-radius: 24px;
  }

  .ld-cta-card .ld-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leadership-x *,
  .leadership-x *::before,
  .leadership-x *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
