/* ==========================================================================
   PMK Advisors — Client Portfolio Redesign
   Scoped to the Clients page only; does not alter shared styles.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro band — editorial statement above featured portfolio
   -------------------------------------------------------------------------- */
.cp-intro-band {
  background: var(--navy);
  padding: 72px var(--gutter);
  border-bottom: 1px solid rgba(250, 249, 246, 0.06);
}

.cp-intro-inner {
  max-width: 780px;
}

.cp-intro-band .eyebrow {
  color: var(--accent);
}

.cp-intro-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.22;
  color: var(--cream);
  margin-top: 16px;
  text-wrap: balance;
}

.cp-intro-text {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(250, 249, 246, 0.72);
  margin-top: 16px;
  max-width: 620px;
}

@media (max-width: 760px) {
  .cp-intro-band { padding: 56px var(--gutter); }
  .cp-intro-heading { font-size: 28px; }
}


/* --------------------------------------------------------------------------
   Featured client sections — shared wrapper
   -------------------------------------------------------------------------- */
.cp-section {
  padding: 96px var(--gutter);
}

.cp-section--tint {
  background: var(--surface);
}


/* --------------------------------------------------------------------------
   Section header — centred editorial heading block
   -------------------------------------------------------------------------- */
.cp-section-header {
  text-align: center;
  margin-bottom: 64px;
}

.cp-section-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.cp-rule {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border);
  display: block;
}

.cp-category-label {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent-dark);
  white-space: nowrap;
}

.cp-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
  color: var(--navy);
  text-wrap: balance;
}

.cp-section-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 12px auto 0;
}

@media (max-width: 760px) {
  .cp-section { padding: 72px var(--gutter); }
  .cp-section-header { margin-bottom: 48px; }
  .cp-section-title { font-size: 30px; }
}


/* --------------------------------------------------------------------------
   Logo grids
   -------------------------------------------------------------------------- */

/* Featured client grids: flex-wrap keeps incomplete rows visually centred
   regardless of how many clients are added from the admin panel. */
.cp-logo-grid--listed,
.cp-logo-grid--ipo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 2px;
}

.cp-logo-grid--listed .cp-logo-card,
.cp-logo-grid--ipo .cp-logo-card {
  flex: 0 0 calc((100% - 4px) / 3);
  min-width: 0;
}

@media (max-width: 900px) {
  .cp-logo-grid--listed .cp-logo-card,
  .cp-logo-grid--ipo .cp-logo-card {
    flex-basis: calc((100% - 2px) / 2);
  }
}

@media (max-width: 560px) {
  .cp-logo-grid--listed,
  .cp-logo-grid--ipo {
    gap: 1px;
  }

  .cp-logo-grid--listed .cp-logo-card,
  .cp-logo-grid--ipo .cp-logo-card {
    flex-basis: 100%;
  }
}


/* --------------------------------------------------------------------------
   Individual logo card
   -------------------------------------------------------------------------- */
.cp-logo-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 32px 28px;
  border: 1px solid var(--border-light);
  background: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    background-color 0.22s var(--ease);
  min-height: 180px;
  /* Ensures equal card heights in the same row */
  height: 100%;
  box-sizing: border-box;
}

/* Subtle bottom accent line on hover */
.cp-logo-card__inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}

.cp-logo-card__inner:hover,
.cp-logo-card__inner:focus-visible {
  border-color: var(--accent-border);
  box-shadow: 0 4px 20px rgba(5, 17, 37, 0.06);
  background: #fefefe;
  outline: none;
}

.cp-logo-card__inner:hover::after,
.cp-logo-card__inner:focus-visible::after {
  transform: scaleX(1);
}


/* --------------------------------------------------------------------------
   Logo frame — normalises different aspect ratios to a consistent container
   -------------------------------------------------------------------------- */
.cp-logo-frame {
  width: 100%;
  max-width: 200px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-logo-img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s var(--ease);
}

.cp-logo-card__inner:hover .cp-logo-img {
  opacity: 0.88;
}


/* --------------------------------------------------------------------------
   Text logo treatment — for clients without a sourced official logo
   -------------------------------------------------------------------------- */
.cp-logo-frame--text {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  background: rgba(250, 249, 246, 0.9);
  height: auto;
  min-height: 72px;
}

.cp-text-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.cp-text-logo__main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.2px;
  text-align: center;
}

.cp-text-logo__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   Client name label — compact descriptor below the logo frame
   -------------------------------------------------------------------------- */
.cp-logo-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
  max-width: 200px;
  pointer-events: none;
}


/* --------------------------------------------------------------------------
   Section divider
   -------------------------------------------------------------------------- */
.cp-section-divider {
  padding: 0 var(--gutter);
}

.cp-divider-line {
  height: 1px;
  background: var(--border-light);
}


/* --------------------------------------------------------------------------
   Tint-section card overrides
   -------------------------------------------------------------------------- */
.cp-section--tint .cp-logo-card__inner {
  background: var(--cream);
  border-color: rgba(5, 17, 37, 0.07);
}

.cp-section--tint .cp-logo-card__inner:hover {
  background: #fff;
}

.cp-section--tint .cp-logo-frame--text {
  background: rgba(250, 249, 246, 0.7);
}


/* --------------------------------------------------------------------------
   Broader client experience — dark navy panel
   -------------------------------------------------------------------------- */
.cp-broader {
  padding: 96px var(--gutter);
  background: var(--navy);
}

