/* ============================================================
   Planner's Desk — base.css
   디자인 시스템: 변수 · 리셋 · 공통 타이포 · 네비게이션
   ============================================================ */

/* ---------- 1. 디자인 토큰 (화이트 = 기본) ---------- */
:root {
  /* 컬러 */
  --bg:        #fafbfc;   /* 사이트 배경 (쿨 화이트) */
  --bg-soft:   #ffffff;   /* 카드/패널 */
  --bg-raised: #ffffff;   /* 떠 있는 요소 */
  --line:      #e6e8ec;   /* 경계선 */
  --gold:      #2563eb;   /* 강조색 (세련된 블루) */
  --gold-dim:  #1d4ed8;
  --text:      #111418;   /* 본문 검정 */
  --text-soft: #4b5563;   /* 보조 텍스트 */
  --text-mute: #9097a1;   /* 흐린 텍스트 */

  /* 타이포 */
  --font-brand: "Playfair Display", "Noto Serif KR", Georgia, serif;
  --font-body:  "Pretendard", "Noto Sans KR", system-ui, sans-serif;

  /* 간격 · 라운드 */
  --gap: 1rem;
  --radius: 14px;
  --radius-sm: 8px;

  /* 모션 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.4s;

  /* 레이아웃 */
  --nav-h: 64px;
  --maxw: 1180px;
}

/* 다크 톤 (토글 옵션) */
:root[data-theme="dark"] {
  --bg:        #1a1714;
  --bg-soft:   #221e1a;
  --bg-raised: #2b2620;
  --line:      #3a342c;
  --gold:      #e8b84b;
  --gold-dim:  #b8902f;
  --text:      #f3ece0;
  --text-soft: #b8af9f;
  --text-mute: #7d7468;
}

/* ---------- 2. 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- 3. 공통 타이포 ---------- */
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
.text-soft { color: var(--text-soft); }
.gold { color: var(--gold); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* 접근성: 모션 줄이기 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 4. 네비게이션 ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* 제목 자리 — 좌측 여백만 차지 (홈 클릭 영역) */
.site-nav__home { width: 38px; height: 38px; }
.site-nav__links { display: flex; gap: 1.75rem; align-items: center; }
.site-nav__links a {
  position: relative;
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
  transition: color 0.25s var(--ease);
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { color: var(--text); }
.site-nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.site-nav__actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.nav-btn:hover { color: var(--gold); border-color: var(--gold-dim); }

/* 모바일 */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .site-nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
    transform: translateY(-120%);
    transition: transform var(--speed) var(--ease);
  }
  .site-nav__links[data-open="true"] { transform: translateY(0); }
  .site-nav__links a { padding: 0.85rem 1.5rem; width: 100%; }
  .nav-toggle { display: grid; }
}
