/*!
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../css/variables.scss';
@import '../../../css/reset.scss';
.top-section {
  height: 720px;
  background-color: $brandColor;
  .top-body {
    position: relative;
    overflow: hidden;
    height: 100%;
    max-width: $contentWidth;
    margin: 0 auto;
  }
  .vertical-middle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    box-sizing: border-box;
    width: 50%;
    z-index: 5;
  }
  .product-name {
    position: relative;
    display: inline-block;
    h2 {
      font-family: Avenir-Medium;
      font-weight: 700;
      font-size: 46px;
      color: #FFF;
      word-break: break-word;
      margin: 0;
    }
  }
  .product-desc {
    font-family: Avenir-Medium;
    font-size: 24px;
    color: #FFF;
    margin: 12px auto 0;
    max-width: 730px;
  }
  .button-area {
    margin-top: 40px;
    .button {
      margin-right: 20px;
      margin-bottom: 10px;
    }
    .button:last-child {
      margin-right: 0;
    }
    @media screen and (max-width: 320px) {
      .button {
        margin-right: 1px;
      }
    }
  }
  .github-buttons {
    margin-top: 10px;
    a {
      margin-right: 20px;
      &:last-child {
        margin-right: 0;
      }
      div {
        border-radius: 2px;
        display: inline-block;
        height: 24px;
        line-height: 24px;
        padding-left: 10px;
        color: #fff;
        font-size: 0;
        background: rgba(255, 255, 255, 0.2);
        img {
          width: 16px;
          height: 16px;
          vertical-align: middle;
        }
        .type {
          font-size: 16px;
          padding: 0 8px 0 4px;
          vertical-align: middle;
        }
        .line {
          vertical-align: middle;
          display: inline-block;
          box-sizing: border-box;
          width: 1px;
          height: 12px;
          border-left: 1px solid rgba(255, 255, 255, 0.2);
        }
        .count {
          vertical-align: middle;
          font-size: 16px;
          padding: 0 8px;
        }
      }
    }
  }
  .version-note {
    margin: 22px 0 10px;
    a {
      text-decoration: none;
      display: inline-block;
      font-family: Avenir-Heavy;
      font-size: 14px;
      color: #FFF;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 2px;
      line-height: 24px;
      padding: 0 6px;
      margin-right: 10px;
      &:last-child {
        margin-right: 0;
      }
    }
  }
  .release-date {
    font-family: Avenir-Medium;
    font-size: 12px;
    color: #fff;
  }
  .animation {
    width: 546px;
    height: 578px;
    position: absolute;
    top: 146px;
    right: 0;
    img {
      position: absolute;
    }
    .img1 {
      width: 351px;
      height: 156px;
      left: calc(50% - 175px);
      top: 0;
      animation: 2s ease-in-out 0s infinite alternate forwards updown;
    }
    .img2 {
      width: 457px;
      height: 578px;
      left: 50%;
      transform: translateX(-50%);
      top: 0;
      z-index: 2;
    }
    .img3 {
      width: 457px;
      height: 578px;
      left: 50%;
      transform: translateX(-50%);
      top: 0;
      z-index: 1;
    }
    .img4 {
      width: 93px;
      height: 39px;
      left: 0;
      bottom: 88px;
      animation: 2s ease-in-out 0s infinite alternate forwards updown;
    }
    .img5 {
      width: 93px;
      height: 39px;
      right: 0;
      bottom: 129px;
      animation: 2s ease-in-out 0s infinite alternate forwards updown;
    }
    .outer-circle {
      opacity: 0.1;
      border: 2px solid #11BAFA;
      width: 512px;
      height: 208px;
      border-radius: 50%;
      position: absolute;
      z-index: 1;
      left: 50%;
      transform: translateX(-50%);
      bottom: 145px;
    }
    .rotate-circle {
      position: absolute;
      left: calc(50% - 202px);
      top: 126px;
      width: 404px;
      height: 404px;
      transform: rotateX(66deg);
      svg {
        animation: 1.2s linear 0s infinite normal none running rotate-circle;
      }
    }
  }

  /* 新建动画的关键帧 */
  @keyframes updown {
    0% {
      transform: translateY(10px);
  }
    0% {
        transform: translateY(-10px);
    }
  }
  @keyframes rotate-circle {
    100% {
      transform: rotate(360deg);
  }
  }

  @media screen and (max-width: 768px) {
    .vertical-middle {
      text-align: center;
      width: 100%;
    }
    .animation {
      display: none;
    }
  }
}