.cp-broader-header {
  max-width: 680px;
  margin-bottom: 64px;
}

.cp-broader-header .eyebrow {
  color: var(--accent);
}

.cp-broader-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.22;
  color: var(--cream);
  margin-top: 14px;
  text-wrap: balance;
}

.cp-broader-intro {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(250, 249, 246, 0.65);
  margin-top: 14px;
  max-width: 560px;
}

/* 4-column grid for sector groups */
.cp-broader-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(250, 249, 246, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cp-sector-group {
  padding: 36px 28px;
  border-right: 1px solid rgba(250, 249, 246, 0.1);
  border-bottom: 1px solid rgba(250, 249, 246, 0.1);
}

.cp-sector-group:nth-child(4n) {
  border-right: none;
}

/* Sector header */
.cp-sector-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(250, 249, 246, 0.12);
}

.cp-sector-icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.cp-sector-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(250, 249, 246, 0.85);
  line-height: 1.4;
  margin: 0;
}

/* Client list */
.cp-sector-clients {
  display: flex;
  flex-direction: column;
  gap: 11px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-sector-client {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(250, 249, 246, 0.6);
  font-weight: 400;
  transition: color 0.18s var(--ease);
}

.cp-sector-client:hover {
  color: rgba(250, 249, 246, 0.9);
}

.cp-sector-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .cp-broader-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cp-sector-group:nth-child(4n) {
    border-right: 1px solid rgba(250, 249, 246, 0.1);
  }
  .cp-sector-group:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 760px) {
  .cp-broader { padding: 72px var(--gutter); }
  .cp-broader-title { font-size: 28px; }
  .cp-broader-header { margin-bottom: 48px; }
  .cp-broader-grid {
    grid-template-columns: 1fr;
  }
  .cp-sector-group {
    border-right: none;
  }
}

@media (max-width: 480px) {
  .cp-sector-group {
    padding: 28px 20px;
  }
}


/* --------------------------------------------------------------------------
   Scale / stats band
   -------------------------------------------------------------------------- */
.cp-scale-band {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 72px var(--gutter);
}

.cp-scale-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.cp-scale-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 32px;
}

.cp-scale-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

.cp-scale-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.8px;
}

.cp-scale-label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 160px;
}

@media (max-width: 900px) {
  .cp-scale-band { padding: 56px var(--gutter); }
  .cp-scale-grid {
    flex-wrap: wrap;
    row-gap: 40px;
  }
  .cp-scale-item {
    flex: 1 1 40%;
    padding: 0 16px;
  }
  /* Hide every other divider on tablet */
  .cp-scale-divider:nth-child(4),
  .cp-scale-divider:nth-child(6) {
    display: none;
  }
  .cp-scale-value { font-size: 32px; }
}

@media (max-width: 560px) {
  .cp-scale-grid {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .cp-scale-divider { display: none; }
  .cp-scale-item { flex: none; width: 100%; padding: 0; }
}



/* --------------------------------------------------------------------------
   Client stories pathway
   -------------------------------------------------------------------------- */
.clients-story-pathway {
  position: relative;
  overflow: hidden;
  background: #102a33;
  color: #f7faf6;
  padding: 44px var(--gutter);
  border-top: 1px solid rgba(0, 143, 163, .18);
  border-bottom: 1px solid rgba(0, 143, 163, .18);
  isolation: isolate;
}

.clients-story-pathway::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 180px;
  right: -90px;
  top: -72px;
  background: radial-gradient(circle, rgba(0, 143, 163, .24) 0%, rgba(0, 143, 163, 0) 72%);
  pointer-events: none;
  z-index: -1;
}

.clients-story-pathway::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(112, 203, 209, .42), transparent);
  pointer-events: none;
}

.clients-story-pathway__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.clients-story-pathway__copy .eyebrow {
  margin-bottom: 9px;
  color: #70cbd1;
}

.clients-story-pathway__copy h2 {
  margin: 0;
  color: #f7faf6;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -.45px;
  font-weight: 600;
}

.clients-story-pathway__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 13px 18px 13px 20px;
  border: 1px solid rgba(220, 245, 239, .34);
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
  color: #f7faf6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .15px;
  transition: border-color .26s var(--pmk-ease), background-color .26s var(--pmk-ease), transform .26s var(--pmk-ease);
}

.clients-story-pathway__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(112, 203, 209, .44);
  border-radius: 50%;
  color: #70cbd1;
  transition: transform .26s var(--pmk-ease), background-color .26s var(--pmk-ease), color .26s var(--pmk-ease);
}

.clients-story-pathway__link:hover,
.clients-story-pathway__link:focus-visible {
  border-color: rgba(112, 203, 209, .75);
  background: rgba(0, 143, 163, .13);
  transform: translateY(-2px);
}

.clients-story-pathway__link:hover .clients-story-pathway__arrow,
.clients-story-pathway__link:focus-visible .clients-story-pathway__arrow {
  transform: translate(2px, -2px);
  background: rgba(112, 203, 209, .11);
  color: #ffffff;
}

@media (max-width: 700px) {
  .clients-story-pathway { padding: 38px var(--gutter); }
  .clients-story-pathway__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }
  .clients-story-pathway__link { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .clients-story-pathway__link,
  .clients-story-pathway__arrow { transition: none; }
}

/* --------------------------------------------------------------------------
   Accessibility: reduce motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cp-logo-card__inner,
  .cp-logo-card__inner::after,
  .cp-logo-img,
  .cp-sector-client {
    transition: none;
  }
}
