.contact-hero {
  padding-top: 72px;
}

.contact-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 32px;
  align-items: stretch;
}

.contact-hero-copy {
  display: grid;
  align-content: center;
  gap: 30px;
}

.contact-info-card,
.contact-form-shell,
.thanks-card {
  border-radius: var(--radius-xl);
}

.contact-info-card {
  padding: 42px;
}

.contact-info-card p:last-child,
.contact-form-head p,
.form-actions p,
.thanks-card .hero-lead {
  color: var(--muted);
  line-height: 1.95;
}

.contact-info-card h2 {
  margin-bottom: 18px;
}

.contact-form-section {
  padding-top: 56px;
}

.contact-form-shell {
  padding: 56px;
}

.contact-form-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.contact-form-head h2 {
  margin-bottom: 12px;
}

.contact-form {
  display: grid;
  gap: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form-field {
  display: grid;
  gap: 10px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label,
.checkbox-label {
  color: var(--heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.required {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #f7fbff;
  background: var(--primary);
  font-size: 11px;
  line-height: 1;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 8px 8px 18px rgba(154, 173, 193, 0.12), inset -8px -8px 18px rgba(255, 255, 255, 0.78);
  font-family: "Manrope", "Noto Sans JP", sans-serif;
  font-size: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.form-field input,
.form-field select {
  min-height: 58px;
  padding: 0 18px;
}

.form-field textarea {
  min-height: 220px;
  padding: 18px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(46, 110, 169, 0.56);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(46, 110, 169, 0.12), inset 8px 8px 18px rgba(154, 173, 193, 0.1), inset -8px -8px 18px rgba(255, 255, 255, 0.82);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.form-actions p {
  font-size: 13px;
}

.thanks-section {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 154px);
}

.thanks-card {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 72px 56px;
  text-align: center;
}

.thanks-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 26px;
  color: #f7fbff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 14px 14px 28px rgba(80, 115, 150, 0.24), -8px -8px 18px rgba(255, 255, 255, 0.54);
  font-size: 34px;
  font-weight: 800;
}

.thanks-card h1 {
  max-width: 780px;
}

.thanks-card .hero-lead {
  max-width: 760px;
}

.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .contact-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-hero-copy {
    justify-items: center;
  }

  .contact-form-head {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }
}

@media (max-width: 820px) {
  .contact-hero {
    padding-top: 52px;
  }

  .contact-info-card,
  .contact-form-shell,
  .thanks-card {
    padding: 34px 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
    justify-items: stretch;
  }

  .form-actions p {
    text-align: center;
  }

  .checkbox-label {
    width: 100%;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .contact-info-card h2,
  .contact-form-head h2 {
    font-size: 1.85rem;
  }

  .form-field input,
  .form-field select {
    min-height: 54px;
  }

  .thanks-actions {
    width: 100%;
  }
}
