/* ============================================================================
 * PickSignal v2.0 — Landing Pages Stylesheet
 * 공유: consent.html + preview.html
 * ============================================================================ */

:root {
  /* 브랜드 */
  --brand-primary: #5B3EFF;
  --brand-primary-dark: #4527E0;
  --brand-primary-light: #EDE9FE;

  /* 중립 */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* 상태 */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* 간격 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* 그림자 */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.12);
}

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

html, body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Noto Sans KR", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── 레이아웃 ─── */
.page {
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 20px;
  font-weight: 800;
  font-size: 18px;
  color: var(--brand-primary);
}
.brand-header .logo-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
}
.brand-header .brand-name {
  font-family: Outfit, Pretendard, sans-serif;
  font-weight: 800;
}

/* ─── FP 프로필 ─── */
.fp-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fp-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}
.fp-info .fp-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}
.fp-info .fp-company {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

/* ─── 자료 프리뷰 ─── */
.material-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
}
.material-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}
.material-cover {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--brand-primary-light);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  font-size: 48px;
  margin-bottom: 16px;
  overflow: hidden;
}
.material-cover img { object-fit: cover; width: 100%; height: 100%; }

.material-points {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.material-points li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: var(--text-primary);
  font-size: 14.5px;
  border-bottom: 1px dashed var(--border);
}
.material-points li:last-child { border-bottom: none; }
.material-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px; height: 22px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 12px;
  font-weight: 800;
}

/* ─── 폼 ─── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-primary);
}
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(91,62,255,0.08);
}
.form-input[readonly] {
  background: var(--bg);
  color: var(--text-secondary);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}
.checkbox-row input[type=checkbox] {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--brand-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-row .chk-main {
  font-weight: 600;
}
.checkbox-row .chk-sub {
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
  font-size: 13px;
}

/* ─── 버튼 ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: transform .08s, box-shadow .15s, background .15s;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--brand-primary-dark); transform: translateY(-1px); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: #fff;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn-secondary:hover { background: var(--brand-primary-light); }

/* ─── 알림 박스 ─── */
.notice {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.notice-info {
  background: #EFF6FF;
  color: #1E3A8A;
  border-left: 3px solid #3B82F6;
}
.notice-warn {
  background: #FEF3C7;
  color: #92400E;
  border-left: 3px solid #F59E0B;
}
.notice-danger {
  background: #FEE2E2;
  color: #991B1B;
  border-left: 3px solid #EF4444;
}
.notice-success {
  background: #D1FAE5;
  color: #065F46;
  border-left: 3px solid #10B981;
}

/* ─── 면책 문구 ─── */
.disclaimer {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 24px;
  padding: 16px;
  background: #F1F5F9;
  border-radius: var(--r-sm);
}

/* ─── 로더 ─── */
.loader {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 완료 뷰 ─── */
.success-view {
  text-align: center;
  padding: 40px 20px;
}
.success-view .success-icon {
  width: 64px; height: 64px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
}
.success-view h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.success-view p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ─── 프리뷰 블러 오버레이 ─── */
.preview-gate {
  position: relative;
  overflow: hidden;
}
.preview-gate::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.95) 75%, #fff 100%);
  pointer-events: none;
}

/* ─── 반응형 ─── */
@media (min-width: 640px) {
  .page { padding: 32px 24px 80px; }
  .card { padding: 28px; }
}

/* ─── 유틸 ─── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }

/* ─── Lucide 아이콘 (이모지 대체) ─── */
.ps-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
  vertical-align: -3px;
  color: currentColor;
}
.ps-icon-sm { width: 14px; height: 14px; vertical-align: -2px; }
.ps-icon-lg { width: 20px; height: 20px; vertical-align: -4px; }
.ps-icon-xl { width: 24px; height: 24px; vertical-align: -5px; }
.ps-icon-2xl { width: 32px; height: 32px; vertical-align: -7px; }
.ps-icon-text { margin-right: 4px; }
.ps-icon svg, svg.ps-icon { width: 100%; height: 100%; }
