/*
 * JLFG portfolio design system — v1
 * Hosted at https://jonlynchfinancial.com/css/jlfg-v1.css
 *
 * This is the shared CSS foundation for every Jon Lynch Financial Group
 * product surface. Products opt in by linking to this file rather than
 * maintaining their own tokens, so palette / typography / spacing stay
 * coherent across producerlens, mymca-desk, daytrading-swarm, dreamcleanr,
 * and the parent jonlynchfinancial.com site.
 *
 * Each product can override --brand-primary / --brand-accent in its own
 * stylesheet AFTER importing this file, to keep its individual character
 * while staying inside the shared visual vocabulary.
 *
 * Source of truth (git): jlfg-marketing/jlfg-parent/css/jlfg-v1.css
 * Deploys with: wrangler pages deploy . --project-name=jlfg-parent
 */

:root {
  /* ── Surfaces ─────────────────────────────────────────────────────────── */
  --jlfg-bg: #080c10;
  --jlfg-surface: #0e1318;
  --jlfg-surface2: #141b22;
  --jlfg-surface3: #1c2530;          /* hover / elevated */
  --jlfg-surface-glass: rgba(20, 27, 34, 0.72);
  --jlfg-overlay: rgba(8, 12, 16, 0.78);

  /* ── Borders ──────────────────────────────────────────────────────────── */
  --jlfg-border: rgba(255, 255, 255, 0.07);
  --jlfg-border-bright: rgba(255, 255, 255, 0.14);
  --jlfg-border-strong: rgba(255, 255, 255, 0.22);

  /* ── Typography ───────────────────────────────────────────────────────── */
  --jlfg-text: #e2e8f0;
  --jlfg-text-dim: #94a3b8;
  --jlfg-muted: #4a5568;
  --jlfg-font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --jlfg-font-display: "Syne", "DM Sans", system-ui, sans-serif;
  --jlfg-font-mono: "DM Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* ── Brand palette (per-product overridable) ──────────────────────────── */
  --jlfg-brand-primary: #3b82f6;     /* JLFG default = electric blue */
  --jlfg-brand-accent: #10b981;      /* JLFG default = signal green */
  --jlfg-brand-warn: #f59e0b;
  --jlfg-brand-danger: #ef4444;

  /* ── Accent palette (system-wide) ─────────────────────────────────────── */
  --jlfg-blue: #3b82f6;
  --jlfg-green: #10b981;
  --jlfg-amber: #f59e0b;
  --jlfg-red: #ef4444;
  --jlfg-purple: #8b5cf6;
  --jlfg-cyan: #06b6d4;
  --jlfg-pink: #ec4899;

  /* ── Data-viz palette (color-blind aware ordering) ────────────────────── */
  --jlfg-viz-1: #3b82f6;
  --jlfg-viz-2: #10b981;
  --jlfg-viz-3: #f59e0b;
  --jlfg-viz-4: #8b5cf6;
  --jlfg-viz-5: #06b6d4;
  --jlfg-viz-6: #ec4899;
  --jlfg-viz-7: #ef4444;
  --jlfg-viz-8: #a3e635;

  /* ── Spacing (4px base) ───────────────────────────────────────────────── */
  --jlfg-space-1: 4px;
  --jlfg-space-2: 8px;
  --jlfg-space-3: 12px;
  --jlfg-space-4: 16px;
  --jlfg-space-5: 20px;
  --jlfg-space-6: 24px;
  --jlfg-space-8: 32px;
  --jlfg-space-10: 40px;
  --jlfg-space-12: 48px;
  --jlfg-space-16: 64px;

  /* ── Radii ────────────────────────────────────────────────────────────── */
  --jlfg-radius-xs: 4px;
  --jlfg-radius-sm: 6px;
  --jlfg-radius-md: 8px;
  --jlfg-radius-lg: 12px;
  --jlfg-radius-xl: 16px;
  --jlfg-radius-pill: 999px;

  /* ── Elevation ────────────────────────────────────────────────────────── */
  --jlfg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --jlfg-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --jlfg-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --jlfg-shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 12px 40px rgba(59, 130, 246, 0.2);

  /* ── Motion ───────────────────────────────────────────────────────────── */
  --jlfg-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --jlfg-ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --jlfg-duration-fast: 120ms;
  --jlfg-duration-base: 180ms;
  --jlfg-duration-slow: 320ms;

  /* ── Layout ───────────────────────────────────────────────────────────── */
  --jlfg-page-max: 1440px;
  --jlfg-z-header: 100;
  --jlfg-z-drawer: 200;
  --jlfg-z-overlay: 250;
  --jlfg-z-palette: 300;
  --jlfg-z-toast: 400;
}

