:root {
  /* Variables for the values used constantly */
  --clr-orange: 105 36% 30%;
  --clr-blue: 101 29% 45%;

  --spacer: 2rem;
}

.desktop-layout { display: none; }
.mobile-layout { display: block; }

.timeline {
  display: grid;
  position: relative;
  max-width: 1200px;
  margin: 100px auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 6px;
  height: 0;
  background: #66914c;
  z-index: 1; /* behind cards */
  pointer-events: none;
  transition: height 120ms linear;
}


.container {
  padding: 20px 60px;
  position: relative;
  width: 36%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms cubic-bezier(0.2, 0.9, 0.3, 1),
    transform 600ms cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 2; /* above the line */
}

/* left side start */
.left-container {
  left: 0;
  transform: translateX(-60px); /* slide from left */
}

/* right side start */
.right-container {
  left: 50%;
  transform: translateX(60px); /* slide from right */
}

/* Visible state */
.container.show {
  opacity: 1;
  transform: translateX(0); /* reset to normal */
}

.right-container {
  position: relative; /* parent for absolute positioning */
}

.right-container::before {
  content: '';
  background-color: #66914c;
  z-index: 2000;
  display: block;
  height: 40px;
  width: 40px;
  position: relative;
  right: 80px;
  top: 50%;
  border-radius: 50%;
}

.left-container::before {
  content: '';
  background-color: #66914c;
  display: block;
  height: 40px;
  width: 40px;
  position: absolute;
  right: -20px;
  top: 50%;
  border-radius: 50%;
}

.text-box {
  color: white;
  padding: 10px 20px;
  background: #777;
  position: relative;
  border-radius: 6px;
  font-size: 15pt;
  z-index: 3; /* above the line but below svg if needed */
}

.heading {
  margin-bottom: 20px;
}

.one-stop-shop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
}

.section-heading {
  font-size: 40pt;
  margin-bottom: 50px;
  color: #20471b;
  align-items: center;
  justify-content: center;
}

.section-paragraph {
  font-size: 19pt;
  align-items: center;
  justify-content: center;
  color: #3d6630;
}

.top-wave {
  margin: 0 ;
  position: absolute;
  bottom: 8px;
}

@media screen and (max-width: 600px) {
  .timeline {
    margin: 20px auto;
  }
  .timeline-line { 
    left: 31px; 
    transform: none; 
  } /* move line to left */
  .container {
    width: 75%;
    padding-left: 80px;
    padding-right: 25px;
    padding-bottom: 70px;
  }
  .text-box {
    font-size: 17px;
  }
  .right-container {
    left: 0;
  }
  .container svg {
    left: 10px;
    margin-top: 70px;
  }
  .one-stop-shop {
    padding: 10px;
  }
  .right-container::before {
    right: 65px;
    top: 50%;
  }
  .left-container::before {
    left: 14px;
    top: 50%;
  }
  .section-heading {
    font-size: 30pt;
  }
  .section-paragraph {
    font-size: 15pt;
  }
}

.gradient-shadow {
  background: linear-gradient(
    45deg,
    hsl(var(--clr-orange)),
    hsl(var(--clr-blue))
  );
  box-shadow: 0;
  position: relative;
  isolation: isolate;
}

.gradient-shadow::before,
.gradient-shadow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: inherit; /* background is inherited - same as the bg within? */
}
/* a good shadow has di--erent levels; dimensions */
.gradient-shadow::before {
  filter: blur(0.5em);
}
.gradient-shadow::after {
  opacity: 0.2;
  filter: blur(3em);
}

@media screen and (min-width: 992px) {
  .desktop-layout { display: block; }
  .mobile-layout { display: none; }

  .stack-area {
    width: 100%;
    height: 335vh;
  
    display: flex;
  
    color: var(--clr-palette-3);
  }
  
  .left,
  .right {
    flex-basis: 50%;
    height: 100vh;
  
    position: sticky;
    top: 0;
  }
  
  .left {
    display: flex;
  }
  
  .left > .description {
    display: flex;
    justify-content: center;
    align-items: center;
  
    flex-direction: column;
  
    padding: 3em;
  
    width: 95%;
  
    font-size: var(--fs-400);
  }
  
  .decoration {
    color: var(--clr-palette-5);
  }
  
  .text__description {
    width: 90%;
    text-align: justify;
    padding-right: 2.5em;
  }
  
  .heading__description {
    margin: 0;
    color: var(--clr-palette-5);
  }
  
  .card {
    width: 350px;
    height: 350px;
  
    border-radius: 25px;
  
    background: var(--clr-palette-5);
    color: var(--clr-palette-1);
  
    display: flex;
    flex-direction: column;
    gap: 5px;
  
    position: absolute;
    top: calc(50% - 175px);
    left: calc(50% - 175px);
  
    transition: 0.5s ease-in-out;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  }
  .card:nth-child(2) {
    background: var(--clr-palette-4);
  }
  .card:nth-child(3) {
    background: var(--clr-palette-3);
  }
  .card:nth-child(4) {
    background: var(--clr-palette-2);
  }
  .card:nth-child(5) {
    background: var(--clr-palette-1);
    color: var(--clr-comp-1);
  }
  
  .title__card {
    font-family: var(--font-family);
    font-size: var(--fs-400);
    text-align: left;
    padding-left: 1em;
    margin-top: 0.5em;
    flex-basis: 60%;
  }
  
  .description__card {
    display: flex;
    flex-basis: 40%;
  
    font-family: var(--font-family);
    font-size: var(--fs-500);
    text-align: left;
    padding: 1rem;
  }
  
  .p__card {
    margin: 0;
  }
}
