<template>
  <div>
    <section class="the-impact --interna">
        <div class="container">
            <div class="wrap">
							<img class="impact-cloud" src="@/assets/images/the-impact-fund-cloud.png" alt="Cloud">
							<img class="img-text" src="@/assets/images/the-impact-fund-title.svg" alt="Title-Cloud">
						</div>
            <div class="map-interna">
                <div class="map-interna-toltip">
                  <img src="@/assets/images/impact/burst.png">
                  <span class="value">25</span>
                  <span class="text">raised</span>
                </div>
                <img class="map-interna-image" src="@/assets/images/impact/map.png" alt="Map">
                <img class="map-interna-cloud" src="@/assets/images/impact/cloud-background.png" alt="Cloud">
                <!-- <img class="map-interna-puppet" src="@/assets/images/impact/puppet.svg" alt="Puppet"> -->
                <!-- <div class="box-zorro-stone">
                  <div class="the-zorro-stone">


                    <lottie-animation class="the-zorro-lottie" path="./lottie/DogZorroHome.json" :width="480" :height="535" />
                    <img class="the-stone-img" src="@/assets/images/impact/mountain.png" alt="Mountain">

                  </div>
                </div> -->
                <div class="map-interna-puppet">
                  <img style="display: none;" src="@/assets/images/puppet.svg" alt="Puppet">
                  <lottie-animation class="lottie-puppet" path="./lottie/DogZorroHome.json" :width="480" :height="535" />
                </div>
            </div>
            <div class="the-impact__content">
                <img src="@/assets/images/impact/cloud-bottom.png" class="the-cloud-right">
                <img src="@/assets/images/impact/cloud-behind-bird.png" class="the-cloud-left">
                <div class="row reverse-mobile">
                  <div class="col-md-5" style="position:relative; z-index:9;">
                    <h4 class="the-impact__subtitle">Our goal is to induce maximum positive impact on the world, especially for animals & medicine.</h4>
                    <p class="the-impact__description">Contributions are not purely financial - we frequently work with the carefully-selected organizations we support to help them do good. The fund was born out of a desire to drive targeted change rather than just giving away money with no accountability. On top of that, we implemented a model for long-term sustainability so the vision doesn't die once capital runs out.</p>
                  </div>
                  <!-- <div class="col-md-7">
                    <div class="mountain-imgs">
                      <img class="map-interna-mountain" src="@/assets/images/impact/mountain.png" alt="Mountain">
                    </div>
                  </div> -->
                </div>
            </div>
        </div>
    </section>
    <section class="list-support pd-mobile" id="initSection">
      <!-- <img src="@/assets/images/impact/bird.svg" class="list-support-bird"> -->
        <!-- <lottie-animation class="list-support-bird" id="birdAnim" path="./lottie/bird-json.json" :width="900" :height="370" /> -->
<lottie-animation path="./lottie/bird-json.json"
:loop="false"
:auto-play="false"
:speed="1"
:width="900"
:height="370"
class="list-support-bird appear absolute bottom-1/4 left-1/2 transform -translate-x-1/2"
@AnimControl="handleAnimation"
@click="hit($event)"
/>
      <img src="@/assets/images/impact/cloud-behind-bird.png" class="the-cloud-bird">
      <div class="container">
        <div class="row">
          <div class="col-md-6">
            <h2 class="list-support__title">We support</h2>
            <ul>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Biotechs that are “patient first”</li>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Animal shelters founded on love</li>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Vets with a heart saving dogs & cats</li>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Random crazy ideas shaking the world</li>
            </ul>
          </div>
          <div class="col-md-6">
            <h2 class="list-support__title">Statistics</h2>
            <ul>
              <li><img src="@/assets/images/checkbox.svg" alt=""> 50% of dogs over 10 years old develop cancer*</li>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Over 98% of pets in the US are uninsured**</li>
              <li><img src="@/assets/images/checkbox.svg" alt=""> Approximately 56% of dogs & 71% of cats entering shelters in the US will be euthanized***</li>
            </ul>
            <img class="toltip" src="@/assets/images/impact/static-bubble.png" alt="">
          </div>
        </div>
        <h3 class="list-support__subtitle">Partners Go Crypto</h3>
        <p class="list-support__description">We help partners go crypto so that long-term they can raise funds in a self-sustaining way from the good-hearted crypto community that would love to support them! The blockchain is perfect for these organizations since it makes donations public thus trackable & verifiable via the ledger.</p>
        <div class="row">
          <div class="col-md-6">
            <div class="list-support__box">
              <h5>Level A Partners</h5>
              <p>These are partners who can be onboarded with crypto. Funds sent goes directly to an account or wallet controlled by the partner.</p>
            </div>
          </div>
          <div class="col-md-6">
            <div class="list-support__box">
              <h5>Level B Partners</h5>
              <p>For partners who require assistance onboarding, we use our address and services like Piixpay and Bankera to send bank transfers. 0% of the funds sent go to Cuddle.</p>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>


