/* =========================================================
   "From question to decision": four customer jobs (Research, Assess,
   Monitor, Communicate). Split heading (title left, sentence right),
   then a 2x2 grid of pale cards, each with a fine-line isometric
   illustration. Quiet hover: border, a few pixels of lift, and the
   illustration moves.
   Wide: text beside the illustration. Tablet: illustration on top.
   Phones: one column.
   ========================================================= */
.jobs {
  background: #fff;
  border-top: 1px solid #e8eeee;
  padding: clamp(64px, 9vh, 104px) 0 clamp(64px, 9vh, 100px);
}
.jobs-head,
.jobs-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Heading: title left, supporting sentence right ---------- */
.jobs-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
  margin-bottom: clamp(40px, 6vh, 60px);
}
.jobs .section-title {
  margin: 0;
  text-align: left;
  font-size: clamp(36px, 3.4vw, 50px);
  line-height: 1.08;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
.jobs-sub {
  max-width: 30em;
  text-wrap: pretty;
  margin: 0.35em 0 0;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--body, #374151);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- Card ---------- */
.job-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(180px, 16vw, 220px);
  align-items: center;
  column-gap: 20px;
  padding: 28px 24px 26px 32px;
  border-radius: 14px;
  background: #f7fafa;
  border: 1px solid #e3ebec;
  transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.job-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}
.job-card h3 {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #111827);
}
.job-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body, #374151);
}
.job-label {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.job-link {
  margin-top: auto;
  padding-top: 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-dark, #2f696f);
  text-decoration: none;
}
.job-link span {
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.3s ease;
}
/* the whole card is clickable through its link */
.job-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.job-link:focus-visible { outline: none; }
.job-card:has(.job-link:focus-visible) {
  outline: 2px solid var(--teal, #397f86);
  outline-offset: 3px;
}

/* ---------- Isometric illustrations: one fine-line system ---------- */
.job-art { display: flex; justify-content: center; }
.job-fig {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.job-fig polygon,
.job-fig line,
.job-fig polyline {
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.iso-box polygon { stroke: #6f8f94; stroke-width: 1; }
.f-t { fill: #fff; }
.f-l { fill: #eef4f5; }
.f-r { fill: #e1eced; }
.iso-box.is-back polygon { stroke: #a9bfc2; }
.iso-box.is-base .f-t { fill: #f9fbfb; }
.iso-box.is-key .f-t { fill: #fdf3e2; }
.iso-box.is-key polygon { stroke: #397f86; }
.iso-box.is-key .f-l { fill: #d6e7e8; }
.iso-box.is-key .f-r { fill: #b9d5d7; }
.iso-box.is-note polygon { stroke: #397f86; }
.g-guide { stroke: #9db6b9; stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.s-grid { stroke: #e1eaeb; stroke-width: 1; }
.s-text { stroke: #c3d3d5; stroke-width: 2; fill: none; }
.s-text.is-key { stroke: #397f86; }
.s-mark { fill: #e7a33c; opacity: 0.22; stroke: none; transition: opacity 0.4s ease; }
.c-check { fill: none; stroke: #e7a33c; stroke-width: 2; }
.m-trend { fill: none; stroke: #397f86; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.m-dot { fill: #e7a33c; }
.m-halo { fill: #e7a33c; opacity: 0.18; transform-box: fill-box; transform-origin: center; }

/* moving parts */
.r-layer, .r-answer, .a-bar, .m-pane, .c-note {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Hover (pointer devices only; cards work fully without it) ---------- */
@media (hover: hover) {
  .job-card:hover {
    background: #fff;
    border-color: color-mix(in srgb, #397f86 38%, #e3ebec);
    box-shadow: 0 10px 28px rgba(8, 26, 28, 0.07);
    transform: translateY(-3px);
  }
  .job-card:hover .job-link span { transform: translateX(4px); }
  .job-card:hover .job-link { text-decoration: underline; text-underline-offset: 3px; }

  /* Research: the source layers open up beneath the answer */
  .job-card:hover .r-layer { transform: translateY(calc(var(--i) * 3px)); }
  .job-card:hover .r-answer { transform: translateY(-8px); }
  .job-card:hover .s-mark { opacity: 0.38; }
  /* Assess: the ratings ripple across the grid */
  .job-card:hover .a-bar { animation: jf-bob 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 0.08s); }
  .job-card:hover .a-bar.is-key { animation-name: jf-rise; animation-fill-mode: forwards; }
  /* Monitor: the panes step up in time order and the trend draws in */
  .job-card:hover .m-pane { animation: jf-bob 0.8s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 0.05s); }
  .job-card:hover .m-trend { animation: jf-draw 1.1s ease; }
  .job-card:hover .m-halo { animation: jf-pulse 1.6s ease-out 0.9s infinite; }
  /* Communicate: the evidence note lifts off the claim */
  .job-card:hover .c-note { transform: translateY(-7px); }
}
@keyframes jf-bob { 0%, 100% { transform: none; } 45% { transform: translateY(-5px); } }
@keyframes jf-rise { 0% { transform: none; } 100% { transform: translateY(-6px); } }
@keyframes jf-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes jf-pulse { 0% { transform: scale(0.6); opacity: 0.35; } 100% { transform: scale(2); opacity: 0; } }

/* reveal cascade, alongside the cards' own hover transition */
.job-card.reveal {
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}
.job-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.job-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.job-card.reveal:nth-child(4) { transition-delay: 0.24s; }
.job-card.reveal.is-settled { transition-delay: 0s; }

/* ---------- Tablet: two columns, illustration above the text ---------- */
@media (max-width: 1099px) {
  .job-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    align-content: start;
    padding: 24px 26px 24px;
  }
  .job-art { order: -1; justify-content: flex-start; margin: 0 0 14px -6px; }
  .job-fig { width: auto; height: 132px; }
}
@media (max-width: 900px) {
  .jobs-head { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .jobs-sub { margin-top: 0; }
}

/* ---------- One column: the card is wide again, so text sits beside the art ---------- */
@media (max-width: 760px) {
  .jobs-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .job-card {
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: center;
    padding: 24px 20px 22px 26px;
  }
  .job-art { order: 0; margin: 0; justify-content: center; }
  .job-fig { width: 100%; height: auto; }
}

/* ---------- Phones: compact, illustration on top ---------- */
@media (max-width: 560px) {
  .jobs-sub { font-size: 17px; }
  .job-card {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 20px 22px 20px;
  }
  .job-art { order: -1; justify-content: flex-start; margin: -4px 0 10px -6px; }
  .job-fig { width: auto; height: 104px; }
  .job-card h3 { font-size: 20px; }
  .job-link { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .job-card, .job-link span, .r-layer, .r-answer, .a-bar, .m-pane, .c-note { transition: none; }
  .job-fig * { animation: none !important; }
  .job-card:hover, .job-card:hover .job-fig * { transform: none !important; }
}
