@import url('https://fonts.googleapis.com/css?family=Black+Ops+One|Josefin+Sans');

body {
  margin: 0;
  background: #0d5257;
  display: grid;
  grid-template-columns: 100px 1fr 200px 360px 100px;
}

#about {
  grid-column: 2 / span 1;
}

#phone {
  grid-column: 4 / span 1;
  height: 70vh;
  max-height: 700px;
}

#about {
  font-size: 22px;
  font-family: sans-serif;
  color: white;
}

#about h1 {
  text-align: center;
  margin-top: 120px;
}

#about h1 #logo-gummies {
  font-family: 'Josefin Sans';
  text-transform: uppercase;
  color: white;
  font-size: 64px;
  margin: 0;
}

  #about h1 #logo-gummies small {
    font-size: 50px;
    font-weight: 800;
  }

#about h1 #logo-hardware {
  font-family: 'Black Ops One';
  font-weight: 400;
  background: #da291c;
  color: white;
  font-size: 40px;
  text-transform: lowercase;
  padding: 0px 14px;
  position: relative;
  top: -6px;
}

#about .icons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 100px;
}

#about .icons figure {
  display: block;
  margin: 0;
  text-align: center;
}

  #about .icons figcaption {
    margin: 0;
  }

  #about .icons img {
    width: 80px;
    height: 80px;
    margin: 20px;
  }

#credits {
  font-size: 14px;
  margin-top: 44px;
}

#about strong {
  background: #da291c;
  padding: 0 4px;
  border-radius: 2px;
}

#phone {
  background-image: url('../images/background.jpg');
  background-fit: cover;

  border-radius: 40px;

  margin-top: 100px;

  border: 12px solid black;

  box-shadow: 0 0 50px rgba(0,0,0,0.5);

  position: relative;
}

  #phone::before {
    position: absolute;
    content: '';
    width: calc(100% + 22px);
    height: calc(100% + 22px);
    display: block;
    top: -13px;
    left: -13px;
    border: 1px solid white;
    border-radius: 40px;
    box-shadow: inset 0 2px 10px rgba(255,255,255,0.4), inset 0 0 10px rgba(255,255,255,0.4);
  }


#phone {
  color: white;
  padding: 20px;
  box-sizing: border-box;
}

#caller-details {
  display: grid;
  grid-template-columns: 1fr 100px;
  grid-template-rows: 50px 50px;
}

#caller-details h1, #caller-details h2 {
  font-family: sans-serif;
  font-weight: regular;
  grid-row-end: span 1;
  grid-column-end: 2;
}

#caller-details h1 {
  font-size: 40px;
  margin: 0 ;
}

#caller-details h2 {
  font-size: 18px;
  margin: 0;
  font-weight: lighter;
}

#caller-details img {
  grid-column: 2 / span 1;
  grid-row: 1 / span 2;
  justify-self: stretch;
  align-self: stretch;
}

#phone button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  position: absolute;
  bottom: 40px;
  outline: none;
  transition: transform 0.1s ease;
  transition-property: transform, right;
}

  #phone button:active {
    transform: scale(0.9);
  }

#start {
  left: 40px;
}

#pause {
  right: 40px;
}

#phone button span {
  background: #5eee7c;
  padding: 16px;
  border-radius: 44px;
  display: block;
  margin-bottom: 8px;
}

#phone button:active span {
  background: #4cd368;
}

#phone #pause span {
  background: #ee5e68;
}

#phone #pause:active span {
  background: #d84c56;
}

#phone button img {
  width: 34px;
  height: 34px;
}

#phone #call-info {
  text-align: center;
  font-family: sans-serif;
  font-size: 54px;
  font-weight: 200;
  margin-top: 60px;
}

#ready {
  display: none;
}

@media (max-width: 1000px) {
  body {
    display: block;
  }

  #diagnosticsButton {
    display: none;
  }

  #about {
    padding: 40px;
  }

  #about h1 {
    margin-top: 20px;
  }

  #about .icons {
    grid-column-gap: 20px;
  }

  #phone {
    border-radius: 0px;
    border: 0;
    box-shadow: none;
    height: 100vh;
    max-height: inherit;
    display: none;
    margin: 0;
  }

    #phone::before {
      display: none;
    }

    body.phone-only #phone {
      display: block;
    }

  #ready {
    display: block;
    background: #da291c;
    border-radius: 4px;
    color: white;
    font-size: 22px;
    padding: 12px 22px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    margin: 24px auto;
    border: none;
    display: block;
  }
}

body.phone-only {
  margin: 0;
  padding: 0;
}

body.phone-only #about {
  display: none;
}

body.no-support #phone {
  display: none !important;
}

body.no-support #ready {
  display: none;
}

#support-help {
  display: none;
}

body.no-support #support-help {
  display: block;
  background: #da291c;
  padding: 8px;
}


#phone.call-active #start {
  display: none;
}

#phone.call-active #pause {
  right: calc(50% - 40px);
}

#phone.call-active #call-info {
  display: block;
}


#phone #loading-indicator {
  display: none;
}

#phone.loading #loading-indicator {
  display: block;
  font-size: 24px;
  text-align: center;
  margin-top: 200px;
  font-family: sans-serif;
}

#phone.loading #caller-details, #phone.loading #start, #phone.loading #pause {
  display: none;
}

#phone.loading {
  background: black;
}

#phone.call-ended #start {
  display: none;
}

#phone.call-ended #pause {
  display: none;
}
