/* Logi AI Connect — フォームページ（LPのカラーシステムに準拠） */
:root {
  --blue-dark: #285a9d;
  --blue-mid: #3a72b8;
  --blue-pale: #dce9f7;
  --blue-pale2: #eef5fc;
  --orange: #f6851d;
  --orange-light: #fa9333;
  --white: #ffffff;
  --gray-100: #f5f6f8;
  --text-dark: #1a2540;
  --text-mid: #3d4f6b;
  --border-input: #d0d7e2;
  --required: #c9302c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body.form-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: var(--text-dark);
  background: var(--gray-100);
  line-height: 1.7;
}

.form-page-header {
  background: var(--blue-dark);
  border-bottom: 2px solid var(--orange);
  padding: 14px 20px;
}

.form-page-header a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.form-page-header img {
  display: block;
  height: 36px;
  width: auto;
}

.form-page-main {
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.form-card {
  position: relative;
  border-radius: 8px;
  padding: 36px 28px 40px;
}

.form-card--trial {
  background: var(--blue-pale2);
  border: 2px solid var(--orange);
  box-shadow: none;
}

.form-card--download {
  background: var(--white);
  border: 1px solid var(--border-input);
  border-top: none;
  box-shadow: none;
}

.form-card h1 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--blue-dark);
  text-align: center;
  line-height: 1.45;
}

.form-card__accent {
  width: 48px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: var(--orange);
}

.form-card__lead {
  margin: 0 0 28px;
  font-size: 0.875rem;
  color: var(--text-mid);
  text-align: left;
  line-height: 1.75;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-dark);
}

.form-field .req {
  color: var(--required);
  font-weight: 700;
  margin-left: 2px;
}

.form-field input[type='text'],
.form-field input[type='email'],
.form-field input[type='tel'],
.form-field input[type='date'],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1px solid var(--border-input);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

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

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

.form-actions {
  margin-top: 32px;
  text-align: center;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 16px 36px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(180deg, var(--blue-mid) 0%, var(--blue-dark) 100%);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.form-submit:hover {
  filter: brightness(1.03);
  box-shadow: none;
}

.form-submit:active {
  transform: scale(0.98);
}

.form-submit--blue {
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 100%);
  box-shadow: none;
}

.form-submit--blue:hover {
  box-shadow: none;
}

.form-back {
  display: block;
  margin-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--blue-mid);
}

.form-back a {
  color: var(--blue-dark);
  font-weight: 700;
}

.form-back a:hover {
  color: var(--orange);
}

.form-msg {
  display: none;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
}

.form-msg.is-error {
  display: block;
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: #7a1e1a;
}

.form-msg.is-success {
  display: block;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.form-page-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-input);
  font-size: 0.75rem;
  color: var(--text-mid);
  text-align: center;
}

body.form-page.is-modal-open {
  overflow: hidden;
}

.form-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: rgba(18, 27, 46, 0.58);
}

.form-confirm-modal__dialog {
  position: relative;
  width: min(660px, 100%);
  max-height: calc(100vh - 64px);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 28px 72px rgba(12, 26, 53, 0.35);
  padding: 26px 34px 22px;
  overflow: auto;
}

.form-confirm-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #5a6578;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.form-confirm-modal__title {
  margin: 0;
  text-align: center;
  color: #1f6581;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 900;
}

.form-confirm-modal__lead {
  margin: 12px 0 22px;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.78rem;
  line-height: 1.7;
}

.form-confirm-modal__list {
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #f5f7fb;
  overflow: hidden;
}

.form-confirm-modal__item + .form-confirm-modal__item {
  border-top: 1px solid #dce3ee;
}

.form-confirm-modal__label {
  padding: 10px 18px 4px;
  color: #0f5f7d;
  font-size: 0.72rem;
  font-weight: 700;
}

.form-confirm-modal__value {
  padding: 0 18px 12px;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.form-confirm-modal__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.form-confirm-modal__btn {
  min-width: 196px;
  padding: 14px 22px;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.form-confirm-modal__btn--back {
  background: #e4e6eb;
  color: #2f3b4c;
}

.form-confirm-modal__btn--submit {
  background: linear-gradient(180deg, #ffd669 0%, #f8b928 100%);
  color: #293752;
}

@media (max-width: 480px) {
  .form-page-main {
    padding: 28px 16px 48px;
  }

  .form-card {
    padding: 28px 18px 32px;
  }

  .form-card h1 {
    font-size: 1.2rem;
  }

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

  .form-confirm-modal {
    padding: 16px 10px;
    align-items: flex-start;
  }

  .form-confirm-modal__dialog {
    max-height: calc(100vh - 32px);
    padding: 20px 14px 16px;
  }

  .form-confirm-modal__title {
    font-size: 1.6rem;
  }

  .form-confirm-modal__lead {
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
  }

  .form-confirm-modal__label {
    padding: 9px 12px 4px;
    font-size: 0.95rem;
  }

  .form-confirm-modal__value {
    padding: 0 12px 11px;
    font-size: 1.15rem;
  }

  .form-confirm-modal__actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-confirm-modal__btn {
    width: 100%;
    min-width: 0;
    font-size: 1.1rem;
  }
}

/* ===== Complete Screen ===== */
.form-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
  text-align: center;
}
.form-complete__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #27ae60;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.form-complete__heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 16px;
}
.form-complete__message {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 400px;
}
.form-complete__back {
  display: inline-block;
  padding: 12px 32px;
  border: 2px solid var(--blue-dark);
  border-radius: 6px;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.form-complete__back:hover {
  background: var(--blue-dark);
  color: #fff;
}
