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

   Loaded only on the careers template, where the legacy stylesheets are
   dequeued, so like kx-home.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 and
   pill classes — chrome is always enqueued first.

   Ported from the Ver 3.0 careers prototype, whose markup carried every rule
   as an inline style attribute. Two things could not survive that as-is: the
   prototype has no media queries at all (every grid is a fixed column count),
   and its hover states were a non-standard `style-hover` attribute the browser
   ignores. Both are written properly here.
   ========================================================================== */

/* --- Base ----------------------------------------------------------------- */
html { scroll-behavior: smooth; }

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

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, video, canvas { display: block; max-width: 100%; }

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

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

.kx-careers__container--narrow {
  width: min(100% - var(--kx-gutter), 1000px);
  margin-inline: auto;
}

/* Shared section rhythm. */
.kx-careers section { padding: var(--kx-section-pt) 0 var(--kx-section-pb); }
.kx-careers section[data-flush] { padding: 0; }

/* --- Shared type ---------------------------------------------------------- */

.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, .55); }

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

/* The brand gradient, used on the closing words of several headings. */
.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; }
.kx-section-head p.kx-lede {
  margin: 0;
  max-width: 54ch;
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

/* --- Hero ----------------------------------------------------------------- */
/* A 320vh scroll track with a pinned viewport: three columns of photographs
   drift at different rates behind the headline, the camera pushes in, and the
   whole thing washes to white as the manifesto arrives. */

.kx-chero {
  position: relative;
  height: 320vh;
  padding: 0;
  background: var(--kx-bg);
}

.kx-chero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg, #f4f1ff 0%, #fdf5fd 38%, #f5f5f7 66%, #eef3fb 100%);
}

.kx-chero__wall {
  position: absolute;
  inset: -12%;
  display: flex;
  justify-content: center;
  gap: 2.4vw;
  transform: rotate(-9deg) scale(var(--cam, 1));
  transform-origin: 50% 45%;
  will-change: transform;
  opacity: var(--wall-opacity, 1);
  filter: blur(var(--wall-blur, 0));
}

.kx-chero__col {
  width: 24%;
  display: flex;
  flex-direction: column;
  gap: 2.2vh;
  will-change: transform;
}

.kx-chero__col--1 { transform: translate3d(0, var(--y1, 0), 0); }
.kx-chero__col--2 { transform: translate3d(0, var(--y2, 0), 0); }
.kx-chero__col--3 { transform: translate3d(0, var(--y3, 0), 0); }

.kx-chero__shot {
  width: 100%;
  border-radius: 22px;
  object-fit: cover;
  background: var(--kx-card-alt);
}

/* Washes the photo wall out behind the headline so the type always holds. */
.kx-chero__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 52%,
    rgba(255, 255, 255, .88) 0%,
    rgba(253, 250, 255, .78) 42%,
    rgba(244, 241, 255, .9) 100%);
}

.kx-chero__body {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px;
  text-align: center;
  opacity: var(--chrome-opacity, 1);
  transform: translate3d(0, calc((1 - var(--chrome-opacity, 1)) * -26px), 0);
}

.kx-chero__title {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(38px, 6vw, 92px);
  font-weight: 600;
  letter-spacing: -.042em;
  line-height: .98;
  color: var(--kx-ink);
}

.kx-chero__sub {
  margin: 0;
  max-width: 50ch;
  font-size: clamp(15px, 1.3vw, 20px);
  letter-spacing: -.012em;
  line-height: 1.5;
  color: #55555a;
}

.kx-chero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

/* The white curtain that closes over the hero as it ends. */
.kx-chero__reveal {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #fff;
  opacity: var(--reveal-opacity, 0);
  pointer-events: none;
}

/* --- Manifesto ------------------------------------------------------------ */
/* The same word-lighting treatment as the front page's #difference stage A,
   over the brand's multi-stop gradient ground. */

