/* style.css — ExternFlow Design System
   Custom palette: Deep charcoal surfaces + vibrant cyan-teal accent
   Fonts: Sora (display) + Inter (body)
   Aesthetic: Premium SaaS — Linear/Vercel energy
*/

/* ============================================
   CUSTOM PALETTE — EXTERNFLOW
   Dark charcoal surfaces, vibrant teal accent
   ============================================ */

:root, [data-theme="light"] {
  /* --- Surfaces (Light: Soft Slate) --- */
  --color-bg:               #f4f5f7;
  --color-surface:          #f9fafc;
  --color-surface-2:        #ffffff;
  --color-surface-offset:   #edeef1;
  --color-surface-offset-2: #e5e6ea;
  --color-surface-dynamic:  #dcdee3;
  --color-divider:          #d4d6dc;
  --color-border:           #caccd3;

  /* Hero section always dark regardless of mode */
  --color-hero-bg:          #0e1117;
  --color-hero-surface:     #141820;
  --color-hero-surface-2:   #1c2230;
  --color-hero-border:      rgba(255,255,255,0.08);
  --color-hero-text:        #f1f3f9;
  --color-hero-text-muted:  #8892a4;

  /* --- Text (Slate) --- */
  --color-text:             #14181f;
  --color-text-muted:       #6b7280;
  --color-text-faint:       #b0b4be;
  --color-text-inverse:     #f9fafc;

  /* --- Primary Accent (Cyan-Teal — vibrant, pops on dark and light) --- */
  --color-primary:          #0cc8c0;
  --color-primary-hover:    #0ab5ae;
  --color-primary-active:   #089e98;
  --color-primary-highlight: #d0f5f3;
  --color-primary-subtle:   rgba(12, 200, 192, 0.12);

  /* --- Secondary / Alternate (Electric Blue) --- */
  --color-secondary:        #4f7ef8;
  --color-secondary-hover:  #3d6ef0;
  --color-secondary-highlight: #dce9ff;

  /* --- Semantic Colors --- */
  --color-success:          #22c55e;
  --color-success-highlight: #dcfce7;
  --color-warning:          #f59e0b;
  --color-warning-highlight: #fef3c7;
  --color-error:            #ef4444;
  --color-error-highlight:  #fee2e2;

  /* --- Radius --- */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Shadows (cool-tinted for slate surfaces) --- */
  --shadow-sm: 0 1px 2px oklch(0.15 0.02 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.15 0.02 240 / 0.10);
  --shadow-lg: 0 12px 32px oklch(0.15 0.02 240 / 0.14);
  --shadow-glow: 0 0 32px oklch(0.73 0.16 185 / 0.25);

  /* --- Content widths --- */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;
  --content-full:    100%;

  /* --- Spacing System (4px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Fluid Type Scale --- */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(2.8rem,   0.5rem  + 6.5vw,  7rem);

  /* --- Fonts --- */
  --font-display: 'Sora', 'SF Pro Display', system-ui, sans-serif;
  --font-body:    'Inter', 'SF Pro Text', system-ui, sans-serif;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  /* --- Surfaces (Deep Charcoal) --- */
  --color-bg:               #0b0d11;
  --color-surface:          #111318;
  --color-surface-2:        #171b23;
  --color-surface-offset:   #131720;
  --color-surface-offset-2: #1a1f2b;
  --color-surface-dynamic:  #242a36;
  --color-divider:          #1e2433;
  --color-border:           #2a3040;

  /* Hero section same dark palette */
  --color-hero-bg:          #080a0e;
  --color-hero-surface:     #0f1219;
  --color-hero-surface-2:   #161c27;
  --color-hero-border:      rgba(255,255,255,0.07);
  --color-hero-text:        #e8ecf5;
  --color-hero-text-muted:  #7d8799;

  /* --- Text (Slate — Dark) --- */
  --color-text:             #e0e3eb;
  --color-text-muted:       #7a8494;
  --color-text-faint:       #3f4554;
  --color-text-inverse:     #0b0d11;

  /* --- Primary Accent (Cyan-Teal — slightly brighter on dark) --- */
  --color-primary:          #14d9d0;
  --color-primary-hover:    #0cc8c0;
  --color-primary-active:   #0ab5ae;
  --color-primary-highlight: #0d2f2e;
  --color-primary-subtle:   rgba(20, 217, 208, 0.12);

  /* --- Secondary --- */
  --color-secondary:        #6690ff;
  --color-secondary-hover:  #4f7ef8;
  --color-secondary-highlight: #1a2540;

  /* --- Semantic --- */
  --color-success:          #34d399;
  --color-success-highlight: #0c2e24;
  --color-warning:          #fbbf24;
  --color-warning-highlight: #2e2207;
  --color-error:            #f87171;
  --color-error-highlight:  #2e1414;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  --shadow-glow: 0 0 40px oklch(0.77 0.16 185 / 0.30);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #0b0d11;
    --color-surface:          #111318;
    --color-surface-2:        #171b23;
    --color-surface-offset:   #131720;
    --color-surface-offset-2: #1a1f2b;
    --color-surface-dynamic:  #242a36;
    --color-divider:          #1e2433;
    --color-border:           #2a3040;
    --color-hero-bg:          #080a0e;
    --color-hero-surface:     #0f1219;
    --color-hero-surface-2:   #161c27;
    --color-hero-border:      rgba(255,255,255,0.07);
    --color-hero-text:        #e8ecf5;
    --color-hero-text-muted:  #7d8799;
    --color-text:             #e0e3eb;
    --color-text-muted:       #7a8494;
    --color-text-faint:       #3f4554;
    --color-text-inverse:     #0b0d11;
    --color-primary:          #14d9d0;
    --color-primary-hover:    #0cc8c0;
    --color-primary-active:   #0ab5ae;
    --color-primary-highlight: #0d2f2e;
    --color-primary-subtle:   rgba(20, 217, 208, 0.12);
    --color-secondary:        #6690ff;
    --color-secondary-hover:  #4f7ef8;
    --color-secondary-highlight: #1a2540;
    --color-success:          #34d399;
    --color-success-highlight: #0c2e24;
    --color-warning:          #fbbf24;
    --color-warning-highlight: #2e2207;
    --color-error:            #f87171;
    --color-error-highlight:  #2e1414;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
    --shadow-glow: 0 0 40px oklch(0.77 0.16 185 / 0.30);
  }
}
