@import url("https://fonts.googleapis.com/css?family=Lato");
@font-face {
  font-family: "Taste";
  src: url("../fonts/Taste Book.otf");
  font-weight: normal;
  font-style: normal;
}
h1, h2 {
  font-family: "Taste";
}

body {
  font-family: "Lato", "Open Sans", "Avenir", "Product Sans", "Helvetica", "Arial", sans-serif;
}

body {
  margin: 2.5rem;
  background: #fef;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: calc(100vw - 5rem);
}
.grid > section {
  padding: 0 1em;
}
.grid > * {
  border-radius: 0.5rem;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  min-height: 10rem;
  box-sizing: border-box;
  background: white;
}
.grid > *.w2 {
  grid-column-end: span 2;
}
.grid > *.h2 {
  min-height: 20.5rem;
  grid-row-end: span 2;
}
.grid > a {
  transition: background-size 300ms;
  position: relative;
  text-decoration: none;
  color: unset;
  padding: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: 8em;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.grid > a > img {
  position: absolute;
  inset: auto;
  width: 1px;
  min-height: var(--img-size, 100%);
  min-width: var(--img-size, 100%);
  transition: transform 300ms;
  transform: scale(1);
  z-index: 1;
}
.grid > a.icon > img {
  width: 1000vmax;
  max-height: var(--img-size, 75%);
  max-width: var(--img-size, 75%);
}
.grid > a > h3 {
  font-size: 2rem;
  margin: 0;
}
.grid > a > h3, .grid > a > p {
  transition: all 300ms;
  opacity: 0;
  transform: scale(1.2);
  text-shadow: 0 0 0.1rem white, 0 0 0.2rem white, 0 0 0.3rem white;
  text-align: center;
  z-index: 3;
}
.grid > a::before {
  background: rgba(255, 255, 255, 0);
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  transition: background-color 300ms;
  z-index: 2;
}
.grid > a:hover > img, .grid > a:focus > img {
  transform: scale(1.25);
}
.grid > a:hover > h3, .grid > a:hover > p, .grid > a:focus > h3, .grid > a:focus > p {
  opacity: 1;
  transform: scale(1);
}
.grid > a:hover::before, .grid > a:focus::before {
  background: rgba(255, 255, 255, 0.8);
}
.grid > a:focus-visible {
  outline: none;
}
.grid > a:focus-visible::after {
  position: absolute;
  inset: 0.3rem;
  border: 0.2rem solid #08c;
  pointer-events: none;
  content: "";
  z-index: 3;
  border-radius: 0.2rem;
}

@media screen and (max-width: 50rem) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (max-width: 30rem) {
  .grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .grid > * {
    grid-column-end: span 1 !important;
    grid-row-end: span 1 !important;
  }
  .grid > a {
    min-height: 10rem !important;
  }
}
@media screen and (min-width: 70rem) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media screen and (min-width: 90rem) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media screen and (min-width: 110rem) {
  .grid {
    margin: 0 auto;
  }
}
@media screen and (min-width: 127.5rem) {
  .grid {
    width: 122.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}