.kx-cmanifesto {
  position: relative;
  height: 150vh;
  padding: 0;
  background-color: #a81adb;
  background-image:
    radial-gradient(120% 95% at 6% 88%, #e7157f 0%, rgba(231, 21, 127, 0) 58%),
    radial-gradient(105% 85% at 2% 14%, #c21ad8 0%, rgba(194, 26, 216, 0) 55%),
    radial-gradient(130% 110% at 96% 6%, #4a86c4 0%, rgba(74, 134, 196, 0) 52%),
    radial-gradient(115% 100% at 100% 92%, #5b3be8 0%, rgba(91, 59, 232, 0) 60%),
    radial-gradient(90% 80% at 46% 52%, #e71be0 0%, rgba(231, 27, 224, 0) 62%);
}

.kx-cmanifesto__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kx-cmanifesto__inner { width: min(100% - var(--kx-gutter), 1000px); text-align: center; }

.kx-cmanifesto__eyebrow { margin: 0 0 26px; color: rgba(255, 255, 255, .72); }

.kx-cmanifesto__headline {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 66px);
  font-weight: 600;
  letter-spacing: -.032em;
  line-height: 1.12;
  text-wrap: pretty;
  color: #fff;
}

/* Each word is lit in turn by kx-careers.js. The unlit colour is the starting
   state, so the headline is readable before the script runs and if it never
   does. */
.kx-cmanifesto__headline span {
  transition: color .28s ease;
  color: rgba(255, 255, 255, .26);
}

/* --- Why ------------------------------------------------------------------ */

.kx-why { background: var(--kx-bg-alt); }

.kx-why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  align-items: stretch;
}

.kx-why__card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--kx-border);
  background: var(--kx-bg);
}

/* The middle card is picked out in the handoff. Unlike the front page's result
   cards this one is a permanent standout rather than a hover: it is the only
   card in the row that is drawn raised, and there is no hover state drawn for
   the others to take. */
.kx-why__card--accent {
  background: var(--kx-purple);
  color: #fff;
  border-color: var(--kx-purple);
  box-shadow: var(--kx-shadow-purple);
  transform: translateY(-12px);
}

.kx-why__card h3 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.024em;
}

.kx-why__card p {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

.kx-why__card--accent p { color: rgba(255, 255, 255, .84); }

.kx-why__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 26px;
}

.kx-why__tag {
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--kx-border-pill);
}

.kx-why__card--accent .kx-why__tag { border-color: rgba(255, 255, 255, .4); }

/* --- Values --------------------------------------------------------------- */

.kx-values { background: #17132b; }

.kx-values__eyebrow { margin: 0 0 40px; text-align: center; }

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

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

.kx-values__head { display: flex; align-items: center; gap: 22px; }

.kx-values__icon { width: 38px; height: 38px; flex: 0 0 38px; }

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

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

/* --- Life ----------------------------------------------------------------- */

.kx-life__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
  margin-top: 56px;
}

.kx-life__cell {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  background: var(--kx-card-alt);
}

.kx-life__cell--wide { grid-column: span 2; }
.kx-life__cell--big { grid-column: span 2; grid-row: span 2; }

/* --- Benefits ------------------------------------------------------------- */

.kx-benefits { background: var(--kx-bg-alt); padding-top: 96px; }

.kx-benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 56px;
}

.kx-benefits__card {
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--kx-border);
  background: var(--kx-bg);
}

.kx-benefits__card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.kx-benefits__card p {
  margin: 10px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

/* --- Founder note --------------------------------------------------------- */

.kx-note { padding: 110px 0 120px; }
.kx-note__inner { text-align: center; }
.kx-note__eyebrow { margin: 0 0 26px; }

.kx-note__quote {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 48px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.16;
  text-wrap: pretty;
}

.kx-note__by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.kx-note__portrait {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: transparent;
}

.kx-note__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kx-note__name strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--kx-ink);
}

.kx-note__name span {
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--kx-muted-2);
}

/* --- Process -------------------------------------------------------------- */

.kx-process {
  padding: 96px 0 40px;
  background-color: #fbfaff;
  background-image:
    radial-gradient(120% 90% at 6% -10%, #f2edff 0%, rgba(242, 237, 255, 0) 62%),
    radial-gradient(100% 85% at 96% 0%, #eaf1fc 0%, rgba(234, 241, 252, 0) 58%);
}

.kx-process__card {
  max-width: 880px;
  margin: 56px auto 0;
  padding: 44px 46px;
  border-radius: 28px;
  border: 1px solid var(--kx-border);
  background: var(--kx-bg);
}

.kx-process__step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 20px;
}

.kx-process__rail { display: flex; flex-direction: column; align-items: center; }

.kx-process__dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(110, 86, 248, .14);
}

.kx-process__dot i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--kx-purple);
}

.kx-process__line {
  flex: 1;
  width: 1px;
  margin: 6px 0 0;
  background: rgba(0, 0, 0, .14);
}

.kx-process__body { padding-bottom: 38px; }
.kx-process__step:last-child .kx-process__body { padding-bottom: 0; }

.kx-process__body h3 {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.024em;
}

