/* PSM theme — extracted from source Gamma/Chakra CSS variables, rebuilt for Bootstrap 5.2 */
:root {
  --psm-accent: #4950bc;
  --psm-accent-dim: #2f36a2;
  --psm-accent-soft: #e5e6f5;
  --psm-accent-muted: #dadbf1;
  --psm-body: #272525;
  --psm-border: #e5e0df;
  --bs-primary: #4950bc;
  --bs-primary-rgb: 73, 80, 188;
  --bs-link-color: #4950bc;
  --bs-link-hover-color: #3d4399;
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--bs-font-sans-serif);
  color: var(--psm-body);
  background-color: #fff;
}

.text-primary {
  color: var(--psm-accent) !important;
}

.btn-primary {
  --bs-btn-bg: var(--psm-accent);
  --bs-btn-border-color: var(--psm-accent);
  --bs-btn-hover-bg: var(--psm-accent-dim);
  --bs-btn-hover-border-color: var(--psm-accent-dim);
  --bs-btn-active-bg: var(--psm-accent-dim);
  --bs-btn-active-border-color: var(--psm-accent-dim);
}

.btn-outline-primary {
  --bs-btn-color: var(--psm-accent);
  --bs-btn-border-color: var(--psm-accent);
  --bs-btn-hover-bg: var(--psm-accent);
  --bs-btn-hover-border-color: var(--psm-accent);
}

.bg-primary {
  background-color: var(--psm-accent) !important;
}

/* Wordmark logo (source: images/psm-logo.png) */
.psm-logo {
  height: auto;
  max-width: 100%;
}

.psm-logo-hero {
  width: clamp(220px, 42vw, 440px);
}

.psm-logo-nav {
  display: block;
  height: 32px;
  width: auto;
}

.navbar-brand {
  line-height: 1;
}

/* Section eyebrow pill (source: .css-18zm5xm label) */
.psm-eyebrow {
  display: inline-block;
  padding: 0.375em 0.75em;
  margin-bottom: 1rem;
  background: var(--psm-accent-muted);
  color: var(--psm-accent);
  border-radius: 0.5rem;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.psm-eyebrow-on-primary {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.nav-link {
  font-weight: 500;
  color: var(--psm-body);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--psm-accent);
}

.hero-section {
  background: linear-gradient(165deg, #fff 0%, var(--psm-accent-soft) 45%, #fff 100%);
}

.hero-inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .hero-inner {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

.hero-figure img {
  max-height: 520px;
  width: 100%;
  object-fit: cover;
}

/* Card accent images (source: right-column layout, cover + natural aspect) */
.psm-card-accent {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.psm-card-accent-portrait {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  max-height: 520px;
}

.section-pad {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 992px) {
  .section-pad {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }
}

/* Team stat rings (source: SVG stats-track / stats-fill, ~18% ring thickness) */
.psm-stat {
  position: relative;
  width: clamp(140px, 18vw, 200px);
  aspect-ratio: 1 / 1;
  margin-left: auto;
  margin-right: auto;
}

.psm-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.psm-ring-track,
.psm-ring-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.psm-ring-track {
  stroke: var(--psm-accent-muted);
}

.psm-ring-fill {
  stroke: var(--psm-accent);
}

.psm-stat-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--psm-accent);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  pointer-events: none;
}

.cred-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cred-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(73, 80, 188, 0.12) !important;
}

.cred-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

/* Scroll reveal */
.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#hero.reveal-section {
  opacity: 1;
  transform: none;
}

/* Contact section on primary background */
#contact a.text-white:hover {
  color: #fff !important;
  text-decoration: underline;
}

footer .text-white-50:hover {
  color: #fff !important;
}

/* Approach: 4-pillar process graphic (ring nodes + horizontal connector on desktop) */
.psm-pillar-graphic {
  position: relative;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.psm-pillar-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 992px) {
  /* Gradient spine through double-ring node centers */
  .psm-pillar-graphic::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: calc(2.75rem - 2.5px);
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(
      90deg,
      var(--psm-accent-muted) 0%,
      var(--psm-accent) 22%,
      var(--psm-accent) 78%,
      var(--psm-accent-muted) 100%
    );
    z-index: 0;
    pointer-events: none;
  }

  .psm-pillar-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 0 0.5rem;
    text-align: center;
    padding-top: 0;
  }

  .psm-pillar-step {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.psm-pillar-node-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.psm-pillar-node-badge {
  position: absolute;
  right: -6px;
  bottom: -4px;
  z-index: 2;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--psm-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(73, 80, 188, 0.45);
}

.psm-pillar-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: #fff;
  color: var(--psm-accent);
  font-size: 1.85rem;
  box-shadow:
    0 0 0 4px var(--psm-accent-muted),
    0 0 0 8px var(--psm-accent),
    0 14px 32px rgba(73, 80, 188, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.psm-pillar-step:hover .psm-pillar-node {
  transform: scale(1.06);
  box-shadow:
    0 0 0 4px var(--psm-accent-muted),
    0 0 0 8px var(--psm-accent),
    0 18px 40px rgba(73, 80, 188, 0.3);
}

.psm-pillar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.psm-pillar-desc {
  font-size: 0.875rem;
  color: var(--psm-body);
  opacity: 0.85;
  margin-bottom: 0;
  line-height: 1.45;
}

/* Mobile / tablet: vertical spine + stacked nodes */
@media (max-width: 991.98px) {
  .psm-pillar-steps {
    margin-left: 0.75rem;
    padding-left: 0;
    border-left: none;
    padding-top: 0;
  }

  .psm-pillar-step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.25rem;
    row-gap: 0.25rem;
    padding-bottom: 1.75rem;
    padding-left: 1rem;
    border-left: 4px solid var(--psm-accent-muted);
    position: relative;
  }

  .psm-pillar-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: -2px;
    top: 5.75rem;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--psm-accent) 0%, var(--psm-accent-muted) 100%);
    border-radius: 0 0 2px 2px;
  }

  .psm-pillar-step:last-child {
    padding-bottom: 0;
  }

  .psm-pillar-step:last-child::after {
    display: none;
  }

  .psm-pillar-node-wrap {
    grid-row: 1 / span 2;
    align-self: start;
    margin-bottom: 0;
    margin-top: 0.15rem;
  }

  .psm-pillar-body {
    grid-column: 2;
    text-align: left;
  }
}
