/* ════════════════════════════════════════════════════════════════════
   CORPORATE SOCIAL RESPONSIBILITY — "Building A Better Tomorrow" Hero
   Isolated component (see csr-hero.js). Replaces the previous abstract
   particle .csrh hero on csr.html only. Full-bleed photographic
   composition of hands joined over growing seedlings, wooden blocks and
   a green globe (Hero/csr.*) with a single left-to-right scrim carrying
   the headline — one full-inset photo + one scrim, matching the site's
   established hero convention (.op-hero in process-hero.css, .awh in
   awards-hero.css, .ins-hero in blog-hero.css), not a boxed image
   stitched against a separately drawn background. The plate already
   bakes in its own navy field on the left and the orange curve along
   the bottom, so neither is redrawn. A four-item CSR commitment row
   spans the full width of the lower band.

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

.csrh {
  --navy: #061B49;
  --navy-mid: #08265C;
  --navy-deep: #020814;
  --ink: #F5F7FB;
  --ink-dim: #B9C4DE;
  --accent: #FF6B00;
  --accent-2: #FF7518;
  --accent-hot: #FFC24B;
  --accent-green: #7CB86B;
  position: relative;
  height: 88vh;
  min-height: 820px;
  max-height: 1040px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--ink);
}

@media (max-width: 900px) {
  .csrh { height: auto; min-height: 0; max-height: none; }
}

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

/* ══ full-bleed photo — the plate itself already carries the navy field
   on the left and the orange curve along the bottom, so no separate
   decorative layer duplicates them ══ */
.csrh-visual { position: absolute; inset: 0; overflow: hidden; }

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

.csrh-visual-img {
  object-fit: cover;
  object-position: 58% 88%;
  transform: scale(1.04);
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@media (max-width: 900px) {
  .csrh-visual-img { object-position: 68% 78%; }
}

/* single scrim reinforcing the plate's own navy field so the headline
   stays readable at any crop, with a deeper footer band so the CSR
   commitment row always sits on a clean, legible surface regardless of
   where the photo's own curve/blocks land in the crop */
.csrh-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, var(--navy) 0%, rgba(6, 27, 73, .92) 24%, rgba(6, 27, 73, .74) 40%, rgba(6, 27, 73, .38) 56%, rgba(6, 27, 73, .08) 72%, transparent 86%),
    linear-gradient(180deg, rgba(2, 8, 20, .15) 0%, transparent 20%, transparent 44%, rgba(2, 8, 20, .5) 62%, rgba(2, 8, 20, .84) 80%, rgba(2, 8, 20, .95) 100%);
}

@media (max-width: 900px) {
  .csrh-scrim {
    background:
      linear-gradient(180deg, rgba(6, 27, 73, .72) 0%, rgba(6, 27, 73, .36) 20%, rgba(6, 27, 73, .3) 36%, rgba(2, 8, 20, .62) 58%, rgba(2, 8, 20, .93) 76%, var(--navy-deep) 100%),
      linear-gradient(90deg, rgba(6, 27, 73, .45) 0%, transparent 45%, transparent 60%, rgba(6, 27, 73, .3) 100%);
  }
}

/* ── faint technical grid, low opacity, confined to the content field ── */
.csrh-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .05;
  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 38%, transparent 60%);
  mask-image: linear-gradient(100deg, #000 0%, #000 38%, transparent 60%);
  animation: csrhGridDrift 20s linear infinite;
}

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

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

/* ── very subtle CSR network: nodes + connecting lines drawn once on
   load, floating over the upper-right of the photo — interconnected
   initiatives, kept low-opacity so it never competes with the photo ── */
.csrh-network {
  position: absolute;
  top: 6%;
  right: 3%;
  width: clamp(220px, 24vw, 340px);
  height: clamp(260px, 28vw, 400px);
  z-index: 2;
  opacity: .22;
  pointer-events: none;
}

.csrh-network-lines path {
  fill: none;
  stroke: var(--accent-hot);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
}

.csrh-network-nodes circle {
  fill: var(--accent-hot);
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  animation: csrhNodePulse 4s ease-in-out infinite;
}

.csrh-network-nodes circle:nth-child(2) { animation-delay: .6s; }
.csrh-network-nodes circle:nth-child(3) { animation-delay: 1.3s; }
.csrh-network-nodes circle:nth-child(4) { animation-delay: .3s; }
.csrh-network-nodes circle:nth-child(5) { animation-delay: 1.7s; }
.csrh-network-nodes circle:nth-child(6) { animation-delay: 1s; }

@keyframes csrhNodePulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.csrh-network-icons { stroke: var(--accent-hot); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }

@media (max-width: 1100px) {
  .csrh-network { opacity: .14; }
}

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

@media (prefers-reduced-motion: reduce) {
  .csrh-grid, .csrh-network-nodes circle { animation: none !important; }
  .csrh-network-nodes circle { opacity: .5; }
}

/* ── drifting glow-dot particles (mirrors .hero-particles on the
   homepage / .ph-particles on the products page): plain spans injected
   once by csr-hero.js with randomized CSS custom properties, animated
   purely by the keyframe below ── */
