@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  --grey-500: #62748e;
  --grey-600: #475467;
  --brand-orange: #e6a14b;
  --brand-orange-lite: #e7ba82;
  --brand-teal: #21615c;
}

#banner {
  background-color: var(--brand-orange);
  padding: 5rem 2rem;
  text-align: center;
  box-shadow: -2px 1px 56px 9px rgba(0,0,0,0.32);
  -webkit-box-shadow: -2px 1px 56px 9px rgba(0,0,0,0.32);
  -moz-box-shadow: -2px 1px 56px 9px rgba(0,0,0,0.32);
  h2 {
    margin: 3rem;
    color: var(--brand-teal);
  }
  p {
    font-size: 2rem;
    color: #fff;
    width: 70%;
    margin: auto;
    font-family: 'DM Serif Text';;
  }
}

@media screen and (max-width:390px) {
  #banner {
    padding: 3rem 1rem;
    p {
      font-size: 1.5rem;
      width: 95%;
    }
  }
}

.bg-img {
  opacity: 0.15;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Instrument Sans';
}

#consent {
  display: none;
  background-color: #fff;
  color: var(--brand-teal);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 10px;
  p {
    margin-top: 0;
  }
  figcaption {
    input,
    label {
      display: inline-block;
    }
    input {
      width: 15px;
      height: 15px;
      vertical-align: top;
    }
    label {
      width: 90%;
      color: var(--brand-teal);
      font-size: 1.5rem;
    }
  }
}

.filter-grey600-svg {
  filter: brightness(0) saturate(100%) invert(27%) sepia(37%) saturate(340%) hue-rotate(175deg) brightness(101%) contrast(85%);
}
.filter-orange-svg {
  filter: invert(63%) sepia(74%) saturate(367%) hue-rotate(351deg) brightness(93%) contrast(93%);
}
.filter-white-svg {
  filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(2%) hue-rotate(237deg) brightness(106%) contrast(101%);
}

footer {
    position: sticky;
    background-color: var(--grey-600);
    color: #fff;
    display: flex;
    justify-content: space-between;
    width: -webkit-fill-available;
    padding: 1rem;
    div:last-of-type {
      margin-top: -0.25rem;
      img {
        display: inline-block;
        width: 25px;
        height: 25px;
        vertical-align: bottom;
        margin-right: 0.25rem;
      }
    }
}

.grid {
  margin: 2rem auto 0;
}

