/* DEC homepage hero — administered exclusively from /admin/banners.
   Intentionally loaded after legacy DEC styles to avoid cross-page regressions. */
#main .dec-home-banner-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(405px, 40vw, 560px);
  overflow: hidden;
  background: #161a1e;
  color: #ffffff;
}

#main .dec-home-banner-slide,
#main .dec-home-banner-visual,
#main .dec-home-banner-visual img,
#main .dec-home-banner-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#main .dec-home-banner-slide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .65s ease, visibility .65s ease;
}

#main .dec-home-banner-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#main .dec-home-banner-visual {
  display: block;
  overflow: hidden;
}

#main .dec-home-banner-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  /* Keep a stable base state for banners that are not currently visible. */
  transform: scale(1);
  transform-origin: center center;
  transition: transform 650ms ease-out;
}

/* A transition cannot run for the first slide because it is already active
   on the initial render. Keyframes animate that first slide immediately and
   restart for each banner whenever the is-active class is applied. */
@keyframes dec-home-banner-zoom-in {
  from { transform: scale(1); }
  to   { transform: scale(1.075); }
}

#main .dec-home-banner-slide.is-active .dec-home-banner-visual img {
  animation: dec-home-banner-zoom-in 6500ms linear both;
}

#main .dec-home-banner-shade {
  background: rgba(9, 11, 16, .67);
  pointer-events: none;
}

#main .dec-home-banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(405px, 40vw, 560px);
  padding-top: 70px;
  padding-bottom: 85px;
  text-align: center;
}

#main .dec-home-banner-copy {
  width: min(100%, 1000px);
  margin: 0 auto;
}

#main .dec-home-banner-eyebrow {
  display: block;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, .83);
  font-size: clamp(10px, .88vw, 12px);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .2em;
  text-transform: uppercase;
}

#main .dec-home-banner-title {
  display: block;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0;
  color: #f4a020 !important;
  font-family: inherit;
  font-size: clamp(25px, 3.25vw, 46px);
  font-weight: 800;
  line-height: 1.19;
  letter-spacing: .11em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

#main .dec-home-banner-title span {
  display: block;
  color: inherit;
}

#main .dec-home-banner-description {
  max-width: 790px;
  margin: 18px auto 0;
  color: #ffffff !important;
  font-size: clamp(14px, 1.35vw, 18px);
  font-weight: 450;
  line-height: 1.58;
  text-align: center;
  text-wrap: pretty;
  white-space: pre-line;
}

#main .dec-home-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

#main .dec-home-banner-actions:empty {
  display: none;
}

#main .dec-home-banner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 27px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: .09em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

#main .dec-home-banner-button--primary {
  background: #f4a020;
  border-color: #f4a020;
  color: #111827 !important;
}

#main .dec-home-banner-button--primary:hover {
  background: #e28d0b;
  border-color: #e28d0b;
  color: #111827 !important;
}

#main .dec-home-banner-button--secondary {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .87);
}

#main .dec-home-banner-button--secondary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #171b22 !important;
}

#main .dec-home-banner-button:focus-visible,
#main .dec-home-banner-controls button:focus-visible {
  outline: 3px solid #ffb743;
  outline-offset: 3px;
}

#main .dec-home-banner-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transform: translateX(-50%);
}

#main .dec-home-banner-controls > button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  color: #ffffff;
  cursor: pointer;
}

#main .dec-home-banner-controls > button:hover {
  background: #f4a020;
  border-color: #f4a020;
  color: #111827;
}

#main .dec-home-banner-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

#main .dec-home-banner-indicators > button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
  transition: background-color .18s ease, width .18s ease;
}

#main .dec-home-banner-indicators > button.is-active {
  width: 23px;
  border-radius: 8px;
  background: #f4a020;
}

