:root {
  --ff-body: system-ui, sans-serif;
  --ff-red-hat-display: "Red Hat Display", serif; font-optical-sizing: auto;
  --ff-darker-grotesque: "Darker Grotesque", serif; font-optical-sizing: auto;

/* system-ui font */
  --fs-a: clamp(1.0rem, 4vw, 1.2rem);
  --fs-p: clamp(1.1rem, 4vw, 1.2rem);
  --fs-h1: clamp(3.4rem, 8vw, 5.18rem);
  --fs-h2: clamp(2rem, 5vw, 2.5rem);
  --fs-h3: clamp(1.5rem, 4vw, 2rem);
  --fs-h4: clamp(3rem, 6vw, 4rem);
  --fs-h5: clamp(1.5rem, 3vw, 1.875rem);

  --bc-black: black;
  --bc-dark-grey: #0e0e0e;
  --bc-white: white;
  --bc-light-grey: #e7e7e7;
  --bc-sand: #b88a69;
  --bc-brown: #7e5d45;

  --border-sand: 2px solid var(--bc-sand);
  --border-light-grey: 2px solid var(--bc-light-grey);
}

.black {background: var(--bc-black);}
.white {background: var(--bc-white);}
.light-grey {background: var(--bc-light-grey);}
.sand {background: var(--bc-sand);}

h1, h2, h5 {font-family: var(--ff-red-hat-display); color: var(--bc-light-grey)}
a, p, h3, h4 {font-family: var(--ff-darker-grotesque); color: var(--bc-light-grey)}

a {font-size:var(--fs-a); font-weight: 400;}
p {font-size:var(--fs-p); font-weight: 300; text-wrap: pretty;}
h1 {font-size:var(--fs-h1); font-weight: 500; text-transform: uppercase; margin-bottom: 3rem;}
h2 {font-size:var(--fs-h2); font-weight: 500; margin-bottom: 2rem;}
h3 {font-size:var(--fs-h3); font-weight: 600; margin-top: -0.625rem; margin-bottom: 6px;}
h4 {font-size:var(--fs-h4); font-weight: 400; line-height: 50px;}
h5 {font-size:var(--fs-h5); font-weight: 300; margin-bottom: 3px;}

@media (min-width:768px) {
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #353535;
  box-shadow: inset 0 0 15px 2px #5f5f5fc2;
  height: 200px;
}
::-webkit-scrollbar-thumb {
  background: #939393;
  box-shadow: 0 0 20px 3px #000000c7;
}
::-webkit-scrollbar-thumb:hover {
  background: #6e6e6e;
}

*, *::before, *::after {
  box-sizing: border-box;
}
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  scroll-behavior: smooth; 
  -webkit-font-smoothing: antialiased;
  color: var(--bc-light-grey);
  background: var(--bc-black);
}

.parallax-wrapper {
  overflow-x: hidden;
  overflow-y:auto;
  perspective: 5px; /* increase=closer */
  height: 100vh;
}

.gradient {
  position: relative;
  background: #be906512;
}

.gradient::after {
  content: "";
  z-index: 0;
  opacity: .15;
  background-color: var(--bc-black);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4.04' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");  background-repeat: repeat;
  background-size: auto;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0%;
  bottom: 0%;
  left: 0%;
}

/*#region BACKGROUND SHAPES */
.shapes1 {
  position: absolute;
  z-index: 0;
  height: 100%;
  transform-style: preserve-3d;
}

.shapes1 div {
  position: absolute;
  margin-left: auto;
  margin-right: auto;
  filter: blur(120px);
}

.shapes2 {
  filter: blur(120px);
  mix-blend-mode: overlay;
}

.shapes2 div {
  position: absolute;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.5;
}

.shapes3 {
  filter: blur(120px);
  position: relative;
  z-index: 0;
}
.shapes3 div {
  position: absolute;
  margin-left: auto;
  margin-right: auto;
}

