/* ===================== CONTACT (도입문의) ===================== */
.contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #5528d1;
  min-height: calc(100vh - 80px);
  margin-top: 80px;
  padding: 50px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 움직이는 그라데이션 글로우 */
.contact::before,
.contact::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
  pointer-events: none;
}

.contact::before {
  width: 48vw;
  height: 48vw;
  max-width: 560px;
  max-height: 560px;
  top: 18%;
  left: 34%;
  background: radial-gradient(circle at center, #c4b3ff 0%, rgba(196, 179, 255, 0) 70%);
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: contact-glow-1 12s ease-in-out infinite;
}

.contact::after {
  width: 52vw;
  height: 52vw;
  max-width: 600px;
  max-height: 600px;
  top: 82%;
  left: 66%;
  background: radial-gradient(circle at center, #1b0a52 0%, rgba(27, 10, 82, 0) 70%);
  mix-blend-mode: multiply;
  opacity: 0.8;
  animation: contact-glow-2 15s ease-in-out infinite;
}

@keyframes contact-glow-1 {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-40%, -40%) scale(1.12);
  }
}

@keyframes contact-glow-2 {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  50% {
    transform: translate(-60%, -60%) scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact::before,
  .contact::after {
    animation: none;
  }
}

.contact__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

/* Heading */
.contact__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: #ffffff;
}

.contact__title {
  font-family: 'Montserrat', var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  font-size: 32px;
  line-height: 40px;
  color: #ffffff;
}

.contact__desc {
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 16px;
  line-height: 24px;
}

/* Card */
.contact__card {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.12);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Field */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field__row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.field__row .field {
  flex: 1 0 0;
  min-width: 0;
}

.field__label {
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  color: #222222;
}

.field__label-sub {
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 18px;
  color: #5528d1;
  margin-left: 4px;
}

.field__input,
.field__textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #444444;
  border-radius: 8px;
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 18px;
  color: #444444;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field__input {
  height: 40px;
  padding: 8px 16px;
}

.field__textarea {
  min-height: 120px;
  padding: 12px 16px;
  resize: vertical;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: #999999;
}

/* State: Focus / Keydown */
.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: #5528d1;
  box-shadow: 1px 3px 8px 1px rgba(0, 0, 0, 0.2);
}

/* State: Success */
.field__input.is-success,
.field__textarea.is-success {
  border-color: #2e9e7a;
}

/* State: Warning */
.field__input.is-warning,
.field__textarea.is-warning {
  border-color: #c48a2c;
}

/* State: Error */
.field__input.is-error,
.field__textarea.is-error {
  border-color: #c2465d;
  color: #c2465d;
}

.field__input.is-error::placeholder,
.field__textarea.is-error::placeholder {
  color: #c2465d;
}

/* State: Disabled */
.field__input:disabled,
.field__textarea:disabled {
  background: #eeeeee;
  border: 1px dashed #999999;
  color: #999999;
  cursor: not-allowed;
}

/* State: Readonly */
.field__input[readonly],
.field__textarea[readonly] {
  background: transparent;
  border: 1px dashed #999999;
  color: #999999;
}

/* Error description (input 하단 안내문구) */
.field__desc {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 0 8px;
  margin-top: -4px;
  color: #c2465d;
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 18px;
}

.field__desc .iconify {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.field.has-error .field__desc {
  display: flex;
}

/* Service checkboxes */
.services {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  width: 100%;
}

.service-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.service-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-check__box {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.cb-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.cb-icon--on {
  display: none;
}

.service-check input:checked + .service-check__box .cb-icon--off {
  display: none;
}

.service-check input:checked + .service-check__box .cb-icon--on {
  display: block;
}

.service-check input:focus-visible + .service-check__box {
  box-shadow: 0 0 0 3px rgba(85, 40, 209, 0.2);
}

.service-check__text {
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 18px;
  color: #444444;
  white-space: nowrap;
}

/* Submit */
.contact__submit-wrap {
  width: 300px;
  max-width: 100%;
  align-self: center;
}

.btn--submit {
  width: 100%;
  height: 50px;
}

.btn--submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===================== 문의 완료 모달 ===================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 300);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-pop 0.2s ease;
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__header {
  padding: 12px 16px;
  border-bottom: 1px solid #d9d9d9;
}

.modal__title {
  margin: 0;
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  line-height: 24px;
  color: #222222;
}

.modal__body {
  display: flex;
  align-items: flex-start;
  min-height: 80px;
  padding: 16px;
}

.modal__body p {
  margin: 0;
  font-family: 'Noto Sans KR', var(--font-family-base);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 18px;
  color: #222222;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
}

.modal__confirm {
  height: 43px;
}

@media (prefers-reduced-motion: reduce) {
  .modal__card {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .contact {
    padding: 40px 16px;
  }

  .field__row {
    flex-direction: column;
  }

  .services {
    flex-direction: column;
    gap: 16px;
  }

  .contact__submit-wrap {
    width: 100%;
  }
}
