/* ==========================================================================
   palettes.css — 13단원 시대·인물별 컬러 토큰
   ==========================================================================
   각 단원은 .unit-NN 클래스를 body에 부여하여 활성화.
   토큰 5종:
     --bg     : 메인 배경 (장면 기본 캔버스)
     --bg-alt : 보조 배경 (장면 전환·강조 배경)
     --accent : 강조 색 (제목·핵심 키워드)
     --text   : 본문 텍스트 색
     --muted  : 부제·캡션·시대 표기

   톤 키워드는 STORY_VIDEO_GUIDE.md §4.3과 동기화.
   ========================================================================== */

/* ─── Unit 01 · 에라토스테네스 · BCE 240 알렉산드리아 ────────────────────────
   tone: sand + night sky (지중해 모래 + 별 헤는 밤하늘) */
.unit-01 {
  --bg:      #0f172a;  /* night sky */
  --bg-alt:  #1e293b;  /* deep slate */
  --accent:  #f4a261;  /* desert sand gold */
  --text:    #f8fafc;
  --muted:   #94a3b8;
}

/* ─── Unit 02 · 브라마굽타 · 628 인도 라자스탄 ────────────────────────────
   tone: saffron + indigo (사프란 + 인디고) */
.unit-02 {
  --bg:      #1e1b4b;  /* deep indigo */
  --bg-alt:  #312e81;  /* indigo shade */
  --accent:  #fb923c;  /* saffron orange */
  --text:    #fef3c7;  /* warm cream */
  --muted:   #a5b4fc;  /* indigo light */
}

/* ─── Unit 03 · 알콰리즈미 · 820 바그다드 (이슬람 황금기) ────────────────
   tone: gold + teal (이슬람 모자이크의 금빛 + 청록) */
.unit-03 {
  --bg:      #134e4a;  /* deep teal */
  --bg-alt:  #115e59;  /* teal shade */
  --accent:  #fbbf24;  /* islamic gold */
  --text:    #f0fdfa;
  --muted:   #5eead4;
}

/* ─── Unit 04 · 디오판토스 · 250 알렉산드리아 후기 ───────────────────────
   tone: parchment + crimson (양피지 + 진홍 잉크) */
.unit-04 {
  --bg:      #292524;  /* dark parchment */
  --bg-alt:  #44403c;  /* aged paper */
  --accent:  #dc2626;  /* crimson ink */
  --text:    #fef3c7;  /* warm parchment */
  --muted:   #a8a29e;
}

/* ─── Unit 05 · 데카르트 · 1637 네덜란드/프랑스 ─────────────────────────
   tone: snow + ink (눈 덮인 유럽의 겨울 + 검은 잉크) */
.unit-05 {
  --bg:      #f8fafc;  /* snow white */
  --bg-alt:  #e2e8f0;  /* light slate */
  --accent:  #1e40af;  /* deep ink blue */
  --text:    #0f172a;
  --muted:   #64748b;
}

/* ─── Unit 06 · 데카르트 (2) · 1637 같은 시대, 다른 강조 ───────────────
   tone: snow + sky (눈 + 청명한 하늘) — 정비례·반비례의 곡선감 */
.unit-06 {
  --bg:      #f1f5f9;
  --bg-alt:  #cbd5e1;
  --accent:  #0891b2;  /* sky cyan */
  --text:    #0f172a;
  --muted:   #475569;
}

/* ─── Unit 07 · 유클리드 · BCE 300 알렉산드리아 ──────────────────────────
   tone: marble + olive (그리스 대리석 + 올리브) */
.unit-07 {
  --bg:      #fafaf9;  /* marble white */
  --bg-alt:  #e7e5e4;  /* marble shade */
  --accent:  #65a30d;  /* olive green */
  --text:    #292524;
  --muted:   #78716c;
}

/* ─── Unit 08 · 유클리드 (2) · 작도 — 같은 시대, 강조색 변화 ─────────
   tone: marble + terracotta (대리석 + 테라코타) */
.unit-08 {
  --bg:      #fafaf9;
  --bg-alt:  #e7e5e4;
  --accent:  #c2410c;  /* terracotta */
  --text:    #292524;
  --muted:   #78716c;
}

/* ─── Unit 09 · 가우스 · 1796 독일 ────────────────────────────────────
   tone: forest + bronze (검은 숲 + 청동) */
.unit-09 {
  --bg:      #0c1f17;  /* dark forest */
  --bg-alt:  #1f2e23;
  --accent:  #ca8a04;  /* bronze gold */
  --text:    #ecfdf5;
  --muted:   #86efac;
}

/* ─── Unit 10 · 아르키메데스 · BCE 287~212 시라쿠사(시칠리아) ─────────
   tone: mediterranean + amber (지중해 청 + 호박) */
.unit-10 {
  --bg:      #082f49;  /* mediterranean deep */
  --bg-alt:  #0c4a6e;
  --accent:  #f59e0b;  /* amber */
  --text:    #f0f9ff;
  --muted:   #7dd3fc;
}

/* ─── Unit 11 · 케플러 · 1571~1630 독일/오스트리아 ───────────────────
   tone: cosmos + copper (밤하늘 우주 + 구리) */
.unit-11 {
  --bg:      #1e1b4b;  /* deep cosmos */
  --bg-alt:  #2e1065;  /* purple void */
  --accent:  #b87333;  /* copper */
  --text:    #ede9fe;
  --muted:   #a78bfa;
}

/* ─── Unit 12 · 카발리에리 · 1598~1647 이탈리아 ───────────────────────
   tone: tuscan + slate (토스카나 황토 + 슬레이트) */
.unit-12 {
  --bg:      #1c1917;  /* slate dark */
  --bg-alt:  #292524;
  --accent:  #d97706;  /* tuscan ochre */
  --text:    #fef3c7;
  --muted:   #a8a29e;
}

/* ─── Unit 13 · 나이팅게일 · 1820~1910 영국 ───────────────────────────
   tone: rose + slate (코크스콤 차트의 분홍 + 슬레이트) */
.unit-13 {
  --bg:      #1e293b;  /* victorian slate */
  --bg-alt:  #334155;
  --accent:  #ec4899;  /* rose */
  --text:    #f1f5f9;
  --muted:   #cbd5e1;
}

/* ─── 공통 ─────────────────────────────────────────────────────────────
   모든 단원에 적용되는 기본 토큰 */
:root {
  --canvas-w: 1280px;
  --canvas-h: 720px;

  /* Typography stack — guide §4.2 */
  --font-serif: 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --font-sans:  'Noto Sans KR', system-ui, sans-serif;

  /* Scene scale tokens */
  --title-size:    64px;
  --subtitle-size: 22px;
  --body-size:     28px;
  --caption-size:  18px;

  /* Default light-mode fallbacks */
  --bg:      #0f172a;
  --bg-alt:  #1e293b;
  --accent:  #f59e0b;
  --text:    #f8fafc;
  --muted:   #94a3b8;
}