.shapes1 div:nth-child(1) {
  width: 80em;
  height: 170em;
  background-color: #c28e6ab8;
  right: 0em;
  top: 1em;
  left: -59em;
  border-radius: 50%;
  transform: rotate(-65deg) translateZ(-10px) scale(2);
  z-index: 1;
}
.shapes1 div:nth-child(2) {
  width: 100vw;
  height: 140vh;
  background-color: #291b12;
  right: 0em;
  top: 7em;
  left: 77em;
  border-radius: 50%;
  transform: rotate(121deg) translateZ(-10px) scale(2);
  z-index: 0;
}
.shapes1 div:nth-child(3) {
  width: 160vw;
  height: 156vh;
  background-color: #795842c2;
  right: 0em;
  top: -73em;
  left: -113em;
  border-radius: 50%;
  transform: rotate(-41deg) translateZ(-10px) scale(2);
  z-index: 0;
}

.shapes1 div:nth-child(4) {
  width: 112em;
  height: 43em;
  background-color: #ffc48fa8;
  right: 0em;
  top: 145em;
  left: 123em;
  border-radius: 50%;
  transform: rotate(-1deg) translateZ(-7px) scale(2);
  z-index: 0;
}

@keyframes rotating-gradient {
  0% {
    transform: rotate(0deg);
  } 50% {
    transform: rotate(180deg);
  } 100% {
    transform: rotate(360deg);
  }
}
@keyframes rotating-gradient-reverse {
  0% {
    transform: rotate(0deg);
  } 50% {
    transform: rotate(-180deg);
  } 100% {
    transform: rotate(-360deg);
  }
}

.shapes2 div:nth-child(1) {
  width: 80em;
  height: 170em;
  background-color: var(--bc-black);
  right: -180em;
  top: -20em;
  left: 0em;
  border-radius: 50%;
  z-index: 0;
  animation: rotating-gradient-reverse 21s linear forwards;
  animation-iteration-count: infinite;
}

.shapes2 div:nth-child(2) {
  width: 50em;
  height: 160em;
  background-color: #ffddc2;
  right: 0em;
  top: -10em;
  left: -140em;
  border-radius: 50%;
  z-index: 0;
  animation: rotating-gradient 21s linear forwards;
  animation-iteration-count: infinite;
}

.shapes2 div:nth-child(3) {
  width: 40em;
  height: 80em;
  background-color: #ffd4b2;
  right: 0em;
  top: 108em;
  left: 40em;
  border-radius: 50%;
  z-index: 0;
  animation: rotating-gradient 21s linear forwards;
  animation-iteration-count: infinite;
}
/*#endregion*/


header {
  min-height: 100vh;
  display: flex;
  position: relative;
  z-index: 5;
  flex-wrap: wrap;
  flex-direction: column;
}

main {
  max-width: 70rem;
  margin: 0 auto;
  padding: 10rem 1rem 1rem 1rem;
  position: relative;
  z-index: 5;
}

video {
  width: 100%;
  border-radius: 10px 10px 0px 0px;
  object-fit: cover;
  min-height: 300px;
  max-height: 520px;
  transition: color .2s ease;
}

.hover-line {
  position: relative;
  display: inline-block;
  width: 100%;
}

.hover-line video{
  display: block;
  width: 100%; /* Adjust as needed */
  transition: transform 0.3s ease-in-out;
}

.lakipalvelu {
  display: flex;
  align-items: center;
  background: #353535;
  width: 100%;
  height: 520px;
  align-content: center;
  justify-content: center;
  border-radius: 10px 10px 0px 0px;
}

@media (max-width: 500px) {
  .hover-line video {
    max-height: 370px;
  }
  .lakipalvelu {
    height: 370px;
  }
}

.hover-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: radial-gradient(10rem at center 100%, var(--bc-sand), var(--bc-black), var(--bc-sand), #ffffff00 112rem);
  transform: translateX(-50%);
  transform-origin: center;
  transition: width 0.2s ease-in-out;
}

.hover-line:hover::after {
  width: 100%;
}

.left-wrapper {
  display: flex;
}

