/* Hero slider of the home pages: static rebuild of Slider Revolution 6 module "hero3".
   Revolution lays layers out on a grid (1240 / 1024 / 778 / 480 px wide depending on the
   window width) and scales text and layer sizes by --hero-scale = min(1, window / grid);
   row and column margins are not scaled. Values below are the module's own settings. */

/* Only chevron_left and chevron_right are kept in this font (tools/perf/subset_icons.py). */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/material-icons/material-icons.woff2') format('woff2');
}

.ql-hero {
  --hero-grid: 1024px;
  --hero-scale: min(1, 100vw / 1024px);
  position: relative;
  /* Full bleed, out of the theme's content column (Revolution does this in JavaScript). */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  background: #05151b;
  color: #fff;
  font-family: 'europa', sans-serif;
  font-weight: 300;
  /* Revolution resets the theme's 0.1px body letter-spacing on its layers. */
  letter-spacing: normal;
}

.ql-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1200ms ease, visibility 0s linear 1200ms;
}

.ql-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1200ms ease, visibility 0s;
  z-index: 1;
}

.ql-hero__background {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ql-hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  transform: scale(var(--hero-zoom-from, 1.2));
  will-change: transform;
}

.ql-hero__slide.is-active .ql-hero__background img {
  animation: ql-hero-zoom 20000ms linear forwards;
}

@keyframes ql-hero-zoom {
  from { transform: scale(var(--hero-zoom-from, 1.2)); }
  to { transform: scale(var(--hero-zoom-to, 1)); }
}

.ql-hero__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* Middle zone: kicker + title, centred vertically. */
.ql-hero__middle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.ql-hero__middle-row {
  width: calc(var(--hero-grid) * var(--hero-scale) - 2 * var(--hero-row-margin-x, 60px));
  min-width: 0;
  max-width: calc(100vw - 2 * var(--hero-row-margin-x, 60px));
  margin-bottom: var(--hero-row-margin-bottom, 100px);
  padding: 0 var(--hero-column-padding-right, 0px) 0 var(--hero-column-padding-left, 0px);
  box-sizing: border-box;
}

.ql-hero .ql-hero__kicker {
  margin: 0 0 calc(30px * var(--hero-scale));
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: calc(14px * var(--hero-scale));
  line-height: calc(25px * var(--hero-scale));
  letter-spacing: calc(4px * var(--hero-scale));
  text-transform: uppercase;
  color: #007aff;
}

.ql-hero__title {
  margin: 0 0 calc(var(--hero-title-margin, 50px) * var(--hero-scale));
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: calc(var(--hero-title-size, 100px) * var(--hero-scale));
  line-height: calc(var(--hero-title-line, 110px) * var(--hero-scale));
  letter-spacing: calc(var(--hero-title-spacing, -4px) * var(--hero-scale));
  color: #fff;
  white-space: normal;
}

/* Bottom bar: dark band + slide number + description + previous / next buttons. */
.ql-hero__band {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--hero-band-width, 80%);
  height: calc(160px * var(--hero-scale));
  background: #05151b;
  z-index: 4;
}

