/* ===========================================================
   Bizniaga Technologies — Careers Page (27 Oct, v2)
   The banner, section headings and scroll reveal reuse css/services.css.
   This file adds: why-join benefit columns (old About Us timeline design),
   the job opening cards and the apply pop-up.
   Behaviour: script/career.js. Previous versions: Backup/Version 18 (stub),
   Backup/Version 19 (first careers design).
   =========================================================== */

.cr-title { font-size: clamp(26px, 1.4vw + 14px, 40px); }
.cr-hero-btn { margin-top: clamp(18px, 3vh, 28px); }
.cr-hero .page-hero-grid > div p { margin-bottom: 0; }
/* the job card navy and the Apply Now gradient (brand purple → brand red) */
:root {
  --cr-card: linear-gradient(165deg, #2b23c9 0%, #1a1196 48%, #0e0a63 100%);
  --cr-apply: linear-gradient(90deg, #4b3fe0 0%, #8a2bb8 55%, #c8102e 100%);
}


/* ---------------- WHY JOIN US: benefit columns ----------------
   Like the old About Us timeline: three plain columns on white (word with a
   line under it, title, text, photo). The highlight — a tall navy rectangle
   drawn behind one column — moves left → middle → right, then the row slides
   on to the next three. script/career.js sets .is-active and moves .cb-track. */
.cr-why {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-space) + 4vh) 0 clamp(36px, 6vh, 72px);
  background: #fff;
}
.cb-slider {
  --per: 3;                              /* columns in view */
  --gap: clamp(20px, 2.4vw, 40px);
  --lift: clamp(16px, 2.6vh, 28px);      /* how far the navy rectangle reaches above / below */
  --pad: clamp(18px, 1.6vw, 26px);
  position: relative;
  margin-top: clamp(14px, 2.4vh, 36px);
  padding: var(--lift) 0;
  overflow-x: clip;                      /* hides the next three; the navy can still reach up / down */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.cb-slider.is-dragging { cursor: grabbing; }
.cb-slider.is-dragging .cb-track { transition: none; }
.cb-photo img { -webkit-user-drag: none; }
.cb-track {
  display: flex;
  gap: var(--gap);
  transform: translateX(calc(var(--page, 0) * -1 * (100% + var(--gap)) + var(--drag, 0px)));
  transition: transform 0.9s cubic-bezier(.65,.05,.25,1);
}
.cb-card {
  position: relative;
  z-index: 0;
  flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per));
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad);
  color: var(--navy);
  transition: color 0.6s ease;
}
.cb-card::before {                       /* the navy rectangle, taller than the column */
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(var(--lift) * -1) 0;
  border-radius: 18px;
  background: linear-gradient(165deg, #2b23c9 0%, #1a1196 48%, #0e0a63 100%);
  box-shadow: 0 30px 60px rgba(26, 17, 150, 0.3);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cb-card.is-active { color: #fff; }
.cb-card.is-active::before { opacity: 1; transform: none; }
.cb-label {
  align-self: flex-start;
  margin: 0 0 clamp(8px, 1.4vh, 12px);
  padding-bottom: 3px;
  border-bottom: 2px solid currentColor;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 0.8vw + 12px, 30px);
  line-height: 1.1;
}
.cb-name { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 0.5vw + 11px, 20px); line-height: 1.3; }
.cb-text {
  flex: 1;
  margin: 0 0 clamp(12px, 2vh, 18px);
  font-size: 15px;
  line-height: 1.7;
  text-align: justify;
  -webkit-hyphens: auto;
          hyphens: auto;
  color: var(--muted);
  transition: color 0.6s ease;
}
.cb-card.is-active .cb-text { color: rgba(255, 255, 255, 0.85); }
.cb-photo { height: clamp(170px, 27vh, 280px); border-radius: 8px; overflow: hidden; background: var(--mist); }
.cb-photo img { width: 100%; height: 100%; object-fit: cover; }

/* dots: one per benefit, the current one fills while it is highlighted */
.cb-dots { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: calc(var(--lift) + clamp(10px, 2vh, 20px)); }
.cb-dot {
  position: relative;
  width: 14px; height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}
.cb-dot::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 12px; margin-top: -6px;
  border-radius: 999px;
  background: rgba(18, 22, 58, 0.22);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.cb-dot:hover::before { background: rgba(75, 63, 176, 0.45); box-shadow: 0 0 0 3px rgba(75, 63, 176, 0.15); }
.cb-dot:focus-visible { outline: 2px solid var(--purple-start); outline-offset: 3px; }
.cb-dot.is-active { width: 56px; }
.cb-dot.is-active::before { background: rgba(75, 63, 176, 0.22); }
.cb-dot-fill {
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 12px; margin-top: -6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--purple-start));
}
.cb-dot.is-active .cb-dot-fill { animation: cbFill var(--cb-time, 5s) linear forwards; }
.cb-slider.is-held .cb-dot.is-active .cb-dot-fill { animation-play-state: paused; }
@keyframes cbFill { to { width: 100%; } }