<script>

import LottieAnimation from "lottie-vuejs/src/LottieAnimation.vue";

export default {
  name: "ImpactFund",
  components: { LottieAnimation },
  methods: {
    handleAnimation: function (anim) {
      this.anim = anim


      //INTERSECTION OBSERVER

      let options = {
        rootMargin: '0px 0px -15% 0px'
      }
      let callback = (entries, observer) => {
        entries.forEach(entry => {
          if (entry.isIntersecting) {
            anim.play();
            observer.unobserve(entry.target)
          }
        })
      }
      let observer = new IntersectionObserver(callback, options)
      var elementsAppear = document.querySelectorAll('.appear')

      elementsAppear.forEach(element => {
        observer.observe(element)
      })

    }
  },

  created: function () {
     document.title = this.$route.name + " - Cuddle"
  }
};
</script>

<style lang="scss">

$black: #2E3240;
$pink: #D551AD;
$bg: #ffe2d1;
$green: #97D26F;


.the-impact {
  &__content {
    position: relative;
    .the-cloud-left {
        position: absolute;
        width: 300px;
        z-index: 3;
        left: 100vw;
        top: 120px;
        animation: animate-cloud;
        animation-duration: 60s;
        animation-delay: 8s;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
      }
      .the-cloud-right {
        position: absolute;
        width: 450px;
        z-index: 3;
        left: 0;
        top: 280px;
        animation: animate-cloud;
        animation-duration: 60s;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
      }
    .mountain-imgs {
      position: relative;
    }
  }

	.wrap {
		margin-bottom: 65px;
		@media(max-width: 992px){
			margin-bottom: 40px;
		}
	}

	.impact-cloud {
		position: absolute;
		/* top: -2px; */
		left: 0;
		right: 0;
		margin: 0 auto;
		width: 70%;
		max-width: 964px;
		z-index: -1;

		@media(max-width: 992px){
			width: 100%;
		}
	}

  &.--interna {
    padding-top: 50px;
    overflow: hidden;
    .lottie-puppet{
      width: 745px !important;
      height: 1005px !important;
      position: absolute;
      top: -477px;
      right: -107px;
      animation: floatStone 3s ease infinite;
    }
    @media(min-width: 1400px){
      .lottie-puppet{
        right: 70px;
      }
    }
    /* .cloud-impact {
        position: absolute;
        top: 100px;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 70%;
        z-index: -1;
    } */
    .img-text {
        margin: 0 auto 22px;
        display: block;


    }
    .box-zorro-stone{
      position: absolute;
      right: -113px;
      top: 160px;
      width: 705px;
      height: 895px;
      z-index: 2;
    }
    .the-zorro-stone{
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-content: center;
      .the-stone-img{
        width: 100%;
        position: absolute;
        bottom: 98px;
        z-index: 0;
      }
      .the-zorro-lottie{
        position: absolute;
        bottom: 0;
        width: 420px;
        top: -160px;
        z-index: 1;
      }
    }
    @media(min-width: 1400px){
      .box-zorro-stone{
        right: 70px;
        top: 175px;
      }
    }
    @media(max-width: 1200px){
      .box-zorro-stone{
        width: 67%;
        // height: 88.5vw;
      }
      .the-zorro-stone{
        top: 270px;
        height: 785px;
        .the-zorro-lottie{
          width: 100%!important;
          top: initial;
          bottom: 37vw;
        }
        .the-stone-img{
          width: 65vw;
          bottom: 0;
        }
      }
    }
    @media(max-width: 768px){
      .the-impact.--interna .map-interna{
        margin-bottom: -130px;
      }
      .box-zorro-stone{
        position: relative;
        width: 100%;
        height: auto;
        right: 0;
        top: -85px;
      }
      .the-zorro-stone{
        position: relative;
        top: 0;
        height: auto;
        // height: 140.3vw;
        flex-direction: column;
        .the-stone-img{
            width: 100%;
            position: relative;
            bottom: 83px;
        }
        .the-zorro-lottie{
            // width: 480px!important;
            position: relative;
            bottom: initial;
        }
      }
    }


    .map-interna {
      position: relative;
      margin-bottom: 0;
      &-toltip {
        position: absolute;
        width: 150px;
        top: 150px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        z-index: 3;
        img {
          position: absolute;
          z-index: 1;
        }
        .value {
          font-size: 35px;
          line-height: 45px;
          color: #fff;
          position: relative;
          z-index: 2;
        }
        .text {
          font-family: 'filsonproregularregular';
          font-size: 16px;
          line-height: 23px;
          color: #fff;
          position: relative;
          z-index: 2;
        }
      }
      &-image {
        width: 940px;
        position: relative;
        z-index: 2;

      }
      &-cloud {
        position: absolute;
        top: 160px;
        right: 0;
        width: 560px;
        max-width: 100%;
        z-index: 1;
        animation: animate-cloud;
        animation-duration: 60s;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
      }
      &-puppet {
        position: absolute;
        z-index: 3;
        right: 0;
        width: 480px;
        max-width: 100%;
      }
      &-mountain {
        position: absolute;
        right: -60px;
        top: -90px;
        width: 660px;
        z-index: 2;
      }
    }
    .the-impact__subtitle {
        font-family: 'filsonproregularregular';
        font-size: 25px;
        line-height: 45px;
        margin-top: 70px;
    }
    .the-impact__description {
      margin-top: 20px;
    }
  }
}

