/* ============================================================
   ENBOX DESIGN TOKENS
   The single source of truth for the enbox product family.
   
   Design philosophy:
   - Dark-first, high contrast, terminal-native aesthetic
   - Each product gets a unique accent hue while sharing structure
   - Inspired by: Ghostty (restraint), Vercel (precision), 
     Bun (personality), Supabase (product cards), Temporal (depth)
   ============================================================ */

/* ------------------------------------------------------------ 
   GLOBAL TOKENS — Shared across all products
   ------------------------------------------------------------ */
:root {
  /* ---- Neutrals (shared dark palette) ---- */
  --gray-950: #08090a;
  --gray-900: #0e1011;
  --gray-850: #131618;
  --gray-800: #1a1d20;
  --gray-750: #21252a;
  --gray-700: #2a2f35;
  --gray-600: #3d444d;
  --gray-500: #545d69;
  --gray-400: #78828f;
  --gray-300: #a0a9b4;
  --gray-200: #c4cad1;
  --gray-100: #e2e5e9;
  --gray-50:  #f3f4f6;
  --white:    #ffffff;

  /* ---- Semantic surface layers ---- */
  --surface-0:       var(--gray-950);    /* page background */
  --surface-1:       var(--gray-900);    /* cards, panels */
  --surface-2:       var(--gray-850);    /* elevated: modals, dropdowns */
  --surface-3:       var(--gray-800);    /* interactive hover states */
  --surface-code:    var(--gray-850);    /* code blocks */
  --surface-glass:   rgba(14, 16, 17, 0.72);  /* frosted glass nav */

  /* ---- Text hierarchy ---- */
  --text-primary:    var(--gray-50);
  --text-secondary:  var(--gray-300);
  --text-tertiary:   var(--gray-400);
  --text-ghost:      var(--gray-500);
  --text-code:       var(--gray-100);

  /* ---- Borders ---- */
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-default:  rgba(255, 255, 255, 0.10);
  --border-strong:   rgba(255, 255, 255, 0.16);
  --border-accent:   var(--accent);
  
  /* ---- Typography ---- */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-display: 'Inter', var(--font-sans);

  /* Font sizes — fluid scale */
  --text-xs:    0.75rem;     /* 12px */
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  0.9375rem;   /* 15px */
  --text-lg:    1.125rem;    /* 18px */
  --text-xl:    1.3125rem;   /* 21px */
  --text-2xl:   1.75rem;     /* 28px */
  --text-3xl:   2.25rem;     /* 36px */
  --text-4xl:   3rem;        /* 48px */
  --text-5xl:   3.75rem;     /* 60px */

  /* Font weights */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Line heights */
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Letter spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-normal:   0;
  --tracking-wide:     0.04em;
  --tracking-wider:    0.08em;

  /* ---- Spacing scale (4px base) ---- */
  --space-0:   0;
  --space-1:   0.25rem;   /* 4px */
  --space-2:   0.5rem;    /* 8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */
  --space-32:  8rem;      /* 128px */

  /* ---- Layout ---- */
  --content-width:  1080px;
  --content-narrow: 720px;
  --content-wide:   1280px;
  --content-gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* ---- Borders & Radii ---- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(var(--accent-rgb), 0.12);

  /* ---- Transitions ---- */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:  120ms;
  --duration-base:  200ms;
  --duration-slow:  400ms;

  /* ---- Z-index scale ---- */
  --z-base:    1;
  --z-sticky:  100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
}


/* ============================================================
   PRODUCT ACCENT TOKENS
   Each product overrides --accent and its derivatives.
   Apply via data-product="gitd" on <html> or any container.
   ============================================================ */

/* ---- Enbox (umbrella — neutral white) ---- */
[data-product="enbox"], :root {
  --accent:         #ffffff;
  --accent-rgb:     255, 255, 255;
  --accent-hover:   #e2e5e9;
  --accent-muted:   rgba(255, 255, 255, 0.12);
  --accent-subtle:  rgba(255, 255, 255, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #ffffff, #c4cad1);
}

/* ---- gitd (mint → cyan) ---- */
[data-product="gitd"] {
  --accent:         #5ef2c8;
  --accent-rgb:     94, 242, 200;
  --accent-hover:   #7ff5d5;
  --accent-muted:   rgba(94, 242, 200, 0.12);
  --accent-subtle:  rgba(94, 242, 200, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #5ef2c8, #7ccfff);
}

/* ---- meshd (orange → amber) ---- */
[data-product="meshd"] {
  --accent:         #ff9f6a;
  --accent-rgb:     255, 159, 106;
  --accent-hover:   #ffb68a;
  --accent-muted:   rgba(255, 159, 106, 0.12);
  --accent-subtle:  rgba(255, 159, 106, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #ff9f6a, #ffc87b);
}

/* ---- memoryd (violet → lavender) ---- */
[data-product="memoryd"] {
  --accent:         #b48eff;
  --accent-rgb:     180, 142, 255;
  --accent-hover:   #c9abff;
  --accent-muted:   rgba(180, 142, 255, 0.12);
  --accent-subtle:  rgba(180, 142, 255, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #b48eff, #e0b0ff);
}

/* ---- notesd (sky blue → ice) ---- */
[data-product="notesd"] {
  --accent:         #66c2ff;
  --accent-rgb:     102, 194, 255;
  --accent-hover:   #8ad2ff;
  --accent-muted:   rgba(102, 194, 255, 0.12);
  --accent-subtle:  rgba(102, 194, 255, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #66c2ff, #a8e0ff);
}

/* ---- moneyd (gold → warm yellow) ---- */
[data-product="moneyd"] {
  --accent:         #ffc44d;
  --accent-rgb:     255, 196, 77;
  --accent-hover:   #ffd37a;
  --accent-muted:   rgba(255, 196, 77, 0.12);
  --accent-subtle:  rgba(255, 196, 77, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #ffc44d, #ffe08a);
}

/* ---- authd (rose → pink) ---- */
[data-product="authd"] {
  --accent:         #ff6b8a;
  --accent-rgb:     255, 107, 138;
  --accent-hover:   #ff8fa6;
  --accent-muted:   rgba(255, 107, 138, 0.12);
  --accent-subtle:  rgba(255, 107, 138, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #ff6b8a, #ffb3c6);
}

/* ---- sociald (emerald → green) ---- */
[data-product="sociald"] {
  --accent:         #34d399;
  --accent-rgb:     52, 211, 153;
  --accent-hover:   #5edfb1;
  --accent-muted:   rgba(52, 211, 153, 0.12);
  --accent-subtle:  rgba(52, 211, 153, 0.06);
  --accent-text:    var(--gray-950);
  --accent-gradient: linear-gradient(135deg, #34d399, #6ee7b7);
}
