/* AICreator Content Workflow Experience (TASK-005) — 독립 CSS, wf- 프리픽스.
   Brain Universe(bu-)와 같은 다크 톤을 이어받아 Hero→Brain→Workflow가 하나의
   다크 존으로 자연스럽게 연결되게 한다. */

.wf-root {
  --wf-bg-0: #05060a;
  --wf-bg-1: #0a0d16;
  --wf-text: #f8fafc;
  --wf-text-dim: rgba(248, 250, 252, 0.72);
  --wf-text-faint: rgba(248, 250, 252, 0.45);
  --wf-border: rgba(255, 255, 255, 0.12);
  --wf-accent-a: #5b7cff;
  --wf-accent-b: #8b5cf6;
  --wf-accent-c: #22d3ee;
  --wf-ease: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  background: linear-gradient(180deg, var(--wf-bg-1), var(--wf-bg-0));
  color: var(--wf-text);
  padding: clamp(64px, 9vw, 120px) max(24px, 4vw);
  font-family: 'Noto Sans KR', sans-serif;
}
.wf-root * { box-sizing: border-box; }

.wf-container { max-width: 1320px; margin: 0 auto; }

.wf-heading { text-align: center; max-width: 680px; margin: 0 auto clamp(40px, 6vw, 72px); }
.wf-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #8b9bff; margin-bottom: 16px; }
.wf-title { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; line-height: 1.3; margin: 0 0 16px; word-break: keep-all; }
.wf-sub { font-size: clamp(0.95rem, 1.2vw, 1.05rem); color: var(--wf-text-dim); line-height: 1.7; margin: 0; word-break: keep-all; }

.wf-layout {
  display: grid;
  grid-template-columns: 300px 64px 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}

/* ── 좌측: Step Navigator ─────────────────────────────── */
.wf-nav { display: flex; flex-direction: column; gap: 6px; }
.wf-step-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid transparent;
  background: transparent; color: var(--wf-text-faint); text-align: left; cursor: pointer;
  transition: background 0.25s var(--wf-ease), border-color 0.25s, color 0.25s;
}
.wf-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; background: rgba(255,255,255,0.06); color: var(--wf-text-faint);
  transition: background 0.25s var(--wf-ease), color 0.25s;
}
.wf-step-label { display: block; font-size: 14px; font-weight: 700; color: var(--wf-text-dim); }
.wf-step-desc { display: block; font-size: 11.5px; color: var(--wf-text-faint); margin-top: 2px; }

.wf-step-btn:hover { background: rgba(255,255,255,0.04); }
.wf-step-btn:focus-visible { outline: 2px solid var(--wf-accent-a); outline-offset: 2px; }
.wf-step-btn[data-state="done"] .wf-step-num { background: var(--wf-accent-c); color: #05070d; }
.wf-step-btn[data-state="done"] .wf-step-label { color: var(--wf-text); }
.wf-step-btn[aria-current="step"] {
  background: linear-gradient(135deg, rgba(91,124,255,0.16), rgba(139,92,246,0.08));
  border-color: rgba(139,124,255,0.4);
}
.wf-step-btn[aria-current="step"] .wf-step-num { background: linear-gradient(120deg, var(--wf-accent-a), var(--wf-accent-b)); color: #05070d; }
.wf-step-btn[aria-current="step"] .wf-step-label { color: var(--wf-text); }

/* ── 중앙: Animated Workflow(세로 경로) ───────────────── */
.wf-path-wrap { position: relative; height: 100%; min-height: 560px; display: flex; justify-content: center; }
.wf-path-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wf-path-track { stroke: rgba(255,255,255,0.12); stroke-width: 2; }
.wf-path-progress { stroke: url(#wfProgressGradient); stroke-width: 2; }

.wf-path-nodes { position: relative; width: 100%; height: 100%; }
.wf-node {
  position: absolute; left: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--wf-bg-0); border: 2px solid rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center;
  color: var(--wf-text-faint); font-size: 11px; font-weight: 800;
  transition: border-color 0.3s var(--wf-ease), background 0.3s var(--wf-ease), box-shadow 0.3s var(--wf-ease), color 0.3s;
}
.wf-node[data-state="done"] { border-color: var(--wf-accent-c); color: var(--wf-accent-c); }
.wf-node[data-state="active"] {
  border-color: var(--wf-accent-a); color: #05070d;
  background: linear-gradient(120deg, var(--wf-accent-a), var(--wf-accent-b));
  box-shadow: 0 0 0 6px rgba(91,124,255,0.16), 0 0 30px rgba(91,124,255,0.5);
}

/* ── 우측: Live Preview ────────────────────────────────── */
.wf-preview-wrap { position: relative; min-height: 420px; }
.wf-preview {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--wf-border); border-radius: 28px;
  padding: clamp(24px, 3vw, 34px);
}
.wf-preview-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wf-text-faint); margin: 0 0 6px; }
.wf-preview-title { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 800; margin: 0 0 22px; }

/* 공용: 카드/청크 */
.wf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid var(--wf-border); color: var(--wf-text-dim);
}