.ql-hero__bottom {
  position: absolute;
  left: 50%;
  bottom: var(--hero-bottom-offset, 0px);
  width: calc(var(--hero-grid) * var(--hero-scale));
  max-width: 100vw;
  min-height: 160px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.ql-hero__bottom-column {
  width: var(--hero-bottom-column-width, 66.67%);
  padding: var(--hero-bottom-padding, 20px 0 0 60px);
  box-sizing: border-box;
}

.ql-hero__index {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: calc(var(--hero-index-size, 100px) * var(--hero-scale));
  line-height: calc(var(--hero-index-size, 100px) * var(--hero-scale));
  color: #007aff;
}

.ql-hero .ql-hero__text {
  display: block;
  margin: calc(var(--hero-text-margin, -60px) * var(--hero-scale)) 0 0;
  padding: 0 calc(var(--hero-text-padding-right, 50px) * var(--hero-scale)) 0 calc(var(--hero-text-padding-left, 160px) * var(--hero-scale));
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: calc(16px * var(--hero-scale));
  /* Revolution rounds layer line heights to whole pixels. */
  line-height: round(calc(24px * var(--hero-scale)), 1px);
  color: rgba(255, 255, 255, 0.7);
}

.ql-hero__buttons {
  position: absolute;
  left: calc(var(--hero-band-width, 80%) - max(80px * var(--hero-scale), var(--hero-button-min, 0px)));
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
}

.ql-hero__button {
  width: calc(80px * var(--hero-scale));
  height: calc(80px * var(--hero-scale));
  min-width: var(--hero-button-min, 0px);
  min-height: var(--hero-button-min, 0px);
  padding: calc(10px * var(--hero-scale)) 0 0;
  border: 0;
  border-radius: 0;
  background: #1e2d32;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: calc(20px * var(--hero-scale));
  line-height: calc(60px * var(--hero-scale));
  text-align: center;
  cursor: pointer;
  transition: background-color 300ms, color 300ms;
}

.ql-hero__button--next { background: #374449; }

.ql-hero__button:hover,
.ql-hero__button:focus-visible {
  background: #007aff;
  color: #05151b;
}

.ql-hero .material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.ql-hero__button .material-icons {
  font-size: calc(24px * var(--hero-scale));
  line-height: inherit;
  vertical-align: top;
}

/* Layer timeline (ms from the start of a slide), as set in Slider Revolution:
   middle row in from the right 0-1000, bottom row in from the left 100-1100, band in from the
   left with a 2x horizontal stretch 0-1000; everything leaves at 8000 over 1000. */
.ql-hero__middle-row,
.ql-hero__bottom,
.ql-hero__band {
  transition: transform 1000ms cubic-bezier(0.645, 0.045, 0.355, 1), opacity 1000ms cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ql-hero__slide .ql-hero__middle-row { transform: translateX(100%); }
.ql-hero__slide .ql-hero__bottom { transform: translateX(calc(-50% - 100%)); }
.ql-hero__slide .ql-hero__band { transform: translateX(-150%) scaleX(2); transform-origin: 50% 50%; }

.ql-hero__slide.is-in .ql-hero__middle-row { transform: none; }
.ql-hero__slide.is-in .ql-hero__bottom { transform: translateX(-50%); transition-delay: 100ms; }
.ql-hero__slide.is-in .ql-hero__band { transform: none; }

.ql-hero__slide.is-out .ql-hero__middle-row { transform: translateX(-100%); opacity: 0; }
.ql-hero__slide.is-out .ql-hero__bottom { transform: translateX(calc(-50% + 100%)); opacity: 0; }
.ql-hero__slide.is-out .ql-hero__band { transform: translateX(150%) scaleX(2); }

/* Responsive levels: window >= 1460 uses the 1240 grid, 785-1459 the 1024 grid,
   500-784 the 778 grid, below 500 the 480 grid. */
@media (min-width: 1460px) {
  .ql-hero {
    --hero-grid: 1240px;
    --hero-scale: 1;
    --hero-row-margin-bottom: 0px;
    --hero-column-padding-right: 300px;
    --hero-title-margin: 60px;
    --hero-title-spacing: -5px;
    --hero-band-width: 66.6667%;
    --hero-button-min: 60px;
  }
}

@media (max-width: 784px) {
  .ql-hero {
    --hero-grid: 778px;
    --hero-scale: min(1, 100vw / 778px);
    --hero-row-margin-bottom: 0px;
    --hero-title-size: 90px;
    --hero-title-line: 90px;
    --hero-title-spacing: -3px;
    --hero-title-margin: 0px;
    --hero-band-width: 100%;
    --hero-index-size: 100px;
    --hero-text-padding-right: 80px;
    --hero-text-padding-left: 150px;
    --hero-bottom-padding: 20px 0 20px 60px;
  }
}

@media (max-width: 499px) {
  .ql-hero {
    --hero-grid: 480px;
    --hero-scale: min(1, 100vw / 480px);
    --hero-row-margin-x: 0px;
    --hero-row-margin-bottom: 60px;
    --hero-column-padding-right: 30px;
    --hero-column-padding-left: 30px;
    --hero-title-size: 65px;
    --hero-title-line: 65px;
    --hero-title-spacing: -1px;
    --hero-title-margin: 0px;
    --hero-band-width: 100%;
    --hero-bottom-offset: 40px;
    --hero-bottom-column-width: 100%;
    --hero-bottom-padding: 0 30px 0 30px;
    --hero-index-size: 70px;
    /* Revolution stacks the description under the number with a 30px top margin inside a
       line box as tall as the number: 70px at grid scale reproduces both. */
    --hero-text-margin: 70px;
    --hero-text-padding-right: 100px;
    --hero-text-padding-left: 0px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ql-hero__slide.is-active .ql-hero__background img { animation: none; }
  .ql-hero__middle-row, .ql-hero__bottom, .ql-hero__band, .ql-hero__slide { transition: none; }
}