.grid-col {
  vertical-align: top;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 1px 1px 12px 1px rgba(115, 115, 115, 0.26);
  -webkit-box-shadow: 1px 1px 12px 1px rgba(115, 115, 115, 0.26);
  -moz-box-shadow: 1px 1px 12px 1px rgba(115,115,115,0.26);
  min-height: 410px;
  .icon-container {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: center;
    background-color: var(--grey-600);
    padding: 4rem 2rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    img {
      width: 80px;
      height: 80px;
    }
  }
  &:first-of-type {
    .icon-container {
      img {
        transform: rotateY(3.142rad);
      }
    }
  }
  h3 {
    text-align: center;
  }
  p {
    font-size: 1rem;
    color: var(--grey-500);
    padding: 0 1.5rem;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Text';;
}

header {
  width: 100%;
  /* min-height: 988px; */
  position: relative;
  overflow: hidden;
  .grid {
    margin: auto;
    display: grid;
    .grid-col {
      display: grid;
      h3 {
        color: var(--grey-600);
        font-size: 1.6rem;
      }
      p {
        font-size: 1.25rem;
      }
    }
  }
  h1 {
      font-size: 3.5rem;
  }

  @media screen and (max-width:390px) {
    h1 {
      font-size: 3.25rem;
    }
  }

  .animIntro {
    position: relative;
    height: 2.5rem;
    margin: 7rem 0 2rem;
    align-items: center;
    p {
      font-size: 3.5rem;
    }
    p, h1 {
        font-family: 'DM Serif Text';
        color: #24726c;
        text-align: center;
        font-weight: 800;
        margin: 0;
    }
  }
  p {
    font-size: 1.75rem;
    color: var(--grey-600);
  }
  .text {
    position: absolute;
    opacity: 0;
    width: 100%;
    top: 0;

    &:nth-child(1) {
      animation: slideUp 6s linear forwards, fadeCycle 4s linear forwards; 
      animation-delay: 0s;
    }

    &:nth-child(2) {
      animation: slideUp 6s linear forwards, fadeCycle 4s linear forwards; 
      animation-delay: 2s;
    }

    &:nth-child(3) {
      animation: slideToFinal 4s forwards, fadeInStay 2s forwards;
      animation-delay: 4s;
      margin-top: -50px;
    }

  }

  @media (max-width:1199px) {
    .grid {
      grid-template-columns: auto auto;
      .grid-col {
        min-height: 100px;
        height: 85px;
        display: grid;
        margin: 0.5rem;
        .icon-container {
          padding: 0.5rem 2rem;
          grid-column: 1 / span 1;
          margin-left: 0;
          height: inherit;
          border-top-left-radius: 0.5rem;
          border-top-right-radius: 0;
          border-bottom-left-radius: 0.5rem;
          border-bottom-right-radius: 0;
          img {
            width: 50px;
            height: 50px;
          }
        }
        .text-container {
          grid-column: 2 / span 5;
          h3 {
            text-align: left;
            margin: 0.5rem;
          }
          p {
            padding: 0;
            margin: 0.5rem;
          }
        }
      }
    }
  }
  @media (max-width:992px) {
    .grid {
      .grid-col {
        .text-container {
          h3 {
            font-size: 1.25rem;
          }
          p {
            font-size: 1.2rem;
          }
        }
      }
    }
  }
  @media (min-width:568px) and (max-width:857px) {
    .bg-img {
        width: 250%;
        height: 136vh;
    }
    .grid {
      grid-template-columns: auto;
      .grid-col {
        &:nth-of-type(2),
        &:nth-of-type(4) {
          .text-container {
            margin-left: -0.75rem;
          }
        }
      }
    }
  }
  @media (max-width:768px) {
    .animIntro {
      height: 11rem;
      margin: 7rem 2rem;
    }
    .bg-img {
      display: none;
    }
    .grid {
      grid-template-columns: auto;
      /* .grid-col {
        &:nth-of-type(2),
        &:nth-of-type(4) {
          .text-container {
            margin-left: 0;
          }
        }
      } */
    }
  }
  @media (max-width:600px) {
    .grid {
      .grid-col {
        &:nth-of-type(2),
        &:nth-of-type(4) {
          .text-container {
            margin-left: 0;
          }
        }
      }
    }
  }
  @media (min-width:992px) and (max-width:1199px) {
    header {
      min-height: unset;
      .animIntro {
        margin-bottom: 0;
        h1 {
          font-size: 2.75rem;
        }
        p {
          font-size: 3.5rem;
        }
        p, h1 {
            font-family: 'DM Serif Text';
            color: #24726c;
            text-align: center;
            font-weight: 800;
            margin: 0;
        }
      }
      .headline {
        margin: 0 auto 2rem;
      }
      /* .grid {
        .grid-col {
          min-height: 340px;
          margin: 0 1.3rem;
          .icon-container {
            padding: 2rem;
          }
          p {
            padding: 0 0.75rem;
          }
        }
      } */
    }
  }
  @media (min-width:1200px) and (max-width:1754px) {
    .grid {
      width: 95%;
      .grid-col {
        margin: 0 1.7rem;
      }
    }
  }
  @media (min-width:1755px) {
    .grid {
      .grid-col {
        margin: 0 2.1rem;
      }
    }
  }
  nav {
    background-color: #fff;
    box-shadow: -4px 20px 27px 0px rgba(0,0,0,0.21);
    -webkit-box-shadow: -4px 20px 27px 0px rgba(0,0,0,0.21);
    -moz-box-shadow: -4px 20px 27px 0px rgba(0,0,0,0.21);
    position: relative;
    #navbar-logo-ctn {
      padding: 0 3rem;
    }
    img {
      height: 50px;
    }
  }  
  .headline,
  .grid,
  button {
    opacity: 0;
  }
  .headline {
    animation: fadeInStay 2s forwards;
    animation-delay: 6s;
    margin: 8rem auto;
    font-size: 2.25rem;
    color: #206963;
  }
  @media (max-width:600px) {
    .headline {
      font-size: 1.75rem;
    }
  }
  .grid {
    animation: fadeInStay 2s forwards;
    animation-delay: 7s;
  }
  button {
    animation: fadeInStay 2s forwards;
    animation-delay: 8s;
    background-color: #206963;
    color: #fff;
    padding: 0.75rem;
    margin: 7.5rem auto;
    display: block;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
  }
}

