@import 'variable';

/*.banner begin*/
.banner {
  background: url(https://res.fudou6.com/c/4/20160730/tayYmFubmVy_1920x677.jpg) no-repeat center center;
  background-size: cover;
  padding-top: 120px;
  padding-bottom: 160px;
  .banner-box {
    margin: 0 auto;
    color: #fff;
    h1 {
      margin-top: 0;
      margin-bottom: 35px;
      text-align: center;
      font-weight: normal;
      font-size: 64px;
    }
    p {
      font-size: 20px;
      line-height: 35px;
    }
  }
}

/*.banner end*/
/*.download begin*/
.download {
  position: relative;
  padding-top: 400px;
  margin: 0 auto;
  .android,
  .iphone {
    position: absolute;
    left: 50%;
    top: 140px;
    //margin-left: -@container-width / 2;
    //margin-left: -467px;
    height: 68px;
    width: 268px;
    line-height: 68px;
    font-size: 18px;
    border-radius: 4px;
    i {
      display: inline-block;
      height: 68px;
      width: 68px;
      margin-right: 22px;
      font-size: 32px;
      text-align: center;
      color: #fff;
      border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
  }
  .android {
    background-color: #82b21c;
  }
  .iphone {
    margin-top: 88px;
    background-color: #0079c2;
  }
  .qr-code {
    position: absolute;
    top: 140px;
    left: 50%;
    margin-left: -150px;
    text-align: center;
    font-size: 14px;
    img {
      display: block;
      margin-bottom: 5px;
    }
  }
  .app-screen {
    position: absolute;
    left: 50%;
    top: -140px;
    //margin-left: (@container-width - 990) / 1.2;
    //margin-left: 10px;
    width: 467px;
    height: 558px;
    background: url(http://res.fudou6.com/c/4/20160730/tq9bW9iaWxlXzAx_467x558.png) no-repeat;
    &:after {
      content: '';
      background: url(http://res.fudou6.com/c/4/20160730/nw3bW9iaWxlLWNvbnRlbnRfMDM=_375x384.jpg) no-repeat 51px 62px;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

  }
  hr {
    width: 95%;
  }
}
/*download end*/
/*character begin*/
@keyframes stretch-delay {
  0%, 50%, 100% {
    transform: scale(0);
    opacity: 0;
  }
  5%, 45% {
    transform: scale(1);
    opacity: 1;
  }
}

.character {
  ul {
    margin: 80px auto;
    li {
      float: left;
      width: 25%;
      height: 160px;
      text-align: center;
      position: relative;
      .projects-count,
      .projects-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: scale(0);
        opacity: 0;
        opacity: 1\9;

        animation-name: stretch-delay;
        animation-duration: 10s;
        animation-iteration-count: infinite;
        animation-fill-mode: forwards;
      }
      .projects-count {
        h3 {
          margin-top: 50px;
          font-size: 44px;
          color: #111d2b;
        }
        h4 {
          font-size: 16px;
          color: #888;
        }
        //position: static\9;
        display: none \9;  /*IE8 隐藏*/
      }
      .projects-content {
        img {
          display: block;
          margin: auto;
        }
        h3 {
          font-size: 36px;
        }
        h4 {
          font-size: 14px;
        }
      }
      .loop(@c) when (@c > 0) {
        .loop((@c - 1));
        &:nth-child(@{c}) {
          & > div {
            &:first-child {
              animation-delay: @c*0.25s;
            }
            &:last-child {
              animation-delay: 5 + @c*0.25s;
            }
          }
        }
      }
      .loop(4);
    }
  }
}

/* character end */


/* projects begin */
.projects {
  background-color: #f6f6f6;
  .projects-header {
    .project-header-left,
    .project-header-right {
      float: left;
      height: 300px;
      position: relative;
      width: 50%;
    }
    .project-header-left {
      background-color: #111d2b;
      div {
        position: relative;
        float: right;
        height: 300px;
        .logo {
          position: absolute;
          top: 50%;
          right: 50px;
          height: 94px;
          width: 227px;
          margin-top: -47px;
          background: url(https://res.fudou6.com/c/4/20160815/2gyaWNvbl8wMQ==_227x94.png) no-repeat;
          background-size: cover;
        }
      }
    }
    .project-header-right {
      background-color: #2e2e2e;
      div {
        position: relative;
        background-color: #2e2e2e;
        height: 300px;
      }
      h3 {
        position: absolute;
        top: 50%;
        left: 20px;
        height: 80px;
        padding-bottom: 45px;
        margin-top: -64px;
        font-size: 48px;
        background: url(https://res.fudou6.com/c/4/20160818/8twaWNvbl8wMg==_237x45.jpg) no-repeat left bottom;
        a {
          color: #fff;
        }
      }
    }
  }
  .section {
    height: 500px;
    margin: 0 auto;
    .section-left {
      float: left;
      margin-top: 50px;
      margin-left: 20px;
      border-right: 1px solid #7f7f7f;
      li {
        position: relative;
        margin-top: 20px;
        font-size: 23px;
        line-height: 30px;
        color: #565656;
        &:before {
          content: '';
          width: .2em;
          height: .2em;
          border-radius: 50%;
          background: #565656;
          position: absolute;
          left: -20px;
          font-size: 50px;
          top: 10px;
        }
      }

    }
    .section-right {
      float: left;
      position: relative;
      .computer {
        position: absolute;
        top: -80px;
        right: 0;
        width: 542px;
        height: 483px;
        background: url(https://res.fudou6.com/c/4/20160815/ejyY29tcHV0ZXI=_542x483.jpg) no-repeat;
      }
    }
  }
}

/* projects end*/

/*product begin*/
.products {
  background-color: #f6f6f6;
  ul {
    //width: @container-width;
    margin: 0 auto;
    padding-bottom: 50px;
    li {
      position: relative;
      color: #fff;

      &.products-image-large {
        //margin-bottom: 30px;
        .products-image,
        .products-detail {
          height: 400px;
          float: left;
        }
        .products-image {
          //width: (@container-width + 30)/3*2-30;
          margin-right: 30px;
          background-size: cover;

        }
        .products-detail {
          //width: (@container-width + 30)/3-30;
          background-color: #2e2e2e;
          text-align: center;
          h3 {
            font-size: 25px;
            margin-top: 80px;
            text-align: center;
          }
          hr {
            width: 237px;
            border: none;
            border-bottom: 1px solid #979797;
            margin: 7px auto 20px;
          }
           div {
            width: 100%;
            margin-bottom: 24px;
            span {
              width: 33%;
              display: block;
              float: left;
              font-size: 16px;
              strong {
                font-size: 32px;
                font-weight: normal;
              }
            }
          }
          a {
            font-size: 14px;
            color: #fff;
          }
        }
      }
      &.products-image-small {
        float: left;
        //width: (@container-width-large + 30)/3-30;
        height: 400px;
        position: relative;
        margin-right: 30px;
        &.last-one {
          margin-right: 0 !important;
        }
        .products-image,
        .products-detail {
          position: absolute;
          width: 100%;
          height: 100%;
        }
        .products-image {
          background-size: cover;
        }
        .products-detail {
          position: relative;
          transition: background .3s;
          &:hover {
            background-color: rgba(0, 0, 0, .75);
          }
          h3 {
            font-size: 25px;
            padding-top: 80px;
            //margin-top: 80px;
            text-align: center;
            line-height: 30px;
          }
          hr {
            border: transparent;
          }
          .products-data {
            width: 100%;
            margin-bottom: 24px;
            position: absolute;
            left: 0;
            top: 152px;
            span {
              width: 33%;
              display: block;
              float: left;
              font-size: 16px;
              text-align: center;
              strong {
                font-size: 32px;
                font-weight: normal;
              }
            }
          }
          .products-link{
            position: absolute;
            top: 270px;
            left: 0;
            width: 100%;
            text-align: center;
            font-size: 14px;
            a {
              color: #fff;
            }
          }
        }
      }
    }
  }
}

/*product end*/



.screen() {
  .media(@screen-width-small, @container-width-small);
  .media(@screen-width, @container-width);
  .media(@screen-width-large, @container-width-large);

  .media(@sw, @cw) {
    @media screen and (min-width: @sw) {
      .rules(@cw);
    }
  }

  .rules(@cw) {
    .banner {
      .banner-box {
        width: @cw;
      }
    }
    .download {
      width: @cw;
      .mixin(@cw);

      .download-element(@a, @b) {
        .android,
        .iphone {
          margin-left: @a;
        }
        .app-screen {
          margin-left: @b;
        }
      }

      .mixin(@cw) when (@cw = @container-width-small) {
        .download-element(-467px, 10px);
      }

      .mixin(@cw) when (@cw = @container-width) {
        .download-element(-500px, 50px);
      }

      .mixin(@cw) when (@cw = @container-width-large) {
        .download-element(-540px, 120px);
      }

    }
    .character {
      ul {
        width: @cw;
      }
    }
    .projects {
      .projects-header {
        .project-header-left{
          div {
            width: @cw/4 + 50;
            margin-right: @cw/4 - 50;
          }
        }
        .project-header-right{
          div {
            width: @cw / 4 * 3 - 50;
            margin-left: -@cw/4 + 50;
          }
        }
      }
      .section {
        width: @cw;
        .section-left {
          width: @cw/2-121;
        }
        .section-right {
          width: @cw/2+100;
        }
      }
    }
    .products {
      ul {
        width: @cw;
        @mr: @cw/33;
        li {
          &.products-image-large {
            margin-bottom: @mr;
              .products-image {
                width: (@cw + @mr)/3*2-@mr;
                margin-right: @mr;
              }
              .products-detail {
                width: (@cw + @mr)/3-@mr;
              }
            margin-bottom: @mr;
          }
          &.products-image-small {
            width: (@cw + @mr)/3-@mr;
            margin-right: @mr;
          }
        }
      }
    }

  }
}

body {
  .screen();
}