/* ============================================================
   Contact form styling
   ============================================================ */

.contact { background: var(--bg-1); }
.contact-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 5vw, 76px); align-items: start; }

.contact-intro { position: sticky; top: 104px; }
.contact-aside { display: flex; flex-direction: column; gap: 1px; margin-top: 40px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.contact-aside-item { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--bg-2); }
.contact-aside-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.contact-aside-v { font-size: 14px; color: var(--text); font-weight: 500; }

/* form */
.contact-form-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 44px);
}
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field-full { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; display: flex; align-items: center; gap: 8px; color: var(--text); }
.field-req { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; font-weight: 500; }
.field-opt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--text-faint); border: 1px solid var(--border); padding: 2px 7px; border-radius: 4px; }

.field input, .field textarea, .select-wrap select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus, .select-wrap select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-1);
}
.field-err input, .field-err textarea, .field-err select { border-color: #e0564f; }
.field-error { font-size: 12px; color: #ff7a72; margin-top: 2px; }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; }
.select-wrap select:invalid, .select-wrap select option[value=""] { color: var(--text-faint); }
.select-caret { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }

/* upload */
.upload-block { margin-top: 22px; display: flex; flex-direction: column; gap: 9px; }
.upload-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-faint);
  margin: 2px 0 0;
  text-wrap: pretty;
}
.dropzone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 30px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; cursor: pointer;
  background: var(--bg);
  transition: border-color 0.25s, background 0.25s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.full { opacity: 0.6; pointer-events: none; }
.dz-ico { color: var(--accent); }
.dz-text { font-size: 14px; color: var(--text); font-weight: 500; }
.dz-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em; }

.file-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item { display: flex; align-items: center; gap: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 13px; }
.file-ico { color: var(--text-dim); flex: none; }
.file-name { font-size: 13.5px; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); flex: none; }
.file-remove { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--text-faint); flex: none; transition: 0.2s; }
.file-remove:hover { background: var(--bg-3); color: var(--text); }

/* terms */
.terms { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; cursor: pointer; }
.terms input { position: absolute; opacity: 0; width: 0; height: 0; }
.terms-box { width: 22px; height: 22px; flex: none; border: 1px solid var(--border-2); border-radius: 6px; display: grid; place-items: center; color: var(--on-accent); transition: 0.25s; margin-top: 1px; }
.terms input:checked + .terms-box { background: var(--accent); border-color: var(--accent); }
.terms-text { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.terms-err .terms-box { border-color: #e0564f; }
.terms-text em { display: block; font-style: normal; margin-top: 3px; }

.submit-btn { margin-top: 28px; width: 100%; justify-content: center; padding-block: 17px; font-size: 16px; }

/* success */
.netlify-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: clamp(34px, 5vw, 64px) clamp(8px, 3vw, 32px); }
.success-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); background: var(--accent); box-shadow: 0 16px 40px -12px var(--accent); margin-bottom: 4px; }
.success-ico svg { width: 28px; height: 28px; }
.success-t { font-size: clamp(22px, 2.6vw, 27px); font-weight: 600; letter-spacing: -0.02em; }
.success-d { font-size: 14.5px; color: var(--text-dim); max-width: 46ch; line-height: 1.85; text-wrap: pretty; }
.success-note {
  text-align: left; margin-top: 14px; width: 100%; max-width: 48ch;
  background: var(--bg); border: 1px solid var(--border); border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm); padding: 18px 20px;
}
.success-note-t { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); margin-bottom: 8px; }
.success-note-t svg { color: var(--accent); }
.success-note-d { font-size: 13px; color: var(--text-faint); line-height: 1.75; text-wrap: pretty; }
.contact-success .btn { margin-top: 18px; }

@media (max-width: 1000px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-intro { position: static; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ── カスタム日付選択 ── */
.contact-date-wrap { position: relative; }
.contact-date-native {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2;
}
.contact-date-native.has-val { pointer-events: none; }

.contact-date-empty {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); background: var(--bg-2);
  cursor: pointer; min-height: 46px;
  transition: border-color 0.2s;
}
.contact-date-empty:hover { border-color: var(--accent); }
.contact-date-undecided { font-size: 14px; color: var(--text-faint); }
.contact-date-pick {
  font-size: 12px; color: var(--accent); font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.contact-date-display {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent-soft) 60%, var(--bg-2));
  min-height: 46px;
}
.contact-date-val {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text);
}
.contact-date-change {
  font-size: 12px; color: var(--accent); cursor: pointer; white-space: nowrap;
  position: relative; z-index: 1;
}
.contact-date-change:hover { text-decoration: underline; }
.contact-date-clear {
  font-size: 12px; color: var(--text-faint); cursor: pointer;
  padding: 3px 8px; border: 1px solid var(--border-2);
  border-radius: 4px; background: none; font-family: inherit;
  transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.contact-date-clear:hover { color: oklch(68% 0.18 22); border-color: oklch(68% 0.18 22); }
