/* banner */
.banner {
  position: relative;
  padding: 56px 36px 36px;
}

.banner .section-header {
  color: rgba(255, 255, 255, 0.7);
}

.section__desc::before,
.section__desc::after {
  background-color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
  .banner {
    padding: 64px 30px;
  }
}

/* END: banner */

/* contact */

.contact {
  position: relative;
  z-index: 1;
  background-color: #fff;
  padding: 20px 0;
}

.vertical-section {
  position: relative;
  z-index: 2;
  background-color: #fff;
  padding: 100px 0 50px;
}

.contact-form {
  flex: 1;
}

.contact-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact .section__btn {
  min-width: 300px;
}
@media (min-width: 1024px) {
  .contact {
    padding: 100px 0;
  }
  .contact-wrap {
    display: flex;
    flex-direction: row;
    gap: 100px;
  }
  .vertical-section {
    padding: 200px 0 150px;
  }
}

.contact-wrap {
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.contact-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  color: rgba(40, 60, 110, 0.6);
  margin-bottom: 40px;
}

.contact-breadcrumb__icon {
  display: inline-flex;
  align-items: center;
  color: rgba(40, 60, 110, 0.7);
}

.contact-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.contact-breadcrumb a:hover { text-decoration: underline; }

.contact-breadcrumb__sep {
  color: rgba(40, 60, 110, 0.35);
  font-size: 10px;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-screen {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, max-height 0.35s ease;
}

#contact-thankyou-screen.form-screen {
  gap: 0;
}

.form-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  max-height: 2000px;
  transform: translateY(0);
}

.vertical-section--aside {
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.contact-wrap.is-thankyou .vertical-section--aside {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  height: 0;
  padding: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #646464;
  letter-spacing: 0.04em;
}

.form-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.form-badge--required {
  background: #1a3a6a;
  color: #fff;
}

.form-badge--optional {
  background: #7E7E7E;
  color: #fff;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px 14px;
  border: 1px solid #000;
  border-radius: 4px;
  background: rgba(220, 235, 255, 0.08);
  font-family: "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 300;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-textarea {
  width: auto;
}

.form-input::placeholder,
.form-textarea::placeholder {
  font-size: 18px;
  color: rgba(100, 100, 100, 0.5);
  opacity: 1;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(60, 120, 200, 0.7);
  box-shadow: 0 0 0 3px rgba(60, 120, 200, 0.08);
}

/* Placeholder prefix label inside input */
.form-input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #000;
  border-radius: 4px;
  background: rgba(220, 235, 255, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.form-input-prefix:focus-within {
  border-color: rgba(60, 120, 200, 0.7);
  box-shadow: 0 0 0 3px rgba(60, 120, 200, 0.08);
}

.form-input--bare {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-family: "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 300;
  color: #333;
  outline: none;
}

.form-input--bare::placeholder {
  font-size: 18px;
  color: rgba(100, 100, 100, 0.5);
  opacity: 1;
}

/* Select wrapper */
.form-select-wrap {
  position: relative;
}

.form-select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(80, 110, 160, 0.55);
  pointer-events: none;
}

.form-select {
  cursor: pointer;
}

.form-select:invalid {
  color: rgba(100, 100, 100, 0.5);
  opacity: 1;
}

.form-select option {
  color: #333;
}

.form-select option[value=""] {
  color: rgba(100, 100, 100, 0.5);
}

.form-textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.8;
}

/* Privacy Policy Block */
.form-privacy {
  border: 1px solid #707070;
  padding: 24px;
  margin-top: 10px;
  background: #fff;
}

.privacy-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.privacy-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.privacy-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1a3a6a; /* Matches typical theme color */
  flex-shrink: 0;
}

.privacy-text {
  font-size: 20px;
  color: #646464;
  font-weight: 400;
}

.privacy-link {
  display: inline-block;
  margin-top: 12px;
  margin-left: 30px; /* Aligns with text */
  color: #0D488A;
  text-decoration: underline;
  font-size: 18px;
}

@media (max-width: 767px) {
  .privacy-row {
    gap: 10px;
    align-items: flex-start;
  }
  .privacy-label {
    align-items: flex-start;
  }
  .privacy-checkbox {
    margin-top: 4px;
  }
  .privacy-text {
    font-size: 14px;
    line-height: 1.5;
  }
  .privacy-link {
    margin-left: 0;
    margin-top: 15px;
    display: block;
  }
  .form-privacy {
    padding: 16px;
  }

  .privacy-link,
  .form-badge,
  .form-label,
  .form-input::placeholder,
  .form-textarea::placeholder {
    font-size: 16px;
  }
}

/* Submit button */
.form-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 52px;
  border: 1px solid rgba(60, 80, 130, 0.5);
  border-radius: 50px;
  background: transparent;
  color: #333;
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.form-submit:hover {
  background: rgba(30, 60, 120, 0.06);
  border-color: rgba(60, 80, 130, 0.8);
}

.form-submit__arrow {
  font-size: 16px;
  line-height: 1;
  color: rgba(60, 80, 130, 0.6);
}

/* Thank You Screen */
.thankyou-title {
  font-size: 40px;
  line-height: 1.6;
  font-weight: 700;
  color: #646464;
  text-align: center;
  margin-bottom: 60px;
}

.thankyou-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 0 55px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
  color: #646464;
  margin: 0 auto;
  max-width: fit-content;
}

.thankyou-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 70px;
}

@media (max-width: 767px) {
  .thankyou-title {
    font-size: 24px;
    margin-bottom: 40px;
  }
  .thankyou-content {
    padding: 0 20px;
    font-size: 14px;
  }
  .thankyou-submit-wrap {
    margin-top: 50px;
  }
}

/* ── Field-level error messages ─────────────────────────────────────────── */

/*
 * Always in the DOM (prevents layout shift on error appear).
 * Reserve space via min-height so fields don't jump.
 */
.field-error {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #c0392b;
  letter-spacing: 0.02em;
  transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.field-error.is-visible {
  max-height: 40px;
  opacity: 1;
  margin-top: 4px;
}

/* Error border on input wrappers */
.form-input-prefix.is-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.08);
}

.form-select-wrap.is-error .form-select {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.08);
}

.form-privacy.is-error {
  border-color: #c0392b;
}

/* END: contact */
