/*
 * Jester — a Forgejo theme for git.jester-designs.com
 * Built on top of Forgejo's own dark theme: anything not overridden here
 * falls back to forgejo-dark, so new Forgejo versions keep working.
 *
 * Palette
 *   void     #1b1e2c   ink1 #232637   ink2 #2B2F42   ink3 #363B50
 *   bone     #bfbcb7   face #e6e1da   ash  #858380   comment #4E5259
 *   plum     #7A5470   red  #A34346   rose #A55354   rust #9A5E42
 *   moss     #68744A   gold #8F7548   teal #446B6E   blue #56658C
 */
@import url("./theme-forgejo-dark.css");

gitea-theme-meta-info {
  --theme-display-name: "Jester";
  --theme-color-scheme: "dark";
}

:root {
  --is-dark-theme: true;

  /* Re-tint Forgejo's own grey "steel" scale (used by forgejo-dark internally) */
  --steel-900: #12141f;
  --steel-850: #161825;
  --steel-800: #1b1e2c;
  --steel-750: #1f2232;
  --steel-700: #232637;
  --steel-650: #2B2F42;
  --steel-600: #363B50;
  --steel-550: #42465a;
  --steel-500: #4E5259;
  --steel-450: #5e5f68;
  --steel-400: #6c6b70;
  --steel-350: #7a7978;
  --steel-300: #858380;
  --steel-250: #9a9792;
  --steel-200: #a8a59f;
  --steel-150: #bfbcb7;
  --steel-100: #d4d0ca;

  /* primary = light plum (cap colour, lifted for readable links) */
  --color-primary: #b48aa8;
  --color-primary-contrast: #1b1e2c;
  --color-primary-dark-1: #bf98b3;
  --color-primary-dark-2: #c9a6bf;
  --color-primary-dark-3: #d3b5ca;
  --color-primary-dark-4: #ddc4d6;
  --color-primary-dark-5: #e6d4e1;
  --color-primary-dark-6: #f0e5ed;
  --color-primary-dark-7: #f8f3f6;
  --color-primary-light-1: #a27c97;
  --color-primary-light-2: #906e86;
  --color-primary-light-3: #7e6076;
  --color-primary-light-4: #6c5265;
  --color-primary-light-5: #483743;
  --color-primary-light-6: #241b22;
  --color-primary-light-7: #0b080a;
  --color-primary-alpha-10: #b48aa819;
  --color-primary-alpha-20: #b48aa833;
  --color-primary-alpha-30: #b48aa84b;
  --color-primary-alpha-40: #b48aa866;
  --color-primary-alpha-50: #b48aa880;
  --color-primary-alpha-60: #b48aa899;
  --color-primary-alpha-70: #b48aa8b3;
  --color-primary-alpha-80: #b48aa8cc;
  --color-primary-alpha-90: #b48aa8e1;
  --color-primary-hover: #c9a6bf;
  --color-primary-active: #d3b5ca;

  --color-secondary: #363B50;
  --color-secondary-dark-1: #3d4258;
  --color-secondary-dark-2: #464b60;
  --color-secondary-dark-3: #53586b;
  --color-secondary-dark-4: #606475;
  --color-secondary-dark-5: #6c6f7e;
  --color-secondary-dark-6: #787a86;
  --color-secondary-dark-7: #858790;
  --color-secondary-dark-8: #93949a;
  --color-secondary-dark-9: #9a9a9f;
  --color-secondary-dark-10: #a6a5a8;
  --color-secondary-dark-11: #b3b1b2;
  --color-secondary-light-1: #2B2F42;
  --color-secondary-light-2: #232637;
  --color-secondary-light-3: #1b1e2c;
  --color-secondary-light-4: #161825;
  --color-secondary-alpha-10: #363B5019;
  --color-secondary-alpha-20: #363B5033;
  --color-secondary-alpha-30: #363B504b;
  --color-secondary-alpha-40: #363B5066;
  --color-secondary-alpha-50: #363B5080;
  --color-secondary-alpha-60: #363B5099;
  --color-secondary-alpha-70: #363B50b3;
  --color-secondary-alpha-80: #363B50cc;
  --color-secondary-alpha-90: #363B50e1;
  --color-secondary-button: #2B2F42;
  --color-secondary-hover: #363B50;
  --color-secondary-active: #42465a;

  /* named colours, lifted from the palette for legibility on the void */
  --color-red: #c75f61;
  --color-orange: #c27a55;
  --color-yellow: #c49a55;
  --color-olive: #8a9a5f;
  --color-green: #7f9a62;
  --color-teal: #5f9296;
  --color-blue: #7b8bb5;
  --color-violet: #9a7ab5;
  --color-purple: #b48aa8;
  --color-pink: #c4788c;
  --color-brown: #9A5E42;
  --color-black: #12141f;
  --color-grey: #4E5259;
  --color-grey-light: #858380;
  --color-gold: #c49a55;
  --color-white: #e6e1da;
  --color-logo: #7A5470;
  --color-git: #c27a55;

  /* surfaces */
  --color-body: #1b1e2c;
  --color-box-header: #232637;
  --color-box-body: #1f2232;
  --color-box-body-highlight: #232637;
  --color-nav-bg: #161825;
  --color-nav-hover-bg: #232637;
  --color-nav-text: #bfbcb7;
  --color-secondary-nav-bg: #161825;
  --color-footer: #161825;
  --color-menu: #1f2232;
  --color-card: #1f2232;
  --color-button: #232637;
  --color-code-bg: #161825;
  --color-secondary-bg: #2B2F42;
  --color-expand-button: #2B2F42;
  --color-timeline: #363B50;
  --color-project-column-bg: #1f2232;
  --color-tooltip-bg: #2B2F42;
  --color-tooltip-text: #e6e1da;
  --color-overlay-backdrop: #0e0f18cc;
  --color-shadow: #0e0f1880;

  /* text */
  --color-text-dark: #e6e1da;
  --color-text: #bfbcb7;
  --color-text-light: #a8a59f;
  --color-text-light-1: #95928d;
  --color-text-light-2: #858380;
  --color-text-light-3: #6c6b70;
  --color-placeholder-text: #6c6b70;
  --color-caret: #e6e1da;

  /* inputs & states */
  --color-input-text: #e6e1da;
  --color-input-background: #161825;
  --color-input-toggle-background: #363B50;
  --color-input-border: #363B50;
  --color-light: #0e0f1828;
  --color-light-border: #bfbcb71f;
  --color-hover: #bfbcb714;
  --color-hover-opaque: #2B2F42;
  --color-active: #bfbcb71f;
  --color-accent: #c49a55;
  --color-small-accent: #7A5470;
  --color-highlight-fg: #c49a55;
  --color-highlight-bg: #8F754833;
  --color-editor-line-highlight: #363B5066;
  --color-editor-selection: #7A547080;
  --color-reaction-bg: #bfbcb712;
  --color-reaction-hover-bg: #7A547066;
  --color-reaction-active-bg: #7A547099;
  --color-label-active-bg: #7A5470;
  --color-markup-table-row: #bfbcb70a;
  --color-markup-code-block: #161825;
  --color-markup-code-inline: #2B2F42;

  /* messages */
  --color-error-text: #d0686a;
  --color-error-bg: #A3434626;
  --color-error-bg-hover: #A343463a;
  --color-error-bg-active: #A343464d;
  --color-error-border: #A3434680;
  --color-success-text: #96ad74;
  --color-success-bg: #68744A33;
  --color-success-border: #68744A99;
  --color-warning-text: #c49a55;
  --color-warning-bg: #8F754833;
  --color-warning-border: #8F754899;
  --color-info-text: #8fa0c8;
  --color-info-bg: #56658C33;
  --color-info-border: #56658C99;
  --color-priority-text: #b48aa8;
  --color-priority-bg: #7A547033;
  --color-priority-border: #7A547099;

  /* badges */
  --color-red-badge: #c75f61;
  --color-green-badge: #8a9a5f;
  --color-yellow-badge: #c49a55;
  --color-orange-badge: #c27a55;

  /* diffs */
  --color-diff-added-fg: #a9bd86;
  --color-diff-added-row-bg: #68744A1f;
  --color-diff-added-row-border: #68744A66;
  --color-diff-added-linenum-bg: #68744A40;
  --color-diff-added-word-bg: #68744A66;
  --color-diff-removed-fg: #d98587;
  --color-diff-removed-row-bg: #A343461f;
  --color-diff-removed-row-border: #A3434666;
  --color-diff-removed-linenum-bg: #A3434640;
  --color-diff-removed-word-bg: #A3434666;
  --color-diff-moved-row-bg: #8F754833;
  --color-diff-moved-row-border: #8F754899;
  --color-diff-inactive: #232637;

  /* actions console */
  --color-console-fg: #e6e1da;
  --color-console-fg-subtle: #a8a59f;
  --color-console-bg: #12141f;
  --color-console-hover-bg: #1f2232;
  --color-console-active-bg: #2B2F42;
  --color-console-link: #858380;

  /* ansi — straight from the terminal palette */
  --color-ansi-black: #1b1e2c;
  --color-ansi-red: #A55354;
  --color-ansi-green: #68744A;
  --color-ansi-yellow: #8F7548;
  --color-ansi-blue: #56658C;
  --color-ansi-magenta: #7A5470;
  --color-ansi-cyan: #446B6E;
  --color-ansi-white: #bfbcb7;
  --color-ansi-bright-black: #858380;
  --color-ansi-bright-red: #c75f61;
  --color-ansi-bright-green: #8a9a5f;
  --color-ansi-bright-yellow: #c49a55;
  --color-ansi-bright-blue: #7b8bb5;
  --color-ansi-bright-magenta: #b48aa8;
  --color-ansi-bright-cyan: #5f9296;
  --color-ansi-bright-white: #e6e1da;

  /* syntax highlighting */
  --color-syntax-text: #bfbcb7;
  --color-syntax-keyword: #b48aa8;
  --color-syntax-control: #b48aa8;
  --color-syntax-operator: #a8a59f;
  --color-syntax-bool: #c27a55;
  --color-syntax-number: #c27a55;
  --color-syntax-name: #c49a55;
  --color-syntax-type: #5f9296;
  --color-syntax-string: #96ad74;
  --color-syntax-string-special: #a9bd86;
  --color-syntax-escape: #c49a55;
  --color-syntax-regexp: #c4788c;
  --color-syntax-comment: #6c6b70;
  --color-syntax-comment-special: #858380;
  --color-syntax-invalid: #d0686a;
  --color-syntax-tag: #c75f61;
  --color-syntax-attribute: #c49a55;
  --color-syntax-property: #7b8bb5;
  --color-syntax-variable: #d4d0ca;
  --color-syntax-entity: #9a7ab5;
  --color-syntax-preproc: #5f9296;
  --color-syntax-preproc-file: #96ad74;
  --color-syntax-decorator: #c4788c;
  --color-syntax-namespace: #7b8bb5;
  --color-syntax-name-pseudo: #9a7ab5;
  --color-syntax-link: #b48aa8;
  --color-syntax-heading: #b48aa8;
  --color-syntax-subheading: #c49a55;
  --color-syntax-emph: #c49a55;
  --color-syntax-strong: #e6e1da;
  --color-syntax-output: #858380;
  --color-syntax-prompt: #c49a55;
  --color-syntax-traceback: #d0686a;
  --color-syntax-whitespace: #4E5259;
  --color-syntax-deleted-bg: #A3434640;
  --color-syntax-inserted-bg: #68744A40;

  accent-color: #c49a55;
  color-scheme: dark;
}

/* ---- small touches ---- */

::selection { background: #7A547099; color: #e6e1da; }

/* harlequin stripe under the navbar */
#navbar {
  border-bottom: 3px solid transparent;
  border-image: repeating-linear-gradient(90deg,
      #7A5470 0 24px, #12141f 24px 48px) 1;
}

/* the big logo on the landing page gets a gentle bob */
.page-content.home .logo,
.page-content.home img[src*="logo"] {
  filter: drop-shadow(0 8px 24px #7A547055);
}
@media (prefers-reduced-motion: no-preference) {
  .page-content.home .logo,
  .page-content.home img[src*="logo"] {
    animation: jester-bob 4s ease-in-out infinite;
  }
}
@keyframes jester-bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-6px) rotate(1.5deg); }
}
