/* Careers — compact team band + open roles */

/* ----- Join our team (compact) ----- */
.cr-team-band {
  padding: 40px 0 36px;
  overflow: hidden;
  overflow-x: clip;
  border-bottom: 1px solid rgba(3, 7, 18, 0.06);
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

@media (max-width: 700px) {
  .cr-team-band { padding: 32px 0 28px; }
}

.cr-team-wrap {
  position: relative;
  text-align: center;
  padding: 0 5vw;
  max-width: 1040px;
  margin: 0 auto;
}

.cr-team-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  height: 120px;
  background: radial-gradient(ellipse 75% 80% at 50% 100%, rgba(3, 7, 18, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cr-team-head {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}

.cr-team-head h2 {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink, #030712);
  margin: 0 0 12px;
}

.cr-team-head p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--n5, #4c4c4c);
  margin: 0;
}

/* Three-row infinite marquee (overflows viewport) */
.cr-team-marquee {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 32px 0 0;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 5%,
    #000 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 5%,
    #000 95%,
    transparent 100%
  );
}

.cr-marquee-row {
  overflow: hidden;
  width: 100%;
  padding: 8px 0;
  box-sizing: content-box;
}

.cr-marquee-row + .cr-marquee-row {
  margin-top: -4px;
}

.cr-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.cr-marquee-set {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding-right: 10px;
}

/* Animate only on desktop — mobile uses static wrapped layout */
@media (prefers-reduced-motion: no-preference) and (min-width: 701px) {
  .cr-marquee-row:nth-child(1) .cr-marquee-track,
  .cr-marquee-row:nth-child(3) .cr-marquee-track {
    animation: crMarqueeLtr var(--cr-marquee-dur, 48s) linear infinite;
  }
  .cr-marquee-row:nth-child(2) .cr-marquee-track {
    animation: crMarqueeRtl var(--cr-marquee-dur, 48s) linear infinite;
  }
}

.cr-team-marquee.cr-team-marquee--static .cr-marquee-track,
.cr-team-marquee.cr-team-marquee--paused .cr-marquee-track {
  animation-play-state: paused;
}

@keyframes crMarqueeLtr {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes crMarqueeRtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .cr-marquee-set > .cr-chip {
    transform: scale(var(--cr-scale));
  }
  .cr-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
  }
  .cr-team-marquee {
    width: 100%;
    margin-left: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cr-marquee-row { overflow: visible; }
}

/* Bubbly size variety on member chips only (join circles keep fixed size) */
.cr-marquee-set > .cr-chip {
  --cr-scale: 1;
  --cr-y: 0px;
  transform: scale(var(--cr-scale)) translateY(var(--cr-y));
  transform-origin: center center;
}

.cr-marquee-set > .cr-chip:nth-child(11n+1)  { --cr-scale: 0.97; --cr-y: 1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+2)  { --cr-scale: 1.02; --cr-y: -1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+3)  { --cr-scale: 0.98; --cr-y: 1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+4)  { --cr-scale: 1.03; --cr-y: -1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+5)  { --cr-scale: 0.96; --cr-y: 2px; }
.cr-marquee-set > .cr-chip:nth-child(11n+6)  { --cr-scale: 1.01; --cr-y: 0; }
.cr-marquee-set > .cr-chip:nth-child(11n+7)  { --cr-scale: 0.99; --cr-y: 1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+8)  { --cr-scale: 1.04; --cr-y: -2px; }
.cr-marquee-set > .cr-chip:nth-child(11n+9)  { --cr-scale: 0.97; --cr-y: 0; }
.cr-marquee-set > .cr-chip:nth-child(11n+10) { --cr-scale: 1.02; --cr-y: 1px; }
.cr-marquee-set > .cr-chip:nth-child(11n+11) { --cr-scale: 1;    --cr-y: -1px; }

.cr-marquee-set > .cr-join {
  transform: translateY(var(--cr-join-y, 0));
}

.cr-marquee-set > .cr-join:nth-child(11n+2)  { --cr-join-y: -2px; }
.cr-marquee-set > .cr-join:nth-child(11n+5)  { --cr-join-y: 2px; }
.cr-marquee-set > .cr-join:nth-child(11n+8)  { --cr-join-y: -3px; }

.cr-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  background: #f0f0f2;
  border-radius: 999px;
  flex-shrink: 0;
}

.cr-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e8ec;
}

.cr-name,
.cr-role {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink, #030712);
  white-space: nowrap;
}

.cr-join {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue, #252fc7);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px -6px rgba(37, 47, 199, 0.5);
  /* Keep scaled join circles from clipping in marquee rows */
  position: relative;
  z-index: 1;
}

.cr-marquee-set > .cr-join {
  max-width: none;
  max-height: none;
}

.cr-join--xs { width: 48px; height: 48px; font-size: 7px; }
.cr-join--sm { width: 54px; height: 54px; }
.cr-join--md { width: 60px; height: 60px; font-size: 9px; }
.cr-join--lg { width: 66px; height: 66px; font-size: 9px; }

.cr-marquee-set > .cr-join:nth-child(11n+3)  { width: 50px; height: 50px; font-size: 7px; }
.cr-marquee-set > .cr-join:nth-child(11n+6)  { width: 62px; height: 62px; }
.cr-marquee-set > .cr-join:nth-child(11n+9)  { width: 56px; height: 56px; font-size: 8px; }
.cr-marquee-set > .cr-join:nth-child(11n+11) { width: 64px; height: 64px; font-size: 9px; }

