/* ════════════════════════════════════════════════════════════════════
   CAREERS — "Build Your Future With Us." Hero
   Isolated component (see careers-hero.js). Replaces the previous .cah
   cinematic-illustration hero on careers.html only — the nav, the logo
   and everything from "Why Join Us" downward are untouched. Full-bleed
   photographic composition of a professional walking a staircase
   toward a sunrise skyline (Hero/Career.*) — the plate already carries
   the dark navy field on the left, the orange stair-light strips, the
   skyline, sunrise and the bottom orange curve, so none of those are
   redrawn separately — one full-inset photo + one scrim, matching the
   site's established hero convention (.cnh in clientele-hero.css,
   .op-hero in process-hero.css, .sush in sustainability-hero.css), not
   a boxed image stitched against a separately drawn background. Five
   compact career-value features span the full-width lower band.

   Motion contract: only transform / opacity are animated on anything
   that runs continuously. Width, height, margin, left and top are
   never transitioned.
   ════════════════════════════════════════════════════════════════════ */

.cah {
  --navy: #08265C;
  --navy-mid: #061B49;
  --navy-deep: #020814;
  --ink: #F5F7FB;
  --ink-dim: #B8C4D4;
  --accent: #FF6B00;
  --accent-2: #FF7518;
  --accent-hot: #FFC24B;
  position: relative;
  height: 92vh;
  min-height: 760px;
  max-height: 1120px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--ink);
}

@media (max-width: 900px) {
  .cah { height: auto; min-height: 0; max-height: none; padding-bottom: 2.5rem; }
}

.cah-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* ══ full-bleed photo ══ */
.cah-visual { position: absolute; inset: 0; overflow: hidden; will-change: transform; }

.cah-visual picture,
.cah-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cah-visual-img {
  object-fit: cover;
  object-position: 66% 50%;
  transform: scale(1.05);
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  animation: cahIdleFloat 22s ease-in-out 1.8s infinite;
}

@media (max-width: 1100px) {
  .cah-visual-img { object-position: 72% 50%; }
}

/* single scrim reinforcing the plate's own navy field on the left so
   the headline stays readable, plus a bottom band so the feature row
   stays legible wherever it lands over the photo ── */
.cah-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, var(--navy-deep) 0%, rgba(2, 8, 20, .94) 22%, rgba(2, 8, 20, .76) 38%, rgba(2, 8, 20, .4) 54%, rgba(2, 8, 20, .1) 70%, transparent 84%),
    linear-gradient(180deg, rgba(2, 8, 20, .25) 0%, transparent 16%, transparent 56%, rgba(2, 8, 20, .55) 82%, rgba(2, 8, 20, .8) 100%);
}

@media (max-width: 900px) {
  .cah-scrim {
    background:
      linear-gradient(180deg, rgba(2, 8, 20, .72) 0%, rgba(2, 8, 20, .36) 18%, rgba(2, 8, 20, .3) 34%, rgba(2, 8, 20, .6) 54%, rgba(2, 8, 20, .9) 72%, var(--navy-deep) 92%),
      linear-gradient(90deg, rgba(2, 8, 20, .5) 0%, transparent 45%, transparent 60%, rgba(2, 8, 20, .35) 100%);
  }
}

/* ── faint technical grid, low opacity, confined to the content field ── */
.cah-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .04;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 42px);
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 36%, transparent 58%);
  mask-image: linear-gradient(100deg, #000 0%, #000 36%, transparent 58%);
  animation: cahGridDrift 22s linear infinite;
}

@keyframes cahGridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 84px 0, 0 84px; }
}

@media (max-width: 900px) {
  .cah-grid-lines { display: none; }
}

/* ── faint career-network lines + pulsing orange nodes over the dark
   navy field, communicating global connections/opportunity ── */
.cah-network {
  position: absolute;
  inset: 0;
  z-index: 1;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 34%, transparent 54%);
  mask-image: linear-gradient(100deg, #000 0%, #000 34%, transparent 54%);
}

.cah-network svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

.cah-network-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 8px 2px rgba(255, 194, 75, .5);
  opacity: .25;
  transform: scale(.85);
  animation: cahNodePulse var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes cahNodePulse {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50% { opacity: .7; transform: scale(1.15); }
}

@media (max-width: 900px) {
  .cah-network { display: none; }
}

/* ── soft breathing ambient glow echoing the sunrise already baked
   into the plate — the only motion added to the still photo's own
   lighting ── */
.cah-glow-wrap { position: absolute; inset: 0; z-index: 1; will-change: transform; }

.cah-glow {
  position: absolute;
  left: 62%;
  top: 30%;
  width: clamp(220px, 26vw, 440px);
  height: clamp(220px, 26vw, 440px);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(26px);
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 197, 90, .26) 0%, rgba(255, 107, 0, .1) 55%, transparent 75%);
  animation: cahSunBreathe 7s ease-in-out infinite;
}

