/* TOP.ESG masthead and full-width hero. Shared by the website and the company guide. */
:is(body.site-page, body.has-topesg-global-chrome) {
  --topesg-header-height: 76px;
  --topesg-hero-surface: #f1f1ef;
  --topesg-hero-ink: #425b7b;
  --topesg-hero-gutter: clamp(24px, 4.5vw, 72px);
}
body.site-page > .site-header,
body.has-topesg-global-chrome > .topesg-global-header {
  min-height: var(--topesg-header-height);
  border: 0;
  border-radius: 0;
  background: var(--topesg-hero-surface);
  backdrop-filter: none;
  box-shadow: none;
  transition: background-color .2s ease, box-shadow .2s ease;
}
:is(body.site-page, body.has-topesg-global-chrome) :is(.site-header-inner, .topesg-global-header-inner) {
  width: min(1460px, calc(100% - 48px));
  min-height: var(--topesg-header-height, 76px);
  gap: 20px;
}
body.topesg-has-leading-hero > :is(.site-header, .topesg-global-header) {
  margin-bottom: calc(-1 * var(--topesg-header-height));
  background: transparent;
}
body.topesg-has-leading-hero > :is(.site-header, .topesg-global-header).is-scrolled,
body.is-menu-open > .site-header,
body.topesg-global-menu-open > .topesg-global-header {
  background: rgb(241 241 239 / 96%);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgb(66 91 123 / 12%);
}
:is(.site-brand, .topesg-global-brand) { width: 150px; }
:is(.site-brand, .topesg-global-brand) img { height: 56px; }
:is(.site-navigation, .topesg-global-navigation) { gap: 4px; }
:is(.site-header-cta, .topesg-global-header-cta) { border-radius: 8px; }

:is(.home-hero-ally, .compact-hero, .topesg-global-compact-hero) {
  --topesg-hero-header-space: 0px;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--topesg-hero-surface, #f1f1ef);
}
.topesg-leading-hero { --topesg-hero-header-space: var(--topesg-header-height); }
:is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-stage, .compact-hero-stage, .topesg-global-compact-hero-stage) {
  position: relative;
  display: flex;
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  min-height: calc(310px + var(--topesg-hero-header-space));
  margin: 0 !important;
  padding: var(--topesg-hero-header-space) 0 0;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--topesg-hero-surface);
  grid-template-areas: none;
}
body.site-page-home .home-hero-stage {
  min-height: calc(620px + var(--topesg-hero-header-space));
  justify-content: center;
}
:is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) {
  position: absolute !important;
  inset: -22px !important;
  z-index: -1;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  border-radius: 0;
  opacity: 1 !important;
  transform: translate3d(var(--hero-pointer-x, 0px), var(--hero-pointer-y, 0px), 0);
  transition: transform .7s ease-out;
  pointer-events: none;
}
:is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 42%;
  animation: topesg-hero-drift 7s ease-in-out infinite alternate;
  animation-play-state: paused;
  transform-origin: 50% 50%;
}
.is-hero-visible :is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) img { animation-play-state: running; }
.topesg-hero-paused :is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) img { animation-play-state: paused; }
:is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(241 241 239 / 96%) 0%, rgb(241 241 239 / 82%) 38%, rgb(241 241 239 / 24%) 100%), linear-gradient(180deg, rgb(241 241 239 / 64%), transparent 45%);
}
.home-hero-media::after {
  background: radial-gradient(ellipse at center, rgb(241 241 239 / 94%) 0%, rgb(241 241 239 / 80%) 35%, rgb(241 241 239 / 22%) 100%), linear-gradient(180deg, rgb(241 241 239 / 70%), transparent 38%);
}
:is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-panel, .compact-hero-panel, .topesg-global-compact-hero-panel) {
  position: relative;
  inset: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(1460px, calc(100% - 2 * var(--topesg-hero-gutter)));
  min-height: 0;
  margin: 0 auto;
  padding: 52px 0 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--topesg-hero-ink);
  text-align: left;
  opacity: 1;
  transform: none;
}
:is(.home-hero-panel, .compact-hero-panel, .topesg-global-compact-hero-panel)::before,
:is(.home-hero-panel, .compact-hero-panel, .topesg-global-compact-hero-panel)::after { display: none; }
:is(body.site-page, body.has-topesg-global-chrome) .home-hero-panel {
  align-items: center;
  max-width: 1100px;
  padding: 70px 0 76px;
  text-align: center;
}
:is(body.site-page, body.has-topesg-global-chrome) .home-hero-panel h1 {
  width: auto;
  margin: 0 0 24px;
  color: var(--topesg-hero-ink);
  font-size: clamp(38px, 5vw, var(--hero-title-size, 56px));
  line-height: 1.05;
  letter-spacing: -.025em;
}
.home-hero-title-line { width: auto; white-space: normal; }
.home-hero-title-line.is-accent { padding: 0; border: 0; color: #425b7b; }
:is(body.site-page, body.has-topesg-global-chrome) .home-hero-lead {
  max-width: 760px;
  margin: 0 0 30px;
  color: #33465b;
  font-size: clamp(16px, 1.6vw, calc(var(--hero-intro-size, 17px) + 3px));
  line-height: 1.55;
}
:is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-panel, .topesg-global-compact-hero-panel) h1:not(.compact-hero-edition-heading) {
  width: auto;
  max-width: 1000px;
  padding: 0;
  margin: 0 0 20px;
  border: 0;
  color: var(--topesg-hero-ink);
  font-size: clamp(34px, 4vw, var(--compact-hero-title-size, var(--topesg-compact-title-size, 56px)));
  line-height: 1.08;
  letter-spacing: -.025em;
}
:is(.compact-hero-panel, .topesg-global-compact-hero-panel) .site-eyebrow,
.topesg-global-compact-hero-panel .topesg-global-eyebrow { margin: 0 0 14px; color: #5a6b7b; }
:is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-intro, .topesg-global-compact-hero-panel > p:last-child) {
  max-width: 780px;
  margin: 0;
  color: #33465b;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
}
:is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-panel, .topesg-global-compact-hero-panel) .compact-hero-edition-heading {
  width: auto;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}
