/* 몰입(MOLIP) — 디자인 토큰 & 베이스 · V3 다크 프리미엄
   웜 차콜 배경 + 호박/골드 액센트 + 발광 디테일 + 명조 헤딩.
   키워드: 깊이감, 발광, 정확한 그리드, 메탈릭한 디테일. */

:root {
  /* ---- 베이스 : 웜 차콜 ---- */
  --bg: #15110e;
  --bg-raised: #1c1814;
  --bg-inset: #100c0a;

  --cream: #f0e7d8;
  --ink: #f4ecdc;
  --ink-mid: #a89c8a;
  --ink-soft: #5e544a;

  --hair: rgba(240, 231, 216, 0.1);
  --hair-soft: rgba(240, 231, 216, 0.05);
  --hair-strong: rgba(240, 231, 216, 0.2);

  /* ---- 액센트 : 호박/골드 ---- */
  --amber: #e2a565;
  --amber-soft: rgba(226, 165, 101, 0.18);
  --amber-glow: rgba(226, 165, 101, 0.55);
  --amber-grad-end: oklch(0.7 0.13 60);

  /* ---- 4분면 그룹 컬러 (결과에서 유형별로 적용) ---- */
  --nt: oklch(0.62 0.16 290); /* 분석가 — 보라 */
  --nf: oklch(0.66 0.12 155); /* 외교관 — 초록 */
  --sj: oklch(0.62 0.13 240); /* 관리자 — 파랑 */
  --sp: oklch(0.74 0.13 75); /* 탐험가 — 골드 */

  /* 현재 그룹 색 — 기본은 앰버, 결과 화면에서 JS가 교체 */
  --group: var(--amber);
  --group-glow: var(--amber-glow);

  --focus-ring: var(--amber);

  /* ---- 타이포그래피 ---- */
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --fs-display: clamp(2.8rem, 11vw, 4.4rem);
  --fs-title: clamp(1.9rem, 6.4vw, 2.7rem);
  --fs-heading: 1.3rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-micro: 0.75rem;

  --lh-tight: 1.12;
  --lh-snug: 1.42;
  --lh-relaxed: 1.72;

  /* ---- 간격 ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ---- 형태 ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.32);
  --shadow-deep: 0 24px 64px rgba(0, 0, 0, 0.5);

  /* ---- 모션 ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 640ms;

  --container: 600px;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* 배경 발광 글로우 — 깊이감을 만드는 V3의 핵심 디테일 */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

body::before {
  top: -22vh;
  right: -28vw;
  width: 80vw;
  height: 80vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(circle, var(--group) 0%, transparent 62%);
  opacity: 0.22;
  transition: background var(--dur-slow) var(--ease);
}

body::after {
  bottom: -20vh;
  left: -30vw;
  width: 76vw;
  height: 76vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, var(--nt) 0%, transparent 62%);
  opacity: 0.14;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  word-break: keep-all;
}

p {
  word-break: keep-all;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--amber-soft);
  color: var(--cream);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