@keyframes cahSunBreathe {
  0%, 100% { opacity: .55; }
  50% { opacity: .68; }
}

@media (max-width: 1100px) {
  .cah-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cah-visual-img { animation: none !important; }
  .cah-grid-lines, .cah-glow, .cah-network-node { animation: none !important; }
  .cah-network-node { opacity: .45; }
  .cah-glow { opacity: .7; }
}

/* ── drifting glow-dot particles (mirrors .hero-particles on the
   homepage / .ph-particles on the products page) — distinct from the
   JS-built .cah-network connected-node graph above. Plain spans
   injected once by careers-hero.js with randomized CSS custom
   properties, animated purely by the keyframe below. ── */
.cah-particles { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }

.cah-particle {
  position: absolute;
  bottom: -5%;
  left: var(--x, 50%);
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: var(--hue, var(--accent-2));
  box-shadow: 0 0 6px 1px var(--hue, rgba(255, 117, 24, .6));
  opacity: 0;
  animation: cahParticleFloat var(--dur, 16s) ease-in var(--delay, 0s) infinite;
}

@keyframes cahParticleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .7; }
  85% { opacity: .35; }
  100% { transform: translateY(-115vh) translateX(var(--drift, 20px)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cah-particle { animation: none !important; }
}

/* ══ content ══ */
.cah-inner {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 1.75rem 0;
}

.cah-content { max-width: min(44%, 620px); }

.cah-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
}

.cah-badge-icon { display: flex; align-items: center; flex-shrink: 0; color: var(--accent); }
.cah-badge-icon svg { width: 15px; height: 15px; display: block; }

.cah-badge-line { width: 30px; height: 1.5px; background: linear-gradient(90deg, var(--accent), rgba(255, 107, 0, 0)); }

.cah-heading {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  text-transform: none;
  font-size: clamp(2.4rem, 4.6vw + 1vh, 4.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.015em;
}

.cah-heading .cah-line { display: block; opacity: 0; }
.cah-heading .cah-line + .cah-line { margin-top: .08em; }
.cah-heading .ink { color: #fff; }
.cah-heading .accent {
  color: var(--accent);
  filter: drop-shadow(0 0 30px rgba(255, 107, 0, .35));
}

.cah-desc {
  margin-top: 1.4rem;
  max-width: 44ch;
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--ink-dim);
  padding: 1.1rem 1.5rem;
  background: linear-gradient(165deg, rgba(8, 38, 92, .38), rgba(2, 8, 20, .28));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
}

/* ── CTA: orange pill, white text, arrow badge ── */
.cah-cta-row { margin-top: 1.9rem; opacity: 0; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }

.cah-cta-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .5rem .5rem .5rem 1.55rem;
  border-radius: 3rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 10px 26px rgba(255, 107, 0, .3);
  transition: box-shadow .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), background .3s ease;
}

.cah-cta-primary:hover,
.cah-cta-primary:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #E85D00, var(--accent));
  box-shadow: 0 16px 34px rgba(255, 107, 0, .42);
}

.cah-cta-primary:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 3px;
}

.cah-cta-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.cah-cta-arrow svg { width: 16px; height: 16px; }

.cah-cta-primary:hover .cah-cta-arrow,
.cah-cta-primary:focus-visible .cah-cta-arrow {
  transform: translateX(5px);
}

.cah-cta-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .5rem .5rem .5rem 1.55rem;
  border-radius: 3rem;
  text-decoration: none;
  color: var(--accent-hot);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(155deg, rgba(255, 194, 75, .12), rgba(8, 38, 92, .3));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 194, 75, .55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease, background .3s ease, color .3s ease;
}

.cah-cta-secondary:hover,
.cah-cta-secondary:focus-visible {
  transform: translateY(-2px);
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 16px 34px rgba(255, 107, 0, .4);
}

.cah-cta-secondary:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 3px;
}

.cah-cta-secondary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 194, 75, .14);
  border: 1.5px solid rgba(255, 194, 75, .55);
  color: var(--accent-hot);
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), background .3s ease, border-color .3s ease, color .3s ease;
}

.cah-cta-secondary-icon svg { width: 16px; height: 16px; }

.cah-cta-secondary:hover .cah-cta-secondary-icon,
.cah-cta-secondary:focus-visible .cah-cta-secondary-icon {
  transform: translateX(5px);
  background: #fff;
  border-color: #fff;
  color: var(--accent);
}

