/* ==========================================================================
   Design Tokens — Glassy Comics
   Light mode is default; dark mode overrides via prefers-color-scheme.
   ========================================================================== */

:root {
  /* ---- Color Palette (Light) ---- */
  --color-bg:             #fafaf9;
  --color-bg-alt:         #f5f5f4;
  --color-bg-subtle:      #e7e5e4;
  --color-surface:        rgba(255, 255, 255, 0.75);
  --color-surface-solid:  #ffffff;
  --color-surface-hover:  rgba(255, 255, 255, 0.9);
  --color-border:         rgba(12, 10, 9, 0.07);
  --color-border-strong:  rgba(12, 10, 9, 0.12);

  --color-text:           #1c1917;
  --color-text-secondary: #57534e;
  --color-text-tertiary:  #a8a29e;

  --color-accent:         #d97706;
  --color-accent-hover:   #b45309;
  --color-accent-soft:    rgba(217, 119, 6, 0.10);
  --color-accent-text:    #92400e;

  /* Gradient mesh blobs */
  --mesh-amber:   rgba(217, 119, 6,  0.06);
  --mesh-sky:     rgba(14, 165, 233, 0.04);
  --mesh-violet:  rgba(168, 85, 247, 0.03);

  /* Device frame */
  --device-bezel:  #1c1917;
  --device-screen: #000000;

  /* Shadows */
  --shadow-xs:   0 1px 2px  rgba(0, 0, 0, 0.04);
  --shadow-sm:   0 2px 4px  rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 80px rgba(217, 119, 6, 0.10);

  /* ---- Typography ---- */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
               ui-monospace, monospace;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */
  --text-7xl:  4.5rem;     /* 72px */

  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.6;

  --tracking-tight:  -0.025em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;

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

  /* ---- Radii ---- */
  --radius-sm:   0.375rem;
  --radius-md:   0.625rem;
  --radius-lg:   1rem;
  --radius-xl:   1.25rem;
  --radius-2xl:  1.75rem;
  --radius-full: 9999px;

  /* ---- Transitions ---- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;

  /* ---- Z-index ---- */
  --z-base:    1;
  --z-sticky:  100;
  --z-overlay: 200;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --container-narrow: 800px;
  --nav-height: 3.5rem;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:             #09090b;
    --color-bg-alt:         #131316;
    --color-bg-subtle:      #1e1e22;
    --color-surface:        rgba(255, 255, 255, 0.04);
    --color-surface-solid:  #18181b;
    --color-surface-hover:  rgba(255, 255, 255, 0.07);
    --color-border:         rgba(255, 255, 255, 0.07);
    --color-border-strong:  rgba(255, 255, 255, 0.12);

    --color-text:           #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-tertiary:  #63636e;

    --color-accent:         #f59e0b;
    --color-accent-hover:   #fbbf24;
    --color-accent-soft:    rgba(245, 158, 11, 0.10);
    --color-accent-text:    #fbbf24;

    --mesh-amber:  rgba(245, 158, 11, 0.07);
    --mesh-sky:    rgba(14, 165, 233, 0.05);
    --mesh-violet: rgba(168, 85, 247, 0.04);

    --device-bezel:  #000000;
    --device-screen: #000000;

    --shadow-xs:   0 1px 2px  rgba(0, 0, 0, 0.20);
    --shadow-sm:   0 2px 4px  rgba(0, 0, 0, 0.25);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.30);
    --shadow-lg:   0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.40);
    --shadow-glow: 0 0 100px rgba(245, 158, 11, 0.08);
  }
}