.compact-hero-edition-logo { object-position: left center; }
:is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-actions, .compact-hero-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  width: auto;
  max-width: 100%;
}
.home-hero-actions { justify-content: center; }
.compact-hero-actions { margin-top: 24px; }
:is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-actions, .compact-hero-actions) .site-button {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 170px;
  padding: 15px 24px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
@keyframes topesg-hero-drift {
  from { transform: translate3d(-20px, 12px, 0) scale(1.06); }
  to { transform: translate3d(20px, -16px, 0) scale(1.06); }
}
@media (max-width: 1280px) {
  :is(body.site-page, body.has-topesg-global-chrome) { --topesg-header-height: 68px; }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.site-header-inner, .topesg-global-header-inner) { width: calc(100% - 40px); }
  :is(.site-header-action, .topesg-global-header-actions) { display: none; }
  :is(.site-menu-toggle, .topesg-global-menu-toggle) { display: block; margin-left: auto; }
  :is(.site-navigation, .topesg-global-navigation) {
    position: fixed;
    inset: var(--topesg-header-height) 0 auto;
    display: none;
    max-height: calc(100dvh - var(--topesg-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 18px 24px 28px;
    border-bottom: 1px solid #dfe5ec;
    background: #f1f1ef;
    box-shadow: 0 18px 36px rgb(29 36 48 / 12%);
  }
  :is(.site-navigation, .topesg-global-navigation).is-open { display: flex; }
  :is(.site-nav-item, .topesg-global-nav-item) { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
  :is(.site-navigation, .topesg-global-navigation) a { padding: 13px 4px; font-size: 16px; }
  :is(.site-submenu-toggle, .topesg-global-submenu-toggle) { width: 44px; height: 44px; justify-self: end; }
  :is(.site-submenu, .topesg-global-submenu) {
    position: static; grid-column: 1 / -1; min-width: 0; display: none; visibility: visible;
    margin: 0 0 8px 14px; border: 0; border-left: 2px solid #db8320; border-radius: 0;
    background: transparent; box-shadow: none; opacity: 1; transform: none;
  }
  .site-nav-item.is-open > .site-submenu, .topesg-global-nav-item.is-open > .topesg-global-submenu { display: block; }
  :is(.site-navigation, .topesg-global-navigation) :is(.site-navigation-search, .topesg-global-navigation-search) { display: flex; width: 100%; justify-content: flex-start; margin-top: 8px; }
  :is(.site-navigation, .topesg-global-navigation) :is(.site-navigation-guide, .topesg-global-navigation-guide, .topesg-global-navigation-logout) { display: flex; justify-content: center; margin-top: 10px; border-radius: 8px; padding: 14px 18px; background: var(--menu-cta-bg, var(--topesg-menu-cta-bg, #171817)); color: #fff; font-weight: 800; }
  :is(.site-navigation-guide, .topesg-global-navigation-guide, .topesg-global-navigation-logout)::after { display: none !important; }
}
@media (max-width: 620px) {
  :is(body.site-page, body.has-topesg-global-chrome) { --topesg-header-height: 64px; --topesg-hero-gutter: 22px; }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.site-header-inner, .topesg-global-header-inner) { width: calc(100% - 32px); }
  :is(.site-brand, .topesg-global-brand) { width: 132px; }
  :is(.site-brand, .topesg-global-brand) img { height: 48px; }
  body.site-page-home .home-hero-stage { min-height: calc(500px + var(--topesg-hero-header-space)); }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-stage, .topesg-global-compact-hero-stage) { min-height: calc(260px + var(--topesg-hero-header-space)); }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-panel, .compact-hero-panel, .topesg-global-compact-hero-panel) { padding: 42px 0 46px; }
  :is(body.site-page, body.has-topesg-global-chrome) .home-hero-panel h1 { font-size: clamp(32px, 9vw, var(--hero-title-size, 56px)); }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-panel, .topesg-global-compact-hero-panel) h1:not(.compact-hero-edition-heading) { font-size: clamp(30px, 8.5vw, var(--compact-hero-title-size, var(--topesg-compact-title-size, 56px))); }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.compact-hero-intro, .topesg-global-compact-hero-panel > p:last-child) { font-size: 16px; }
  :is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media)::after { background: rgb(241 241 239 / 80%); }
  :is(body.site-page, body.has-topesg-global-chrome) :is(.home-hero-actions, .compact-hero-actions) .site-button { min-width: 0; padding: 13px 18px; }
  .compact-hero-edition-logo { max-width: 100%; max-height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) { transform: none; transition: none; }
  :is(.home-hero-media, .compact-hero-media, .topesg-global-compact-hero-media) img { animation: none; transform: none; }
}

/* Quiet title divider and solid secondary controls, also before hover. */
:is(.home-hero-panel, .compact-hero-panel, .topesg-global-compact-hero-panel) h1:has(+ p)::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 20px;
  background: #fca437;
}
:is(.home-hero-actions, .compact-hero-actions) .site-button.is-light,
.site-search-trigger,
.topesg-global-search-trigger { background: #fff; }
