/* SecondFamily Design System — tokens
   --------------------------------------------------------------
   Single source of truth for color, type, spacing, radius, shadow.
   90% neutral + 10% sage accent. No emoji. SVG icons only.
*/

/* --- Pretendard ----------------------------------------------- */
@font-face {
  font-family: "Pretendard";
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/woff2/PretendardVariable.woff2") format("woff2-variations");
}

:root {
  /* === BRAND ============================================= */
  --sage-50:  #EAF5EF;
  --sage-100: #D4EBDF;
  --sage-200: #A7D7BD;
  --sage-300: #7AC39B;
  --sage-400: #4CAF7D;   /* PRIMARY brand accent */
  --sage-500: #3F9C6E;   /* hover / pressed */
  --sage-600: #338058;
  --sage-700: #266142;

  --brand:           var(--sage-400);
  --brand-hover:     var(--sage-500);
  --brand-pressed:   var(--sage-600);
  --brand-soft:      var(--sage-50);

  /* === NEUTRALS (90% of every screen) =================== */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F8F9FA;
  --neutral-100: #F3F4F6;   /* canonical badge / chip / tag bg */
  --neutral-200: #E5E7EB;
  --neutral-300: #D1D5DB;
  --neutral-400: #9CA3AF;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #0B0F14;

  /* === SEMANTIC FOREGROUND =============================== */
  --fg-1: var(--neutral-900);   /* headings */
  --fg-2: var(--neutral-700);   /* body */
  --fg-3: var(--neutral-500);   /* secondary */
  --fg-4: var(--neutral-400);   /* placeholder / hint */
  --fg-on-brand: #FFFFFF;
  --fg-link: var(--sage-500);

  /* === SEMANTIC BACKGROUND =============================== */
  --bg-page:    var(--neutral-0);
  --bg-subtle:  var(--neutral-50);
  --bg-chip:    var(--neutral-100);   /* unified badge bg */
  --bg-elevated: var(--neutral-0);
  --bg-overlay: rgba(11, 15, 20, 0.48);

  /* === BORDER ============================================ */
  --border-subtle:  var(--neutral-200);
  --border-default: var(--neutral-300);
  --border-strong:  var(--neutral-400);
  --border-focus:   var(--brand);

  /* === STATUS DOTS ====================================== */
  --status-pending: #C9A227;
  --status-active:  var(--sage-400);
  --status-error:   #C0392B;
  --status-info:    #6B7280;
  --status-offline: #9CA3AF;

  /* === TYPE ============================================== */
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont,
               "system-ui", "Apple SD Gothic Neo", "Noto Sans KR",
               "Malgun Gothic", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;

  --t-display-l-size: 56px;  --t-display-l-lh: 1.20; --t-display-l-w: 700; --t-display-l-tr: -0.03em;
  --t-display-m-size: 36px;  --t-display-m-lh: 1.34; --t-display-m-w: 700; --t-display-m-tr: -0.027em;
  --t-heading-l-size: 28px;  --t-heading-l-lh: 1.36; --t-heading-l-w: 700; --t-heading-l-tr: -0.022em;
  --t-heading-m-size: 24px;  --t-heading-m-lh: 1.40; --t-heading-m-w: 600; --t-heading-m-tr: -0.018em;
  --t-heading-s-size: 20px;  --t-heading-s-lh: 1.40; --t-heading-s-w: 600; --t-heading-s-tr: -0.014em;
  --t-body-l-size:    17px;  --t-body-l-lh:    1.50; --t-body-l-w:    500; --t-body-l-tr:    0;
  --t-body-m-size:    16px;  --t-body-m-lh:    1.50; --t-body-m-w:    500; --t-body-m-tr:    0.006em;
  --t-body-s-size:    14px;  --t-body-s-lh:    1.50; --t-body-s-w:    500; --t-body-s-tr:    0.006em;
  --t-caption-size:   13px;  --t-caption-lh:   1.40; --t-caption-w:   500; --t-caption-tr:   0.006em;
  --t-micro-size:     11px;  --t-micro-lh:     1.36; --t-micro-w:     600; --t-micro-tr:     0.02em;

  /* === SPACING (4-pt scale) ============================== */
  --space-1:  4px;  --space-2:  8px;  --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-32: 128px;

  /* === RADIUS ============================================ */
  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 20px; --radius-2xl: 24px; --radius-pill: 9999px;

  /* === SHADOW =========================================== */
  --shadow-sm: 0 1px 2px rgba(17,24,39,0.04), 0 1px 1px rgba(17,24,39,0.03);
  --shadow-md: 0 8px 24px rgba(17,24,39,0.08);

  /* === MOTION =========================================== */
  --ease-standard:   cubic-bezier(0.2, 0, 0, 1);
  --ease-decelerate: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro:  200ms;
  --dur-screen: 320ms;

  /* === LAYOUT =========================================== */
  --gutter-mobile: 20px;
  --gutter-desktop: 32px;
  --max-content: 1200px;
  --topbar-mobile: 56px;
  --tabbar-mobile: 64px;
  --topbar-desktop: 64px;
}

