body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #f7f8ff;
  color: #111;
  scroll-behavior: smooth;
}

.bg {
  position: fixed;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 20%, #dfe7ff, transparent),
    radial-gradient(circle at 80% 30%, #e7ffd9, transparent),
    radial-gradient(circle at 50% 80%, #ffd9d9, transparent);
  z-index: -1;
  filter: blur(60px);
}

header {
  display: flex;
  justify-content: space-between; /* кнопки по углам */
  align-items: center;
  padding: 25px 40px;
  min-height: 44px;
}

/* общие стили для кнопок в header */
header a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  transition: .3s;
  min-height: 44px; /* одинаковая высота */
  box-sizing: border-box;
}

/* синяя кнопка слева */
.blue-btn {
  background: #007bff;
  color: #fff;
  border: 2px solid #007bff;
}

.blue-btn:hover {
  background: #0056b3;
  border-color: #0056b3;
}

/* зелёная кнопка справа */
.buy {
  background: #2ecc71;
  color: #fff;
  border: 2px solid #2ecc71;
}

.buy:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.hero {
  margin-top: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  min-height: 300px;    
  text-align: center;
}

.hero h1 {
  font-size: 38px;
  margin: 20px 0;
  opacity: 0;
  display: inline-block; /* inline-block для transform */
  line-height: 1.3;
}

.typing {
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  border-right: none;
  animation: typing 3s steps(30, end) forwards;
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* меню */
.menu {
  margin-top: 90px;
  display: flex;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  transform: translateY(40px);
  transition: 1s;
}

.menu.show {
  opacity: 1;
  transform: translateY(0);
}

.menu a {
  font-weight: 600;
  text-decoration: none;
  color: #333;
  font-size: 20px;
}

.border-box{
  border: 2px solid #000;
  padding: 8px 16px;
  border-radius: 6px;
}

.yellow { color: #f1c40f; }
.red { color: #e74c3c; }

.card {
  max-width: 850px;
  width: calc(100% - 40px);
  margin: 200px auto;
  padding: 40px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);

  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card h2 {
  margin-top: 0;
  font-size: 30px;
}

.contact {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #e9e9e9;
  border: 1px solid #ccc;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact a {
  text-decoration: none;
  color: #333;
}

.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: none;
}

.scroll-top:hover {
  background: #0056b3;
}

@media screen and (max-width: 768px) {
  header {
    padding-left: 20px;
    padding-right: 0px;
  }

  header a {
    font-size: 14px;
    padding: 10px 16px;
    min-height: 40px;
  }

  .hero {
    margin-top: 20px !important;
  }

  .hero h1 {
    font-size: 22px;
  }

  .menu {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: auto auto; 
    gap: 20px;
    justify-items: center;
    margin-top: 40px;
  }

  .menu a:nth-child(1) {
    grid-column: 1 / span 2;
    justify-self: center;
  }

  .menu a:nth-child(2) {
    grid-column: 1;
  }
  .menu a:nth-child(3) {
    grid-column: 2;
  }

  .menu a {
    font-size: 18px;
  }

  .card {
    margin: 100px 20px;
    padding-right: 40px;
    padding-left: 20px;
    font-size: 16px;
  }

  .card h2 {
    font-size: 24px;
  }

  .contact {
    bottom: 15px;
    left: 15px;
    font-size: 14px;
  }

  .scroll-top {
    bottom: 15px;
    right: 15px;
    padding: 12px 15px;
    font-size: 18px;
  }
}

a,button {
  -webkit-tap-highlight-color: transparent;
}