/* 1) Keyword mock */
.wf-mock-input {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--wf-border); margin-bottom: 16px;
  font-size: 15px; font-weight: 700; color: var(--wf-text);
}
.wf-mock-input .cursor { display: inline-block; width: 2px; height: 18px; background: var(--wf-accent-a); animation: wf-blink 1s step-end infinite; }
@keyframes wf-blink { 50% { opacity: 0; } }
.wf-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 2) Brain mock */
.wf-mock-brain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wf-mock-brain-card {
  padding: 14px 8px; text-align: center; border-radius: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--wf-border); color: var(--wf-text-faint);
}
.wf-mock-brain-card svg { width: 20px; height: 20px; margin-bottom: 6px; }
.wf-mock-brain-card span { display: block; font-size: 11px; font-weight: 600; }
.wf-mock-brain-card[data-active="true"] {
  background: linear-gradient(135deg, rgba(91,124,255,0.22), rgba(139,92,246,0.1));
  border-color: rgba(139,124,255,0.5); color: var(--wf-text);
}

/* 3) Title mock */
.wf-title-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wf-title-list li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--wf-border); font-size: 13.5px; color: var(--wf-text-dim);
}
.wf-title-list li[data-picked="true"] { border-color: rgba(34,211,238,0.5); background: rgba(34,211,238,0.08); color: var(--wf-text); }
.wf-title-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: var(--wf-accent-c); color: #05070d;
}

/* 4) Content mock (스켈레톤 바) */
.wf-skeleton-line { height: 11px; border-radius: 999px; background: rgba(255,255,255,0.08); margin-bottom: 10px; }
.wf-skeleton-line:nth-child(3n) { width: 92%; }
.wf-skeleton-line:nth-child(3n+1) { width: 100%; }
.wf-skeleton-line:nth-child(3n+2) { width: 78%; }
.wf-mock-stat { margin-top: 18px; }

/* 5) Image mock */
.wf-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wf-image-block {
  aspect-ratio: 4/3; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--wf-accent-a), var(--wf-accent-b));
}
.wf-image-block:nth-child(2) { background: linear-gradient(135deg, var(--wf-accent-c), var(--wf-accent-a)); }
.wf-image-block:nth-child(3) { background: linear-gradient(135deg, #ff9850, var(--wf-accent-b)); }
.wf-image-block:nth-child(4) { background: linear-gradient(135deg, #34d399, var(--wf-accent-c)); }
.wf-image-block span {
  position: absolute; left: 8px; bottom: 8px; font-size: 10px; font-weight: 700;
  color: #05070d; background: rgba(255,255,255,0.75); padding: 3px 8px; border-radius: 999px;
}

/* 6) SEO mock */
.wf-seo-score { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.wf-seo-score-ring {
  position: relative;
  width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--wf-accent-c) calc(var(--wf-score, 0) * 1%), rgba(255,255,255,0.08) 0);
  display: flex; align-items: center; justify-content: center;
}
.wf-seo-score-ring::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--wf-bg-0);
}
.wf-seo-score-num { position: relative; z-index: 1; font-size: 15px; font-weight: 800; }
.wf-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wf-checklist li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--wf-text-dim); }
.wf-check-dot {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(52,211,153,0.16); color: #34d399; display: flex; align-items: center; justify-content: center; font-size: 11px;
}

/* 7) Publishing mock */
.wf-channel-list { display: flex; flex-direction: column; gap: 10px; }
.wf-channel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--wf-border);
}
.wf-channel-name { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--wf-text); }
.wf-channel-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #34d399; }
.wf-channel-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.wf-channel-status[data-tone="pending"] { color: #fbbf24; }
.wf-channel-status[data-tone="pending"] .dot { background: #fbbf24; }

/* 8) Analytics mock */
.wf-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.wf-kpi-card { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--wf-border); }
.wf-kpi-card .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wf-kpi-card .l { font-size: 11px; color: var(--wf-text-faint); margin-top: 2px; }
.wf-chart { height: 64px; }
.wf-chart svg { width: 100%; height: 100%; }
.wf-chart path.line { fill: none; stroke: var(--wf-accent-c); stroke-width: 2; }
.wf-chart path.fill { fill: url(#wfChartGradient); opacity: 0.45; stroke: none; }

/* ── Reveal 대상 초기 상태(FOUC 방지) ───────────────────── */
.wf-anim-item { opacity: 0; }

/* ── Tablet/Mobile: Vertical Stepper + Preview 아래 배치 ── */
@media (max-width: 1023px) {
  /* 스펙 §Mobile: Vertical Stepper + Preview 아래 배치 — 가로 배치로 바꾸지 않고
     Desktop의 세로 목록을 그대로 유지하되(중앙 경로만 숨김) 한 줄에 맞게 압축한다. */
  .wf-layout { grid-template-columns: 1fr; }
  .wf-path-wrap { display: none; }
  .wf-nav { flex-direction: column; margin-bottom: 24px; }
  .wf-step-btn { min-height: 44px; }
  .wf-step-desc { display: none; }
}

@media (max-width: 480px) {
  .wf-kpi-grid, .wf-mock-brain-grid { grid-template-columns: repeat(2, 1fr); }
  .wf-image-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .wf-root *, .wf-root *::before, .wf-root *::after { transition-duration: 0.1s !important; animation-duration: 0.1s !important; }
  .wf-anim-item { opacity: 1 !important; transform: none !important; }
}
