/* ======================
   Forms (contact)
   ====================== */

/* 上余白は .page-title 側の padding-top が担う（二重に空けない） */
.form-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.form-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.form-page-header p {
  color: var(--text-secondary);
  line-height: 1.95;
}

.form-card {
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(31, 41, 55, 0.9),
    rgba(17, 24, 39, 0.9)
  );
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}

.form-required {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--metallic-blue-bright);
  vertical-align: middle;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(3, 7, 18, 0.6);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.8;
}

/* select はブラウザ既定の矢印を消して自前で描く。
   共通ルールの background ショートハンドに打ち消されないよう、必ずこの順で置くこと */
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2360a5fa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--metallic-blue-mid);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #6b7280;
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* スパム避け。人間には見えない位置に置き、値が入っていたら弾く */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.form-consent input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--metallic-blue-mid);
}

.form-submit {
  width: 100%;
  padding: 1.05rem 2rem;
  border: none;
  border-radius: 30px;
  background: var(--gradient-metallic);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-submit:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.form-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1.1rem 1.35rem;
  border-radius: 12px;
  font-size: 0.94rem;
  line-height: 1.8;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.form-status.is-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.form-fallback {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.form-fallback a {
  color: var(--metallic-blue-light);
}

@media (max-width: 640px) {
  .form-card {
    padding: 1.75rem 1.35rem;
  }
}
