* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

.title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  border: 1px solid #d5d7dd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus {
  border-color: #ff0000;
}

.field input.invalid {
  border-color: #e02424;
}

.error {
  display: block;
  color: #e02424;
  font-size: 12px;
  margin-top: 5px;
  min-height: 15px;
}

.privacy-note {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #9aa0a6;
  text-align: center;
}

/* 직접 신청 버튼: 텔레그램(1차 CTA)에 시선을 양보하는 보조(연회색 채움) 스타일 */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #3f4754;
  background: #eceef1;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.submit-btn:hover {
  background: #e2e5e9;
  border-color: #d3d7dc;
  color: #2c333d;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1f9d55;
  text-align: center;
  min-height: 18px;
}

/* 폼과 텔레그램 영역 구분선 */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 28px 0 18px;
  color: #b0b4ba;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e6ea;
}

.divider span {
  padding: 0 12px;
}

/* 텔레그램 영역 */
.telegram-block {
  display: flex;
  flex-direction: column;
}

.telegram-note {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  text-align: center;
  margin-bottom: 12px;
}

/* 텔레그램 히어로(폼 위 1차 CTA) */
.telegram-hero {
  margin-top: 25px;
}

.hero-note {
  margin-top: 25px;
  margin-bottom: 0;
  font-size: 12.5px;
  color: #6b7280;
}

/* 텔레그램 이동 버튼 (배너형 강조 + 반짝임) */
.cta-button {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 68px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(115deg, #2bb2ec 0%, #1f97d4 45%, #229ed9 70%, #1c8dc2 100%);
  background-size: 200% 100%;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.45);
  animation: cta-pulse 2s ease-in-out infinite,
    cta-flow 6s ease-in-out infinite;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

/* 배너 위를 주기적으로 스쳐 지나가는 빛 줄기(glint) */
.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-180%) skewX(-22deg);
  animation: cta-shine 3.4s ease-in-out infinite;
}

.cta-button > * {
  position: relative;
  z-index: 1;
}

.cta-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.6);
}

.cta-button:active {
  transform: translateY(1px) scale(0.995);
}

@keyframes cta-pulse {
  0% {
    box-shadow: 0 6px 18px rgba(34, 158, 217, 0.45),
      0 0 0 0 rgba(34, 158, 217, 0.5);
  }
  70% {
    box-shadow: 0 6px 18px rgba(34, 158, 217, 0.45),
      0 0 0 14px rgba(34, 158, 217, 0);
  }
  100% {
    box-shadow: 0 6px 18px rgba(34, 158, 217, 0.45),
      0 0 0 0 rgba(34, 158, 217, 0);
  }
}

/* 빛 줄기: 빠르게 한 번 훑고 다음 주기까지 대기 */
@keyframes cta-shine {
  0% {
    transform: translateX(-180%) skewX(-22deg);
  }
  22% {
    transform: translateX(320%) skewX(-22deg);
  }
  100% {
    transform: translateX(320%) skewX(-22deg);
  }
}

/* 은은하게 흐르는 배경 그라데이션 */
@keyframes cta-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-button {
    animation: none;
  }
  .cta-button::before {
    display: none;
  }
}

.tg-icon {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

/* 모바일: 스크롤 없이 한 화면에 들어오도록 간격·크기 압축 */
@media (max-width: 480px) {
  body {
    padding: 10px;
    align-items: flex-start;
  }

  .card {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .title {
    font-size: 19px;
    margin-bottom: 5px;
  }

  .subtitle {
    font-size: 12.5px;
    margin-bottom: 12px;
    line-height: 1.4;
  }

  form {
    gap: 0;
  }

  .field label {
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 4px;
  }

  .field input {
    height: 44px;
    font-size: 14px;
  }

  .error {
    font-size: 11px;
    margin-top: 3px;
    min-height: 0;
  }

  .privacy-note {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.4;
  }

  .submit-btn {
    height: 46px;
    margin-top: 8px;
    font-size: 15px;
  }

  .form-status {
    margin-top: 8px;
    min-height: 0;
  }

  .divider {
    margin: 12px 0 10px;
  }

  .telegram-note {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .cta-button {
    height: 62px;
    font-size: 18px;
  }
}

/* 세로 길이가 짧은 화면(낮은 폰/가로 모드)에서 추가 압축 */
@media (max-height: 720px) {
  .subtitle {
    margin-bottom: 10px;
  }

  .field label {
    margin-top: 6px;
  }

  .divider {
    margin: 10px 0 8px;
  }
}
