/* ============================================================
   나눔글꼴 — Color tokens
   A warm, humanist palette. "나눔" (sharing) green anchors the
   system; warm paper + ink neutrals carry the editorial type
   specimens. Green heritage nods to the Naver Nanum project.
   ============================================================ */

:root {
  /* ---- Brand green scale (나눔 green) ---- */
  --green-50:  #e9f9f0;
  --green-100: #c8f0d9;
  --green-200: #93e2b4;
  --green-300: #57cf8b;
  --green-400: #1fbf69;
  --green-500: #03c75a; /* signature */
  --green-600: #02a64b;
  --green-700: #04823c;
  --green-800: #0a5f2e;
  --green-900: #0c3f21;

  /* ---- Warm neutral scale (ink + paper) ---- */
  --neutral-0:   #ffffff;
  --neutral-25:  #fbfaf7; /* paper */
  --neutral-50:  #f6f4ee;
  --neutral-100: #ece9e1;
  --neutral-200: #ddd9cd;
  --neutral-300: #c4bfb1;
  --neutral-400: #9b9587;
  --neutral-500: #726d61;
  --neutral-600: #514d44;
  --neutral-700: #393630;
  --neutral-800: #24221e;
  --neutral-900: #161512; /* ink */

  /* ---- Accent (warm clay, for highlights / proofs) ---- */
  --clay-100: #fbe6da;
  --clay-300: #f0a987;
  --clay-500: #d9663a;
  --clay-700: #a8492560;

  /* ---- Functional ---- */
  --red-500:    #d64545;
  --amber-500:  #d99b1f;
  --blue-500:   #2d6fdb;

  /* ============================================================
     Semantic aliases
     ============================================================ */

  /* Surfaces */
  --surface-page:    var(--neutral-25);
  --surface-card:    var(--neutral-0);
  --surface-sunken:  var(--neutral-50);
  --surface-inverse: var(--neutral-900);
  --surface-brand:   var(--green-500);
  --surface-brand-soft: var(--green-50);

  /* Text */
  --text-strong:   var(--neutral-900);
  --text-body:     var(--neutral-700);
  --text-muted:    var(--neutral-500);
  --text-faint:    var(--neutral-400);
  --text-inverse:  var(--neutral-25);
  --text-brand:    var(--green-700);
  --text-on-brand: var(--neutral-0);

  /* Lines & borders */
  --border-subtle: var(--neutral-200);
  --border-default: var(--neutral-300);
  --border-strong: var(--neutral-900);
  --border-brand:  var(--green-500);

  /* Interactive */
  --action-bg:        var(--green-500);
  --action-bg-hover:  var(--green-600);
  --action-bg-active: var(--green-700);
  --focus-ring:       var(--green-400);
}

/* ============================================================
   나눔글꼴 — Typography tokens
   One family, four weights. Nanum Gothic is a humanist Korean
   sans ("고딕") built for screen readability — even rhythm,
   open counters, generous line spacing for Hangul.
   ============================================================ */

:root {
  /* ---- Family ---- */
  --font-sans: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic",
    system-ui, sans-serif;
  --font-display: "Nanum Gothic", "Apple SD Gothic Neo", sans-serif;

  /* ---- Weights ---- */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* ---- Type scale (rem, 16px base) ---- */
  --size-display-1: 5.5rem;   /* 88px */
  --size-display-2: 4rem;     /* 64px */
  --size-title-1:   3rem;     /* 48px */
  --size-title-2:   2.25rem;  /* 36px */
  --size-title-3:   1.75rem;  /* 28px */
  --size-heading:   1.375rem; /* 22px */
  --size-subhead:   1.125rem; /* 18px */
  --size-body:      1rem;     /* 16px */
  --size-small:     0.875rem; /* 14px */
  --size-caption:   0.75rem;  /* 12px */

  /* ---- Line heights ---- */
  --leading-tight:  1.15;  /* display */
  --leading-snug:   1.3;   /* headings */
  --leading-normal: 1.6;   /* body (Hangul comfort) */
  --leading-relaxed: 1.8;  /* long-form Korean prose */

  /* ---- Letter spacing (Hangul prefers near-zero / slightly tight) ---- */
  --tracking-tight:  -0.02em;
  --tracking-snug:   -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em; /* labels / eyebrows */

  /* ============================================================
     Semantic roles
     ============================================================ */
  --text-display: var(--weight-extrabold) var(--size-display-1) /
    var(--leading-tight) var(--font-display);
  --text-title: var(--weight-extrabold) var(--size-title-1) /
    var(--leading-snug) var(--font-display);
  --text-heading: var(--weight-bold) var(--size-heading) /
    var(--leading-snug) var(--font-sans);
  --text-body-role: var(--weight-regular) var(--size-body) /
    var(--leading-normal) var(--font-sans);
  --text-caption-role: var(--weight-regular) var(--size-caption) /
    var(--leading-snug) var(--font-sans);
}

/* ============================================================
   나눔글꼴 — Spacing, radii, shadows, borders, motion
   A calm, paper-like system. Generous whitespace, hairline
   rules, soft low shadows. Nothing flashy — type leads.
   ============================================================ */

:root {
  /* ---- Spacing scale (4px base) ---- */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */

  /* ---- Radii ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* ---- Border widths ---- */
  --border-hairline: 1px;
  --border-thick: 2px;
  --border-heavy: 3px;

  /* ---- Shadows (soft, warm, low) ---- */
  --shadow-xs: 0 1px 2px rgba(22, 21, 18, 0.06);
  --shadow-sm: 0 2px 6px rgba(22, 21, 18, 0.07);
  --shadow-md: 0 6px 18px rgba(22, 21, 18, 0.09);
  --shadow-lg: 0 16px 40px rgba(22, 21, 18, 0.12);
  --shadow-focus: 0 0 0 3px rgba(3, 199, 90, 0.35);

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.2, 0, 0.1, 1); /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --duration-fast: 120ms; /* @kind other */
  --duration-base: 200ms; /* @kind other */
  --duration-slow: 360ms; /* @kind other */

  /* ---- Layout ---- */
  --container-max: 1200px;
  --container-prose: 680px;
}


/* 버튼 (디자인 시스템 Button 컴포넌트와 동일한 규격) */
.btn { display:inline-flex; align-items:center; justify-content:center; font-family:var(--font-sans); font-weight:700; line-height:1; cursor:pointer; text-decoration:none !important; white-space:nowrap; transition:background var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard); }
.btn:active { transform:scale(0.97); }
.btn-sm { padding:8px 16px; font-size:14px; border-radius:var(--radius-sm); }
.btn-md { padding:12px 22px; font-size:16px; border-radius:var(--radius-sm); }
.btn-lg { padding:16px 30px; font-size:18px; border-radius:var(--radius-md); }
.btn-primary { background:var(--action-bg); color:var(--text-on-brand) !important; border:1px solid transparent; }
.btn-primary:hover { background:var(--action-bg-hover); }
.btn-secondary { background:var(--surface-card); color:var(--text-strong) !important; border:1px solid var(--border-default); }
.btn-secondary:hover { background:var(--surface-sunken); }
.btn:focus-visible { outline:none; box-shadow:var(--shadow-focus); }
/* 배지 */
.badge { display:inline-flex; align-items:center; font-family:var(--font-sans); font-weight:700; font-size:12px; line-height:1; letter-spacing:0.01em; padding:5px 10px; border-radius:var(--radius-pill); }
.badge-clay { background:var(--clay-100); color:var(--clay-500); }
