/* ============================================================
   klukvaCloud — Design Tokens (Flat 2.0 / Editorial Minimalism)
   ============================================================ */

:root {
  /* ---- Brand (klukvaCloud Cranberry) ---- */
  --cranberry-100: #D03767;
  --cranberry-200: #BE2E52;
  --cranberry-300: #B12742;
  --cranberry-400: #A42032;
  --cranberry-500: #98171F;

  --brand-500: var(--cranberry-300);   /* primary accent */
  --brand-600: var(--cranberry-400);   /* hover */
  --brand-700: var(--cranberry-500);   /* active / dark */
  --brand-400: var(--cranberry-200);   /* light accent */
  --brand-50:  #fff0f3;                /* ultra-light pink */
  --brand-100: #ffe3e8;                /* light highlight pink */

  /* ---- New Accents (Indigo & Teal for technical contrast) ---- */
  --accent-indigo: #4F46E5;
  --accent-teal: #0891B2;
  --accent-orange: #EA580C;

  /* ---- Neutral (Slate - Editorial Apple/Vercel style) ---- */
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --paper:   #ffffff;

  /* ---- Semantic (light theme defaults) ---- */
  --bg:            #ffffff;
  --bg-subtle:     #f8fafc;
  --bg-elevated:   #ffffff;
  --bg-inverse:    #0f172a;
  --surface:       #ffffff;
  --surface-2:     #f1f5f9;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:          #0f172a;
  --text-muted:    #475569;
  --text-subtle:   #64748b;
  --text-inverse:  #ffffff;
  --text-brand:    var(--brand-600);

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* ---- Typography (Clean Grotesk / Inter) ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans); /* Use sans-serif for everything now */
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code",
               Menlo, Consolas, monospace;

  --fs-xs:   0.75rem;   
  --fs-sm:   0.875rem;  
  --fs-base: 1rem;      
  --fs-md:   1.125rem;  
  --fs-lg:   1.375rem;  
  --fs-xl:   1.75rem;   
  --fs-2xl:  2.25rem;   
  --fs-3xl:  3.25rem;   
  --fs-4xl:  4.25rem;   
  --fs-5xl:  5.5rem;    

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-normal: 1.6;
  --lh-relaxed: 1.8;

  --tracking-tight: -0.03em;
  --tracking-snug:  -0.015em;
  --tracking-wide:  0.02em;
  --tracking-caps:  0.08em;

  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- Spacing scale ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;
  --sp-12: 12rem; /* Added for extreme negative space */

  /* ---- Layout ---- */
  --container: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  /* ---- Radius (Flat 2.0 / Apple Structural) ---- */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* ---- Shadow (Ultra-soft Flat 2.0 micro-shadows) ---- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.05), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.08);
  
  --shadow-glow-cranberry: 0 8px 32px rgba(208, 55, 103, 0.15);
  --shadow-glow-indigo: 0 8px 32px rgba(79, 70, 229, 0.15);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 500ms;

  --z-header: 100;
  --z-dropdown: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  color-scheme: light;
}

/* ---- Dark theme ---- */
:root[data-theme="dark"], [data-theme="dark"] {
  --bg:            #0f172a;
  --bg-subtle:     #1e293b;
  --bg-elevated:   #1e293b;
  --bg-inverse:    #ffffff;
  --surface:       #1e293b;
  --surface-2:     #334155;
  --border:        #334155;
  --border-strong: #475569;

  --text:          #f8fafc;
  --text-muted:    #94a3b8;
  --text-subtle:   #64748b;
  --text-inverse:  #0f172a;
  --text-brand:    var(--brand-400);

  --brand-500: var(--cranberry-100);
  --brand-600: var(--cranberry-200);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
  }
}