/* tablets: two columns; phones: one */
@media (max-width: 1024px) { .cb-slider { --per: 2; } }
@media (max-width: 640px)  { .cb-slider { --per: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cb-track, .cb-card, .cb-card::before { transition: none; }
  .cb-dot.is-active .cb-dot-fill { animation: none; width: 100%; }
}


/* ---------------- CURRENT OPENINGS ----------------
   Tall navy cards side by side. script/career.js adds .is-open to the card
   being looked at and .has-open to the row: that card widens to show the
   full role and the others fold into narrow strips with the title written
   upwards. Each card holds three layers: .job-sum (closed), .job-detail
   (open) and .job-vtitle (folded); only one shows at a time.
   --base-w / --open-w (set by career.js) keep the text from re-wrapping
   while a card changes width. */
.cr-jobs { padding: clamp(60px, 10vh, 110px) 0 clamp(60px, 10vh, 100px); background: #fff; }
.cr-sub { max-width: 620px; margin-bottom: 0; }
.job-list {
  --strip: clamp(118px, 9vw, 140px);    /* width of a folded card */
  --gap: clamp(14px, 1.6vw, 22px);
  --pad: clamp(22px, 2vw, 30px);
  --base-w: 360px;
  --open-w: 800px;
  display: flex;
  gap: var(--gap);
  height: clamp(400px, 60vh, 520px);
  margin-top: clamp(26px, 4.4vh, 44px);
}
.job {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--cr-card);
  color: #fff;
  box-shadow: 0 22px 44px rgba(14, 10, 99, 0.28);
  cursor: pointer;
  transition: flex 0.75s cubic-bezier(.65,.05,.25,1), box-shadow 0.3s ease;
}
.job:focus-visible { outline: 3px solid rgba(75, 63, 176, 0.5); outline-offset: 4px; }
.job-list.has-open .job { flex: 0 0 var(--strip); }
.job-list.has-open .job.is-open { flex: 1 1 0; cursor: default; box-shadow: 0 30px 60px rgba(14, 10, 99, 0.36); }

.job-title {
  margin: 0 0 clamp(14px, 2.4vh, 22px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 1vw + 12px, 30px);
  line-height: 1.15;
  color: #fff;
}
/* layer 1: closed card */
.job-sum {
  position: absolute;
  left: var(--pad); top: var(--pad);
  width: calc(var(--base-w) - var(--pad) * 2);
  transition: opacity 0.35s ease 0.3s;
}
.job-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.job-facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.9); }
.job-facts svg { width: 22px; height: 22px; }
/* layer 2: open card */
.job-detail {
  position: absolute;
  left: var(--pad); top: var(--pad);
  bottom: calc(var(--pad) + 64px);
  width: calc(var(--open-w) - var(--pad) * 2);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
/* soft fade at the bottom edge when the role is longer than the card (it scrolls) */
.job-detail { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); padding-bottom: 22px; }
.job-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.6vw, 40px); }
.job-detail h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff; }
.job-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-detail li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.job-detail li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
/* layer 3: folded strip (title reads bottom to top) */
.job-vtitle {
  position: absolute;
  left: 50%;
  top: var(--pad);
  bottom: calc(var(--pad) + 64px);
  margin: 0;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 1vw + 12px, 28px);
  line-height: 1.1;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
/* which layer shows */
.job-list.has-open .job .job-sum { opacity: 0; transition-delay: 0s; pointer-events: none; }
.job.is-open .job-detail { opacity: 1; visibility: visible; transition: opacity 0.45s ease 0.45s, visibility 0s; }
.job-list.has-open .job:not(.is-open) .job-vtitle { opacity: 1; transition-delay: 0.4s; }