.fig-left {
  max-width: 468px;
  height: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

img {
  display: block;
  max-width: 100%;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.img-bg {
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
}

.img-bg img{
  transition: 0.5s;
  height: auto;

}

.img-bg img:hover{
  transform: scale(1.2);
}

.spacer img {
  border-radius: 10px 10px 0px 0px;
}

.fig-wrapper {
  display: flex;
  width: 100%;
  margin-bottom: auto;
  margin-top: auto;
  justify-content: center;
}

figure {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  height: auto;
  gap: 2rem;
  padding: 2rem;
}

#side-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.fig-right {
  display: grid;
}

article {
  margin-bottom: 8rem;
  display: flex;
  flex-wrap: wrap;
  border-radius: 10px;
  background: var(--bc-dark-grey);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.wrapper article {
  margin-bottom: 0rem;
  width: 100%;
}

.video-container {
  width: 100%;
}

.wrapper {
  display: grid;
  gap: 4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
  justify-content: space-evenly;
  align-items: stretch;
  flex-wrap: wrap;
  justify-items: center;
  margin-bottom: 8rem;
}

#flex-fix {
  width: 100%;
}

.spacer {
  width: 100%;
  border-radius: 10px;
}

section {
  display: flex;
  gap: 1rem;
  width: 100%;
  padding: 2rem 2rem 2rem 2rem;
  flex-wrap: wrap;
  flex-direction: column-reverse;
}

.web-bg {
  background-image: url("kyyry_thumb.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  width: 100%;
  height: 31.5rem;
  border-radius: 10px;
}

.container-info {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
}

.container-button {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
}

@media (min-width:528px) {
  section {
    flex-wrap: nowrap;
    flex-direction:unset;
  }
  .container-button {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: flex-end;
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.btn-visit {
  background: var(--bc-sand);
  display: inline
}
.btn-visit:hover {
  background: var(--bc-brown);
}

button {
  width: 6rem;
  height: 3rem;
  border-radius: 2rem;
  margin-top: 6px;
  background: none;
  color: var(--bc-white);
  border: var(--border-sand);
  transition: 0.2s ease;
  cursor: pointer;
  font-family: var(--ff-darker-grotesque);
  font-size: var(--fs-p);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}
button p {
  font-weight: 400;
}

button:hover {
  background-color: #8d71587e;
  color: var(--bc-white);
  transform: scale(0.95);
}

/*#region NAV */

.nav-wrapper {
  display: flex;
  width: 100%;
  justify-content: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 70rem;
  padding: 1rem 2rem;
}

.navbar a {
  text-decoration: none;
  color: var(--bc-light-grey);
  padding: 4px 0;
  display: block;
  position: relative;
  transition: color .2s ease;
}

.navbar-links a {
  text-decoration: none;
  color: white;
  display: block;
  position: relative;
  transition: color .2s ease;
}

.navbar-links a:hover {
  color: #939393;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--bc-sand);
  transform: translateX(-50%);
  transform-origin: center;
  transition: width .2s ease;
}

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}
/*#endregion*/

/*#region pageload animation */

.line1 {
  height: 0px;
  padding: 1px;
  opacity: 0;
  background: var(--bc-light-grey)
}

.line1.show {
  height: 100%;
  opacity: 1;
  transform-origin: center top;
  animation: 1.5s Down forwards;
}

.line2 {
  width: 0px;
  height: 2px;
  margin-bottom: 5px;
  margin-top: 5px;
  background: var(--bc-light-grey)

}

.line2.show {
  width: 100%;
  transform-origin: center left;
  animation: 1.5s ease-out leftToRight forwards;
}

.fadeIn {
  opacity: 0;
}
.fadeIn.show {
  animation: 1s fadeIn forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  } 100% {
    opacity: 1;
  }
}

@keyframes leftToRight {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes Down {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}

.animated {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.animated.show {
  opacity: 1;
  transform: translateX(0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.enabled {
  opacity: 1;
  transform: translateY(0);
}

/*#endregion*/