/* ==========================================================================
   Keynes — about page (Ver 3.0).

   Loaded only on the about template, where the legacy stylesheets are
   dequeued, so like kx-home.css and kx-careers.css it owns the document and is
   free to set base element styles.

   Depends on kx-chrome.css for @font-face, the :root tokens and the button
   classes — chrome is always enqueued first.

   Ported from the Ver 3.0 about prototype, which carried every rule as an
   inline style attribute and its hover states as a non-standard
   `style-hover` attribute the browser ignores. Both are written properly here.
   ========================================================================== */

/* --- Base ----------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: var(--kx-header-h); }

body {
  margin: 0;
  background: var(--kx-bg);
  color: var(--kx-ink);
  font-family: var(--kx-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 { text-wrap: balance; }
p, li, blockquote, figcaption { text-wrap: pretty; }

a { color: var(--kx-purple); text-decoration: none; }
a:hover { color: var(--kx-purple-link-hover); }
::selection { background: rgba(110, 86, 248, .18); }

img, svg { display: block; max-width: 100%; }

:where(a, button):focus-visible {
  outline: 2px solid var(--kx-purple);
  outline-offset: 3px;
  border-radius: 4px;
}

.kx-about__container {
  width: min(100% - var(--kx-gutter), var(--kx-container));
  margin-inline: auto;
}

.kx-about__container--980  { max-width: 980px; }
.kx-about__container--1000 { max-width: 1000px; }

/* --- Shared type ---------------------------------------------------------- */
/* Same definitions as kx-careers.css: each Ver 3.0 page stylesheet stands
   alone, because only one of them is ever loaded. */

.kx-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--kx-muted);
}

.kx-eyebrow--light { color: rgba(255, 255, 255, .6); }

.kx-h2 {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 62px);
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.05;
}

.kx-grad {
  background-image: linear-gradient(90deg, #7539ff 0%, #e70fe9 55%, #4a8fd4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kx-section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.kx-section-head .kx-h2 { max-width: 18ch; }

/* --- Hero ----------------------------------------------------------------- */

.kx-ahero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 168px 0 0;
  background:
    radial-gradient(60% 50% at 18% 30%, rgba(176, 160, 255, .22), transparent 70%),
    radial-gradient(55% 45% at 85% 25%, rgba(244, 184, 230, .22), transparent 70%),
    radial-gradient(70% 55% at 50% 95%, rgba(140, 185, 255, .18), transparent 70%),
    linear-gradient(180deg, #fdfcf9 0%, #f8f5f4 60%, #f3efee 100%);
}

.kx-ahero__body {
  width: min(100% - var(--kx-gutter), 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}

.kx-ahero__title {
  margin: 0;
  font-size: clamp(38px, 6vw, 92px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--kx-ink);
}

.kx-ahero__sub {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: -.014em;
  line-height: 1.45;
  color: #55555a;
  text-wrap: balance;
}

/* The artwork is cropped to a letterbox and feathered on all four edges into
   the wash behind it, so it reads as part of the ground, not a pasted panel. */
.kx-ahero__art {
  position: relative;
  width: min(100% - var(--kx-gutter), 800px);
  aspect-ratio: 1672 / 560;
  margin: 72px auto 96px;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 14%, #000 88%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 0%, #000 14%, #000 88%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.kx-ahero__art img {
  width: 100%;
  height: auto;
  margin-top: -9.5%;
}

/* --- What we offer -------------------------------------------------------- */

.kx-offer { padding: 112px 0 116px; background: var(--kx-bg); }

.kx-offer .kx-about__container {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.kx-offer .kx-section-head { gap: 22px; }

.kx-offer__statement {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.032em;
  line-height: 1.18;
  color: var(--kx-ink);
}

.kx-offer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.kx-offer__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 30px 34px;
  border-radius: 24px;
  background: var(--kx-bg-alt);
}

.kx-offer__card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.024em;
  line-height: 1.15;
}

.kx-offer__card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: #55555a;
}

/* --- The Keynes Way ------------------------------------------------------- */

.kx-way {
  position: relative;
  z-index: 1;
  padding: 108px 0 112px;
  background: #17132b;
  color: #fff;
}

.kx-way__head { margin-bottom: 44px; }
.kx-way .kx-h2 { color: #fff; }

.kx-way__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kx-way__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 20px 40px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.kx-way__row:last-child { border-bottom: 0; }

.kx-way__lead {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.kx-way__num {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  background-image: linear-gradient(90deg, #a98bff, #f06cf1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kx-way__row h3 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: -.028em;
  line-height: 1.05;
  color: #fff;
}

.kx-way__row p {
  margin: 0;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .82);
}

/* --- Mission -------------------------------------------------------------- */

.kx-mission { padding: 116px 0; background: var(--kx-bg); }

.kx-mission__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 820px;
  text-align: center;
}

.kx-mission__title {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 56px);
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.06;
}

.kx-mission__body {
  margin: 0;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -.012em;
  color: #55555a;
}

/* --- Leadership ----------------------------------------------------------- */

.kx-leadership { padding: 108px 0 116px; background: var(--kx-bg-alt); }

.kx-leaders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 56px auto 0;
  padding: 0;
  list-style: none;
}

