* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;
  color: #fff;
  background-color: #333;
  background-image: url(./background-image.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

main {
  position: relative;
  z-index: 9;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 20px;
}

.lead {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer {
  font-size: 12px;
  opacity: 0.6;
  font-weight: 200;
  text-align: center;
  padding: 20px 0;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #ccc;
}

/* 平板样式 */
@media screen and (max-width: 1024px) {
  .lead {
    font-size: 24px;
    max-width: 700px;
  }
}

/* 手机样式 */
@media screen and (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  
  main {
    min-height: 100vh;
    min-height: 100dvh; /* 动态视窗高度，处理移动端地址栏 */
    grid-template-rows: 3fr 1fr 1fr auto;
    padding: 0;
  }
  
  .lead {
    font-size: 16px;
    line-height: 1.6;
    max-width: none;
    padding: 0 8%;
    align-self: end;
    grid-row: 2;
  }
  
  .footer {
    align-self: end;
    padding: 20px 0;
    grid-row: 4;
  }
}

/* 小屏手机样式 */
@media screen and (max-width: 480px) {
  .lead {
    font-size: 15px;
    padding: 0 6%;
  }
}

/* 横屏手机样式 */
@media screen and (max-height: 500px) and (orientation: landscape) {
  main {
    grid-template-rows: 1fr auto;
  }
  
  .lead {
    font-size: 14px;
    align-self: center;
    margin-top: 0;
  }
}