*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  display: grid;
  place-items: center;
  min-height: 100vh;
}

p {
  margin: 0.25rem;
}

.card {
  position: relative;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  background: linear-gradient(to right, #ec2f4b, #009fff);
  width: clamp(20rem, 25rem, 30rem);
  border-radius: 0.5rem;
  color: #f3f3f3;
}

.card::before {
  --space: 1rem;

  content: attr(data-title);
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: calc(var(--space) / 2);
  left: calc(var(--space) / 2);
  width: calc(100% - var(--space));
  height: calc(100% - var(--space));
  background-color: rgba(0, 0, 0, 0.3);
  font-size: 1.5rem;
  text-transform: uppercase;
  font-weight: 900;
  backdrop-filter: blur(0.5rem);
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.card:hover:before {
  height: 25%;
  top: 0;
  transform: translateY(-50%);
  font-size: 1.25rem;
}
