HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/bomacon/bomacon.nl/resources/sass/site/5-Components/_components.hero.scss
// Component settings: Hero
// ------------------------------------------

$c-hero: (
	'hero-bgcolor-1':		palette(primary),
	'hero-bgcolor-2':		palette(primary, 700),
	'caption-bgcolor':		palette(primary, 700),
	'caption-color':		palette(neutral, 0),
	'right-bgcolor-ratio':	63%,
);

// ------------------------------------------


.c-hero {
  @include mq(m) {
    @include contain;
  }
}

.c-hero__main {
  position: relative;
  background-color: palette(neutral, 0);
}

.c-hero__slider {
  overflow: hidden;
  position: relative;
  padding-bottom: 55.556%; // Ratio used for mobile image

  @include mq(m, l) {
    padding-bottom: 50%; // Ratio used for image
  }
}

.c-hero__picture {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition-property: opacity, filter;
  transition-duration: 500ms;
  transition-timing-function: linear;
  filter: blur(5px);

  &.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

.c-hero__image {
  width: 100%;
}

.c-hero__caption {
  @include hyphenate;
  font-size: calc(16px + 1vw);
  font-weight: bold;
  position: relative;
  padding: space(2);
  line-height: 1.2857;
  text-align: center;
  color: map-get($c-hero, 'caption-color');
  background-color: map-get($c-hero, 'caption-bgcolor');

  @include mq(m) {
    position: absolute;
    bottom: 0;
    max-width: column(1,2);
    padding: space(3) space(4);
    text-align: left;
    background-color: rgba(map-get($c-hero, 'caption-bgcolor'), 0.9);
  }

  // Font-lock to scale font-size proportionally
  @include mq(m, l) {
    padding: 2.0vw; // Magic value so text scales nicely
    font-size: 3.2vw; // Magic value so text scales nicely
  }

  @include mq(l) {
    @include font-size(xl);
    line-height: 1.2;
    padding-left: column(0.5);
  }
}

.c-hero__controls {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  padding: space(1);

  &::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: space(6);
    width: 100%;
    background: linear-gradient(to top, black, transparent);
    opacity: 0.3;
  }
}


// Button with arrow that scrolls down
.c-hero__scroll {
  @include mq($max: m) {
    display: none;
  }

  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 10px;
  color: palette(neutral, 0);
  background-color: palette(secondary);
  border-radius: 100%;
  transform: translate(-50%, 50%) rotate(0.25turn);
  transition: background-color 200ms;

  & > svg {
    transition: transform 200ms;
  }

  &:hover {
    cursor: pointer;
    background: mix(palette(secondary), black, 90%);

    & > svg {
      transform: translateX(3px);
    }
  }

  &:focus {
    outline: none;
    background: mix(palette(secondary), black, 90%);
    box-shadow: 0 0 0 3px palette(neutral, 0);
  }
}