@charset "UTF-8";

/* ==========================================================================
   service-intro (서비스 소개서 신청) — style.css
   톤은 구독 플랜·보안 페이지를 따른다 — 웜 오프화이트 배경, 1px 선(--line), 장식 없는 단색 제목,
   알약형 검정 버튼. 가운데 정렬 1열 폼.
   GNB·푸터는 공통 /assets/gnb-footer.css가 맡고, 본문 상단 여백은 공통 토큰 --jn-gnb-height를 따른다.
   ========================================================================== */

:root {
  --gray04: #8a96a3;
  --gray05: #6f7c89;
  --gray06: #556372;
  --gray08: #3c4651;
  --gray10: #242a30;
  --white: #ffffff;
  --primary: #111111;
  --bg: #fdfcfc;
  --line: #eeedec;
  --line-strong: #dedcda;
  --field: #ffffff;
  --danger: #e5484d;
  --danger-bg: #fff5f5;
  --focus: rgba(17, 17, 17, 0.08);
  --form-max: 520px;
}

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

body {
  font-family:
    'Pretendard Variable',
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    'Helvetica Neue',
    'Segoe UI',
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    'Malgun Gothic',
    sans-serif;
  color: var(--gray10);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.si {
  padding-top: var(--jn-gnb-height, 70px);
}

.si__inner {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 64px 20px 96px;
}

/* ===================== 머리말 ===================== */

.si-head {
  text-align: center;
  margin-bottom: 40px;
}

.si-head__eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray05);
  margin-bottom: 10px;
}

.si-head__title {
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.si-head__title span,
.si-head__desc span {
  display: block;
}

.si-head__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray06);
}

/* ===================== 폼 ===================== */

/* 간격 규칙 (8px 단위)
   묶음 사이 40 · 묶음 제목 선 아래 20 · 칸 사이 20 · 라벨과 입력 8 · 칩 사이 8.
   묶음 제목과 칩 항목 라벨은 <legend>라서 flex gap이 적용되지 않는다. 아래로 띄우는 간격은 margin으로 준다. */
.si-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.si-group {
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.si-group__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  margin-bottom: 20px;
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.si-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  min-width: 0;
}

.si-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray08);
  padding: 0;
}

/* 필수 표시: 라벨 뒤 작은 빨간 점 */
.si-req {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--danger);
  margin-left: 2px;
  transform: translateY(-4px);
}

.si-label__optional {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray04);
  margin-left: 2px;
}

.si-label__note {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray04);
  margin-left: 6px;
}

.si-control {
  position: relative;
}

.si-control__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--gray04);
  pointer-events: none;
}

.si-control__caret {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--gray05);
  pointer-events: none;
}

.si-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 42px;
  font-size: 15px;
  line-height: 1.5;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.si-input::placeholder {
  color: #b4bcc4;
}

.si-input:hover {
  border-color: #c9c6c3;
}

.si-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.si-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.si-select:invalid {
  color: #b4bcc4;
}

.si-select option {
  color: var(--gray10);
}

.si-textarea {
  padding: 12px 16px;
  min-height: 104px;
  resize: vertical;
}

.si-hint {
  font-size: 12px;
  color: var(--gray05);
}

.si-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--danger);
}

.si-field.is-invalid .si-input {
  border-color: var(--danger);
}

.si-field.is-invalid .si-input:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12);
}

.si-field.is-invalid .si-hint {
  display: none;
}

/* ===================== 선택 칩 ===================== */

.si-choice > .si-label {
  margin-bottom: 8px;
}

.si-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.si-chip {
  position: relative;
  cursor: pointer;
}

.si-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.si-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray08);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.si-chip:hover span {
  border-color: #c9c6c3;
}

.si-chip input:checked + span {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.si-chip input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--focus);
}

.si-field.is-invalid .si-chip span {
  border-color: var(--danger);
}

.si-field.is-invalid .si-chip input:checked + span {
  border-color: var(--primary);
}

/* ===================== 동의 ===================== */

.si-consents {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}

.si-consent + .si-consent {
  border-top: 1px solid var(--line);
}

