/**
 * clients/mooni/assets/css/theme.css
 *
 * mooni studio 사이트 — Tailwind로 표현하기 번거로운 부분만.
 *
 * 원칙:
 *   - 색·폰트·간격·반경은 Tailwind 클래스로. 여기 직접 쓰지 X
 *   - 여기는 Tailwind 보강이 어려운 효과·복합 컴포넌트만
 *   - AI가 인라인 스타일로 폰트사이즈·색 하드코딩하면 즉시 Tailwind 클래스로 교체
 *
 * 의존:
 *   - Pretendard Variable (CDN)
 *   - JetBrains Mono (CDN, 코드박스 전용)
 *   - Tailwind v3 CDN + tailwind-config.js
 */

/* ─────────────────── 폰트 매끄럽게 ─────────────────── */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─────────────────── 글래스 헤더 (Cruip Simple 필 카드 차용) ─────────────────── */
.mooni-header-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* ─────────────────── 코드 박스 — Cruip Simple 차용 + mooni 톤 ─────────────────── */
.mooni-code-window {
  background: #0F172A;
  border: 1px solid #1E293B;
}
.mooni-code-window-bar {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 1px solid #1E293B;
}
.mooni-code-light { width: 12px; height: 12px; border-radius: 9999px; display: inline-block; }
.mooni-code-light.red    { background: #FF5F57; }
.mooni-code-light.yellow { background: #FEBC2E; }
.mooni-code-light.green  { background: #28C840; }

/* 코드 색상 톤 (terminal-ish) */
.mooni-code-line { color: #94A3B8; }
.mooni-code-time { color: #64748B; }
.mooni-code-cmd  { color: #E2E8F0; }
.mooni-code-ok   { color: #4ADE80; }
.mooni-code-key  { color: #A89CFF; }
.mooni-code-val  { color: #FACC15; }
.mooni-code-arr  { color: #7C6FFF; }
.mooni-code-url  { color: #38BDF8; text-decoration: underline; text-decoration-color: rgba(56,189,248,0.3); }

/* 커서 깜빡임 */
.mooni-code-cursor::after {
  content: '▋';
  color: #4ADE80;
  margin-left: 4px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  to { opacity: 0; }
}

/* ─────────────────── 가벼운 그라데이션 배경 (히어로) ─────────────────── */
.mooni-bg-aurora {
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 111, 255, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(168, 156, 255, 0.10) 0%, transparent 40%),
    #FFFFFF;
}

/* ─────────────────── 도식 막대 (장점 ①·② 비교) ─────────────────── */
.mooni-bar { height: 8px; border-radius: 9999px; transition: width 0.8s ease-out; }
.mooni-bar.bad  { background: linear-gradient(90deg, #FCA5A5, #F87171); }
.mooni-bar.good { background: linear-gradient(90deg, #A89CFF, #7C6FFF); }

/* ─────────────────── 셀렉션 색 ─────────────────── */
::selection {
  background: rgba(124, 111, 255, 0.25);
  color: #1E293B;
}

/* ─────────────────── 네비 캡슐 hover (iOS 스타일) ─────────────────── */
.mooni-nav-link {
  position: relative;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mooni-nav-link:hover {
  color: #4538B8;
  background: rgba(124, 111, 255, 0.10);
}
.mooni-nav-link.is-active {
  color: #4538B8;
  background: rgba(124, 111, 255, 0.15);
}

/* ─────────────────── 스크롤 fade-up (D-1) ─────────────────── */
.mooni-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.mooni-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* 스태거 (D-3) — 간격 넓혀 천천히 순차 */
.mooni-reveal[data-stagger="1"] { transition-delay: 0.10s; }
.mooni-reveal[data-stagger="2"] { transition-delay: 0.30s; }
.mooni-reveal[data-stagger="3"] { transition-delay: 0.50s; }
.mooni-reveal[data-stagger="4"] { transition-delay: 0.70s; }
.mooni-reveal[data-stagger="5"] { transition-delay: 0.90s; }

/* ─────────────────── 도식 카운트업·바 (D-2) ─────────────────── */
.mooni-bar { width: 0; transition: width 2.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mooni-bar.is-active.bad  { width: 80%; }
.mooni-bar.is-active.good { width: 25%; }

.mooni-count { font-variant-numeric: tabular-nums; }

/* ─────────────────── 코드박스 반복 타이핑 (#4) ─────────────────── */
.mooni-code-typing pre {
  /* 8줄 + 빈 줄 1 + 패딩 여유까지 미리 확보해 끝에 늘어나는 점프 방지 */
  min-height: 320px;
}
@media (min-width: 768px) {
  .mooni-code-typing pre { min-height: 300px; }
}
.mooni-code-typing .ct-line {
  opacity: 0;
}
.mooni-code-typing .ct-line.is-shown {
  opacity: 1;
}
.mooni-code-typing .ct-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: #4ADE80;
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}

/* 헤더 스크롤 시 살짝 압축 (D-4 가벼운 버전) */
.mooni-header-pill.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* ─────────────────── 문의폼 (CONTACT_INQUIRY) ─────────────────── */

/* 패키지 카드 — 라디오 라벨 */
.pkg-card {
  display: block;
  cursor: pointer;
  position: relative;
}
.pkg-card .pkg-inner {
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.pkg-card:hover .pkg-inner {
  border-color: #A89CFF;
  background: #FAFAFE;
}
.pkg-card input:checked + .pkg-inner {
  border-color: #7C6FFF;
  background: #F2F0FF;
  box-shadow: 0 0 0 3px rgba(124, 111, 255, 0.18);
}
.pkg-card input:focus-visible + .pkg-inner {
  outline: 2px solid rgba(124, 111, 255, 0.5);
  outline-offset: 2px;
}

/* 문의 버튼 */
.inquiry-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0F172A;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.inquiry-btn-primary:hover {
  background: #1E293B;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.inquiry-btn-primary:disabled {
  background: #94A3B8;
  cursor: wait;
  transform: none;
  box-shadow: none;
}
.inquiry-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748B;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}
.inquiry-btn-ghost:hover {
  color: #0F172A;
  background: #F1F5F9;
}

/* 단계 패널 전환 */
.step-panel {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;        /* fieldset 기본 min-content 폭 제거 */
  animation: stepIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.step-panel.is-leaving {
  animation: stepOut 0.3s ease forwards;
}
@keyframes stepOut {
  to { opacity: 0; transform: translateX(-20px); }
}

/* 폼 검증 에러 */
.is-invalid input,
.is-invalid textarea,
input.is-invalid,
textarea.is-invalid {
  border-color: #F87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12) !important;
}

/* ─────────────────── WORKS 다크 입자 배경 ─────────────────── */
/* 다크 톤 위 옅은 별빛 입자. 마우스 인터랙션 X (data-mouse-mode="off") — 사장님은 작업물 카드에 집중 */
.mooni-works-dark {
  position: relative;
  isolation: isolate;
  background: #0F172A;        /* ink-900 */
  overflow: hidden;
}
.mooni-works-dark .mooni-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;       /* 마우스 입력 받지 X — 카드 hover 우선 */
  opacity: 0.55;              /* 추가 감쇠 — 너무 튀지 않게 */
}
.mooni-works-dark > .max-w-container {
  position: relative;
  z-index: 2;
}

/* 결과 영역 */
.inquiry-result {
  text-align: center;
  padding: 32px 16px;
  animation: stepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.inquiry-result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 9999px;
  background: #DCFCE7;
  color: #16A34A;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inquiry-result-icon.fail {
  background: #FEE2E2;
  color: #DC2626;
}
.inquiry-result h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px;
}
.inquiry-result p {
  font-size: 0.875rem;
  color: #64748B;
  line-height: 1.7;
  margin: 0;
}
.inquiry-result-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.inquiry-result-actions .mooni-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.inquiry-result-actions .mooni-btn-secondary:hover {
  background: #E2E8F0;
  color: #0F172A;
}
