/* ======================
   ATARE Form Page
   ====================== */

/* ---------- Header ---------- */
.at-form__title-en {
  font-size: clamp(52px, 7.3vw, 100px);
  font-weight: 400;
  letter-spacing: 0.07em;
  text-align: center;
  color: #111;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.2;
  margin: 0;
}

.at-form__title-ja {
  font-size: 30px;
  letter-spacing: 0.05em;
  text-align: center;
  color: #111;
  margin: 10px 0 0;
  font-weight: 400;
}

.at-form__desc {
  font-size: 18px;
  text-align: center;
  color: #111;
  margin: 64px 0 0;
  line-height: 1.9;
}

.at-form__br--sp {
  display: none;
}

.at-form__divider {
  margin: 75px 0;
  height: 1px;
  background: #111;
  position: relative;
}

.at-form__divider::before,
.at-form__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #111;
  border-radius: 50%;
}

.at-form__divider::before { left: 0; }
.at-form__divider::after { right: 0; }

/* ---------- Form ---------- */
.at-form__form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 768px) {
  .at-form__form {
    padding-inline: 55px;
  }

  .at-form__label-wrap {
    padding-left: 40px;
  }

  .at-form__radio span {
    white-space: nowrap;
  }
}

.at-form__field {
  display: grid;
  grid-template-columns: 307px 1fr;
  gap: 64px;
  align-items: start;
}

.at-form__label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 23px;
}

.at-form__label {
  font-size: 18px;
  color: #111;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.at-form__badge {
  font-size: 11px;
  padding: 2px 20px;
  border: 1px solid #111;
  color: #111;
  white-space: nowrap;
  line-height: 1.6;
}

.at-form__badge--required {
  background: #111;
  color: #fff;
}

.at-form__input,
.at-form__textarea {
  width: 100%;
  background: #f5f5f5;
  border: none;
  padding: 23px 20px;
  font-size: 18px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #111;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  box-sizing: border-box;
}

.at-form__input--error {
  outline: 2px solid #c00;
  outline-offset: 0;
}

.at-form__textarea {
  resize: vertical;
  min-height: 500px;
  line-height: 1.8;
}

.at-form__input::placeholder,
.at-form__textarea::placeholder {
  color: #aaa;
}

.at-form__name-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---------- Radios ---------- */
.at-form__radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  padding-top: 8px;
}

.at-form__radio {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 18px;
  color: #111;
}

.at-form__radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid #DFDFDF;
  border-radius: 50%;
  background: #f5f5f5;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.at-form__radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #111;
  border-radius: 50%;
}

/* ---------- Checkbox ---------- */
.at-form__privacy-check {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.at-form__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #111;
  user-select: none;
}

.at-form__checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #DFDFDF;
  border-radius: 2px;
  background: #f5f5f5;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.at-form__checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
}

/* ---------- Form error ---------- */
.at-form__form-error {
  text-align: center;
  color: #c00;
  font-size: 14px;
  margin: 0;
}

/* ---------- Actions ---------- */
.at-form__actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.at-form__btn {
  font-size: 18px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 31px 60px;
  min-width: 400px;
  cursor: pointer;
  border: 1px solid #111;
  transition: background 0.25s, color 0.25s;
  line-height: 1;
}

.at-form__btn--primary {
  background: #111;
  color: #fff;
}

.at-form__btn--primary:hover {
  background: #333;
}

.at-form__btn--outline {
  background: transparent;
  color: #111;
}

.at-form__btn--outline:hover {
  background: #111;
  color: #fff;
}

/* ---------- Confirmation screen ---------- */
.at-form__confirm-header {
  text-align: center;
  font-size: 18px;
  color: #111;
  margin: 0 0 75px;
}

.at-form__confirm {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e0e0e0;
  margin-bottom: 80px;
}

@media (min-width: 768px) {
  .at-form__confirm {
    max-width: 950px;
    margin-inline: auto;
  }
}

.at-form__confirm-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 130px;
  padding: 34px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 18px;
  color: #111;
  overflow-wrap: break-word;
}

.at-form__confirm-row__label {
  color: #666;
  white-space: nowrap;
}

.at-form__confirm-row > div:last-child {
  min-width: 0;
}

/* ---------- Thanks screen ---------- */
.at-form__thanks {
  text-align: center;
  padding: 0;
}

.at-form__thanks-title {
  font-size: 30px;
  color: #111;
  line-height: 2.2;
  margin: 0;
}

.at-form__thanks-text {
  font-size: 18px;
  color: #111;
  line-height: 2.2;
  margin: 0 0 48px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .at-form__br--sp {
    display: block;
  }

  .at-form__title-en {
    font-size: 44px;
  }

  .at-form__title-ja {
    font-size: 20px;
  }

  .at-form__desc {
    font-size: 13px;
  }

  .at-form__divider {
    margin: 32px 0;
  }

  .at-form__form {
    gap: 32px;
  }

  .at-form__field {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .at-form__label-wrap {
    padding-top: 0;
  }

  .at-form__radios {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .at-form__radio {
    font-size: 15px;
  }

  .at-form__input,
  .at-form__textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .at-form__textarea {
    min-height: 240px;
  }

  .at-form__name-wrap {
    gap: 12px;
  }

  .at-form__btn {
    font-size: 16px;
    padding: 16px 32px;
    min-width: unset;
    width: 100%;
  }

  .at-form__actions {
    flex-direction: column-reverse;
  }

  .at-form__confirm-row {
    grid-template-columns: 1fr;
    font-size: 15px;
    gap: 8px;
  }

  .at-form__confirm-row__label {
    white-space: normal;
  }

  .at-form__thanks-title {
    font-size: 22px;
    line-height: 1.6;
  }

  .at-form__thanks-text {
    font-size: 14px;
  }
}