.si-consent {
  padding: 14px 16px;
}

.si-consent .si-error {
  margin-top: 6px;
  padding-left: 28px;
}

.si-consent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.si-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray10);
  cursor: pointer;
}

.si-check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c9c6c3;
  border-radius: 5px;
  background: var(--white) center / 12px no-repeat;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.si-check input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.si-check input:focus-visible {
  box-shadow: 0 0 0 4px var(--focus);
  outline: none;
}

.si-consent.is-invalid .si-check input {
  border-color: var(--danger);
}

.si-consent__tag {
  font-weight: 700;
  color: var(--gray10);
}

.si-consent__tag--optional {
  font-weight: 600;
  color: var(--gray05);
}

.si-consent__toggle {
  flex: none;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray05);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}

.si-consent__toggle:hover {
  color: var(--gray10);
}

.si-terms {
  margin-top: 12px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray06);
  background: var(--bg);
  border-radius: 10px;
}

.si-terms ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.si-terms li {
  position: relative;
  padding-left: 12px;
}

.si-terms li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.si-terms strong {
  font-weight: 600;
  color: var(--gray08);
}

.si-terms__more {
  margin-top: 10px;
}

.si-terms a {
  color: var(--gray10);
  text-underline-offset: 3px;
}

/* ===================== 제출 ===================== */

/* 자동 제출을 걸러내는 숨긴 칸(index.astro). display:none이면 채우지 않는 봇이 있어 화면 밖으로만 뺀다 */
.si-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.si-submit-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: -20px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 12px;
}

.si-submit-error i {
  margin-top: 3px;
}

.si-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: -12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    opacity 0.15s ease;
}

.si-submit:hover {
  background: #2b2b2b;
}

.si-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.2);
}

.si-submit[aria-busy='true'] {
  cursor: progress;
  opacity: 0.85;
}

.si-submit__loading {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: si-spin 0.8s linear infinite;
}

.si-submit[aria-busy='true'] .si-submit__label {
  display: none;
}

.si-submit[aria-busy='true'] .si-submit__loading {
  display: block;
}

.si-submit__busy {
  display: none;
  align-items: center;
  gap: 10px;
}

.si-submit[aria-busy='true'] .si-submit__busy {
  display: inline-flex;
}

/* 보내는 중 안내. 비어 있을 때는 자리를 차지하지 않는다(폼의 gap이 생기지 않게) */
.si-submit-status {
  margin-top: -28px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray06);
  text-align: center;
}

.si-submit-status:empty {
  display: none;
}

@keyframes si-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================== 완료 ===================== */

.si-done {
  text-align: center;
  padding: 48px 0 24px;
  outline: none;
}

.si-done__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  font-size: 22px;
  color: var(--white);
  background: var(--primary);
  border-radius: 50%;
}

.si-done__title {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.si-done__desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray06);
}

.si-done__desc strong {
  font-weight: 600;
  color: var(--gray10);
  word-break: break-all;
}

.si-done__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.si-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.si-btn--primary {
  color: var(--white);
  background: var(--primary);
}

.si-btn--primary:hover {
  background: #2b2b2b;
}

.si-btn--secondary {
  color: var(--gray10);
  background: var(--white);
  border: 1px solid var(--line-strong);
}

.si-btn--secondary:hover {
  border-color: #c9c6c3;
}

/* ===================== 모바일 ===================== */

@media (max-width: 767px) {
  .si__inner {
    padding: 48px 16px 80px;
  }

  .si-head {
    margin-bottom: 36px;
  }

  .si-head__desc,
  .si-done__desc {
    font-size: 15px;
  }

  /* 모바일 입력칸은 16px 미만이면 iOS가 입력할 때 화면을 확대한다 */
  .si-input {
    font-size: 16px;
  }

  .si-form {
    gap: 36px;
  }

  .si-consent {
    padding: 16px;
  }

  .si-chip span {
    padding: 0 14px;
  }

  .si-done__actions .si-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .si-submit__loading {
    animation-duration: 2s;
  }
}
