/* Narani · Time Bank — Design Tokens · Warm Watercolor Healing (Upgrade 28 → 29)
 * Pretendard Variable (sans: numbers, buttons, captions) + Gowun Dodum (soft rounded Korean display:
 * titles, guard letters) + Fraunces Soft (English display + the wordmark), all bundled locally
 * (OFL-1.1, assets/fonts/) and precached by sw.js, so the offline PWA never falls back to a system font.
 */

@font-face {
  font-family: 'Pretendard Variable';
  font-style: normal;
  font-weight: 45 930;
  font-display: swap;
  src: url('../assets/fonts/PretendardVariable-ks.woff2') format('woff2-variations'),
    url('../assets/fonts/PretendardVariable-ks.woff2') format('woff2');
}

/* Upgrade 32: the in-house Narani Font (© WISE Co., Ltd.) leads Korean display text; Gowun Dodum stays a fallback */
@font-face {
  font-family: 'Narani Font';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/NaraniFont-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Gowun Dodum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/GowunDodum-Regular-ks.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/Fraunces-Soft-latin.woff2') format('woff2-variations'),
    url('../assets/fonts/Fraunces-Soft-latin.woff2') format('woff2');
}

:root {
  /* Watercolor cotton-paper surfaces */
  --bg: #f4ede2;
  --bg-soft: #efe6d7;
  --surface: #fbf6ee;
  --surface-1: #fbf6ee;
  --surface-2: #f5ede1;
  --surface-3: #efe6d7;
  --milk-tea: #efe6d7;

  /* Hairlines in sepia, never brown outlines */
  --hairline: rgba(62, 49, 40, 0.1);
  --hairline-strong: rgba(62, 49, 40, 0.16);
  --border: rgba(62, 49, 40, 0.12);
  --border-strong: rgba(62, 49, 40, 0.18);

  /* Sepia ink (no pure black anywhere) */
  --ink: #3e3128;
  --ink-1: #3e3128;
  --ink-2: #5f4e41;
  --ink-3: #7a685a;
  --ink-on-solid: #fbf6ee;

  /* Warm fills: walnut for actions, terracotta accent, sage moss for selection */
  --solid: #5b4334;
  --solid-hover: #4c382b;
  --terracotta: #b26948;
  --accent: #b26948;
  --accent-hover: #9c5a3c;
  --accent-soft: #f6e6da;
  --sage: #6f8665;
  --sage-soft: #e6ede1;
  /* WCAG AA (>= 4.5:1) companions for small text: same hues, deeper */
  --sage-ink: #4f6446;
  --sage-deep: #566b4d;
  --terracotta-ink: #8f4a2c;
  --gold: #9c7424;
  --gold-ink: #80601f; /* gold text on gold-soft / paper: >= 5:1 (Upgrade 30 plaque) */
  --gold-soft: #f7efdc;
  --danger: #b4483f;
  --danger-soft: #f8e8e5;

  /* Cotton paper: inline SVG grain (0 external bytes) over a sunlight/peach + sage wash */
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .29 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper-wash: radial-gradient(120% 60% at 12% 0%, rgba(243, 196, 160, 0.3), rgba(243, 196, 160, 0) 62%),
    radial-gradient(90% 55% at 92% 4%, rgba(176, 199, 160, 0.26), rgba(176, 199, 160, 0) 60%),
    radial-gradient(80% 45% at 50% 100%, rgba(239, 230, 215, 0.6), rgba(239, 230, 215, 0) 70%);
  --paper: var(--paper-grain), var(--paper-wash), var(--surface-1);

  /* Single soft shadow family */
  --shadow-sm: 0 1px 2px rgba(62, 49, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(62, 49, 40, 0.08);
  --shadow-soft: 0 10px 30px rgba(91, 67, 52, 0.14);
  --shadow-lg: 0 18px 48px rgba(24, 17, 12, 0.18);

  /* Corners: 20 (sheets, cards) / 14 (controls) */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* 4pt spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Type scale: Display 28/700 · Title 20/650 · Body 15/450 (1.55) · Caption 12/500 */
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-display-kr: 'Narani Font', 'Gowun Dodum', 'Fraunces', 'Pretendard Variable', sans-serif;
  --font-display-en: 'Fraunces', 'Narani Font', 'Gowun Dodum', Georgia, serif;
  --font-wordmark: 'Fraunces', Georgia, serif;
  /* Display face follows the document language (html[lang]) */
  --font-serif: var(--font-display-kr);
  --fs-display: 28px;
  --fw-display: 700;
  --fs-title: 20px;
  --fw-title: 650;
  --fs-body: 15px;
  --fw-body: 450;
  --lh-body: 1.55;
  --fs-caption: 12px;
  --fw-caption: 500;

  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html[lang='en'] {
  --font-serif: var(--font-display-en);
}
