/* ============================================================
   tokens.css — Design Tokens
   Single source of truth for breakpoints, colors, typography,
   spacing, and reader theme variables.
   TWEAK: Adjust values here to re-skin the entire app.
   WHY: All other CSS files reference these custom properties.
        Never hardcode pixel values, hex colors, or rems elsewhere.
   ============================================================ */

:root {
  color-scheme: light dark;

  /* ---------- Breakpoints (desktop-first) -------------------- */
  --bp-mobile:  480px;
  --bp-tablet:  768px;
  --bp-desktop: 1024px;
  --bp-wide:    1280px;

  /* ---------- Brand palette ----------------------------------
     Ink colors. They must stay readable on every surface, and
     --color-text-inverse must stay readable on the brand and
     state fills (buttons, heroes, badges). Themes retune these. */
  --color-brand-primary:    #1F5C40;
  --color-brand-secondary:  #174A34;
  --color-brand-accent:     #8FB8A4;
  --color-brand-gold:       #7A5200;
  --color-accent:           #1F5C40;

  /* ---------- Surface (light theme defaults) ---------------- */
  --color-bg:               #FFFFFF;
  --color-bg-secondary:     #F4F6F8;
  --color-bg-subtle:        #E7EDF2;
  --color-surface:          #FFFFFF;
  --color-surface-raised:   #FFFFFF;
  --color-border:           #E2E8F0;

  /* ---------- Text ------------------------------------------- */
  --color-text:             #1A202C;
  --color-text-primary:     #1A202C;
  --color-text-secondary:   #4A5568;
  --color-text-muted:       #5A6A7A;
  --color-text-inverse:     #FFFFFF;
  --color-heading:          #1A202C;

  /* ---------- State ------------------------------------------ */
  --color-success:          #1B5E3B;
  --color-warning:          #7A4E00;
  --color-error:            #B42318;
  --color-info:             #1D4E89;

  /* ---------- Bible reader themes (light variants) ----------- */
  --reader-bg-default:      #FFFFFF;
  --reader-bg-sepia:        #F5EDD6;
  --reader-bg-night:        #1A1A2E;
  --reader-bg-forest:       #1B3A2D;
  --reader-bg-dusk:         #2D1B69;
  --reader-text:            #1A202C;
  --reader-font-size:       1rem; /* TWEAK range: 0.75rem to 1.375rem */

  /* ---------- Typography ------------------------------------- */
  --font-sans:    'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif:   'Georgia', 'Times New Roman', serif;
  --font-mono:    ui-monospace, 'Courier New', monospace;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;

  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.75;

  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* ---------- Spacing scale ---------------------------------- */
  --space-0:   0;
  --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;

  /* ---------- Borders & shadows ------------------------------ */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-pill: 9999px;

  --shadow-sm:  0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md:  0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg:  0 12px 32px rgba(15, 23, 42, 0.12);

  /* ---------- Layout dimensions ------------------------------ */
  --sidebar-width:  240px;
  --header-height:  64px;
  --footer-height:  48px;
  --content-max:    1200px;
  /* Height of the mobile bottom nav. Fixed-position overlays that must not
     hide behind it (e.g. the reader's chapter rails) offset by this. Keep in
     step with .mobile-nav's padding + item height in components.css. */
  --mobile-nav-height: 72px;

  /* ---------- Motion ----------------------------------------- */
  --t-fast:  120ms;
  --t-base:  200ms;
  --t-slow:  320ms;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
}