/* ── Reset (opt-in via :where to keep specificity 0) ──────────────────── */
:where(*, *::before, *::after) {
  box-sizing: border-box;
}

:where(html) {
  color-scheme: dark;
}

/* ── Reduced motion respect ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  :where(*, *::before, *::after) {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
}

/* ── Shared keyframes ─────────────────────────────────────────────────── */
@keyframes jlfg-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes jlfg-spin {
  to { transform: rotate(360deg); }
}

@keyframes jlfg-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Component primitives (BEM-namespaced under .jlfg-) ───────────────── */

.jlfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--jlfg-space-2);
  padding: var(--jlfg-space-3) var(--jlfg-space-5);
  border-radius: var(--jlfg-radius-md);
  font-family: var(--jlfg-font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--jlfg-duration-fast) var(--jlfg-ease-standard),
              background var(--jlfg-duration-fast) var(--jlfg-ease-standard),
              border-color var(--jlfg-duration-fast) var(--jlfg-ease-standard);
}

.jlfg-btn:hover { transform: translateY(-1px); }
.jlfg-btn:active { transform: translateY(0); }
.jlfg-btn:focus-visible { outline: 2px solid var(--jlfg-brand-primary); outline-offset: 2px; }

.jlfg-btn--primary {
  background: var(--jlfg-brand-primary);
  color: white;
}
.jlfg-btn--primary:hover { background: color-mix(in oklab, var(--jlfg-brand-primary) 88%, white); }

.jlfg-btn--secondary {
  background: var(--jlfg-surface2);
  color: var(--jlfg-text);
  border-color: var(--jlfg-border-bright);
}
.jlfg-btn--secondary:hover { background: var(--jlfg-surface3); }

.jlfg-btn--ghost {
  background: transparent;
  color: var(--jlfg-text-dim);
}
.jlfg-btn--ghost:hover { background: var(--jlfg-surface); color: var(--jlfg-text); }

.jlfg-card {
  background: var(--jlfg-surface);
  border: 1px solid var(--jlfg-border);
  border-radius: var(--jlfg-radius-lg);
  padding: var(--jlfg-space-6);
  transition: border-color var(--jlfg-duration-base) var(--jlfg-ease-standard),
              transform var(--jlfg-duration-base) var(--jlfg-ease-standard);
}
.jlfg-card:hover { border-color: var(--jlfg-border-bright); transform: translateY(-2px); }

.jlfg-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--jlfg-space-1);
  padding: 2px var(--jlfg-space-3);
  border-radius: var(--jlfg-radius-pill);
  background: var(--jlfg-surface2);
  border: 1px solid var(--jlfg-border);
  font-size: 11px;
  font-weight: 500;
  color: var(--jlfg-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jlfg-container {
  max-width: var(--jlfg-page-max);
  margin: 0 auto;
  padding: 0 var(--jlfg-space-8);
}

@media (max-width: 768px) {
  .jlfg-container { padding: 0 var(--jlfg-space-4); }
}

/* ── Trust-signal block (SDVOSB + SOC 2 posture + security.txt link) ───── */
.jlfg-trust {
  display: inline-flex;
  align-items: center;
  gap: var(--jlfg-space-3);
  padding: var(--jlfg-space-2) var(--jlfg-space-4);
  border-radius: var(--jlfg-radius-md);
  background: var(--jlfg-surface);
  border: 1px solid var(--jlfg-border);
  font-size: 12px;
  color: var(--jlfg-text-dim);
}

.jlfg-trust__badge {
  font-weight: 700;
  color: var(--jlfg-brand-accent);
  letter-spacing: 0.02em;
}

/* ── Print: collapse decoration, keep content readable ───────────────── */
@media print {
  :where(*) {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}
