/* ==========================================================================
   Contact Page — Company-based arch structure
   ========================================================================== */

.p-contact-page {
  background: #fb9516;
}

.p-contact {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  color: #334c5a;
}

/* --------------------------------------------------------------------------
   Hub — Orange bg + single white arch (top + bottom radius)
   -------------------------------------------------------------------------- */

.p-contact-hub {
  position: relative;
  z-index: 3;
  background: #fb9516;
  padding-top: 86px;
}

.p-contact-hub__arch {
  width: 100%;
  padding: clamp(70px, 7.1vw, 102px) clamp(30px, 6vw, 80px) clamp(70px, 7.1vw, 102px);
  background: linear-gradient(to bottom, #ffffff 0%, #f2f8f7 100%);
  border-top-left-radius: 50% clamp(300px, 40vw, 580px);
  border-top-right-radius: 50% clamp(300px, 40vw, 580px);
  border-bottom-left-radius: 50% clamp(300px, 40vw, 580px);
  border-bottom-right-radius: 50% clamp(300px, 40vw, 580px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Hero (title + subtitle)
   -------------------------------------------------------------------------- */

.p-contact-hero__title {
  margin: 0;
}

.p-contact-hero__title img {
  display: block;
  margin: 0 auto;
  width: clamp(220px, 36vw, 510px);
  height: auto;
}

.p-contact-hero__subtitle {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.45vw, 20px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.08em;
  color: #516877;
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

.p-contact-form-wrap {
  width: min(1080px, calc(100% - 48px));
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding: clamp(36px, 5vw, 74px) clamp(20px, 4vw, 66px) clamp(42px, 5.5vw, 82px);
  border-radius: clamp(34px, 6vw, 62px);
  background: #ffffff;
  border: 1px solid #e8f4f2;
  box-shadow: 0 16px 40px rgba(61, 119, 130, 0.08);
}

.p-contact-lead {
  margin: 0 0 clamp(30px, 4vw, 48px);
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 2;
  letter-spacing: 0.04em;
  color: #436272;
  text-align: center;
}

.p-contact-form {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}

.p-contact-form__row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.p-contact-form__row--textarea {
  align-items: start;
}

.p-contact-form__label {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2f5567;
}

.p-contact-form__required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #fb9516;
}

.p-contact-form__input,
.p-contact-form__textarea {
  width: 100%;
  border: 2px solid #cbe9e6;
  border-radius: 14px;
  background: #ffffff;
  font-family: var(--font-family-ja);
  font-size: clamp(14px, 1.1vw, 16px);
  color: #2d4f5e;
  transition:
    border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.p-contact-form__input {
  min-height: 56px;
  padding: 14px 16px;
}

.p-contact-form__textarea {
  min-height: clamp(170px, 25vw, 250px);
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.8;
}

.p-contact-form__input:focus,
.p-contact-form__textarea:focus {
  outline: none;
  border-color: #fb9516;
  box-shadow: 0 0 0 4px rgba(251, 149, 22, 0.18);
}

.p-contact-form__submit {
  margin-top: clamp(8px, 1.4vw, 14px);
  text-align: center;
}

.p-contact-form__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(210px, 27vw, 340px);
  min-height: 58px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: #fb9516;
  color: #ffffff;
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 700;
  letter-spacing: 0.12em;
  transition:
    transform var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    opacity var(--duration-fast) ease;
}

.p-contact-form__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(251, 149, 22, 0.34);
  opacity: 0.96;
}

.p-contact-form__button:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Footer overrides — hide SVG curve, match Company pattern
   -------------------------------------------------------------------------- */

main.p-contact + .l-footer {
  margin-top: -1px;
  padding-top: 380px;
}

main.p-contact + .l-footer .l-footer__curve {
  display: none;
}

main.p-contact + .l-footer .l-footer__curve-path {
  fill: #f2f8f7;
}

main.p-contact + .l-footer .l-footer__island--left {
  top: 160px;
}

main.p-contact + .l-footer .l-footer__island--right {
  top: 90px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  main.p-contact + .l-footer {
    padding-top: 300px;
  }

  main.p-contact + .l-footer .l-footer__island--left {
    top: 120px;
  }

  main.p-contact + .l-footer .l-footer__island--right {
    top: 60px;
  }
}

@media (max-width: 980px) {
  .p-contact-form__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .p-contact-form__label {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .p-contact-hub {
    padding-top: 74px;
  }

  .p-contact-hub__arch {
    padding: clamp(50px, 7vw, 70px) 30px clamp(50px, 6vw, 80px);
    border-top-left-radius: 50% clamp(200px, 40vw, 430px);
    border-top-right-radius: 50% clamp(200px, 40vw, 430px);
    border-bottom-left-radius: 50% clamp(200px, 40vw, 430px);
    border-bottom-right-radius: 50% clamp(200px, 40vw, 430px);
  }
}

@media (max-width: 767px) {
  .p-contact-hub {
    padding-top: 64px;
  }

  main.p-contact + .l-footer {
    padding-top: 200px;
  }

  .p-contact-hub__arch {
    min-height: 300px;
    padding: 100px 20px 60px;
    border-top-left-radius: 50% 280px;
    border-top-right-radius: 50% 280px;
    border-bottom-left-radius: 50% 280px;
    border-bottom-right-radius: 50% 280px;
  }

  .p-contact-form-wrap {
    width: calc(100% - 30px);
    border-radius: 26px;
    padding: 28px 16px 36px;
  }

  .p-contact-form__input {
    min-height: 52px;
    border-radius: 12px;
  }

  .p-contact-form__textarea {
    min-height: 170px;
    border-radius: 12px;
  }

  .p-contact-form__button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .p-contact-hub {
    padding-top: 56px;
  }

  main.p-contact + .l-footer {
    padding-top: 140px;
  }

  .p-contact-hub__arch {
    min-height: 260px;
    padding: 80px 16px 48px;
    border-top-left-radius: 50% 200px;
    border-top-right-radius: 50% 200px;
    border-bottom-left-radius: 50% 200px;
    border-bottom-right-radius: 50% 200px;
  }
}
