/* Evobug Dark — Forgejo theme inspired by evobug.com.
 * Imports the stock dark theme for code highlighting / CodeMirror /
 * Chroma, then overrides the brand variables.
 *
 * Brand palette (from /srv/static/evobug.com):
 *   Backgrounds:  #06060a / #0a0a0f / #12121a / #1a1a26 / #242438
 *   Text:         #f0f0f5 / #9898b0 / #5c5c78
 *   Primary:      #8b5cf6 (with #a78bfa / #7c3aed / #6d28d9 / #5b21b6)
 *   Success:      #00c758
 *   Warning:      #fbbf24
 *   Error:        #fb2c36
 *   Accent:       #fe6e00 (orange) / #3080ff (blue)
 *   Fonts:        Outfit (display/sans), JetBrains Mono (code)
 */
@import url("theme-forgejo-dark.css");

:root {
  /* Surface scale — remapped to Evobug's near-black + purple-tinted greys */
  --steel-900: #06060a;
  --steel-850: #0a0a0f;
  --steel-800: #0e0e15;
  --steel-750: #12121a;
  --steel-700: #1a1a26;
  --steel-650: #242438;
  --steel-600: #2e2e46;
  --steel-550: #3a3a55;
  --steel-500: #4a4a65;
  --steel-450: #5c5c78;
  --steel-400: #6e6e88;
  --steel-350: #8585a0;
  --steel-300: #9898b0;
  --steel-250: #a8a8c0;
  --steel-200: #c0c0d4;
  --steel-150: #d8d8e6;
  --steel-100: #f0f0f5;

  /* Primary: Evobug purple */
  --color-primary: #8b5cf6;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #a78bfa;
  --color-primary-dark-2: #b39dfb;
  --color-primary-dark-3: #c4b5fd;
  --color-primary-dark-4: #ddd6fe;
  --color-primary-dark-5: #ede9fe;
  --color-primary-dark-6: #f5f3ff;
  --color-primary-dark-7: #ffffff;
  --color-primary-light-1: #7c3aed;
  --color-primary-light-2: #6d28d9;
  --color-primary-light-3: #5b21b6;
  --color-primary-light-4: #4c1d95;
  --color-primary-light-5: #3e1882;
  --color-primary-light-6: #2e1265;
  --color-primary-light-7: #1f0d4a;
  --color-primary-alpha-10: #8b5cf619;
  --color-primary-alpha-20: #8b5cf633;
  --color-primary-alpha-30: #8b5cf64b;
  --color-primary-alpha-40: #8b5cf666;
  --color-primary-alpha-50: #8b5cf680;
  --color-primary-alpha-60: #8b5cf699;
  --color-primary-alpha-70: #8b5cf6b3;
  --color-primary-alpha-80: #8b5cf6cc;
  --color-primary-alpha-90: #8b5cf6e1;
  --color-primary-hover: var(--color-primary-dark-1);
  --color-primary-active: var(--color-primary-light-1);

  /* Semantic status colors aligned with brand */
  --color-red: #fb2c36;
  --color-red-light: #ff4d56;
  --color-orange: #fe6e00;
  --color-orange-light: #ff8c33;
  --color-yellow: #fbbf24;
  --color-yellow-light: #fcd34d;
  --color-green: #00c758;
  --color-green-light: #1ee07a;
  --color-blue: #3080ff;
  --color-blue-light: #5599ff;
  --color-violet: #8b5cf6;
  --color-violet-light: #a78bfa;
  --color-purple: #7c3aed;
  --color-purple-light: #8b5cf6;

  /* Accent on highlights, selections, badges */
  --color-accent: var(--color-primary);
  --color-small-accent: var(--color-primary-light-3);
  --color-highlight-fg: var(--color-primary-dark-1);
  --color-highlight-bg: var(--color-primary-alpha-20);

  /* Diff colors — tinted toward brand */
  --color-diff-added-row-bg: #0d2a1a;
  --color-diff-added-row-border: #1f6e3c;
  --color-diff-added-word-bg: #1d6c43;
  --color-diff-removed-row-bg: #2a0f12;
  --color-diff-removed-row-border: #b91c1c;
  --color-diff-removed-word-bg: #7f1820;
}

/* Brand fonts — body uses Outfit, code uses JetBrains Mono. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

body,
.ui,
.ui.input > input,
.ui.menu,
.ui.button,
.ui.header {
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
}

code,
pre,
.monospace,
.CodeMirror,
.chroma,
.file-view .lines-code,
.repository .blame-line .code-inner,
.repository .non-diff-file-content {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Evobug body background:
 *   - base color (already set via --color-body)
 *   - subtle purple radial glow from top
 *   - fractalNoise SVG grain overlay (same SVG evobug.com uses, low opacity)
 *
 * Pixelation note: feTurbulence produces noise at the SVG's native render
 * resolution. To stay crisp on HiDPI screens, the SVG declares explicit
 * width/height (1024) AND background-size matches (no upscale = no blur).
 */
body {
  background-color: var(--color-body);
  background-image:
    /* Noise grain — 1024×1024 native, displayed 1:1, no scaling */
    url("data:image/svg+xml,%3Csvg width='1024' height='1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    /* Purple glow seeping from top-center */
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.18), transparent 70%),
    /* Secondary subtle glow lower-right */
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(124, 58, 237, 0.08), transparent 70%);
  background-size: 1024px 1024px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  background-repeat: repeat, no-repeat, no-repeat;
}

/* Hide the "Help" link in the navbar (points to forgejo.org/docs) */
#navbar a[href*="forgejo.org/docs"] {
  display: none !important;
}
