/* AEO Checker — 2DOT 브랜드 통일판 (DESIGN.md v2, 2026-07-10)
   구 네온민트 팔레트 → 보라+노랑. 셀렉터는 유지, 토큰만 교체 (app.js 무수정) */
:root {
  --bg: #17102B;            /* --ink */
  --surface: #1F1738;       /* 보라 틴트 서피스 */
  --border: #322850;
  --violet: #5B2EFF;
  --violet-lt: #B9A8FF;     /* 다크 위 보라 텍스트용 (8.8:1) */
  --yellow: #FFD02F;
  --text: #EDE9F6;
  --text-secondary: #A79DBE;
  --alert: #FF7A93;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  word-break: keep-all;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  position: relative;
}

/* ── 히어로 앰비언트 마크 (creatip.co.kr 역기획: 대형 워터마크 심볼, 2026-07-22 — offer.html 히어로와 동일 장치) ── */
.watermark-wrap {
  position: absolute;
  right: -160px;
  top: -40px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.brandline, header, #diagnose-form, #result, #cta, .faq, footer.brand-foot {
  position: relative;
  z-index: 1;
}
@media (max-width: 480px) {
  .watermark-wrap { right: -220px; opacity: 0.08; }
}

/* 2DOT 브랜드 라인 */
.brandline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.brandline .mark { animation: spin 60s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.brandline span { margin-left: auto; }
.brandline a {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--violet-lt);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.brandline a:hover { color: var(--yellow); }

.eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--violet-lt);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--violet);
}

header h1 {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.22;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
header h1 .hl {
  position: relative;
  display: inline-block;
  padding: 0 0.14em;
  color: var(--text);
  z-index: 0;
  animation: hl-text 0.5s ease 0.3s forwards;
}
header h1 .hl::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
  animation: hl-sweep 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}
@keyframes hl-sweep { to { transform: scaleX(1); } }
@keyframes hl-text { 0%, 54% { color: var(--text); } 100% { color: var(--bg); } }

.sub {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── 스탯 밴드 (creatip.co.kr 역기획: 01/02/03 인덱스 + 헤어라인 구획, 2026-07-22) ── */
.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}
.stat-item {
  padding: 1.4rem 1rem;
  border-left: 1px solid var(--border);
  transition: background 0.2s;
}
.stat-item:first-child { border-left: none; }
.stat-item:hover { background: rgba(91, 46, 255, 0.1); }
.stat-item:hover .stat-idx { color: var(--yellow); }
.stat-item:hover .stat-num { transform: scale(1.05); }
.stat-idx {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--violet-lt);
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.stat-num {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0.3rem 0 0.2rem;
  white-space: nowrap;
  transform-origin: left;
  transition: transform 0.2s;
}
.stat-num.stat-accent {
  color: var(--yellow);
  font-size: clamp(1.25rem, 4.4vw, 1.9rem);
}
.stat-num i { font-style: normal; }
.stat-plus {
  font-size: 0.5em;
  font-weight: 700;
  margin-left: 0.1em;
  color: var(--text-secondary);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
@media (max-width: 480px) {
  .stat-band { grid-template-columns: 1fr; }
  .stat-item { border-left: none; border-top: 1px solid var(--border); padding: 1rem 0.2rem; }
  .stat-item:first-child { border-top: none; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

#diagnose-form, #email-form {
  display: flex;
  gap: 0.5rem;
}

.faq h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.faq-item {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.faq-item:first-of-type {
  border-top: none;
}

.faq-item h3 {
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.faq-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9375rem;
}

input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(91, 46, 255, 0.25);
}

button {
  background: var(--yellow);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover { transform: translateY(-1px); }
button:active { transform: scale(0.98); }

.hidden { display: none; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.55;
  cursor: pointer;
}
.consent input { margin-top: 0.2rem; accent-color: #5B2EFF; }

.score {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--yellow);
}

.check-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.check-row:last-child { border-bottom: none; }

.pass { color: var(--violet-lt); }
.fail { color: var(--alert); }

.category-label {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.25rem 0 0.25rem;
}

.category-label:first-of-type { margin-top: 1rem; }

.check-item .check-row { border-bottom: none; padding-bottom: 0.25rem; }

.fix-box {
  position: relative;
  margin: 0 0 0.75rem;
}

.fix-snippet {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0;
  font-family: "D2Coding", ui-monospace, "Courier New", monospace;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--violet-lt);
  border: 1px solid var(--border);
}

.copy-btn:hover { background: var(--border); }

.prescription {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

footer.brand-foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
footer.brand-foot a { color: var(--violet-lt); text-decoration: none; }
footer.brand-foot a:hover { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  .brandline .mark { animation: none; }
  header h1 .hl, header h1 .hl::before { animation: none; color: var(--bg); transform: none; }
  .watermark-wrap { transition: none; }
}

/* ── v2.1 결과 UX (2026-07-10 벤치마크 반영: 게이지 링 + 판정 + 카테고리 요약 + 실측 detail) ── */
.score-wrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 0.75rem;
}
.ring { flex: none; }
.ring .track { stroke: var(--border); }
.ring .bar { transition: stroke-dashoffset 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.verdict {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.verdict.ok { color: var(--violet-lt); }
.verdict.warn { color: var(--yellow); }
.verdict.bad { color: var(--alert); }
.score-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.6;
}
.sum-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}
.chiplet {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.chiplet.done { border-color: var(--violet); color: var(--violet-lt); }
.check-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.1rem 0 0.5rem;
  line-height: 1.55;
}
.next-steps {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.5rem;
}
.next-steps a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.2s;
}
.next-steps a:hover { border-color: var(--violet); }
.next-steps a small {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--violet-lt);
  white-space: nowrap;
}
.loading-line {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  animation: pulse 1.2s ease infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .loading-line { animation: none; }
  .ring .bar { transition: none; }
}

/* ── 반응형 (2026-07-10 감사: 모바일 브레이크포인트 부재 해소) ── */
@media (max-width: 480px) {
  .wrap { padding: 2.2rem 1.1rem 3rem; }
  #diagnose-form, #email-form { flex-direction: column; }
  #diagnose-form button, #email-form button { width: 100%; }
  .score-wrap { flex-wrap: wrap; gap: 1rem; }
  .next-steps a { flex-wrap: wrap; }
  .brandline a { letter-spacing: 0.02em; }
}
