* {
  box-sizing: border-box;
}

:root {
  -webkit-text-size-adjust: 100%;
  --card-width: 310px;
  --gap-width: 30px;
  --page-margin: 30px;
  --card-padding: 20px;
  /*see excel to calculate media queries*/
}

@media (max-width: 709px) {
  body {
    width: 310px;
  }
}
@media (min-width: 710px) and (max-width: 1049px) {
  body {
    width: 650px;
  }
}
@media (min-width: 1050px) and (max-width: 1389px) {
  body {
    width: 990px;
  }
}
@media (min-width: 1390px) {
  body {
    width: 1330px;
  }
}

body {
  font-family: "Palanquin", sans-serif;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
}

.header {
  margin-bottom: 40px;
  margin-top: 25px;
  border-bottom: 2px solid black;
  padding-block: 15px;
  width: 100%;
}

.header img {
  width: 200px;
}

.services {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-width);
}

.services .card {
  background-color: black;
  width: var(--card-width);
  height: 420px;
  flex-shrink: 0;
  color: white;
  padding: var(--card-padding);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.services .card h1 {
  margin: 0;
  font-size: 15px;
}

.services .card h2 {
  margin: 0;
  font-size: 15px;
}

.services .card p {
  margin: 0;
  font-size: 20px;
  line-height: 140%;
}

.services .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
  z-index: -1;
}

.services .card.managed {
  background-image: url('img/managed.jpg');
  background-size: cover;
  background-position: center;
}

.services .card.onprem {
  background-image: url('img/onprem.jpg');
  background-size: cover;
  background-position: center;
}

.services .card.cloud {
  background-image: url('img/cloud.jpg');
  background-size: cover;
  background-position: center;
}

.services .card.hybrid {
  background-image: url('img/hybrid.jpg');
  background-size: cover;
  background-position: center;
}

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-block: 100px;
  max-width: 800px;
  column-gap: 50px;
  row-gap: 20px;
}

.profile-info {
  max-width: 550px;
}

.profile-info a {
  text-decoration: none;
  color: black;
  border: 2px solid black;
  border-radius: 100px;
}

.intro {
  font-size: 20px;
  font-weight: 100;
  line-height: 130%;
}

.intro h2 {
  display: inline;
  font-size: 20px;
  font-weight: 100;
  line-height: 130%;
}

.badge {
  height: 300px;
}

.brands {
  margin-block: 40px;
  padding-inline: 20px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.brands .block {
  display: flex;
  gap: 30px;
  flex-wrap: nowrap;
}

.brands img {
  height: 55px;
  max-width: 80px;
}

.contact {
  margin-top: 15px;
  display: flex;
  row-gap: 10px;
  column-gap: 20px;
  flex-wrap: wrap;
}

.contact a {
  display: flex;
  align-items: center;
  gap:15px;
  padding-block: 7px;
  padding-left: 17px;
  padding-right: 25px;
  line-height: 120%;
  font-size: 18px;
  font-weight: 400;
}

.contact .dest {
  margin-bottom: 3px;
}

.cases {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--card-width));
  grid-template-rows: auto;
  gap: var(--gap-width);
  justify-content: start;
  grid-auto-flow: dense;
  margin-bottom: 50px;
}

.cases .card {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: var(--card-padding);
  color: black;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cases .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 250, 0.8);
  z-index: -1;
}

.cases .card img {
  height: 60px;
}

.cases .card h2 {
  line-height: 120%;
  font-weight: 400;
  font-size: 18px;
  margin-top: 10px;
  margin-bottom: 5px;
}

.cases .card .expand-action {
  width: 100%;
  text-align: right;
  margin-top: auto;
}

.cases .card .text {
  line-height: 120%;
  font-weight: 200;
  margin-bottom: 10px;
  font-size: 16px;
}

.cases .card.law {
  background-image: url('img/case_law.jpg');
  background-size: cover;
  background-position: center;
}

.cases .card.coffee {
  background-image: url('img/case_coffee.jpg');
  background-size: cover;
  background-position: center;
}

.cases .card.edu {
  background-image: url('img/case_edu.jpg');
  background-size: cover;
  background-position: center;
}

.cases .card.manufacturing {
  background-image: url('img/case_manufacturing.jpg');
  background-size: cover;
  background-position: center;
}

.hidden {
  display: none;
}

.expanded {
  grid-column: 1 / -1;
}
.expanded::before {
  background: rgba(250, 250, 250, 0.9) !important;
}

.footer {
  margin-top: auto;
  border-top: 1px solid black;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  font-size: 10px;
  line-height: 12px;
  padding-block: 15px;
  width: 100%;
  text-align: right;
}

.footer img {
  width: 100px;
  padding-inline: 8px;
}