@font-face {
  font-family: 'Roboto';
  src: url(Resources/Roboto.ttf);
}

html, body {
  box-sizing: border-box;
  scroll-behavior: smooth;
  height: 100%;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  width: 100vw;
  min-height: 100dvh;
  height: 100dvh;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  overscroll-behavior: none;
}

body a {
  color: #000000;
  text-decoration: none;
  transition: 0.5s;
}

body a:hover {
  color: #D0CACA;
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 18px;
  padding: 29px;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

.header .name {
  grid-column: 1 / 2;
}

.header .contact {
  grid-column: 2 / 3;
}

.header {
  display: contents;
}

.description {
  grid-column: 1 / span 2;
  grid-row: 3;
}

.footer-wrapper {
  position: absolute;
  bottom: 36px;
  left: 36px;
  right: 36px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.footer .handle {
  grid-column: 1;
  grid-row: 6;
  align-self: end;
  justify-self: start;
}

.footer .credit {
  grid-column: 2;
  grid-row: 6;
  align-self: end;
  justify-self: start;
}

.footer .handle,
.footer .credit {
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  align-self: end;
  justify-self: start;
}

.footer {
  display: contents;
}

/* BACKGROUND HANDLING */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.bg-image.active {
  opacity: 1;
}

/* Retina image sets */
.bg-image.slide-1 {
  background-image: image-set(
    url('Images/leaavedon_img_1.jpg') 1x,
    url('Images/Leaavedon_BG_1.jpg') 2x
  );
}

.bg-image.slide-2 {
  background-image: image-set(
    url('Images/leaavedon_img_2.jpg') 1x,
    url('Images/Leaavedon_BG_2.jpg') 2x
  );
}

.bg-image.slide-3 {
  background-image: image-set(
    url('Images/leaavedon_img_3.jpg') 1x,
    url('Images/Leaavedon_BG_3.jpg') 2x
  );
}

.bg-image.slide-4 {
  background-image: image-set(
    url('Images/leaavedon_img_4.jpg') 1x,
    url('Images/Leaavedon_BG_4.jpg') 2x
  );
}

.bg-image.slide-5 {
  background-image: image-set(
    url('Images/leaavedon_img_5.jpg') 1x,
    url('Images/Leaavedon_BG_5.jpg') 2x
  );
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  html, body {
    height: 100dvh;
    position: relative;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .background-container {
    position: absolute;
    top: 50dvh;
    left: 0;
    width: 100%;
    height: 50dvh;
    z-index: -1;
    overflow: hidden;
  }
}

@media (max-width: 600px) {
  .background-container .bg-image:nth-child(4) {
    background-position: calc(50% - 50px) center;
  }
}
