/*
 * Grid
 */

/* Header */
#container-header {
  display: grid;
  grid-template-rows: 40px 132px 1fr;
  grid-template-columns: 132px 1fr 1fr 1fr;
  grid-template-areas:
    "header header navi   navi"
    "icon   title  title  title"
    "...... ...... ...... badge";
}

#item-header-navigation {
  grid-area: navi;
}

#item-header-icon {
  grid-area: icon;
}

#item-header-title {
  grid-area: title;
}

#item-header-badge {
  grid-area: badge;
}


#container-keyvisuals {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#container-products {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Footer */
#container-footer {
  display: grid;
  grid-template-rows: 40px;
  grid-template-columns: 1fr 3fr 1fr 1fr;
  grid-template-areas:
    "social copyright copyright copyright twitter facebook";
}

#item-footer-copyright {
  grid-area: copyright;
}

#item-footer-social {
  grid-area: social;
}

#item-footer-twitter {
  grid-area: twitter;
}

#item-footer-facebook {
  grid-area: facebook;
}


/*
 * Common
 */
body {
  background: #f8f8ff;
  margin-left: auto;
  margin-right: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

h1, h2, h3, h4, h5, p, li {
  font-family: Roboto,Helvetica,Arial,sans-serif;
}

h3, h4, h5 {
  font-size: 16pt;
  font-weight: bold;
  margin-top: 8px;
  margin-bottom: 4px;
}

h4.keyfeature-caption {
  margin-bottom: 16px;
}

.container-keyfeatures h5 {
  font-size: 14pt;
}

.container-keyfeatures h5::before {
  content: "■";
}

.container-keyfeatures p {
  margin-left: 1em;
  margin-right: 1em;
}

img.app-icon {
  display: inline-block;
}

.badge-appstore {
  display: block;
  margin: 0 auto;
}

.attention {
  color: #007fff;
  font-weight: bold;
}

.copyright {
  margin: 8px auto;
  text-align: center;
}

.social-links {
  margin: 4px;
}

.social-links > [class^="social-"] {
  float: left;
  display: inline-block;
  margin: 4px auto 4px auto;
}

.social-links > [class^="social-"]:first-child {
  margin-left: 10px;
}

.social-links > [class^="social-"]:last-child {
  float: right;
  margin-right: 10px;
}

.social-link:after {
  content: "";
  display: block;
  clear: both;
}

/*
 * Media
 */
@media (min-width: 920px) {
  body {
    width: 960px;
  }

  h1 {
    font-size: 40pt;
    margin-top: 8px;
    margin-bottom: 1px;
    margin-left: 4px;
  }

  h2 {
    font-size: 28pt;
    margin-top: 1px;
    margin-bottom: 1px;
    margin-left: 4px;
  }

  img.app-icon {
    border-radius: 32px;
    max-width: 128px;
    max-height: 128px;
  }

  .badge-appstore img {
    display: inline-block;
    width: 180px;
    height: 60px;
  }
}

/* iPad */
@media (min-width: 415px) and (max-width: 1024px) {
  body {
    width: 760px;
  }

  h1 {
    font-size: 32pt;
    margin-top: 8px;
    margin-bottom: 1px;
    margin-left: 4px;
  }

  h2 {
    font-size: 20pt;
    margin-top: 1px;
    margin-bottom: 1px;
    margin-left: 4px;
  }

  img.app-icon {
    border-radius: 24px;
    max-width: 96px;
    max-height: 96px;
  }

  .badge-appstore img {
    display: inline-block;
    width: 144px;
    height: 48px;
  }

  #container-header {
    display: grid;
    grid-template-rows: 20px 100px 1fr;
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "header navi"
      "icon title"
      ".... badge";
  }
}

/* iPhone */
@media (max-width: 414px) {
  body {
    width: 96%;
  }

  h1 {
    font-size: 20pt;
    margin-top: 8px;
    margin-bottom: 1px;
  }

  h2 {
    font-size: 12pt;
    margin-top: 1px;
    margin-bottom: 1px;
  }

  img.app-icon {
    border-radius: 18px;
    max-width: 72px;
    max-height: 72px;
  }

  .badge-appstore img {
    display: inline-block;
    width: 144px;
    height: 48px;
  }

  #container-header {
    display: grid;
    grid-template-rows: 20px 80px 1fr;
    grid-template-columns: 80px 1fr;
    grid-template-areas:
      "header navi"
      "icon title"
      ".... badge";
  }

  #container-footer {
    display: grid;
    grid-template-rows: 40px 40px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "copyright copyright"
      "twitter facebook";
  }
}
