/* ============================================
   Design Tokens — Public Site
   Structured naming: --{category}-{property}-{variant}
   ============================================ */

:root {
  /* --- Color: Backgrounds --- */
  --color-bg-primary: #ffffff;
  --color-bg-primary-rgb: 255, 255, 255;
  --color-bg-secondary: #f1f1f1;
  --color-bg-form: #f5f5f5;
  --color-bg-surface-dark: #111111;
  --color-bg-surface-medium: #414040;
  --color-bg-viewer: rgb(60, 59, 58);

  /* --- Color: Text --- */
  --color-text-primary: #4d4949;
  --color-text-secondary: #666666;
  --color-text-tertiary: #b2b1a9;
  --color-text-metadata: #999999;
  --color-text-form: #333333;
  --color-text-on-dark: #ffffff;

  /* --- Color: Title Bar --- */
  --color-titlebar-bg: transparent;
  --color-titlebar-text: #ffffff;
  --color-titlebar-text-alt: #000000;

  /* --- Color: Accent --- */
  --color-accent-default: #3b4a57;
  --color-accent-default-rgb: 59, 74, 87;
  --color-accent-active: #2d3842;
  --color-accent-hover: #4c5d6d;
  --color-accent-subtle: rgba(59, 74, 87, 0.2);

  /* --- Color: Border --- */
  --color-border-default: #4d4c4c;

  /* --- Color: Feedback --- */
  --color-error: #dc3545;

  /* --- Typography --- */
  --font-sans: "Noto Sans", sans-serif;
  --font-serif: "Crimson Text", serif;

  /* --- Typography Scale --- */
  --text-sm: 13px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;

  /* --- Spacing Scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;

  /* --- Layout --- */
  --content-max-width: 1200px;

  /* --- Radius --- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

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

  /* --- Line Heights --- */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.8;

  /* --- Letter Spacing --- */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.04em;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* --- Color: Semantic --- */
  --color-success: #2e7d4f;
  --color-warning: #b8860b;
  --color-info: #3b6fa0;

  /* --- Transitions --- */
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;

  /* --- Hover Effects --- */
  --hover-lift: translateY(-2px);
  --hover-scale: scale(1.02);
  --transition-hover: transform var(--duration-slow) ease;
}

[data-theme="dark"] {
  /* --- Backgrounds --- */
  --color-bg-primary: #323031;
  --color-bg-primary-rgb: 50, 48, 49;
  --color-bg-secondary: #383637;
  --color-bg-form: #2a2a2a;
  --color-bg-surface-dark: #1a1a1a;
  --color-bg-surface-medium: #3a3939;
  --color-bg-viewer: #2c2b2a;

  /* --- Text --- */
  --color-text-primary: #f0f0f0;
  --color-text-secondary: #bbbbbb;
  --color-text-tertiary: #8a8982;
  --color-text-metadata: #777777;
  --color-text-form: #cccccc;
  --color-text-on-dark: #ffffff;

  /* --- Title Bar --- */
  --color-titlebar-bg: transparent;
  --color-titlebar-text-alt: #ffffff;

  /* --- Accent --- */
  --color-accent-default: #5a6d7d;
  --color-accent-default-rgb: 90, 109, 125;
  --color-accent-active: #4a5d6d;
  --color-accent-hover: #6a7d8d;
  --color-accent-subtle: rgba(90, 109, 125, 0.25);

  /* --- Border --- */
  --color-border-default: #555555;

  /* --- Feedback --- */
  --color-error: #ff6b6b;

  /* --- Shadows (dark) --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3);

  /* --- Semantic Colors (dark) --- */
  --color-success: #3dba78;
  --color-warning: #e5a63e;
  --color-info: #5a7ea6;
}
