/* Design Tokens - Matching CF Developer Starter Kit design system
   Reference: dev-plat-channel-feedback-developer-enablment-landing-page.thomas-development.workers.dev */

:root {
  /* === BRAND COLORS (exact match) === */
  --cf-orange: #ff4801;
  --cf-orange-hover: #e54100;
  --cf-orange-light: rgba(255, 72, 1, 0.1);
  --cf-orange-5: rgba(255, 72, 1, 0.05);
  --cf-orange-glow: rgba(255, 72, 1, 0.2);

  /* === TEXT COLORS (exact match) === */
  --cf-text: #521000;
  --cf-text-muted: #7a4a3a;
  --cf-text-subtle: rgba(82, 16, 0, 0.55);

  /* === BACKGROUND COLORS (exact match) === */
  --cf-bg: #fffbf5;
  --cf-bg-alt: #fff7ed;
  --cf-bg-card: #ffffff;
  --cf-bg-code: #faf8f5;
  --cf-text-code: #393a34;

  /* === BORDER COLORS (exact match) === */
  --cf-border: #ebd5c1;
  --cf-border-light: #f5e6d8;
  --cf-border-50: rgba(235, 213, 193, 0.5);

  /* === SEMANTIC ALIASES === */
  --bg-primary: var(--cf-bg);
  --bg-secondary: var(--cf-bg-card);
  --bg-tertiary: var(--cf-bg-alt);
  --bg-surface: var(--cf-bg-card);

  --text-primary: var(--cf-text);
  --text-secondary: var(--cf-text-muted);
  --text-tertiary: var(--cf-text-subtle);

  --border-primary: var(--cf-border);
  --border-secondary: var(--cf-border-light);
  --border-muted: var(--cf-border-light);

  --accent-primary: var(--cf-orange);
  --accent-secondary: var(--cf-orange-hover);

  /* === SPACING SYSTEM === */
  --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-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;

  /* === TYPOGRAPHY (matching reference: Inter + JetBrains Mono) === */
  --font-primary: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Font Sizes (matching reference Tailwind scale) */
  --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 */

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* === LAYOUT === */
  --header-height: 56px;
  --sidebar-width: 300px;
  --content-max-width: 900px;
  --layout-max-width: 1152px; /* max-w-6xl = 72rem */
  --layout-max-width-7xl: 1280px;

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* === BORDER RADIUS (matching reference) === */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 0.75rem; /* 12px - rounded-lg */
  --radius-xl: 1rem; /* 16px - rounded-xl */
  --radius-pill: 9999px; /* rounded-full */

  /* === SHADOWS (warm-tinted for cohesion with cream palette) === */
  --shadow-sm: 0 1px 2px rgba(82, 16, 0, 0.06);
  --shadow-md:
    0 4px 6px -1px rgba(82, 16, 0, 0.08), 0 2px 4px -2px rgba(82, 16, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(82, 16, 0, 0.08), 0 4px 6px -4px rgba(82, 16, 0, 0.06);
  --shadow-glow: 0 4px 12px var(--cf-orange-glow);

  /* === ANIMATION (matching reference) === */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* === COMPONENT TOKENS === */
  --nav-height: var(--header-height);
  --nav-z-index: 50;

  --button-radius: var(--radius-pill);
  --button-font-weight: var(--weight-medium);

  --card-padding: var(--space-5);
  --card-radius: var(--radius-xl);
  --card-border: 1px solid var(--cf-border);

  --progress-height: 6px;
  --progress-radius: var(--radius-pill);

  /* === Z-INDEX === */
  --z-base: 1;
  --z-sidebar: 40;
  --z-overlay: 40;
  --z-header: 50;
  --z-modal: 200;
  --z-tooltip: 300;
}

/* === DARK MODE ===
   Inspired by workers.cloudflare.com & sandbox.cloudflare.com
   Activated via .dark class on <html> element */
html.dark {
  /* Brand (orange stays consistent) */
  --cf-orange: #ff6b2b;
  --cf-orange-hover: #ff8a50;
  --cf-orange-light: rgba(255, 107, 43, 0.12);
  --cf-orange-5: rgba(255, 107, 43, 0.06);
  --cf-orange-glow: rgba(255, 107, 43, 0.25);

  /* Text */
  --cf-text: #f0ece8;
  --cf-text-muted: #a8a0a0;
  --cf-text-subtle: rgba(240, 236, 232, 0.5);

  /* Backgrounds */
  --cf-bg: #0a0a0a;
  --cf-bg-alt: #111111;
  --cf-bg-card: #161616;
  --cf-bg-code: #121212;
  --cf-text-code: #dbd7ca;

  /* Borders */
  --cf-border: #2a2a2a;
  --cf-border-light: #222222;
  --cf-border-50: rgba(42, 42, 42, 0.5);

  /* Shadows (darker for dark mode) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 4px 12px var(--cf-orange-glow);
}