/* === BASE ================================================ */
html, body {
  background: var(--bg-page);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: var(--t-body-m-size);
  line-height: var(--t-body-m-lh);
  letter-spacing: var(--t-body-m-tr);
  font-weight: var(--t-body-m-w);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === SEMANTIC TYPE CLASSES ============================== */
.t-display-l { font-size: var(--t-display-l-size); line-height: var(--t-display-l-lh); font-weight: var(--t-display-l-w); letter-spacing: var(--t-display-l-tr); color: var(--fg-1); }
.t-display-m { font-size: var(--t-display-m-size); line-height: var(--t-display-m-lh); font-weight: var(--t-display-m-w); letter-spacing: var(--t-display-m-tr); color: var(--fg-1); }
.t-heading-l { font-size: var(--t-heading-l-size); line-height: var(--t-heading-l-lh); font-weight: var(--t-heading-l-w); letter-spacing: var(--t-heading-l-tr); color: var(--fg-1); }
.t-heading-m { font-size: var(--t-heading-m-size); line-height: var(--t-heading-m-lh); font-weight: var(--t-heading-m-w); letter-spacing: var(--t-heading-m-tr); color: var(--fg-1); }
.t-heading-s { font-size: var(--t-heading-s-size); line-height: var(--t-heading-s-lh); font-weight: var(--t-heading-s-w); letter-spacing: var(--t-heading-s-tr); color: var(--fg-1); }
.t-body-l    { font-size: var(--t-body-l-size);    line-height: var(--t-body-l-lh);    font-weight: var(--t-body-l-w);    letter-spacing: var(--t-body-l-tr); }
.t-body-m    { font-size: var(--t-body-m-size);    line-height: var(--t-body-m-lh);    font-weight: var(--t-body-m-w);    letter-spacing: var(--t-body-m-tr); }
.t-body-s    { font-size: var(--t-body-s-size);    line-height: var(--t-body-s-lh);    font-weight: var(--t-body-s-w);    letter-spacing: var(--t-body-s-tr); }
.t-caption   { font-size: var(--t-caption-size);   line-height: var(--t-caption-lh);   font-weight: var(--t-caption-w);   letter-spacing: var(--t-caption-tr); color: var(--fg-3); }
.t-micro     { font-size: var(--t-micro-size);     line-height: var(--t-micro-lh);     font-weight: var(--t-micro-w);     letter-spacing: var(--t-micro-tr); }

h1 { font-size: var(--t-display-m-size); line-height: var(--t-display-m-lh); font-weight: 700; letter-spacing: -0.027em; color: var(--fg-1); margin: 0; }
h2 { font-size: var(--t-heading-l-size); line-height: var(--t-heading-l-lh); font-weight: 700; letter-spacing: -0.022em; color: var(--fg-1); margin: 0; }
h3 { font-size: var(--t-heading-m-size); line-height: var(--t-heading-m-lh); font-weight: 600; letter-spacing: -0.018em; color: var(--fg-1); margin: 0; }
h4 { font-size: var(--t-heading-s-size); line-height: var(--t-heading-s-lh); font-weight: 600; letter-spacing: -0.014em; color: var(--fg-1); margin: 0; }
p, li { color: var(--fg-2); }
small { font-size: var(--t-caption-size); color: var(--fg-3); }
code, pre { font-family: var(--font-mono); font-size: 13px; }

/* === FOCUS RING ======================================== */
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