.job-apply {
  position: absolute;
  left: var(--pad);
  bottom: var(--pad);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--cr-apply);
  background-size: 160% 100%;
  background-position: 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.28);
  transition: left 0.6s cubic-bezier(.65,.05,.25,1), transform 0.6s cubic-bezier(.65,.05,.25,1),
              padding 0.4s ease, font-size 0.4s ease, background-position 0.4s ease, box-shadow 0.3s ease;
}
.job-apply span { transition: transform 0.25s ease; }
.job-apply:hover { background-position: 100% 0; box-shadow: 0 14px 30px rgba(200, 16, 46, 0.38); }
.job-apply:hover span { transform: translateX(4px); }
.job-list.has-open .job:not(.is-open) .job-apply { left: 50%; transform: translateX(-50%); padding: 10px 12px; font-size: 13px; gap: 6px; }

.cr-general { margin: clamp(22px, 4vh, 36px) 0 0; text-align: center; font-size: 15px; color: var(--muted); }
.cr-link { margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--purple-start); }
.cr-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* phones / small tablets: cards stack; a tap opens one downwards */
@media (max-width: 860px) {
  .job-list { flex-direction: column; height: auto; }
  .job, .job-list.has-open .job, .job-list.has-open .job.is-open { flex: none; }
  .job { padding: var(--pad); }
  .job-sum, .job-detail { position: static; width: auto; }
  .job-list.has-open .job .job-sum { opacity: 1; pointer-events: auto; }
  .job-detail {
    max-height: 0;
    overflow: hidden;
    visibility: visible;
    transition: max-height 0.6s ease, opacity 0.4s ease;
  }
  .job.is-open .job-detail { max-height: 1600px; margin-top: 18px; }
  .job-detail .job-title { display: none; }
  .job-detail { -webkit-mask-image: none; mask-image: none; padding-bottom: 0; }
  .job-cols { grid-template-columns: 1fr; }
  .job-vtitle { display: none; }
  .job-apply, .job-list.has-open .job:not(.is-open) .job-apply { position: static; transform: none; margin-top: 20px; padding: 12px 20px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .job, .job-apply, .job-sum, .job-detail, .job-vtitle { transition: none !important; }
}


/* ---------------- APPLY POP-UP ---------------- */
.apply-modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink, var(--navy));
  box-shadow: 0 40px 90px rgba(6, 8, 30, 0.45);
  overflow: auto;
  overscroll-behavior: contain;
}
.apply-modal[open] { animation: applyIn 0.4s cubic-bezier(.22,.9,.32,1); }
.apply-modal::backdrop { background: rgba(11, 13, 38, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes applyIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
.apply-form { position: relative; display: grid; gap: 14px; padding: clamp(24px, 4vh, 38px) clamp(22px, 3vw, 40px); }
.apply-form .section-eyebrow { margin: 0; }
.apply-title { margin: -6px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 1vw + 14px, 30px); color: var(--navy); }
.apply-note { margin: -4px 0 6px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.apply-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  color: var(--navy);
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}
.apply-close:hover { background: var(--navy); color: #fff; transform: rotate(90deg); }
.apply-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.apply-field { position: relative; display: grid; gap: 6px; }
.apply-field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.apply-field em { font-style: normal; font-weight: 400; color: var(--muted); }
.apply-field input:not([type=file]),
.apply-field select,
.apply-field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.apply-field select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat; }
.apply-field input:focus, .apply-field select:focus, .apply-field textarea:focus { outline: none; border-color: var(--purple-start); background-color: #fff; }
.apply-field .is-invalid, .apply-file.is-invalid .apply-file-box { border-color: var(--red) !important; }
/* CV upload: the real file input covers the box, so clicking or dropping a file works */
.apply-file input[type=file] { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; opacity: 0; cursor: pointer; z-index: 2; }
.apply-file-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 16px;
  border: 1.5px dashed #c9cbe0;
  border-radius: 12px;
  background: var(--mist);
  font-size: 13.5px;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.apply-file:hover .apply-file-box, .apply-file.is-drag .apply-file-box { border-color: var(--purple-start); background: #eeedfb; }
.apply-file.has-file .apply-file-box { border-style: solid; border-color: var(--purple-start); color: var(--navy); font-weight: 600; }
.apply-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apply-file-btn { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 600; }
.apply-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.apply-submit.btn { background: var(--navy); color: #fff; padding: 12px 24px; }
.apply-submit.btn:hover { background: var(--purple-start); }
.apply-submit[disabled] { opacity: 0.6; cursor: wait; }
.apply-status { margin: 0; font-size: 13.5px; color: var(--muted); }
.apply-status.is-ok { color: #1f8a57; }
.apply-status.is-error { color: var(--red); }
html.apply-open { overflow: hidden; }
@media (max-width: 560px) {
  .apply-row { grid-template-columns: 1fr; }
  .apply-modal { width: calc(100% - 20px); border-radius: 20px; }
}


/* ---------------- Wide screens (past 1536px; units from css/wide.css) ---------------- */
@media (min-width: 1537px) {
  .cb-text { font-size: calc(15 * var(--ut)); }
  .cb-photo { height: clamp(170px, 27vh, calc(280 * var(--u))); }
  .job-list { --strip: calc(140 * var(--u)); height: clamp(400px, 60vh, calc(520 * var(--u))); }
  .job-facts li { font-size: calc(15 * var(--ut)); }
  .job-detail li { font-size: calc(13.5 * var(--ut)); }
  .job-detail h4 { font-size: calc(16 * var(--ut)); }
  .job-apply { font-size: calc(15 * var(--ut)); }
  .apply-modal { width: min(calc(640 * var(--u)), calc(100% - 32px)); }
}


/* ---------------- One screen per section + snapping (27 Oct) ----------------
   Each section is a .sv-scene: the page glides one section per wheel /
   trackpad gesture like Services and Products (script/career.js). */
@media (min-width: 861px) {
  .cr-why, .cr-jobs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--nav-space) + 2vh);
    padding-bottom: 4vh;
  }
  .cr-why > .container, .cr-jobs > .container { width: 100%; }
  .cb-slider { margin-top: clamp(10px, 2vh, 28px); }
}
@media (max-width: 860px) {
  .cr-why.sv-scene, .cr-jobs.sv-scene { min-height: 0; }
}

/* ---------------- Job cards: Version 1 Services motion (27 Oct) ----------------
   Cards slide in from the left one after another when the section comes into
   view and slide out to the right when it leaves (.in-view / .out-view from
   career.js); widening / folding uses the quicker V1 accordion easing. */
.job {
  --d: 0s;
  opacity: 0;
  transform: translateX(-60px);
  transition:
    flex 0.55s cubic-bezier(.4,0,.2,1),
    box-shadow 0.3s ease,
    opacity 1.2s cubic-bezier(.4,0,.2,1) var(--d),
    transform 1.2s cubic-bezier(.4,0,.2,1) var(--d);
}
.job:nth-child(2) { --d: 0.15s; }
.job:nth-child(3) { --d: 0.3s; }
.job:nth-child(4) { --d: 0.45s; }
.cr-jobs.in-view .job { opacity: 1; transform: none; }
.cr-jobs.out-view .job { opacity: 0; transform: translateX(60px); }
.cr-jobs.out-view .job:nth-child(1) { --d: 0.3s; }
.cr-jobs.out-view .job:nth-child(3) { --d: 0s; }
/* text follows the card quickly, like V1: the title grows / shrinks, details fade in */
.job-sum { transition: opacity 0.3s ease 0.2s; }
.job.is-open .job-detail { transition: opacity 0.4s ease 0.25s, visibility 0s; }
.job-list.has-open .job:not(.is-open) .job-vtitle { transition-delay: 0.25s; }
.job-detail .job-title { font-size: clamp(18px, 0.6vw + 10px, 22px); transition: font-size 0.4s cubic-bezier(.4,0,.2,1); }
.job.is-open .job-detail .job-title { font-size: clamp(22px, 1vw + 12px, 30px); }
@media (prefers-reduced-motion: reduce) {
  .job { opacity: 1; transform: none; }
}
@media (max-width: 860px) {
  .job { opacity: 1; transform: none; }
}

/* shorter laptop screens: the benefits section still fits one screen */
@media (min-width: 861px) and (max-height: 800px) {
  .cb-text { font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
  .cb-photo { height: clamp(130px, 20vh, 200px); }
  .cb-label { margin-bottom: 6px; }
  .cb-name { margin-bottom: 6px; }
  .cb-dots { margin-top: calc(var(--lift) + 6px); }
  .cr-why { padding-bottom: 2vh; }
}


/* ================================================================
   27 Oct (later): white job cards with the opened one in blue,
   "Don't see your role?" line spacing, and sizes that shrink on
   smaller / shorter screens so each section fits one screen.
   ================================================================ */
:root { --cr-blue: linear-gradient(160deg, #3a4ce6 0%, #2a3bd2 55%, #2130b8 100%); }

/* white cards; the open one fills with blue */
.job { background: #fff; color: var(--navy); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(18, 22, 58, 0.08); }
.job::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--cr-blue);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.job.is-open::after { opacity: 1; }
.job.is-open { border-color: transparent; }
.job-list.has-open .job.is-open { box-shadow: 0 30px 60px rgba(38, 56, 207, 0.32); }
.job:not(.is-open):hover { border-color: rgba(75, 63, 176, 0.35); box-shadow: 0 18px 40px rgba(18, 22, 58, 0.12); }
.job-sum, .job-detail, .job-vtitle, .job-apply { z-index: 1; }
.job-title, .job-vtitle { color: var(--navy); transition: color 0.4s ease; }
.job.is-open .job-title { color: #fff; }
.job-facts li { color: var(--muted); }
.job-facts svg { color: var(--purple-start); }

/* "Don't see your role?" — centred under the cards with room to breathe */
.cr-general {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 6px;
  margin: clamp(28px, 5vh, 52px) 0 0;
  font-size: 15px;
}
.cr-link { margin-left: 0; font-size: inherit; line-height: inherit; }
.cr-jobs { padding-bottom: clamp(48px, 9vh, 100px); }

/* sizes follow the screen's width AND height, so short screens shrink too */
.cr-title { font-size: clamp(22px, min(1.4vw + 12px, 3.4vh + 10px), 40px); }
.cr-why .section-eyebrow, .cr-jobs .section-eyebrow { font-size: clamp(11px, min(0.3vw + 8px, 1.2vh + 5px), 13px); }
.cr-sub { font-size: clamp(13px, min(0.3vw + 10px, 1.2vh + 7px), 15px); }
.job-title { font-size: clamp(18px, min(1vw + 10px, 2.6vh + 6px), 30px); }
.job-vtitle { font-size: clamp(18px, min(1vw + 10px, 2.6vh + 6px), 28px); }
.job-facts li { font-size: clamp(13px, min(0.3vw + 10px, 1.3vh + 6px), 15px); }
.job-detail li { font-size: clamp(12.5px, min(0.25vw + 9.5px, 1.2vh + 6px), 13.5px); }
.job-apply { font-size: clamp(13px, min(0.3vw + 9px, 1.2vh + 6px), 15px); padding: clamp(9px, 1.4vh, 12px) clamp(14px, 1.4vw, 20px); }
@media (min-width: 861px) {
  /* the cards take whatever height is left under the heading */
  .job-list { height: clamp(260px, calc(100svh - var(--nav-space) - 250px), 520px); }
}

/* short screens (small laptops, zoomed-in browsers): benefits stay on one screen */
@media (min-width: 861px) and (max-height: 680px) {
  .cr-why, .cr-jobs { padding-top: calc(var(--nav-space) + 1vh); padding-bottom: 2vh; }
  .cb-slider { --lift: 12px; margin-top: 8px; }
  .cb-label { font-size: clamp(20px, 3.4vh, 26px); margin-bottom: 4px; }
  .cb-name { font-size: 15px; margin-bottom: 4px; }
  .cb-text { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
  .cb-photo { height: clamp(70px, 14vh, 120px); }
  .cb-dots { margin-top: calc(var(--lift) + 2px); }
  .job-list { margin-top: 16px; }
  .cr-general { margin-top: 20px; }
}
@media (min-width: 1537px) {
  .cr-general { font-size: calc(15 * var(--ut)); }
  .job-facts li { font-size: calc(15 * var(--ut)); }
  .job-detail li { font-size: calc(13.5 * var(--ut)); }
  .job-apply { font-size: calc(15 * var(--ut)); }
  .cr-sub { font-size: calc(15 * var(--ut)); }
  .job-list { height: clamp(260px, calc(100svh - var(--nav-space) - 290px), calc(520 * var(--u))); }
}


/* ================================================================
   27 Oct (later): job cards stay white when opened; Apply Now in
   blue-violet with a dark-blue shadow and a Connect-style fill on
   hover; benefit columns a fixed height with the words scrolling.
   ================================================================ */
/* opened job card: white, outlined in purple — no blue fill */
.job::after { display: none; }
.job.is-open { border-color: rgba(75, 63, 176, 0.45); }
.job-list.has-open .job.is-open { box-shadow: 0 26px 54px rgba(18, 22, 58, 0.16); }
.job.is-open .job-title { color: var(--navy); }
.job-detail h4 { color: var(--purple-start); }
.job-detail li { color: #4a4d66; }
.job-detail li::before { background: linear-gradient(135deg, var(--red), var(--purple-start)); }
.job-detail { scrollbar-color: rgba(75, 63, 176, 0.35) transparent; }

/* Apply Now: blue-violet, dark-blue shadow, navy sweeps in from the left on hover (like Connect) */
.job-apply {
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(90deg, #4b3fe0 0%, #2b23c9 100%);
  box-shadow: 0 10px 24px rgba(18, 22, 58, 0.28);
}
.job-apply::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.job-apply:hover { background-position: 0 0; box-shadow: 0 14px 30px rgba(18, 22, 58, 0.38); }
.job-apply:hover::before { transform: scaleX(1); }
.job-list.has-open .job:not(.is-open) .job-apply { padding: 10px 12px; }

/* benefit columns: fixed height; the words scroll when they don't fit
   (wheel over them scrolls the words first, then the page moves on) */
@media (min-width: 861px) {
  .cb-card { height: clamp(300px, calc(100svh - var(--nav-space) - 240px), 520px); }
  .cb-text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    margin-right: -6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 63, 176, 0.35) transparent;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
    padding-bottom: 14px;
  }
  .cb-card.is-active .cb-text { scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }
  .cb-photo { flex: none; height: clamp(100px, 20vh, 240px); }
}
/* short screens: keep the words a comfortable size and let them scroll */
@media (min-width: 861px) and (max-height: 680px) {
  .cb-text { font-size: 14px; line-height: 1.6; }
  .cb-label { font-size: clamp(22px, 3.6vh, 28px); }
  .cb-name { font-size: 16px; }
  .cb-photo { height: clamp(80px, 16vh, 140px); }
}
@media (min-width: 1537px) {
  .cb-card { height: clamp(300px, calc(100svh - var(--nav-space) - 270px), calc(520 * var(--u))); }
  .cb-photo { height: clamp(100px, 20vh, calc(240 * var(--u))); }
}


/* ================================================================
   27 Oct (later): shorter benefit text with larger photos (no
   scrolling), and job details laid out in columns that fill the
   space so a role fits on screen without scrolling.
   ================================================================ */
@media (min-width: 861px) {
  .cb-card { height: auto; }
  .cb-text {
    flex: 0 0 auto;
    overflow: visible;
    margin: 0 0 auto;              /* any spare room sits between the words and the photo */
    padding: 0 0 clamp(12px, 2vh, 18px);
    -webkit-mask-image: none;
            mask-image: none;
  }
  .cb-photo { flex: none; height: clamp(150px, 28vh, 320px); }
}
@media (min-width: 861px) and (max-height: 680px) {
  .cb-photo { height: clamp(120px, 25vh, 200px); }
  .cb-text { font-size: 13.5px; }
}
@media (min-width: 1537px) {
  .cb-card { height: auto; }
  .cb-photo { height: clamp(150px, 28vh, calc(320 * var(--u))); }
}

/* Openings: the section is one screen and the row of cards takes all the
   height left under the heading */
@media (min-width: 861px) {
  .cr-jobs { height: 100vh; height: 100svh; min-height: 560px; }
  .cr-jobs > .container { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .cr-jobs .job-list { flex: 1 1 auto; height: auto; min-height: 260px; max-height: 620px; margin-top: clamp(14px, 2.6vh, 32px); }
  .cr-jobs .cr-general { margin-top: clamp(16px, 3vh, 36px); }
  .job-list { --strip: clamp(100px, 7.6vw, 128px); }
}
/* the role's points flow across as many columns as fit, instead of scrolling */
.job-detail { bottom: calc(var(--pad) + 52px); }
.job-detail .job-title { margin-bottom: clamp(8px, 1.6vh, 14px); }
.job-cols { display: block; column-width: 230px; column-gap: clamp(22px, 2.4vw, 36px); }
.job-cols > div { display: contents; }
.job-detail h4 { margin: 0 0 6px; font-size: clamp(13px, min(0.25vw + 10px, 1.4vh + 5px), 15px); break-after: avoid; }
.job-detail ul { display: block; margin: 0 0 clamp(10px, 1.6vh, 14px); }
.job-detail li { margin-bottom: clamp(4px, 0.8vh, 7px); break-inside: avoid; line-height: 1.45; font-size: clamp(12px, min(0.22vw + 9.5px, 1.25vh + 5px), 13.5px); }
@media (max-width: 860px) {
  .job-cols { column-width: auto; column-count: 1; }
  .cr-jobs { height: auto; }
}
@media (min-width: 1537px) {
  .cr-jobs .job-list { max-height: calc(620 * var(--u)); }
  .job-detail li { font-size: calc(13.5 * var(--ut)); }
}

/* more room for the role: Apply Now moves up beside the title when a card
   opens, the intro line runs wider, and less empty space under the cards */
@media (min-width: 861px) {
  .cr-sub { max-width: 920px; }
  .cr-jobs { padding-bottom: clamp(16px, 3vh, 40px); }
  .job-apply { transition: left 0.55s cubic-bezier(.4,0,.2,1), bottom 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1), padding 0.4s ease, font-size 0.4s ease, box-shadow 0.3s ease; }
  .job-list.has-open .job.is-open .job-apply {
    left: calc(100% - var(--pad));
    bottom: calc(100% - var(--pad) - clamp(36px, 5vh, 44px));
    transform: translateX(-100%);
  }
  .job-detail { bottom: var(--pad); }
  .job-detail .job-title { padding-right: 170px; min-height: clamp(36px, 5vh, 44px); display: flex; align-items: center; }
}
@media (min-width: 861px) and (max-height: 640px) {
  .job-detail li { font-size: 12px; line-height: 1.38; margin-bottom: 3px; }
  .job-detail h4 { margin-bottom: 4px; }
  .job-detail ul { margin-bottom: 8px; }
  .cr-jobs .cr-general { margin-top: 12px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .job-cols { column-width: 190px; column-gap: 20px; }
  .job-list { --strip: 92px; }
}
/* folded strips: wide enough for their Apply Now button */
@media (min-width: 861px) {
  .job-list { --strip: clamp(118px, 8vw, 132px); }
  .job-list.has-open .job:not(.is-open) .job-apply { padding: 9px 10px; font-size: 12.5px; gap: 5px; }
}
@media (min-width: 861px) and (max-width: 1100px) { .job-list { --strip: 112px; } }
@media (min-width: 861px) and (max-height: 640px) { .job-detail li { line-height: 1.34; } .job-detail .job-title { margin-bottom: 6px; } }
@media (min-width: 861px) and (max-width: 1100px) { .job-cols { column-width: 170px; column-gap: 18px; } .job-detail .job-title { font-size: 20px; } }

/* ================================================================
   27 Oct (later): back to Apply Now at the bottom of an opened card.
   Responsibilities (left) and Job requirements (right) each scroll on
   their own; the title and the two headings stay in place.
   ================================================================ */
@media (min-width: 861px) {
  .job-list.has-open .job.is-open .job-apply { left: var(--pad); bottom: var(--pad); transform: none; }
  .job-detail {
    bottom: calc(var(--pad) + 64px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .job-detail .job-title { padding-right: 0; min-height: 0; display: block; margin-bottom: clamp(10px, 1.8vh, 16px); }
  .job-cols {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 2.6vw, 40px);
    column-width: auto;
  }
  .job-cols > div { display: flex; flex-direction: column; min-height: 0; }
  .job-detail h4 { margin: 0 0 8px; font-size: clamp(14px, 0.3vw + 10px, 16px); }
  .job-cols ul {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 10px 18px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 63, 176, 0.35) transparent;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
  }
  .job-detail li { font-size: clamp(12.5px, min(0.25vw + 9.5px, 1.2vh + 6px), 13.5px); line-height: 1.55; margin-bottom: 8px; }
}
@media (min-width: 861px) and (max-width: 1100px) { .job-cols { gap: 18px; } }
@media (min-width: 861px) { .job .job-detail .job-title, .job-cols h4 { flex: none; } .job .job-detail .job-title { margin: 0 0 clamp(12px, 2.2vh, 20px); } }

/* ================================================================
   28 Oct: more breathing room inside the benefit cards — wider side
   padding and the navy box reaching further above and below, so the
   card reads as a taller rectangle.
   ================================================================ */
.cb-slider {
  --pad: clamp(26px, 2.4vw, 42px);
  --lift: clamp(26px, 4.6vh, 48px);
  --gap: clamp(28px, 3vw, 52px);
}
.cb-card::before { border-radius: 22px; }
.cb-photo { border-radius: 12px; }
@media (min-width: 861px) {
  .cb-photo { height: clamp(140px, 25vh, 290px); }
  .cr-why { padding-top: calc(var(--nav-space) + 1vh); padding-bottom: 1vh; }
}
@media (min-width: 861px) and (max-height: 680px) {
  .cb-slider { --lift: 20px; --pad: clamp(22px, 2vw, 30px); }
  .cb-photo { height: clamp(110px, 21vh, 180px); }
}
@media (min-width: 1537px) {
  .cb-photo { height: clamp(140px, 25vh, calc(290 * var(--u))); }
}

/* ================================================================
   28 Oct: job card text animation
   - folding: the strip collapses first, THEN its title types in
     upwards letter by letter (script/career.js wraps each letter)
   - opening: the title, headings and points rise into place one
     after another once the card has widened
   ================================================================ */
.job-vtitle { opacity: 1 !important; transition: none !important; }
.job-vtitle .jl { opacity: 0; }
.job-list.has-open .job:not(.is-open) .job-vtitle .jl {
  animation: jobType 0.01s linear forwards;
  animation-delay: calc(0.55s + var(--k) * 32ms);   /* 0.55s = the fold time */
}
@keyframes jobType { to { opacity: 1; } }
/* a blinking caret follows the typing, then fades away */
.job-vtitle::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 2px;
  margin-top: 4px;
  background: var(--purple-start);
  opacity: 0;
}
.job-list.has-open .job:not(.is-open) .job-vtitle::after {
  animation: jobCaret 0.5s steps(1) calc(0.55s + var(--n, 20) * 32ms) 3 forwards;
}
@keyframes jobCaret { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

/* opening: content pops up from below, staggered */
.job.is-open .job-detail { opacity: 1; visibility: visible; transition: none; }
.job-detail .job-pop { opacity: 0; transform: translateY(18px); }
.job.is-open .job-detail .job-pop {
  animation: jobPop 0.5s cubic-bezier(.22,.9,.32,1) forwards;
  animation-delay: calc(0.35s + var(--k) * 55ms);
}
@keyframes jobPop { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .job-detail .job-pop { opacity: 1; transform: none; animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .job-vtitle .jl, .job-detail .job-pop { opacity: 1 !important; transform: none !important; animation: none !important; }
  .job-vtitle::after { display: none; }
}

/* ---------------- WHY JOIN BACKGROUND (3 Nov) ----------------
   Instead of plain white: a soft lavender wash, two blurred brand-colour
   glows (purple top-right, red bottom-left) and a faint dot grid that fades
   out towards the edges. */
.cr-why {
  background:
    radial-gradient(38% 45% at 92% 8%, rgba(91, 79, 224, 0.16), transparent 70%),
    radial-gradient(32% 40% at 4% 96%, rgba(228, 32, 48, 0.09), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f5f4ff 100%);
  isolation: isolate;
}
.cr-why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(26, 17, 150, 0.16) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 65% at 50% 45%, #000 0%, transparent 100%);
          mask-image: radial-gradient(70% 65% at 50% 45%, #000 0%, transparent 100%);
}

/* ---------------- APPLY: expected salary + thank-you (3 Nov) ---------------- */
.apply-field[hidden] { display: none; }
.apply-done { padding: clamp(24px, 4vh, 40px) clamp(22px, 3vw, 40px); display: grid; gap: 10px; justify-items: start; }
.apply-done .apply-submit { margin-top: 8px; }

/* 11 Nov — phones: an opened job no longer traps the finger.
   The details were a non-scrolling box with "contain" overscroll, so a swipe
   starting on them went nowhere. Now the card opens to its full length and
   the page itself scrolls through the requirements & responsibilities. */
@media (max-width: 860px) {
  .job-detail,
  .job-detail ul {
    overflow: clip;
    overscroll-behavior: auto;
    touch-action: pan-y;
  }
  .job.is-open .job-detail { max-height: 6000px; }
  .job { touch-action: pan-y; }
}