.csrh-particles { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }

.csrh-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: csrhParticleFloat var(--dur, 16s) ease-in var(--delay, 0s) infinite;
}

@keyframes csrhParticleFloat {
  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) {
  .csrh-particle { animation: none !important; }
}

/* ══ content ══ */
.csrh-inner {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2.25rem) 1.75rem 0;
}

.csrh-content { max-width: 620px; padding-bottom: 2rem; }

.csrh-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent-hot);
  opacity: 0;
}

.csrh-badge-icon { display: flex; flex-shrink: 0; color: var(--accent); }
.csrh-badge-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.csrh-badge-line { width: 30px; height: 1.5px; background: linear-gradient(90deg, var(--accent), var(--accent-hot)); }

.csrh-heading {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  text-transform: none;
  font-size: clamp(2.5rem, 4.4vw + 1vh, 4.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.csrh-heading .line { display: block; opacity: 0; }
.csrh-heading .ink { color: #fff; }
.csrh-heading .accent {
  color: var(--accent);
  filter: drop-shadow(0 0 26px rgba(255, 107, 0, .32));
}

.csrh-desc {
  margin-top: 1.2rem;
  max-width: 46ch;
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--ink-dim);
  padding: .95rem 1.3rem;
  background: linear-gradient(165deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  opacity: 0;
}

/* ── CTA: orange pill, white text, arrow badge ── */
.csrh-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  margin-top: 1.9rem;
  padding: .5rem .5rem .5rem 1.55rem;
  border-radius: 3rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  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, .28);
  opacity: 0;
  transition: box-shadow .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), background .3s ease;
}

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

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

.csrh-cta-label {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.csrh-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);
}

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

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

/* ══ four-item CSR commitment row — full width across the lower band ══ */
.csrh-features {
  position: relative;
  padding-bottom: clamp(3rem, 6.5vw, 5rem);
  opacity: 0;
}

.csrh-features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

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

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

.csrh-feature-icon {
  position: relative;
  width: 40px;
  height: 40px;
  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(6, 14, 33, .05)), rgba(6, 14, 33, .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;
}

.csrh-feature-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── idle "flex" pulse: a soft ring breathing outward behind each icon ── */
.csrh-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: csrhIconFlex 2.6s cubic-bezier(.22, 1, .36, 1) infinite;
}
.csrh-feature:nth-child(1) .csrh-feature-icon::after { animation-delay: 0s; }
.csrh-feature:nth-child(2) .csrh-feature-icon::after { animation-delay: .65s; }
.csrh-feature:nth-child(3) .csrh-feature-icon::after { animation-delay: 1.3s; }
.csrh-feature:nth-child(4) .csrh-feature-icon::after { animation-delay: 1.95s; }

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

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

.csrh-feature-sub {
  display: block;
  margin-top: .3rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--ink-dim);
  text-shadow: 0 1px 8px rgba(2, 8, 20, .7);
}

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

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

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

@media (max-width: 1100px) {
  .csrh-content { max-width: 520px; }
  .csrh-feature-sub { display: none; }
  .csrh-feature-icon { width: 34px; height: 34px; }
  .csrh-feature-icon svg { width: 16px; height: 16px; }
}

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

/* below 900px the hero switches to the stacked mobile layout, where
   .csrh-features-mobile takes over — avoid showing both at once */
@media (max-width: 900px) {
  .csrh-features { display: none; }
}

/* ══ mobile: text stacks centered over the same full-bleed photo, which
   deepens to solid navy toward the bottom so the four commitments read
   clearly beneath it — no separate boxed card, matching the homepage /
   leadership hero ══ */
@media (max-width: 900px) {
  .csrh-inner { padding: calc(var(--nav-h) + 1.6rem) 1.25rem 0; display: block; }

  .csrh-content { max-width: none; text-align: center; padding-bottom: 0; }

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

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

  .csrh-cta { margin-left: auto; margin-right: auto; }

  .csrh-visual-img { object-position: 70% 30%; transform: scale(1); }
}

.csrh-features-mobile {
  display: none;
  position: relative;
  z-index: 3;
  order: 3;
  margin: 1.8rem 0 0;
  padding: 0 1.25rem 2.2rem;
  opacity: 0;
}

@media (max-width: 900px) { .csrh-features-mobile { display: block; } }

.csrh-features-grid-m {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}

.csrh-feature-m {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .55rem;
  padding: 1.1rem .8rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 107, 0, .22);
  background: linear-gradient(155deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
  opacity: 0;
  transform: translateY(14px);
}

.csrh-feature-m .csrh-feature-icon { width: 40px; height: 40px; }
.csrh-feature-m .csrh-feature-icon svg { width: 18px; height: 18px; }
.csrh-feature-m .csrh-feature-title { font-size: .76rem; }
.csrh-feature-m .csrh-feature-sub { display: block; font-size: .72rem; }

/* ══ 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) {
  .csrh-grid { 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 .csrh-grid { animation: none !important; }