#how-it-works {
  .grid {
    width: 100%;
    margin: auto;
    display: grid;
    grid-template-columns: auto;
    .grid-col {
      min-height: unset;
      display: grid;
      grid-column: 1;
      margin: 0 0 1.5rem 0;
      .icon-container {
        background-color: transparent;
        grid-column: 1 / span 1;
        padding: 0.5rem 1rem;
        width: 5rem;
        margin-left: 0;
        img {
          width: 100%;
          height: 100%;
        }
      }
      .text-container {
        grid-column: 2 / span 4;
        padding-right: 1rem;
        h3, p {
          color: var(--grey-600);
        }
        h3 {
          text-align: left;
        }
        p {
          font-size: 1rem;
          padding: 0;
        }
      }
    }
  }
  .section-card-wide {
    padding: 1.5rem 2.5rem 2.5rem;
    h2 {
      margin: 0 0 3rem;
    }
    h2, p {
      color: #fff;
    }
  }
}

@media (min-width:768px) and (max-width:991px) {
  #how-it-works {
    .grid {
      .grid-col {
        .text-container {
          margin-left: -3rem;
        }
      }
    }
  }
}

@media (min-width:992px) {
  #how-it-works {
    .section-card-wide {
      padding: 0 2.5rem 4.25rem;
      vertical-align: top;
      p {
        font-size: 1.2rem;
      }
    }
    .grid {
      display: block;
      .grid-col {
        min-height: unset;
        margin: 0 1.5rem 1.5rem 0;
        width: 45%;
        display: inline-flex;
      }
    }
  }
}
@media (min-width:1200px){
  body {
    box-shadow: 1px 2px 38px 0px rgba(0,0,0,0.5);
    -webkit-box-shadow: 1px 2px 38px 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 1px 2px 38px 0px rgba(0,0,0,0.5);
    max-width: 2000px;
    margin: auto;
  }
  header {
    .animIntro,
    .headline,
    .grid {
      width: 1200px;
    }
    .animIntro {
      margin-left: auto;
      margin-right: auto;
    }
    .grid {
      display: grid;
      grid-template-columns: auto auto auto auto;
      .grid-col {
        .icon-container {
          padding: 5.2rem;
          height: fit-content;
        }
      }
    }
  }
  #how-it-works {
    padding: 5rem 2.5rem 6.5rem;
    background-color: lightgray;
    .section-card-wide {
      /* width: 45%; */
      display: inline-block;
      /* height: 818px; */
        h2 {
        margin: 2.5rem 0 3rem;
      }
    }

    .img-container {
      /* width: 45%; */
      display: inline-block;
      margin-left: 2rem;
      border-radius: 0.5rem;
      .mbl {
        display: none;
      }
      .dsk {
        display: block;
      }
    }
  }
}

@media (min-width:1200px) and (max-width:1500px) {
  #how-it-works {
    .grid {
      .grid-col {
          width: 100%;
          display: grid;
      }
    }
    .section-card-wide {
      width: 40%;
      padding-bottom: 1rem;
      height: 818px;
      h2 {
        margin: 1.5rem 0;
      }
    }

    .img-container {
      width: 50%;
      max-height: 830px;
    }
  }
}