html[dir="rtl"] .cr-marquee-row:nth-child(1) .cr-marquee-track,
html[dir="rtl"] .cr-marquee-row:nth-child(3) .cr-marquee-track {
  animation-name: crMarqueeRtl;
}

html[dir="rtl"] .cr-marquee-row:nth-child(2) .cr-marquee-track {
  animation-name: crMarqueeLtr;
}

/* ----- Open roles (Newden blue theme) ----- */
.cr-openings-block {
  padding: 56px 0 88px !important;
  margin: 0;
  background: linear-gradient(
    165deg,
    var(--blue-lightest, #e9eaf9) 0%,
    rgba(233, 236, 255, 0.65) 38%,
    rgba(255, 255, 255, 1) 72%
  );
  color: var(--ink, #030712);
}

.cr-openings-block.content-body .container-narrow {
  max-width: 820px;
}

.cr-openings-head {
  max-width: 620px;
  margin: 0 0 40px;
  padding: 0;
  border: none;
  text-align: start;
}

.cr-openings-head .eyebrow {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue, #252fc7);
  display: block;
  margin-bottom: 16px;
}

html[lang="ar"] .cr-openings-head .eyebrow {
  letter-spacing: 0;
}

.cr-openings-head h2 {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink, #030712);
  margin: 0 0 16px;
}

.cr-openings-head p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--n5, #4c4c4c);
  margin: 0;
  max-width: 54ch;
}

.cr-openings-inner .careers-list {
  margin-top: 0;
  gap: 18px;
}

/* Role cards */
.cr-openings-block .career-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(37, 47, 199, 0.16);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 14px 36px -22px rgba(37, 47, 199, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cr-openings-block .career-card:hover {
  border-color: rgba(37, 47, 199, 0.32);
  box-shadow: 0 18px 44px -18px rgba(37, 47, 199, 0.4);
}

.cr-openings-block .career-card h3 {
  color: var(--blue-darker, #0e124f);
}

.cr-openings-block .career-card .tag {
  display: inline-block;
  padding: 4px 11px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(37, 47, 199, 0.1);
  color: var(--blue, #252fc7);
  letter-spacing: 0.06em;
}

.cr-openings-block .career-card .career-location {
  color: rgba(29, 37, 159, 0.75);
}

.cr-openings-block .career-card .btn {
  background: var(--blue, #252fc7);
  color: #fff;
  border-color: transparent;
}

.cr-openings-block .career-card .btn:hover {
  background: var(--blue-dark, #1d259f);
  color: #fff;
}

.cr-openings-block .career-toggle {
  border-top-color: rgba(37, 47, 199, 0.12);
  color: var(--blue-dark, #1d259f);
}

.cr-openings-block .career-toggle-icon {
  color: var(--cyan, #00d2ff);
}

.cr-openings-block .career-details {
  color: rgba(14, 18, 79, 0.78);
}

/* Empty state */
.cr-openings-block .careers-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 44px;
  border-radius: 20px;
  border: 1px solid rgba(37, 47, 199, 0.2);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(233, 234, 249, 0.85) 100%
  );
  box-shadow: 0 16px 40px -24px rgba(37, 47, 199, 0.3);
}

.cr-openings-block .careers-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-lightest, #e9eaf9) 0%, rgba(0, 210, 255, 0.25) 100%);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--blue, #252fc7);
}

.cr-openings-block .careers-empty-icon svg {
  display: block;
}

.cr-openings-block .careers-empty-title {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-darker, #0e124f);
  margin: 0 0 8px;
}

.cr-openings-block .careers-empty-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(14, 18, 79, 0.72);
  max-width: 42ch;
  margin: 0 0 22px;
}

.cr-openings-block .careers-empty-state .btn {
  text-decoration: none;
  border-color: var(--blue, #252fc7);
  color: var(--blue, #252fc7);
}

.cr-openings-block .careers-empty-state .btn:hover {
  background: var(--blue-lightest, #e9eaf9);
  color: var(--blue-dark, #1d259f);
  border-color: var(--blue-dark, #1d259f);
}

@media (max-width: 700px) {
  .cr-marquee-row {
    padding: 10px 0;
    overflow: visible;
  }

  .cr-team-marquee,
  .cr-team-marquee.cr-team-marquee--static {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .cr-marquee-track {
    animation: none !important;
    will-change: auto;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    gap: 8px;
  }

  .cr-marquee-set {
    flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
    gap: 8px;
  }

  .cr-marquee-set > .cr-chip {
    --cr-scale: 1;
    --cr-y: 0;
  }

  .cr-name,
  .cr-role {
    white-space: normal;
    font-size: 12px;
    line-height: 1.25;
    max-width: 22ch;
    text-align: start;
  }

  .cr-openings-block {
    padding: 40px 0 56px !important;
  }

  .cr-openings-head {
    margin-bottom: 28px;
  }

  .cr-openings-head p {
    font-size: 16px;
  }

  .cr-openings-block .career-card {
    padding: 18px 16px;
  }

  .cr-openings-block .careers-empty-state {
    padding: 28px 20px 36px;
  }
}

@media (max-width: 520px) {
  .cr-team-marquee {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}
