/* ==========================================================================
   solo.link — Design Token System (Light & Dark Mode)
   Linear / Vercel / Stripe / Notion Polish · 8px Grid · Self-Hosted Type
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* 1. Brand Emerald Scale (50–900) */
  --emerald-50: #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-200: #A7F3D0;
  --emerald-300: #6EE7B7;
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065F46;
  --emerald-900: #064E3B;

  /* 2. Neutral Slate/Zinc Scale (50–950) */
  --neutral-0: #FFFFFF;
  --neutral-50: #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-300: #CBD5E1;
  --neutral-400: #94A3B8;
  --neutral-500: #64748B;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1E293B;
  --neutral-900: #0F172A;
  --neutral-950: #090D16;

  /* 3. Semantic Surface & Text Tokens (Light Mode) */
  --bg-canvas: var(--neutral-50);
  --bg-surface: var(--neutral-0);
  --bg-elevated: var(--neutral-0);
  --bg-muted: var(--neutral-100);
  --bg-subtle: #F4F7FA;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-500);
  --text-inverse: var(--neutral-0);

  --border-hairline: var(--neutral-200);
  --border-strong: var(--neutral-300);

  /* Brand Accent Aliases */
  --color-brand-primary: var(--emerald-500);
  --color-brand-primary-hover: var(--emerald-600);
  --color-brand-light: var(--emerald-50);
  --color-brand-border: var(--emerald-200);
  --color-primary: var(--emerald-500);
  --color-primary-hover: var(--emerald-600);
  --color-primary-tint: var(--emerald-100);
  --color-primary-subtle: var(--emerald-50);
  --color-primary-ink: #052E16;

  --color-black: var(--neutral-900);
  --color-white: var(--neutral-0);

  /* 4. Semantic Status Tokens */
  --color-success: #16A34A;
  --status-success-bg: #F0FDF4;
  --status-success-border: #BBF7D0;
  --status-success-text: #15803D;

  --color-danger: #DC2626;
  --status-danger-bg: #FEF2F2;
  --status-danger-border: #FECACA;
  --status-danger-text: #B91C1C;

  --color-info: #2563EB;
  --status-info-bg: #EFF6FF;
  --status-info-border: #BFDBFE;
  --status-info-text: #1D4ED8;

  --color-warning: #D97706;
  --status-warning-bg: #FFFBEB;
  --status-warning-border: #FDE68A;
  --status-warning-text: #B45309;

  /* Extended Pastel Accents */
  --accent-amber-bg: #FEF3C7;
  --accent-amber-text: #B45309;
  --accent-lavender-bg: #F3E8FF;
  --accent-lavender-text: #7E22CE;
  --accent-sky-bg: #E0F2FE;
  --accent-sky-text: #0369A1;
  --accent-rose-bg: #FFE4E6;
  --accent-rose-text: #BE123C;

  /* 5. Typography Scale */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-display: clamp(2.25rem, 4.2vw, 3.5rem);
  --text-h1: clamp(1.75rem, 2.6vw, 2.25rem);
  --text-h2: clamp(1.375rem, 2vw, 1.875rem);
  --text-h3: 1.25rem;
  --text-h4: 1.0625rem;
  --text-body: 1rem;
  --text-sm: 0.9375rem;
  --text-caption: 0.8125rem;

  --tracking-tight: -0.03em;
  --tracking-heading: -0.02em;
  --leading-tight: 1.12;
  --leading-snug: 1.3;
  --leading-body: 1.6;

  /* 6. Spacing Scale (8px Grid) */
  --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;

  /* 7. Radii & Depth (Soft Layered Shadows) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08), 0 24px 48px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 0 1px rgba(16, 185, 129, 0.18), 0 20px 50px rgba(16, 185, 129, 0.16);

  /* 8. Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 250ms;

  /* 9. Layout Dimensions */
  --container-max: 1200px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 76px;
  --topbar-height: 64px;
}

/* ==========================================================================
   Dark Mode Token Overrides ([data-theme="dark"])
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #090D16;
  --bg-surface: #0F172A;
  --bg-elevated: #162033;
  --bg-muted: #1E293B;
  --bg-subtle: #131C2E;
  --bg-glass: rgba(15, 23, 42, 0.82);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --text-inverse: #090D16;

  --border-hairline: #1E293B;
  --border-strong: #334155;

  --color-white: #0F172A;
  --color-black: #F8FAFC;

  --color-primary: #10B981;
  --color-primary-hover: #34D399;
  --color-primary-tint: rgba(16, 185, 129, 0.18);
  --color-primary-subtle: rgba(16, 185, 129, 0.10);
  --color-brand-border: rgba(52, 211, 153, 0.32);

  --status-success-bg: rgba(22, 163, 74, 0.14);
  --status-success-border: rgba(74, 222, 128, 0.28);
  --status-success-text: #4ADE80;

  --status-danger-bg: rgba(220, 38, 38, 0.16);
  --status-danger-border: rgba(248, 113, 113, 0.3);
  --status-danger-text: #FCA5A5;

  --status-info-bg: rgba(37, 99, 235, 0.16);
  --status-info-border: rgba(96, 165, 250, 0.3);
  --status-info-text: #93C5FD;

  --status-warning-bg: rgba(217, 119, 6, 0.16);
  --status-warning-border: rgba(251, 191, 36, 0.3);
  --status-warning-text: #FCD34D;

  --accent-amber-bg: rgba(245, 158, 11, 0.16);
  --accent-amber-text: #FCD34D;
  --accent-lavender-bg: rgba(168, 85, 247, 0.16);
  --accent-lavender-text: #D8B4FE;
  --accent-sky-bg: rgba(14, 165, 233, 0.16);
  --accent-sky-text: #7DD3FC;
  --accent-rose-bg: rgba(244, 63, 94, 0.16);
  --accent-rose-text: #FDA4AF;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 16px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 28px 56px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(52, 211, 153, 0.28), 0 24px 60px rgba(16, 185, 129, 0.22);
}