.kx-person { display: flex; }

.kx-person__card {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0;
  font: inherit;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  color: var(--kx-ink);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.kx-person__card:hover,
.kx-person__card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -28px rgba(58, 40, 160, .4);
}

.kx-person__photo {
  display: block;
  width: 100%;
  aspect-ratio: 373 / 328;
  object-fit: cover;
  object-position: 50% 50%;
  background: #ecebf3;
}

.kx-person__meta {
  display: flex;
  flex: 1;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 22px;
}

.kx-person__id {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kx-person__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.022em;
}

.kx-person__role {
  font-size: 14px;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

.kx-person__plus {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #efeefb;
  color: var(--kx-purple-hover);
  font-size: 18px;
  line-height: 1;
}

/* The bio dialog. A native <dialog>, so the browser owns the focus trap,
   Escape and the top layer; this only styles it. */

.kx-bio {
  width: min(100% - 44px, 880px);
  max-width: none;
  max-height: calc(100vh - 44px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: var(--kx-ink);
  box-shadow: 0 40px 90px -30px rgba(23, 19, 43, .6);
  overflow: auto;
}

.kx-bio::backdrop {
  background: rgba(23, 19, 43, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.kx-bio__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.kx-bio__photo {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: 50% 20%;
  background: #ecebf3;
}

/* `img { display: block }` above outranks the UA's [hidden] rule. */
.kx-bio__photo[hidden] { display: none; }

.kx-bio__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 44px 42px;
}

.kx-bio__role {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--kx-purple);
}

.kx-bio__name {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.034em;
  line-height: 1.05;
}

.kx-bio__body p {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -.012em;
  color: #55555a;
}

.kx-bio__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--kx-ink);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

/* --- Closing banner ------------------------------------------------------- */

.kx-banner { padding: 0 0 112px; background: var(--kx-bg-alt); }

/* The leadership section above runs straight into this one on the same grey,
   so a hidden leadership section needs the banner to bring its own top. */
.kx-mission + .kx-banner,
.kx-way + .kx-banner,
.kx-offer + .kx-banner,
.kx-ahero + .kx-banner { padding-top: 112px; }

.kx-banner__frame {
  position: relative;
  width: min(100% - var(--kx-gutter), 980px);
  margin-inline: auto;
  container-type: inline-size;
  overflow: hidden;
  aspect-ratio: 4 / 1;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: linear-gradient(90deg, #f3e6fb, #fbf7fd 50%, #f6f2fd);
}

.kx-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kx-banner__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  text-align: center;
}

.kx-banner__logo { width: 9.5cqw; height: auto; }

.kx-banner__title {
  margin: 0;
  font-family: 'Inter Tight', -apple-system, sans-serif;
  font-size: 6.4cqw;
  font-weight: 800;
  letter-spacing: 0;
  line-height: .95;
  color: var(--kx-ink);
}

.kx-banner__sub {
  margin: -.7cqw 0 0;
  font-size: max(11px, 1.55cqw);
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--kx-ink);
}

.kx-banner__cta {
  margin-top: .4cqw;
  padding: max(6px, .9cqw) max(14px, 2cqw);
  font-size: max(11px, 1.4cqw);
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--kx-purple);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(58, 40, 160, .6);
  transition: background .2s ease;
}

.kx-banner__cta:hover,
.kx-banner__cta:focus-visible { background: var(--kx-purple-link-hover); color: #fff; }

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

@media (max-width: 1024px) {
  .kx-leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .kx-way__row { grid-template-columns: 1fr; gap: 14px; }
  .kx-leaders { gap: 12px; }
  .kx-person__meta { padding: 14px 14px 16px; }
  .kx-person__name { font-size: 16px; }
  .kx-person__role { font-size: 13px; }

  .kx-bio__card { grid-template-columns: 1fr; }
  .kx-bio__photo { min-height: 0; max-height: 320px; aspect-ratio: 373 / 328; }
  .kx-bio__text { padding: 28px 24px 32px; }

  .kx-ahero { padding-top: 120px; }
  .kx-ahero__art { margin: 48px auto 64px; }

  .kx-offer,
  .kx-mission,
  .kx-way,
  .kx-leadership { padding-top: 68px; padding-bottom: 76px; }

  /* At phone width the 4:1 banner is too shallow for its lockup, and the
     container units shrink the type past legibility. Give it height. */
  .kx-banner { padding-bottom: 76px; }
  .kx-banner__frame { aspect-ratio: 2 / 1; }
  .kx-banner__body { gap: 2.4cqw; }
  .kx-banner__logo { width: 16cqw; }
  .kx-banner__title { font-size: 10cqw; }
  .kx-banner__sub { font-size: max(12px, 3cqw); margin-top: 0; }
  .kx-banner__cta { font-size: max(12px, 2.8cqw); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kx-person__card,
  .kx-banner__cta { transition: none; }
  .kx-person__card:hover,
  .kx-person__card:focus-visible { transform: none; }
}
