:root {
  --color-bg-gray-light: #E9EEF4;
  --color-bg-gray: #E4E8ED;
  --partner-feature-color: #870f18;
}

/* Home Hero border scroll fix */
/* ================================ */

#home-hero {
  .slider-content {
    .slider { transition: ease bottom 250ms; bottom: 0; }
  }
  > .section-borders {
    > div { background-color: var(--color-bg-gray-light);
      &.left, &.right {
        @media all and (max-width: 1023px) { width: 25px; }
      }
    }
  }
}

.show-borders {
  #home-hero {
    .slider-content {
      .slider { bottom: 60px;
        @media all and (max-width: 767px) { bottom: 0; }
      }
    }
  }
}

/* Overflow fixes */
/* ================================ */

section.quote { overflow: hidden; }

/* Talk to an Expert Headshot Fix */
/* ================================ */

#sectors-expert {
  .object-cover { object-position: 0 10%; }
}

/* Hero white bar fix */
/* ================================ */

body:not(.home) .mt-header-mobile.md\:mt-header { margin-top: 0;
  @media (width >= 48rem) { margin-top: 0; }
}

body:not(.home) #hero { height: 430px;
  @media (width >= 48rem) { height: 600px; }
}

#single-story { padding-top: 110px;
  @media (width >= 48rem) { padding-top: 160px; }
}

/* Card image aspect ratio update */
/* ================================ */

.card .card-image { aspect-ratio: 17 / 9; }

/* Partner Feature Color */
/* ================================ */

.split-content-mix {
  .button-grow, .button:not(.gform_button), .button-icon { background-color: var(--partner-feature-color) !important; }
  .logo-grid-title, .sumatra-prose p a { color: var(--partner-feature-color); }
  .list-wrapper li:before { color: var(--partner-feature-color) !important; }
}

/* Work Stats Fix */
/* ================================ */

.group-animation-underline { padding-right: 40px; }

/* Icon Flag Fix */
/* ================================ */
.button-icon {
  svg { width: 100%;
    path, polygon, rect { fill: transparent; stroke: transparent;
      &:not(.bounding-box) { fill: transparent; stroke: #FFFFFF; stroke-width: 1px; }
    }
  }
}

/* Empty Hero */
/* ================================ */
.empty-hero { padding-top: 200px; }

/* Card link bbg fix on white */
/* ================================ */
.card-links.bg-white {
  .grid {
    > .bg-white { background-color: #eff4f8; }
  }
}

/* Font Fix */
/* ================================ */
.text-h4, .text-h3 { letter-spacing: -0.02rem; }

/* Pop-up Fix */
/* ================================ */

.popup-image-wrap { position: relative }
.popup-image[aria-busy="true"] { opacity: 0 }
.popup-image-wrap.is-loading::after {
  content: ""; position: absolute; inset: 0;
  display: block; opacity: .5;
  background: radial-gradient(circle 12px, currentColor 95%, transparent) center/24px 24px no-repeat;
}

/* Pop-up Close Mobile */
/* ================================ */

.popup-closer {
  svg {
    @media all and (max-width: 1023px) {
      width: 24px;
      margin-top: -8px;
    }
  }
}

/* Grow button mobile */
/* ================================ */
@media all and (max-width: 991px) {
  .group-button {
      & .button-grow {
        &[data-type='sectors'] .text {
          width: 195px;
          padding-left: 25px;
        }
      }
  }
}

/* Home hero Overlay */
/* ================================ */
#home-hero {
  > .overlay { background: #000000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%); }
}


/* Home Background Image Transition */
/* ================================ */
.image-list {
  img { transition: ease all 800ms; }
}

/* Kill box button hover */
/* ================================ */
.group-button { overflow: hidden; position: relative;;
  img { transform-origin: left center; transition: ease all 600ms; transform: scale(1);
    &.lg\:order-first { transform-origin: right center; }
  }
  &:hover { box-shadow: none !important;
    img { transform: scale(1.02); }
  }
}

/* Hero text width */
/* ================================ */
#hero .section-content > .container > h1 {
  max-width: 900px;
}

/* Nested lists */
/* ================================ */
ul {
  li {
    ul.children { margin-top: 15px; }
  }
}

/* Work H1 */
/* ================================ */

.work-template-default {
  h1 {
    span { display: block; }
  }
}

/* Padding Fix */
/* ================================ */
.box-padded-left { padding-left: 24px }


/* Tablet Nav Fix */
/* ================================ */
.menu-item > a > span {
  @media all and (max-width: 799px) { display: none; }
  @media all and (max-width: 767px) { display: inline; }
}

/* Skip Link */
/* ================================ */

/* Visually hide until keyboard focus */
.skip-link{
  position: absolute;
  top: calc(env(safe-area-inset-top, 0) + 8px);
  left: calc(env(safe-area-inset-left, 0) + 8px);
  padding: 8px 12px;
  background: #870f18;          /* high-contrast blue */
  color: #fff;
  border-radius: 0;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transform: translateY(-200%);
  transition: transform .2s ease;
  z-index: 10000;
}

/* Reveal on keyboard focus */
.skip-link:focus,
.skip-link:focus-visible{
  transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce){
  .skip-link{ transition: none; }
}

/* Allow programmatic focus on the main region without a focus ring */
#main-content:focus{ outline: none; }

/* Tab Navigation Fix */
/* ================================ */

.sub-menu {
  &:focus-within { opacity: 1; transform: none; pointer-events: auto; }
}

/* No Results Text Fix */
/* ================================ */
.text-center-no-result { text-align: center; width: 100%; display: grid; grid-column-start: 1; grid-column-end: 4; }

/* Newsletter Form Submit Fix */
/* ================================ */
#newsletter-form {
  &:before { content: none; }
  form {
    .gform-body { position: relative; z-index: 1; }
    .gform-footer { position: absolute; z-index: 2; visibility: visible; }
  }
}

/* Gform Upload Fix */
/* ================================ */
.gfield--input-type-fileupload {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0 20px;
  background-color: var(--color-gray-lightest);
  position: relative;

  line-height: var(--spacing-button);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'General Sans', sans-serif;

  &:before {
    content: 'UPLOAD';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    background-color: var(--color-gray-darker);
    color: white;
    padding: 0 10px;
    line-height: 32px;
  }

  .gfield_label {
    position: absolute;
    z-index: -1;
    display: none !important;
  }

  .gfield_required,
  .gfield_description {
    display: none;
  }

  input {
    position: relative;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--color-gray-darker);
    transition: 0.3s all ease;
    border: 1px solid transparent;
    @apply focus:outline-0;
  }

  &.gfield_error input {
    border: 1px solid red;
  }
}