/* ══ five career-value features spanning the full-width lower band ══ */
.cah-features {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: clamp(1.6rem, 3vw, 2.2rem) 1.75rem clamp(2.6rem, 5.5vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.cah-feature {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 0 1.3rem;
  border-left: 1px solid rgba(255, 255, 255, .09);
  outline: none;
  opacity: 0;
  transform: translateY(15px);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}

.cah-feature:first-child { border-left: none; padding-left: 0; }

.cah-feature-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 28%, rgba(255, 107, 0, .3), rgba(2, 8, 20, .05)), rgba(2, 8, 20, .68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 107, 0, .45);
  color: var(--accent-hot);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), border-color .28s ease, box-shadow .28s ease, color .28s ease;
}

.cah-feature-icon svg { width: 20px; height: 20px; }

/* ── idle "flex" pulse: a soft ring breathing outward behind each icon ── */
.cah-feature-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-hot);
  box-shadow: 0 0 0 0 rgba(255, 194, 75, .5);
  opacity: 0;
  animation: cahIconFlex 2.6s cubic-bezier(.22, 1, .36, 1) infinite;
}
.cah-feature:nth-child(1) .cah-feature-icon::after { animation-delay: 0s; }
.cah-feature:nth-child(2) .cah-feature-icon::after { animation-delay: .65s; }
.cah-feature:nth-child(3) .cah-feature-icon::after { animation-delay: 1.3s; }
.cah-feature:nth-child(4) .cah-feature-icon::after { animation-delay: 1.95s; }

@keyframes cahIconFlex {
  0% { transform: scale(1); opacity: .9; }
  75% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

.cah-feature-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }

.cah-feature-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  text-shadow: 0 1px 8px rgba(2, 8, 20, .7);
  transition: color .28s ease;
}

.cah-feature-sub {
  font-size: .72rem;
  line-height: 1.45;
  color: var(--ink-dim);
  text-shadow: 0 1px 8px rgba(2, 8, 20, .7);
}

.cah-feature:hover,
.cah-feature:focus-visible { transform: translateY(-2px); }

.cah-feature:hover .cah-feature-icon,
.cah-feature:focus-visible .cah-feature-icon {
  transform: scale(1.08);
  border-color: var(--accent-hot);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(255, 107, 0, .14), 0 0 18px rgba(255, 194, 75, .4);
}

.cah-feature:hover .cah-feature-title,
.cah-feature:focus-visible .cah-feature-title { color: var(--accent-hot); }

@media (prefers-reduced-motion: reduce) {
  .cah-feature, .cah-feature:hover, .cah-feature:focus-visible { transform: none !important; }
  .cah-feature-icon::after { animation: none !important; display: none; }
}

@media (max-width: 1280px) and (min-width: 901px) {
  .cah-feature-sub { display: none; }
  .cah-feature { padding: 0 .75rem; }
  .cah-feature-icon { width: 32px; height: 32px; }
  .cah-feature-icon svg { width: 15px; height: 15px; }
}

@media (max-width: 1024px) and (min-width: 901px) {
  .cah-content { max-width: min(48%, 520px); }
  .cah-heading { font-size: clamp(2.1rem, 4.4vw + 1vh, 3.4rem); }
}

/* ══ mobile: badge, headline, copy, CTA and the five features stack
   centered over the same full-bleed photo, no separate boxed card —
   matches the homepage / leadership hero ══ */
@media (max-width: 900px) {
  .cah-inner { padding: calc(var(--nav-h) + 1.6rem) 1.25rem 0; display: block; }

  .cah-content { max-width: none; text-align: center; }

  .cah-badge { justify-content: center; }

  .cah-desc { margin-left: auto; margin-right: auto; }

  .cah-cta-row { justify-content: center; }

  .cah-visual-img { object-position: 68% 32%; animation: none; }

  .cah-features {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem 1rem;
    padding: 1.8rem 1.25rem 2.2rem;
  }

  .cah-feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .55rem;
    border-left: none;
    padding: 0;
  }

  .cah-feature:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 220px; margin: 0 auto; }

  .cah-feature-body { align-items: center; }
}

/* Extremely slow cinematic drift — ~1.5% scale breathing plus a faint
   horizontal pan, cycled over 22s so no single frame reads as motion. */
@keyframes cahIdleFloat {
  0% { transform: scale(1.05) translate3d(0, 0, 0); }
  50% { transform: scale(1.065) translate3d(-.6%, 0, 0); }
  100% { transform: scale(1.05) translate3d(0, 0, 0); }
}

/* ══ LOW-END MOBILE: decorative background-position sweep/drift forces a
   repaint every frame and (where paired) costs extra compositing via
   mix-blend-mode; simplify it away below the tablet breakpoint regardless
   of the user's reduced-motion preference, since most low-end-phone users
   won't have that OS setting enabled ══ */
@media (max-width: 760px) {
  .cah-grid-lines { animation: none !important; }
}

/* ══ LOW-POWER MODE: same grid-drift simplification as the mobile
   breakpoint above, keyed off device capability (.low-power-mode)
   instead of viewport width ══ */
.low-power-mode .cah-grid-lines { animation: none !important; }
