/* =========================================================
  Contact Page - SNOW tone
========================================================= */
.contact-main {
  background: #fff;
  color: #20333a;
  overflow: hidden;
}

/* =========================================================
  Contact Page
========================================================= */

.contact-page {
  background: #f6f7f5;
  color: #2d2d2d;
}

.contact-main {
  background:
    radial-gradient(
      circle at top right,
      rgba(185, 202, 194, 0.24),
      transparent 34%
    ),
    linear-gradient(180deg, #f6f7f5 0%, #eef3ef 48%, #ffffff 100%);
  color: #20333a;
  overflow: hidden;
}

/* =========================================================
  HERO / INTRO
  facility page style
========================================================= */

.contact-page .facility-hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111;
  color: #fff;
}

.contact-page .facility-hero__media,
.contact-page .facility-hero__overlay {
  position: absolute;
  inset: 0;
}

.contact-page .facility-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-page .facility-hero__overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.contact-page .facility-hero__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, 1280px);
  min-height: 72vh;
  margin: 0 auto;
  padding: 160px 0 70px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

.contact-page .facility-hero__title {
  margin: 0;
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: clamp(2.3rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.12em;
  font-weight: 300;
}

.contact-page .facility-intro {
  padding: 0;
}

.contact-page .facility-intro__inner {
  width: min(100%, 860px);
  margin: 0 auto;
  text-align: center;
  padding-top: 50px;
}

.contact-page .facility-intro__eyebrow {
  position: relative;
  display: inline-block;
  margin: 0 0 16px;
  padding-bottom: 14px;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  letter-spacing: 0.22em;
  color: #2d2d2d;
}

.contact-page .facility-intro__eyebrow::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78px;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.7s ease 0.12s;
}

.contact-page .facility-intro__eyebrow.is-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.contact-page .facility-intro__title {
  margin: 0;
  font-size: clamp(1.3rem, 1.8vw, 2rem);
  line-height: 0.8;
  letter-spacing: 0.2em;
  font-weight: 400;
}

.contact-page .facility-intro__copy {
  margin: 20px auto 70px;
  width: min(100%, 820px);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  line-height: 2.1;
  letter-spacing: 0.08em;
  color: #43413b;
}

/* =========================================================
  Section
========================================================= */

.contact-section {
  position: relative;
  padding: 0 20px clamp(90px, 11vw, 150px);
}

.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/images/line_m.png') center top / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.contact-section__inner {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin: 0 auto;
}

.contact-section__head {
  margin: 0 0 clamp(38px, 5vw, 58px);
  text-align: center;
}

.contact-section__eyebrow {
  margin: 0 0 14px;
  color: rgba(32, 51, 58, 0.52);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.contact-section__title {
  margin: 0;
  color: #20333a;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.contact-section__lead {
  max-width: 660px;
  margin: 22px auto 0;
  color: rgba(32, 51, 58, 0.68);
  font-size: 0.96rem;
  line-height: 2;
  letter-spacing: 0.04em;
}

/* =========================================================
  Reveal
========================================================= */
.contact-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(6px);
  animation: contactFadeUp 0.9s ease forwards;
}

.contact-form.contact-reveal {
  animation-delay: 0.12s;
}

@keyframes contactFadeUp {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

/* =========================================================
  Error
========================================================= */
.contact-error {
  margin: 0 0 28px;
  padding: 18px 22px;
  border: 1px solid rgba(198, 65, 48, 0.26);
  background: rgba(198, 65, 48, 0.06);
  color: #9c2f22;
}

.contact-error p {
  margin: 0;
  line-height: 1.7;
}

.contact-error p + p {
  margin-top: 6px;
}

/* =========================================================
  Form
========================================================= */
.contact-form {
  display: grid;
  gap: 26px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(32, 51, 58, 0.1);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 70px rgba(20, 42, 50, 0.08);
}

.contact-form__row {
  position: relative;
  display: grid;
  gap: 10px;
}

.contact-form__row label {
  color: rgba(32, 51, 58, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.contact-form__row label span {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(55, 106, 99, 0.1);
  color: #376a63;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.contact-form__row input,
.contact-form__row textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(32, 51, 58, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #20333a;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  outline: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.contact-form__row input {
  min-height: 54px;
  padding: 0 2px;
}

.contact-form__row textarea {
  min-height: 190px;
  padding: 14px 2px;
  resize: vertical;
  line-height: 1.8;
}

.contact-form__row::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #376a63;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.34s ease;
}

.contact-form__row:focus-within::after {
  transform: scaleX(1);
}

.contact-form__row input:focus,
.contact-form__row textarea:focus {
  background: rgba(255, 255, 255, 0.44);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(20, 42, 50, 0.06);
}

.contact-form__row input::placeholder,
.contact-form__row textarea::placeholder {
  color: rgba(32, 51, 58, 0.36);
}

/* =========================================================
  Submit Button
========================================================= */
.contact-form__submit {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.contact-submit-btn {
  position: relative;
  min-width: 250px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid rgba(32, 51, 58, 0.18);
  background: #20333a;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease;
}

.contact-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #376a63, #8ebfd1);
  transform: translateX(-101%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-submit-btn__text,
.contact-submit-btn__arrow {
  position: relative;
  z-index: 1;
}

.contact-submit-btn__arrow {
  display: inline-block;
  transition: transform 0.28s ease;
}

.contact-submit-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(55, 106, 99, 0.44);
}

.contact-submit-btn:hover::before {
  transform: translateX(0);
}

.contact-submit-btn:hover .contact-submit-btn__arrow {
  transform: translateX(8px);
}

/* =========================================================
  Complete
========================================================= */
.contact-complete {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 72px) clamp(22px, 5vw, 54px);
  border: 1px solid rgba(32, 51, 58, 0.12);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 24px 70px rgba(20, 42, 50, 0.08);
}

.contact-back-link {
  display: inline-flex;
  margin-top: 32px;
  color: #20333a;
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 51, 58, 0.28);
  padding-bottom: 6px;
  letter-spacing: 0.08em;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.contact-back-link:hover {
  color: #376a63;
  border-color: rgba(55, 106, 99, 0.56);
  transform: translateX(4px);
}

/* =========================================================
  SP
========================================================= */
@media (max-width: 767.98px) {
  .contact-page .facility-hero,
  .contact-page .facility-hero__inner {
    min-height: 64vh;
  }

  .contact-page .facility-hero__inner {
    width: min(100% - 32px, 1280px);
    padding: 130px 0 54px;
  }

  .contact-page .facility-hero__title {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    letter-spacing: 0.08em;
  }

  .contact-page .facility-intro__inner {
    width: min(100% - 32px, 860px);
  }

  .contact-page .facility-intro__title {
    line-height: 1.3;
  }

  .contact-page .facility-intro__copy {
    margin-bottom: 54px;
  }

  .contact-section {
    padding: 0 18px 76px;
  }

  .contact-section::before {
    background-size: contain;
    opacity: 0.08;
  }

  .contact-form {
    gap: 24px;
    padding: 28px 20px;
  }

  .contact-form__submit {
    justify-content: stretch;
  }

  .contact-submit-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-submit-btn,
  .contact-submit-btn::before,
  .contact-submit-btn__arrow,
  .contact-form__row::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}
