/* ==========================================================================
   FlowCraft Design Tokens — Dark Mode
   Backup of original light-mode tokens is in assets/css/backup/tokens.css
   ========================================================================== */

:root {
  /* --- Colors --- */
  --color-accent:       #0082B6;
  --color-accent-dark:  #006a94;
  --color-bg:           #0B0D14;   /* dark page background */
  --color-surface:      #141720;   /* card / section surface */
  --color-surface-dark: #1C2033;   /* elevated: modals, dropdowns */
  --color-text:         #F0F2F6;   /* headings, high-emphasis */
  --color-body:         #B0BDCB;   /* body copy */
  --color-muted:        #4B5563;   /* borders, dividers */
  --color-muted-text:   #6B7280;   /* captions, secondary labels */
  --color-white:        #FFFFFF;
  --color-star:         #F5A623;
  --color-black:        #000000;
  --color-footer-bg:    #0B0D14;   /* footer — always dark, never overridden */

  /* --- Typography --- */
  --font-primary: 'Figtree', system-ui, -apple-system, sans-serif;

  --font-size-h1: clamp(2.5rem, 6vw, 5rem);
  --font-size-h2: clamp(2rem, 4.5vw, 3.5rem);
  --font-size-h3: clamp(1.5rem, 3vw, 2.25rem);
  --font-size-h4: clamp(1.25rem, 2.5vw, 1.75rem);
  --font-size-h5: clamp(1.125rem, 2vw, 1.375rem);
  --font-size-h6: 1rem;
  --font-size-body: 1.125rem;
  --font-size-small: 0.875rem;
  --font-size-xs: 0.75rem;

  --font-weight-heading: 500;
  --font-weight-body: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --line-height-heading: 1.1;
  --line-height-body: 1.65;
  --line-height-tight: 1.2;

  --letter-spacing-heading: -0.02em;
  --letter-spacing-tight: -0.03em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.12em;

  /* --- Spacing --- */
  --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 */

  /* --- Section padding --- */
  --section-padding-y: clamp(3rem, 6vw, 5rem);
  --section-padding-x: clamp(1.25rem, 5vw, 3.125rem);

  /* --- Container --- */
  --container-max:    1200px;
  --container-wide:   1440px;
  --container-narrow: 800px;

  /* --- Border radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* --- Icon sizes --- */
  --icon-sm: 16px;
  --icon-md: 24px;
  --icon-lg: 32px;

  /* --- Nav --- */
  --nav-font-size: 1rem;

  /* --- Buttons --- */
  --btn-font-size: 0.9375rem;

  /* --- Shadows (stronger opacity for dark backgrounds) --- */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.7);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-index --- */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-overlay:  100;
  --z-modal:    200;
  --z-nav:      300;
  --z-toast:    400;

  /* --fc-* aliases — design-system.css uses these; they point here so
     both token systems share one source of truth and .is-light-page works for both */
  --fc-base:          var(--color-bg);
  --fc-base-2:        var(--color-surface);
  --fc-base-3:        var(--color-surface-dark);
  --fc-base-4:        var(--color-surface-dark);
  --fc-primary:       var(--color-accent);
  --fc-primary-dark:  var(--color-accent-dark);
  --fc-primary-light: #3AAFD6;
  --fc-primary-dim:   rgba(0, 130, 182, 0.12);
  --fc-secondary:     var(--color-muted-text);
  --fc-neutral:       var(--color-muted);
  --fc-neutral-light: var(--color-muted-text);
  --fc-white:         var(--color-white);
  --fc-text:          var(--color-text);
  --fc-text-muted:    var(--color-body);
  --fc-text-faint:    var(--color-muted-text);
}

/* ==========================================================================
   Light page override — blog posts, content pages, article templates
   Apply .is-light-page to <body> via body_class() or page template.
   Footer and nav are NOT affected (they use --color-footer-bg and fixed values).
   ========================================================================== */

.is-light-page {
  --color-bg:           #FFFFFF;
  --color-surface:      #F5F5F5;
  --color-surface-dark: #E8E8E8;
  --color-text:         #0B0D14;
  --color-body:         #374151;
  --color-muted:        #D1D5DB;
  --color-muted-text:   #6B7280;
}

/* Breakpoints (reference — use in media queries):
   Desktop:  1200px
   Tablet:   810px
   Mobile:  <810px
*/
