/* ════════════════════════════════════════════════════════
   REUSABLE SUBPAGE HEADER (service / detail pages)
   Fill per page: breadcrumb, heading (+ .sub-hero__hl highlight),
   intro, CTA, the stat card (label / number / avatars) and 2 photos.
   Uses only existing design tokens. No libraries.
   ════════════════════════════════════════════════════════ */
.sub-hero { padding: calc(var(--section-pad-y) + 70px) 0 var(--section-pad-y); background: var(--e-global-color-bg); }
.sub-hero__wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── top row: heading (left) + intro & CTA (right) ── */
.sub-hero__top {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(30px, 4vw, 56px);
  align-items: end; margin-bottom: clamp(30px, 3.5vw, 44px);
}
.sub-hero__crumb {
  display: flex; align-items: center; gap: 8px; margin: 0 0 22px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--e-global-color-text-mute);
}
.sub-hero__crumb a { color: var(--e-global-color-text-mute); text-decoration: none; transition: color .2s ease; }
.sub-hero__crumb a:hover { color: var(--e-global-color-text); }
.sub-hero__crumb [aria-current] { color: var(--e-global-color-text); }
.sub-hero__crumb-sep { color: var(--e-global-color-text-mute); opacity: 0.5; }   /* lichtgrijze separators */
.sub-hero__heading {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: clamp(32px, 3.8vw, 50px); line-height: 1.1;
  letter-spacing: -0.025em; color: var(--e-global-color-text); margin: 0; max-width: none;
}
/* yellow highlight that stays legible on white: skewed marker bar */
.sub-hero__hl { position: relative; display: inline-block; color: var(--e-global-color-text); }
.sub-hero__hl::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: 0.08em;
  height: 0.30em; background: var(--e-global-color-accent);
  opacity: 0.9; z-index: -1; transform: skew(-6deg); border-radius: 4px;
}
.sub-hero__right { display: flex; flex-direction: column; gap: 22px; padding-bottom: 6px; }
.sub-hero__intro {
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.7;
  color: var(--e-global-color-text-dim); margin: 0;
}
.sub-hero__cta { align-self: flex-start; }   /* reuses .btn .btn--primary */

/* ── three-cell row: photo | stat | photo ── */
.sub-hero__cells {
  display: grid; grid-template-columns: 1.7fr 0.8fr 1.05fr; gap: 20px;
}
.sub-hero__photo, .sub-hero__stat { height: 360px; overflow: hidden; }
.sub-hero__stat { border-radius: 5px; }
.sub-hero__photo { border-radius: 0; }
.sub-hero__photo { margin: 0; }
.sub-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-hero__stat {
  background: var(--e-global-color-bg-soft);
  padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
}
.sub-hero__stat-label {
  font-family: 'JetBrains Mono', monospace; font-weight: 500;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--e-global-color-text-dim); margin: 0; max-width: 9ch; line-height: 1.35;
}
.sub-hero__stat-num {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: clamp(42px, 4vw, 58px); line-height: 1; letter-spacing: -0.02em;
  color: var(--e-global-color-text); margin: 0;
}
.sub-hero__avatars { display: flex; align-items: center; }
.sub-hero__avatars img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--e-global-color-bg); margin-left: -10px;
}
.sub-hero__avatars img:first-child { margin-left: 0; }
.sub-hero__avatars-add {
  width: 42px; height: 42px; border-radius: 50%; margin-left: -10px;
  background: var(--e-global-color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--e-global-color-bg);
}
.sub-hero__avatars-add svg { width: 18px; height: 18px; }

/* ── responsive ── */
/* TABLET: text row stacks 1-col; 3-cell row becomes 2-col with the stat spanning full width */
@media (max-width: 1024px) {
  .sub-hero__top { grid-template-columns: 1fr; gap: clamp(24px, 4vw, 32px); align-items: start; }
  .sub-hero__cells { grid-template-columns: 1fr 1fr; }
  .sub-hero__stat { grid-column: span 2; height: auto; min-height: 220px; }
  /* editor used in place of a photo: keep it in flow with the 2-col grid */
  .sub-hero__editor { height: 320px; }
}
/* PHONE: everything stacks to a single column */
@media (max-width: 640px) {
  .sub-hero__cells { grid-template-columns: 1fr; gap: 16px; }
  .sub-hero__photo { height: 240px; }
  .sub-hero__stat { grid-column: auto; height: auto; min-height: 200px; padding: 24px; }
  /* Eén vaste titelmaat voor ALLE subpagina-hero's op telefoon: 26px is de
     grootste maat waarbij de langste titel ('IT Staff Augmentation /
     Nearshoring' — langste regel 'IT Staff Augmentation' = 21 tekens à
     0.575em = 313.95px) nog binnen 320px (360px viewport − 2×20px gutter)
     past en dus elke titel op max 2 regels blijft, overal exact even groot. */
  .sub-hero__heading { font-size: 26px; }
  .sub-hero__stat-num { font-size: clamp(38px, 12vw, 52px); }
  /* CTA houdt op telefoon zijn natuurlijke breedte, links uitgelijnd —
     width:fit-content + justify-self dekken ook grid/stretch-containers */
  .sub-hero__cta { width: fit-content; justify-self: start; align-self: flex-start; }
}

/* ── optional: code-editor cell (use INSTEAD of a .sub-hero__photo) ──
   JS types the code out, then a green "run" result fades in (loops). */
.sub-hero__editor {
  height: 360px; border-radius: 5px; overflow: hidden; margin: 0;
  background: var(--e-global-color-bg); display: flex; flex-direction: column;
  border: 1px solid var(--e-global-color-border);
  box-shadow: none;
}
.ceditor__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; background: var(--e-global-color-bg-soft);
  border-bottom: 1px solid var(--e-global-color-border);
}
.ceditor__dot { width: 11px; height: 11px; border-radius: 50%; }
.ceditor__dot--r { background: #FE5B5B; }
.ceditor__dot--y { background: #EEC611; }
.ceditor__dot--g { background: #3FCF8E; }
.ceditor__file {
  margin-left: 8px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--e-global-color-text-mute);
}
.ceditor__body {
  flex: 1; padding: 18px 20px 16px; overflow: hidden;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7;
}
.ceditor__code { margin: 0; white-space: pre-wrap; color: var(--e-global-color-text); }
.ceditor__code .kw  { color: #8250df; }
.ceditor__code .fn  { color: #0969da; }
.ceditor__code .str { color: #0a7d33; }
.ceditor__code .pn  { color: var(--e-global-color-text-mute); }
.ceditor__caret {
  display: none; width: 7px; height: 1.05em; vertical-align: -0.18em;
  background: transparent; margin-left: 1px;
  animation: ceditorBlink 1s step-end infinite;
}
@keyframes ceditorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.ceditor__out {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--e-global-color-border);
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #1a7f37;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.ceditor__out.is-on { opacity: 1; transform: none; }
.ceditor__out .run { color: var(--e-global-color-text-mute); }
@media (prefers-reduced-motion: reduce) { .ceditor__caret { animation: none; } }
@media (max-width: 640px) {
  .sub-hero__editor { height: 300px; }
  .ceditor__body { padding: 14px 14px 12px; font-size: 12px; line-height: 1.6; }
  .ceditor__code { word-break: break-word; }
  .ceditor__bar { padding: 11px 14px; }
}
@media (max-width: 420px) {
  .sub-hero__editor { height: 280px; }
  .ceditor__body { font-size: 11px; }
}
