#bg1 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url("../img/edge1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}
#bg1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* 黒い膜。0.5は透明度。調整可 */
  z-index: 1;
}

/* ① セクション全体を画面中央に（任意） */
.contact {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  padding-top: 40px;
}
.contact-wrap__title {
  text-align: center;
  font-size: 24px;
  padding: 40px 0 40px 0;
  max-width: 800px;
  margin: 0 auto;
}
.contact-wrap__title span {
  font-size: 32px;
}
.contact-wrap__form {
  display: grid;
  grid-template-columns: 160px 1fr; /* 左にlabel、右にinput */
  gap: 25px;
  max-width: 800px;
  margin: 40px auto;
  align-items: center; /* 縦中央揃え */
  max-width: 100vh;
}

/* ラベルのスタイル */
.contact-wrap__form label {
  font-size: 16px;
  text-align: left;
  padding-right: 8px;
}

/* 入力欄のスタイル */
.contact-wrap__form input,
.contact-wrap__form textarea {
  width: 100%;
  padding: 2.5%;
  border: 1px solid #444;
  color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  color: #000;
}
/* textareaは行跨ぎ */
.contact-wrap__form textarea {
  grid-column: 2 / 3; /* 右カラムだけに表示 */
  resize: vertical;
  min-height: 140px;
}

/* textareaのラベルだけ左上に表示 */
.contact-wrap__form label[for="subject"] {
  align-self: start;
  padding-top: 10px;
  width: 100%;
}

/* ボタンは2カラム分を使う */
.contact-wrap__form__button {
  grid-column: 1 / 3;
  width: 100%;
  margin: 40px auto 0;
  background-color: #fff;
  font-weight: bold;
  border: #444 solid 1px;
  cursor: pointer;
  font-size: 20px;
  color: #000;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid #fff;
  transition: color 0.3s ease;
}
.contact-wrap__form__button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: #fff;
}
@media screen and (max-width: 750px) {
  .contact-wrap__title {
    text-align: center;
    font-size: clamp(0.875rem, 0.4583rem + 2.0833vw, 1.5rem);
    padding: 20px 0 20px 0;
    width: 95%;
    margin: 0 auto;
  }
  .contact-wrap__title span {
    font-size: clamp(1.25rem, 0.75rem + 2.5vw, 2rem);
  }
  /* ボタンは2カラム分を使う */
  .contact-wrap__form__button {
    grid-column: 1 / 3;
    width: 100%;
    margin: 20px auto 0;
    background-color: #fff;
    font-weight: bold;
    border: #444 solid 1px;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid #fff;
    transition: color 0.3s ease;
  }
  .contact {
    width: 100%;
    padding-top: 20px;
  }
}
@media screen and (max-width: 500px) {
  contact-wrap__form {
    width: 90%;
    margin: 0 auto;
    margin-bottom:0;
  }
  .contact-wrap__form label {
    font-size: 14px;
    text-align: left;
    padding-right: 8px;
  }
  .contact-wrap {
    width:90%;
    margin: 0 auto;
  }
}
