@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  background: #fcf1f0;
}

body{
  padding-top: 150px;
}

nav {
  position: fixed;
  top: 0;
  z-index: 99;
  width: 100%;
  background: #fcf1f0;
  padding-top: 8px;
  z-index: 100;
}
nav .wrapper{
  position: sticky;
  max-width: 1300px;
  padding: 0px 30px;
  height: 70px;
  line-height: 50px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wrapper .logo a{
  color: #f9ca24;
  font-size: 40px;
  font-weight: 800;
  font-family: "Playfair Display";
  text-decoration: none;
}
.wrapper .logo a:hover{
  content: url(../kaleidoscope.png);
  width: 6%;
  position: absolute;
  top: 0px;
  left: 20px;
}

.nav-links li{
  position: absolute;
  float: left;
  right: 28px;
  top: 10px;
}
.nav-links li a{
  color: #f0932b;
  text-decoration: none;
  font-size: 1.15em;
  font-weight: 700;
  display: inline;
  padding-left: 100px;
  width: 175px;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}
.nav-links li a:hover{
  color: #f9ca24;
}

.nav-links .dot {
  width: 8px;
  height: 8px;
  background: #f9ca24;
  border-radius: 50%;
  opacity: 0;
  position: absolute;
  bottom: -1px; /* positions dot below text */
  left: 20%;
  transform: translateX(-50%);
  opacity: 0; /* hidden by default */
  transition: opacity 0.2s ease-in-out;
}

.nav-links a:nth-child(1):hover ~ .dot {
  -webkit-transform: translateX(30px);
  transform: translateX(30px);
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  opacity: 1;
}

.nav-links a:nth-child(2):hover ~ .dot {
  -webkit-transform: translateX(210px);
  transform: translateX(210px);
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
  opacity: 1;
}

.nav-links a:nth-child(3):hover ~ .dot {
  -webkit-transform: translateX(380px);
  transform: translateX(380px);
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
  opacity: 1;
}

h1{
  font-family: "Playfair Display", cursive;
  font-size: 2.2vw;
  color: #bf2c6a;
  font-weight: 600;
  text-align: left;
  padding-left: 100px;
}

h2{
  font-family: "Poppins", sans-serif;
/*  font-style: italic;*/
  font-size: 1.1vw;
  color: #c79c97;
  font-weight: 500;
  text-align: left;
  padding-left: 100px;
  padding-top: 15px;
  padding-right: 150px;
}

ul {
  display: flex;
  width: calc(94% - 2rem);
  max-height: 400px;
  padding-top: 2rem;
  margin: 0;
  list-style-type: none;
  padding-left: 100px;
}

li {
  padding: 0;
}

img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  object-fit: cover;
  transition: all 0.2s ease;
}

ul:is(:hover, :focus-within) img {
  opacity: calc(0.1 + (var(--active-lerp, 0) * 0.9));
  filter: grayscale(calc(1 - var(--active-lerp, 0)));
}

:root {
  --lerp-0: 1;
  --lerp-1: 0.5787037;
  --lerp-2: 0.2962963;
  --lerp-3: 0.125;
  --lerp-4: 0.037037;
  --lerp-5: 0.0046296;
  --lerp-6: 0;
}

a {
  outline-offset: 4px;
}

li {
  flex: calc(0.5 + (var(--active-lerp, 0) * 1));
  transition: flex 0.2s ease;
}

li:is(:hover, :focus-within) {
  --active-lerp: var(--lerp-0);
  z-index: 7;
}
li:has( + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li {
  --active-lerp: var(--lerp-1);
  z-index: 6;
}
li:has( + li + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li + li {
  --active-lerp: var(--lerp-2);
  z-index: 5;
}
li:has( + li + li + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li + li + li {
  --active-lerp: var(--lerp-3);
  z-index: 4;
}
li:has( + li + li + li + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li + li + li + li {
  --active-lerp: var(--lerp-4);
  z-index: 3;
}
li:has( + li + li + li + li + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li + li + li + li + li {
  --active-lerp: var(--lerp-5);
  z-index: 2;
}
li:has( + li + li + li + li + li + li:is(:hover, :focus-within)),
li:is(:hover, :focus-within) + li + li + li + li + li + li {
  --active-lerp: var(--lerp-6);
  z-index: 1;
}

.result {
  position: relative;
  overflow: hidden;
}

.result .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  color: #6a9a62;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  padding: 10px 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.result:hover .caption {
  opacity: 1;
}