@media (max-width: 820px) {
  #main .dec-home-banner-hero,
  #main .dec-home-banner-content {
    min-height: 480px;
  }
  #main .dec-home-banner-content {
    padding-top: 58px;
    padding-bottom: 85px;
  }
  #main .dec-home-banner-title {
    font-size: clamp(23px, 4.35vw, 36px);
    letter-spacing: .08em;
  }
  #main .dec-home-banner-description {
    max-width: 600px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  #main .dec-home-banner-hero,
  #main .dec-home-banner-content {
    min-height: 500px;
  }
  #main .dec-home-banner-content {
    padding-top: 55px;
    padding-bottom: 90px;
  }
  #main .dec-home-banner-eyebrow {
    margin-bottom: 13px;
    letter-spacing: .13em;
  }
  #main .dec-home-banner-title {
    font-size: clamp(22px, 6.1vw, 30px);
    line-height: 1.27;
    letter-spacing: .055em;
  }
  #main .dec-home-banner-description {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.55;
  }
  #main .dec-home-banner-actions {
    gap: 10px;
    margin-top: 25px;
  }
  #main .dec-home-banner-button {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 11px;
  }
  #main .dec-home-banner-controls {
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main .dec-home-banner-slide,
  #main .dec-home-banner-button,
  #main .dec-home-banner-indicators > button,
  #main .dec-home-banner-visual img {
    transition: none !important;
  }

  #main .dec-home-banner-visual img,
  #main .dec-home-banner-slide.is-active .dec-home-banner-visual img {
    animation: none !important;
    transform: none !important;
  }
}

/* DEC homepage: float the existing About DEC section over the hero's edge.
   Presentation-only: the section's three-column markup, spacing, and content
   remain exactly as they were. The card is an outer visual surface. */
#main .dec-v3-home {
  --dec-about-card-overlap: clamp(36px, 4vw, 52px);
}

#main .dec-v3-home .dec-v3-about {
  position: relative;
  isolation: isolate;
  z-index: 2;
  margin-top: calc(-1 * var(--dec-about-card-overlap));
  background: linear-gradient(
    to bottom,
    transparent 0 var(--dec-about-card-overlap),
    #f3f6fa var(--dec-about-card-overlap) 100%
  );
}

#main .dec-v3-home .dec-v3-about::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 clamp(16px, 2vw, 32px);
  background: #fff;
  border: 1px solid rgba(15, 43, 78, .07);
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(8, 31, 57, .085);
  pointer-events: none;
}

/* Match both side gutters of the overlapping About card. The shared
   homepage container intentionally has unequal left/right padding; keep its
   left padding unchanged and match the right side only in this card. */
#main .dec-v3-home .dec-v3-about > .container-page.dec-v3-about-grid {
  padding-right: clamp(26px, 4.6vw, 72px);
}

/* Keep the hero's existing arrow/indicator controls clear of the new card. */
#main .dec-v3-home .dec-home-banner-controls {
  bottom: calc(var(--dec-about-card-overlap) + 24px);
}

@media (max-width: 820px) {
  #main .dec-v3-home {
    --dec-about-card-overlap: 30px;
  }
  #main .dec-v3-home .dec-v3-about::before {
    inset-inline: 12px;
  }
}

@media (max-width: 520px) {
  /* A smaller overlap prevents collisions with tall mobile hero headlines. */
  #main .dec-v3-home {
    --dec-about-card-overlap: 12px;
  }
  #main .dec-v3-home .dec-v3-about::before {
    inset-inline: 8px;
  }
  #main .dec-v3-home .dec-home-banner-controls {
    bottom: 20px;
  }
}

/* Engineering Solutions: make the entire existing card clickable without
   changing its image, text or grid arrangement. */
#main .dec-v3-operation-card--quote { position: relative; }
#main .dec-v3-operation-card--quote .dec-v3-inline-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
#main .dec-v3-operation-card--quote:focus-within {
  outline: 2px solid #f2a019;
  outline-offset: 2px;
}