.kx-process__body p {
  margin: 10px 0 0;
  max-width: 62ch;
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

/* --- Locations ------------------------------------------------------------ */

.kx-locations {
  position: relative;
  overflow: hidden;
  padding: 56px 0 112px;
  background-color: #fbfaff;
  background-image:
    radial-gradient(120% 70% at 4% 34%, #f2edff 0%, rgba(242, 237, 255, 0) 62%),
    radial-gradient(110% 70% at 98% 46%, #eaf1fc 0%, rgba(234, 241, 252, 0) 60%),
    radial-gradient(130% 95% at 50% 112%, #fdeafb 0%, rgba(253, 234, 251, 0) 64%);
}

.kx-locations__inner { position: relative; }

.kx-globe {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 8px 0 34px;
}

.kx-globe__shadow {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: min(52%, 380px);
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(52, 38, 120, .2), rgba(52, 38, 120, 0));
  filter: blur(9px);
}

.kx-globe__host {
  position: relative;
  width: min(100%, 720px);
  height: min(78vw, 620px);
}

.kx-globe__canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }

.kx-globe__card {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--kx-bg);
  color: var(--kx-ink);
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 30px 60px -24px rgba(29, 29, 31, .35);
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
  will-change: transform, opacity;
}

.kx-globe__card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: var(--kx-card-alt);
}

.kx-globe__card-text { padding: 14px 16px 16px; }

.kx-globe__card-text strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.022em;
}

.kx-globe__card-text p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

/* The plain-text fallback under the globe. It is the only description of where
   Keynes works that survives with no canvas, no JS, or a screen reader, so it
   is in the document rather than drawn — and hidden from sighted users only
   once the globe is actually running. */
.kx-globe__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kx-globe__list li {
  max-width: 30ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--kx-muted);
}

.kx-globe__list strong { display: block; color: var(--kx-ink); }

.kx-globe-live .kx-globe__list {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Roles ---------------------------------------------------------------- */

.kx-roles { padding: 104px 0 120px; }

.kx-roles__filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
}

.kx-roles__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.kx-roles__pill {
  padding: 9px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  border-radius: 999px;
  border: 1px solid var(--kx-border-pill);
  background: var(--kx-bg);
  color: var(--kx-ink);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.kx-roles__pill:hover { border-color: var(--kx-purple); }

.kx-roles__pill[aria-pressed="true"] {
  background: var(--kx-purple);
  border-color: var(--kx-purple);
  color: #fff;
}

/* The location row is the quieter of the two filters. */
.kx-roles__pill--loc {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 400;
  border-color: transparent;
  background: transparent;
  color: var(--kx-muted);
}

.kx-roles__pill--loc[aria-pressed="true"] {
  background: var(--kx-purple-tint);
  border-color: transparent;
  color: var(--kx-purple-hover);
}

.kx-roles__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 940px;
  margin: 34px auto 0;
}

.kx-role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border-radius: 22px;
  border: 1px solid var(--kx-border);
  background: var(--kx-bg);
  color: var(--kx-ink);
  transition: border-color .2s ease, transform .2s ease;
}

.kx-role-row:hover {
  border-color: rgba(110, 86, 248, .55);
  transform: translateY(-2px);
  color: var(--kx-ink);
}

.kx-role-row[hidden] { display: none; }

.kx-role-row__main { display: flex; flex-direction: column; gap: 7px; }

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

.kx-role-row__tags { display: flex; flex-wrap: wrap; gap: 8px; }

.kx-tag {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 999px;
  background: var(--kx-card-alt);
  color: var(--kx-muted);
}

.kx-tag--team {
  font-weight: 500;
  background: #efeefb;
  color: var(--kx-purple-hover);
}

.kx-role-row__cta {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--kx-purple);
  white-space: nowrap;
}

.kx-roles__empty {
  margin: 28px auto 0;
  max-width: 40ch;
  text-align: center;
  font-size: 16px;
  line-height: 1.55;
  color: var(--kx-muted);
}

.kx-roles__empty[hidden] { display: none; }

.kx-roles__closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 56px;
  text-align: center;
}

.kx-roles__closing h3 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -.03em;
}

.kx-roles__closing p {
  margin: 0;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--kx-muted);
}

.kx-roles__closing .kx-btn { margin-top: 8px; }

/* --- Single role ---------------------------------------------------------- */

.kx-role { padding: calc(var(--kx-header-h) + 72px) 0 40px; }

.kx-role__back {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 15px;
  color: var(--kx-muted);
}

.kx-role__back:hover { color: var(--kx-purple); }

.kx-role__title {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.04;
}

.kx-role__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.kx-role__summary {
  margin: 24px 0 0;
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -.012em;
  color: var(--kx-ink-2);
}

