/**
 * Homepage hero slider (MetaSlider).
 *
 * Every value here was read off the live Slider Revolution module so the replacement lands on
 * the same pixels: 920px tall down to 480px wide, 720px below that; content group 86% wide and
 * vertically centred (342x205 on phones); 25% black overlay; Fira Sans 400 headline; Roboto 500
 * pill button in #021e42.
 *
 * Selectors are prefixed with `.metaslider.twill-hero` on purpose: MetaSlider's public.css ships
 * `.metaslider .flexslider .slides li { height: auto }` and `.metaslider .caption-wrap { … }`,
 * which outrank a plain `.twill-hero …` rule and collapse the slide to zero height.
 */

.metaslider.twill-hero {
  position: relative;
  width: 100%;
  background-color: #000;
}

/* FlexSlider's stock chrome: white frame, rounded corners, 60px of bottom margin. */
.metaslider.twill-hero .flexslider {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.metaslider.twill-hero .flexslider .slides {
  background: none;
}

.metaslider.twill-hero .flexslider .slides > li {
  position: relative;
  overflow: hidden;
  height: 920px;
}

/* Reserve the box before the image decodes — the old slider shifted the page by 0.408 CLS. */
.metaslider.twill-hero .flexslider,
.metaslider.twill-hero .flexslider .slides {
  min-height: 920px;
}

.metaslider.twill-hero .flexslider .slides > li > .twill-hero-picture,
.metaslider.twill-hero .flexslider .slides > li > a.metaslider_image_link {
  position: absolute;
  inset: 0;
  display: block;
}

.metaslider.twill-hero .flexslider .slides > li img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Dark wash the headline sits on. */
.metaslider.twill-hero .flexslider .slides > li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* ---- content group: 86% wide, centred both ways, 2/5 of the slider tall ---- */

.metaslider.twill-hero .flexslider .slides > li .caption-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  z-index: 2;
  width: 86%;
  height: 368px;
  transform: translate(-50%, -50%);
  padding: 0;
  margin: 0;
  background: none;
  color: inherit;
  opacity: 1;
  line-height: normal;
}

.metaslider.twill-hero .flexslider .slides > li .caption,
.metaslider.twill-hero .flexslider .slides > li .twill-hero-caption {
  position: relative;
  height: 100%;
  padding: 0;
  margin: 0;
}

.metaslider.twill-hero .flexslider .slides > li .twill-hero-title {
  position: absolute;
  left: 2px;
  top: 194px;
  width: 400px;
  margin: 0;
  padding: 0;
  font-family: "Fira Sans", sans-serif;
  font-size: 30px;
  line-height: 25px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #fff;
}

.metaslider.twill-hero .flexslider .slides > li .twill-hero-btn {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-block;
  padding: 0 20px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 45px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: #fff;
  background-color: #021e42;
  border: 0;
  border-radius: 25px;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.metaslider.twill-hero .flexslider .slides > li .twill-hero-btn:hover,
.metaslider.twill-hero .flexslider .slides > li .twill-hero-btn:focus {
  color: #000;
  background-color: #fff;
}

/* ---- phones: the old slider switched layout below 480px ---- */

@media only screen and (max-width: 479px) {
  .metaslider.twill-hero .flexslider .slides > li {
    height: 720px;
  }

  .metaslider.twill-hero .flexslider,
  .metaslider.twill-hero .flexslider .slides {
    min-height: 720px;
  }

  .metaslider.twill-hero .flexslider .slides > li .caption-wrap {
    width: 342px;
    height: 205px;
    margin-left: 2px;
    margin-top: -1px;
  }

  .metaslider.twill-hero .flexslider .slides > li .twill-hero-title {
    left: 0;
    top: 46px;
    width: auto;
    font-size: 22px;
    line-height: 28px;
  }

  .metaslider.twill-hero .flexslider .slides > li .twill-hero-btn {
    padding: 0 5px;
    font-size: 15px;
    line-height: 27px;
  }
}
