/* ============================================================
   MOTIVE — 모션 레이어
   히어로 3D 필드 + 스크롤 시네마틱.
   원칙: 무거운 연출은 히어로 하나. 나머지는 절제.
   ============================================================ */

/* ---------- 히어로 3D 파티클 필드 ---------- */

.hero {
  position: relative;
  isolation: isolate;
}

#ax-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

#ax-field.ready {
  opacity: 1;
}

/* 콘텐츠는 항상 파티클 위 */
.hero .wrap {
  position: relative;
  z-index: 2;
}

/* 파티클이 카피를 침범하지 않게 얇은 베일 */
/* 링 한가운데에만 얇게 깔리는 코어 그늘.
   글자가 뜨기만 하면 된다. 넓게 덮으면 링이 통째로 죽는다. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 26% 20% at 50% 36%,
    rgba(6, 11, 24, 0.72) 0%,
    rgba(6, 11, 24, 0.4) 55%,
    rgba(6, 11, 24, 0) 100%
  );
}

/* 3D 필드 범례 — 색이 무엇을 뜻하는지 밝힌다 */
.field-key {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  z-index: 3;
  display: flex;
  gap: 22px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(234, 240, 255, 0.4);
  pointer-events: none;
}

.field-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.field-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
}

.field-key .old i {
  background: #94a3b8;
}

.field-key .new i {
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}

@media (max-width: 860px) {
  .field-key {
    display: none;
  }
}

/* 스크롤 리빌은 원본 페이지의 .rv/.on 시스템이 담당한다. 여기서 건드리지 않는다. */

/* ---------- 마그네틱 버튼 ---------- */

[data-magnetic] {
  will-change: transform;
}

/* ---------- 카드 3D 틸트 ---------- */

[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

[data-tilt]:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 22px 60px -20px rgba(139, 92, 246, 0.35);
}

[data-tilt] > * {
  transform: translateZ(28px);
}

/* ---------- 숫자 카운트업: 자릿수 흔들림 방지 ---------- */

.stat .n,
.kpi2 .n,
[data-count] {
  font-variant-numeric: tabular-nums;
}

/* 숫자 기준 라벨 — 검증 경로 없는 숫자는 공격받는다 */
.stat .basis {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(234, 240, 255, 0.32);
  letter-spacing: 0.01em;
}

.stats-note {
  margin-top: 22px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: rgba(234, 240, 255, 0.35);
}

/* ---------- 아이콘 (이모지 대체) ---------- */

.ico {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  display: block;
  color: #8b5cf6;
}

.ico.c2 {
  color: #22d3ee;
}

/* ---------- 최종 CTA: 수렴 ---------- */

.final {
  position: relative;
  overflow: hidden;
}

#converge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.final .wrap {
  position: relative;
  z-index: 2;
}

/* ---------- 접근성 ---------- */

@media (prefers-reduced-motion: reduce) {
  #ax-field,
  #converge {
    display: none;
  }
  [data-tilt] > * {
    transform: none;
  }
}

/* ============================================================
   문의 폼 — 원본은 인라인 스타일이었다. 클래스로 옮긴다.
   ============================================================ */

#axform input,
#axform select,
#axform textarea,
#repform input[type="email"] {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(6, 11, 24, 0.6);
  color: var(--tx);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#axform textarea {
  resize: vertical;
  line-height: 1.7;
}

#axform input::placeholder,
#axform textarea::placeholder,
#repform input::placeholder {
  color: rgba(234, 240, 255, 0.35);
}

#axform input:focus,
#axform select:focus,
#axform textarea:focus,
#repform input:focus {
  border-color: #8b5cf6;
  background: rgba(6, 11, 24, 0.9);
}

#axform select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%237c8aa0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* 봇 함정 필드는 어떤 경우에도 보이면 안 된다 */
#axform input[name="website"],
#repform input[name="website"] {
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#axform button[disabled],
#repform button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 620px) {
  #axform {
    grid-template-columns: 1fr !important;
  }
}