.list-support {
  padding-bottom: 50px;
  position: relative;
  overflow: hidden;
  .the-cloud-bird {
    position: absolute;
    width: 350px;
    left: 50px;
    top: 300px;
    animation: animate-cloud;
    animation-duration: 60s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
  }
  &-bird {
    position: absolute;
    width: 900px;
    left: -550px;
    top: 300px;
    z-index: 2;
  }
  &__title {
    font-size: 40px;
    line-height: 65px;
    color: $pink;
    margin-bottom: 20px;
  }
  &__subtitle {
    font-size: 40px;
    line-height: 65px;
    color: $pink;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 100px;
  }
  &__description {
    font-family: 'filsonproregularregular';
    font-size: 25px;
    line-height: 45px;
    color: $black;
    width: 890px;
    max-width: 100%;
    margin: 0 auto 70px;
    text-align: center;
  }
  &__box {
    background: #fff;
    margin-bottom: 30px;
    border-radius: 23px;
    padding: 50px;
    h5 {
      font-size: 22px;
      line-height: 30px;
      color: $pink;
      margin-bottom: 10px;
    }
    p {
      font-family: 'filsonproregularregular';
      font-size: 16px;
      line-height: 28px;
      color: #000;
      min-height: 84px;
    }
  }
  ul {
    margin: 0;
    padding: 0;
    li {
      list-style: none;
      margin-bottom: 10px;
      font-family: 'filsonproregularregular';
      font-size: 20px;
      line-height: 35px;
      color: #000;
      display: flex;
      align-items: flex-start;
      img {
        margin-right: 20px;
        position: relative;
        top: 7px;
      }
    }
  }
  .toltip {
    width: 270px;
  }
}

@media (min-width:767px) and (max-width:1200px){
  .map-interna-puppet{
    width: 42vw;

  }
  .the-impact{
    &.--interna{
      .lottie-puppet{
        width: 65vw !important;
        height: auto !important;
        top: -30vw;
      }
    }
  }
}


@media(max-width:768px) {
  .the-impact.--interna .map-interna-image {
    max-width: 120%;
    margin-left: -10%;
  }
  .the-impact.--interna .lottie-puppet{
      position: relative;
      top: -7vw;
      width: 100vw !important;
      height: 135vw !important;
      right: initial;
  }
  .the-impact.--interna .map-interna-puppet {
    position: relative;
    z-index: 3;
    right: 0;
    width: 480px;
    max-width: 100%;
    margin-top: -50px;
  }
  .the-impact.--interna .map-interna-toltip {
    z-index: 9;
    right: 0;
    bottom: 0;
  }
  .the-impact.--interna .map-interna-mountain {
    position: relative;
    right: 0;
    top: -90px;
    width: 660px;
    z-index: 2;
  }
  .the-impact__content .mountain-imgs .the-cloud-left {
    position: absolute;
    width: 160px;
    z-index: 3;
    right: -15px;
    top: 35px;
  }
  .the-impact__content .mountain-imgs .the-cloud-right {
    position: absolute;
    width: 200px;
    z-index: 3;
    left: 0;
    top: 130px;
  }
  .the-impact.--interna .the-impact__subtitle {
    font-size: 24px;
    line-height: 36px;
    margin-top: 0;
    padding: 0 15px;
  }
  .the-impact.--interna .the-impact__description {
    padding: 0 15px;
  }
  .list-support__subtitle {
    font-size: 32px;
    line-height: 65px;
    margin-bottom: 20px;
    text-align: left;
    margin-top: 30px;
  }
  .list-support__description {
    font-size: 24px;
    line-height: 36px;
    margin: 0 auto 60px;
    text-align: left;
  }
  .list-support__box {
    padding: 30px;
  }
  .list-support {
    padding-bottom: 0;
  }
  .list-support-bird, .list-support .the-cloud-bird {
    display: none;
  }
  .list-support__title {
    font-size: 32px;
  }
}

@media(min-width:769px) and (max-width:1200px) {
    .the-impact.--interna {
        padding: 50px 30px 0;
    }
}

</style>
