/* ═══════════════════════════════════════════════════════════════════════
   ReferNex Marketplace — Design Tokens (from Design.md)
   All values map directly to the ReferNex design system.
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ── Typography ────────────────────────────────────────────────── */
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 30px;
    --font-size-3xl: 36px;
    --font-size-4xl: 48px;
    --font-weight-light: 300;
    --font-weight-base: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --line-height-base: 24px;
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* ── Colors — Dark Theme ──────────────────────────────────────── */
    --color-text-primary: #f4f4f5;
    --color-text-secondary: #8b96a5;
    --color-text-tertiary: #06090f;
    --color-text-inverse: #f59e0b;
    --color-surface-base: #000000;
    --color-surface-muted: #0f141e;
    --color-surface-strong: #60a5fa;
    --color-surface-elevated: #1a1f2e;
    --color-surface-card: #0d1117;
    --color-border-default: #e5e7eb;
    --color-border-muted: #ffffff;
    --color-border-subtle: rgba(255, 255, 255, 0.06);
    --color-border-strong: rgba(229, 231, 235, 0.15);

    /* ── Semantic Colors ──────────────────────────────────────────── */
    --color-success: #22c55e;
    --color-success-muted: rgba(34, 197, 94, 0.15);
    --color-error: #ef4444;
    --color-error-muted: rgba(239, 68, 68, 0.15);
    --color-warning: #f59e0b;
    --color-warning-muted: rgba(245, 158, 11, 0.15);
    --color-info: #3b82f6;
    --color-info-muted: rgba(59, 130, 246, 0.15);
    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-accent-muted: rgba(96, 165, 250, 0.15);

    /* ── Spacing ──────────────────────────────────────────────────── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 10px;
    --space-4: 14px;
    --space-5: 16px;
    --space-6: 20px;
    --space-7: 24px;
    --space-8: 28px;
    --space-9: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* ── Border Radius ────────────────────────────────────────────── */
    --radius-xs: 14px;
    --radius-sm: 18px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* ── Shadows ──────────────────────────────────────────────────── */
    --shadow-1: rgba(0, 0, 0, 0.8) 0px 12px 32px -8px, rgba(255, 255, 255, 0.05) 0px 1px 0px 0px inset;
    --shadow-2: rgba(0, 0, 0, 0.8) 0px 12px 32px -8px, rgba(255, 255, 255, 0.05) 0px 1px 0px 0px inset;
    --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.2);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-none: none;

    /* ── Motion ───────────────────────────────────────────────────── */
    --motion-instant: 150ms;
    --motion-fast: 300ms;
    --motion-normal: 400ms;
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);

    /* ── Z-Index ──────────────────────────────────────────────────── */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;

    /* ── Layout ───────────────────────────────────────────────────── */
    --container-max: 1280px;
    --sidebar-width: 260px;
    --header-height: 64px;

    /* ── Responsive Breakpoints (used in queries) ────────────────── */
    @custom-media --mobile (max-width: 767px);
    @custom-media --tablet (min-width: 768px) and (max-width: 1023px);
    @custom-media --desktop (min-width: 1024px);
}

/* ── Responsive Utility Classes ──────────────────────────────────── */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-mobile-block { display: none; }
.d-mobile-flex { display: none; }

/* Mobile-first responsive helpers */
@media (max-width: 767px) {
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
    .d-mobile-flex { display: flex !important; }
    .text-center-mobile { text-align: center !important; }
    .w-full-mobile { width: 100% !important; }
    .gap-mobile-0 { gap: 0 !important; }
}
@media (min-width: 768px) {
    .d-desktop-none { display: none !important; }
    .d-desktop-block { display: block !important; }
    .d-desktop-flex { display: flex !important; }
    .d-desktop-inline { display: inline !important; }
}

/* Container responsive */
@media (max-width: 767px) {
    .container { padding: 0 var(--space-4); }
}

/* Section responsive */
@media (max-width: 767px) {
    .section { padding: var(--space-8) 0; }
}

/* Grid responsive overrides */
@media (max-width: 767px) {
    .grid-2-mobile { grid-template-columns: 1fr 1fr !important; }
}