@media (min-width:1500px) {
  #how-it-works {
    .section-card-wide {
      width: 57.5%;
      padding-bottom: 2rem;
    }

    .img-container {
      width: 32%;
      position: relative;
      height: 625px;
      .dsk {
        position: absolute;
        bottom: 0;
      }
    }
  }
}

@media (min-width:1918px) {
  #how-it-works {
    .section-card-wide {
      padding-bottom: 3.5rem;
    }
  }
}

#form-ctn {
  background-color: var(--brand-teal);
  padding: 7rem 0;
  color: #fff;
  p {
    font-size: 1.5rem;
  }
}

.headline {
    text-align: center;
    width: 85%;
    margin: 4rem auto;
}

.img-container {
  overflow: hidden;
  img {
    width: 100%;
    &.mbl {
      display: block;
    }
    &.dsk {
      display: none;
    }
  }
}

.input-validation {
  background-color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 0.5rem;
  &.success {
    border: 2px solid green;
    color: green;
  }
  &.error {
    border: 2px solid red;
    color: red;
  }
}

#signup-form {
  width: 35%;
  margin: auto;
  label, input {
    display: block;
    font-size: 1.3rem;
  }
  label {
    color: #fff;
    margin-bottom: 0.5rem;
  }
  input {
    width: 100%;
    height: 2.25rem;
    color: var(--brand-teal);
    &[type="submit"] {
      background-color: var(--brand-orange);
      color: var(--grey-600);
      font-weight: 800;
      border: none;
      border-radius: 12px;
      padding: 0.75rem 0.5rem;
      margin: 1rem auto;
      width: 9.75rem;
      height: 3rem;
      line-height: 0.25;
       &:disabled {
        opacity: 0.85;
        background-color: var(--brand-orange-lite);
      }
    }
  }
}

@media screen and (max-width:834px) {
  #signup-form {
    width: 360px;
  }
}

@media screen and (max-width:400px) {
  #signup-form {
    width: 300px;
  }
}

#privacy {
  &.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 97, 92, 0.7);
    transition: opacity 500ms;
    visibility: hidden;
    opacity: 0;
    &:target {
      visibility: visible;
      opacity: 1;
    }
  }
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 80%;
  position: relative;
  transition: all 5s ease-in-out;
  color: var(--grey-500);
  h2 {
    margin-top: 0;
    color: var(--brand-teal);
  }
  .content {
    max-height: 60vh; 
    overflow-y: auto; 
    padding-right: 10px;
    div {
      margin-bottom: 2rem;
      h3 {
        color: var(--grey-600);
      }
    }
  }
  .close {
    position: absolute;
    top: 20px;
    right: 30px;
    transition: all 200ms;
    font-size: 30px;
    font-weight: bold;
    text-decoration: none;
    color: var(--grey-600);
    &:hover {
      color: var(--brand-teal);
    }
  }
}

.second-heading {
    font-family: 'DM Serif Text';
    font-size: 2.65rem;
    font-weight: 800;
    text-align: center;
}

section {
  opacity: 0;
  transition: opacity 1.5s ease-out;
}

.section-card-wide {
  &.bg-grey-600 {
    background-color: var(--grey-600);
  }
}

@media (min-width:1200px) {
  .section-card-wide {
    border-radius: 0.5rem;
    box-shadow: 1px 1px 12px 1px rgba(115, 115, 115, 0.26);
    -webkit-box-shadow: 1px 1px 12px 1px rgba(115, 115, 115, 0.26);
    -moz-box-shadow: 1px 1px 12px 1px rgba(115,115,115,0.26);
  }
}

section.fade-in {
  /* display: block; */
  opacity: 1;
}

/* Keyframes:
   - fade in (0–20%)
   - stay visible (20–40%)
   - fade out (40–60%)
   - stay gone (60–100%)
*/
@keyframes fadeCycle {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  30%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes fadeInStay {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes slideUp {
  0% { transform: translateY(0); }
  33% { transform: translateY(-50px); }
  66% { transform: translateY(-100px); }
  100% { transform: translateY(0); }
}

@keyframes slideToFinal {
  0%   { transform: translateY(75%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}