/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  /* 1rem = 10px */
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  font-family: 'tradegothiclt-bold', sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #ffffff;
  background-color: #000000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Disable text selection */
body {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Header styles */
header {
  text-align: center;
  padding: 2rem 0;
  font-size: 2.4rem;
  font-weight: bold;
  /* background-color: rgba(0, 0, 0, 0.8); */
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Canvas styles */
canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

/* Main styles */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 1;
}

/* Typewriter effect */
#typewriter {
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  border-right: 0.15em solid orange;
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end), caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0
  }

  to {
    width: 100%
  }
}

@keyframes caret {

  from,
  to {
    border-color: transparent
  }

  50% {
    border-color: orange
  }
}

/* Footer styles */
footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  /* background-color: rgba(0, 0, 0, 0.8); */
  min-height: 100px;
  /* Add a minimum height to reduce layout shifts */
}

#badges img:hover {
  transform: scale(1.05);
}

#contacts-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style-type: none;
}

.icon {
  margin-right: 0.5rem;
  font-size: 1.8rem;
}

#call-mobile {
  transition: all 0.3s ease;
  animation: fadein 2s;
}

#arrow {
  display: none;
  height: 1.8rem;
  width: auto;
  /* animation: fadein 1s, bounce 2s infinite; */
  vertical-align: middle;
}

.contact {
  color: white;
  text-decoration: none;
  padding-bottom: 0.3rem;
  transition: all 0.3s ease;
  position: relative;
}

.contact::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.contact:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

#contacts-wrapper {
  justify-content: right;
}

/* Animations */
@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Media queries */
@media (max-width: 768px) {
  html {
    font-size: 56.25%;
    /* 1rem = 9px */
  }

  footer {
    grid-template-columns: 1fr;
  }

  #contacts-wrapper {
    justify-content: center;
  }

  #badges {
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 50%;
    /* 1rem = 8px */
  }
}

img {
  max-width: 100%;
  height: auto;
}