.kx-role__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.kx-role__body {
  max-width: 72ch;
  margin: 0;
  padding: 56px 0 96px;
  font-size: 17px;
  line-height: 1.62;
  color: var(--kx-ink-2);
}

.kx-role__body > * + * { margin-top: 1.1em; }

.kx-role__body h2 {
  margin-top: 2em;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.026em;
  color: var(--kx-ink);
}

.kx-role__body h3 {
  margin-top: 1.8em;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--kx-ink);
}

.kx-role__body ul, .kx-role__body ol { padding-left: 1.3em; }
.kx-role__body li + li { margin-top: .5em; }
.kx-role__body strong { color: var(--kx-ink); }

/* The closing apply panel on a role page. */
.kx-role__apply {
  padding: 48px;
  border-radius: 28px;
  border: 1px solid var(--kx-border);
  background: var(--kx-bg-alt);
  text-align: center;
}

.kx-role__apply h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -.03em;
}

.kx-role__apply p {
  margin: 12px auto 0;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--kx-muted);
}

.kx-role__apply .kx-btn { margin-top: 24px; }

/* The application form sits in the same panel as the fallback button. It is
   left-aligned against the panel's centred heading, because a form reads badly
   centred, and capped at a comfortable measure rather than the panel width. */
.kx-role__form {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 28px auto 0;
  text-align: left;
}

/* The confirmation replaces the form once it is submitted, so it is a line of
   prose rather than a set of fields and wants the panel's own centring back.
   Without this it inherits the left alignment above and sits oddly under the
   centred heading it is answering. */
.kx-role__form .submitted-message {
  text-align: center;
  text-wrap: pretty;
}

/* Scrolled to from the apply button at the top of the page, so it needs to
   clear the fixed header when it lands. */
.kx-role__apply { scroll-margin-top: calc(var(--kx-header-h) + 24px); }

/* --- Responsive ----------------------------------------------------------- */
/* The prototype has no media queries — every grid in it is a fixed column
   count, which is only correct at desktop width. */

@media (max-width: 1024px) {
  .kx-why__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .kx-why__card--accent { transform: none; }
  .kx-benefits__grid { grid-template-columns: repeat(2, 1fr); }
  .kx-values__row { grid-template-columns: 1fr; gap: 14px; }
  .kx-life__grid { grid-auto-rows: 170px; }
}

@media (max-width: 768px) {
  :root { --kx-gutter: 32px; }

  .kx-careers section { padding: 72px 0 80px; }
  .kx-benefits, .kx-process { padding-top: 72px; }
  .kx-note { padding: 80px 0 88px; }
  .kx-roles { padding: 80px 0 88px; }

  /* The photo wall is the hero's whole effect and it does not survive a narrow
     viewport — three columns at 24% each leave nothing legible. Drop to two
     and shorten the scroll track so the section does not outstay its welcome. */
  .kx-chero { height: 240vh; }
  .kx-chero__col--3 { display: none; }
  .kx-chero__col { width: 38%; }

  .kx-benefits__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .kx-process__card { padding: 32px 26px; }
  .kx-life__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .kx-life__cell--big, .kx-life__cell--wide { grid-column: span 2; }

  .kx-role-row { grid-template-columns: 1fr; gap: 14px; }
  .kx-role-row__cta { justify-self: start; }

  .kx-role { padding-top: calc(var(--kx-header-h) + 48px); }
  .kx-role__apply { padding: 32px 24px; }

  /* A 280px card next to a 320px globe does not fit; park it under the globe
     rather than letting it hang off the side. */
  .kx-globe__card { width: min(280px, 82vw); }
}

@media (max-width: 480px) {
  .kx-chero__col--2 { display: none; }
  .kx-chero__col { width: 62%; }
  .kx-values__head { gap: 14px; }
}

/* --- Reduced motion ------------------------------------------------------- */
/* The scroll choreography is also switched off in JS, which is what actually
   stops the work; this settles the resting state so nothing is left mid-effect. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .kx-chero { height: auto; min-height: 100vh; }
  .kx-chero__pin { position: static; height: auto; min-height: 100vh; }
  .kx-chero__wall { transform: rotate(-9deg); filter: none; opacity: 1; }
  .kx-chero__body { position: relative; opacity: 1; transform: none; padding: 120px 24px; }
  .kx-chero__reveal { display: none; }

  .kx-cmanifesto { height: auto; }
  .kx-cmanifesto__pin { position: static; height: auto; padding: 120px 0; }
  .kx-cmanifesto__headline span { color: #fff; transition: none; }

  .kx-role-row, .kx-roles__pill { transition: none; }
  .kx-role-row:hover { transform: none; }
}
