/*
 * Defined Once: Forgejo's dark theme in our brand colours and fonts (the brand card in the
 * home repo, static/input.css). Only variables are changed, so a Forgejo upgrade keeps working;
 * after a major upgrade, compare with theme-forgejo-dark.css of the new version.
 */
@import url("./theme-forgejo-dark.css");

@font-face {
  font-family: "Open Sauce Sans";
  src: url("../fonts/OpenSauceSans-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("../fonts/OpenSauceSans-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("../fonts/OpenSauceSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce Sans";
  src: url("../fonts/OpenSauceSans-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Fonts: Open Sauce Sans for everything, in Light, and Medium for emphasis. It has no 400,
     600 or 700, so Forgejo's weights are mapped onto the two we have. */
  --fonts-override: "Open Sauce Sans";
  --font-weight-light: 300;
  --font-weight-normal: 300;
  --font-weight-medium: 500;
  --font-weight-semibold: 500;
  --font-weight-bold: 500;

  /* Forgejo's dark theme is built on a blue-grey "steel" scale; ours is neutral grey. The named
     brand tokens: sunken 900, surface 800, raised 700, edge 600, fg-faint 400, fg-muted 300,
     fg-soft 150, fg 100. The steps in between are interpolated. */
  --steel-900: #0a0a0a;
  --steel-850: #121212;
  --steel-800: #171717;
  --steel-750: #1f1f1f;
  --steel-700: #262626;
  --steel-650: #333333;
  --steel-600: #404040;
  --steel-550: #4a4a4a;
  --steel-500: #525252;
  --steel-450: #636363;
  --steel-400: #737373;
  --steel-350: #8a8a8a;
  --steel-300: #a1a1a1;
  --steel-250: #b5b5b5;
  --steel-200: #c4c4c4;
  --steel-150: #d4d4d4;
  --steel-100: #f5f5f5;

  /* Accent: orange-500, lighter on hover as on the website (orange-400). */
  --color-primary: #ff6900;
  --color-primary-contrast: #0a0a0a;
  --color-primary-dark-1: #ff8904;
  --color-primary-dark-2: #ff8904;
  --color-primary-dark-3: #ffb86a;
  --color-primary-dark-4: #ffb86a;
  --color-primary-dark-5: #ffd6a7;
  --color-primary-dark-6: #ffd6a7;
  --color-primary-dark-7: #ffedd4;
  --color-primary-light-1: #f54900;
  --color-primary-light-2: #ca3500;
  --color-primary-light-3: #9f2d00;
  --color-primary-light-4: #973c00;
  --color-primary-light-5: #973c00;
  --color-primary-light-6: #7e2a0c;
  --color-primary-light-7: #7e2a0c;
  --color-primary-alpha-10: #ff690019;
  --color-primary-alpha-20: #ff690033;
  --color-primary-alpha-30: #ff69004b;
  --color-primary-alpha-40: #ff690066;
  --color-primary-alpha-50: #ff690080;
  --color-primary-alpha-60: #ff690099;
  --color-primary-alpha-70: #ff6900b3;
  --color-primary-alpha-80: #ff6900cc;
  --color-primary-alpha-90: #ff6900e1;
  --color-primary-hover: var(--color-primary-dark-1);
  --color-primary-active: var(--color-primary-light-1);
  --color-accent: #ff6900;
  --color-secondary-alpha-10: #40404019;
  --color-secondary-alpha-20: #40404033;
  --color-secondary-alpha-30: #4040404b;
  --color-secondary-alpha-40: #40404066;
  --color-secondary-alpha-50: #40404080;
  --color-secondary-alpha-60: #40404099;
  --color-secondary-alpha-70: #404040b3;
  --color-secondary-alpha-80: #404040cc;
  --color-secondary-alpha-90: #404040e1;

  /* Surfaces: one surface for the page and the navigation, as on the website; boxes on raised;
     code on sunken. */
  --color-body: #171717;
  --color-nav-bg: #171717;
  --color-header-wrapper: #171717;
  --color-header-wrapper-transparent: #17171700;
  --color-footer: #0a0a0a;
  --color-box-header: #262626;
  --color-box-body: #171717;
  --color-box-body-highlight: #262626;
  --color-markup-code-block: #0a0a0a;
  --color-markup-code-inline: #262626;
  --color-code-bg: #0a0a0a;
  --color-console-bg: #0a0a0a;
  --color-console-border: #404040;
  --color-console-menu-bg: #262626;
  --color-console-menu-border: #404040;

  /* Text: emphasis in fg-soft and fg, secondary text in fg-muted. */
  --color-text-dark: #f5f5f5;
  --color-text: #d4d4d4;
  --color-text-light: #a1a1a1;
  --color-text-light-1: #a1a1a1;
  --color-text-light-2: #a1a1a1;
  --color-text-light-3: #8a8a8a;
  --color-input-text: #d4d4d4;
  --color-selection-bg: #ff6900;
  --color-selection-fg: #0a0a0a;

  /* Diffs in the Gruvbox colours of the website's code blocks. */
  --color-diff-removed-word-bg: #fb493455;
  --color-diff-added-word-bg: #b8bb2645;
  --color-diff-removed-row-bg: #fb49341f;
  --color-diff-added-row-bg: #b8bb261a;
  --color-diff-removed-row-border: #fb493455;
  --color-diff-added-row-border: #b8bb2645;
}

/* The navigation: a thin edge below, as on the website. */
#navbar {
  border-bottom: 1px solid #404040;
}

/* Headings in prose and on the start page. */
.markup h1,
.markup h2,
.markup h3,
.markup h4,
.markup h5,
.markup h6,
.page-content.home .hero h1,
.page-content.home .hero h2 {
  color: #f5f5f5;
}

/* Links in prose: accent, lighter on hover. */
.markup a {
  color: #ff6900;
}
.markup a:hover {
  color: #ff8904;
}

/* The start page (templates/home.tmpl). */
.page-content.home {
  padding-top: 4rem;
}
.page-content.home .logo {
  margin-bottom: 2rem;
}
.page-content.home .hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1;
}
.page-content.home .hero h2 {
  font-family: var(--fonts-regular);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.625;
  color: #a1a1a1;
}
.brand-gradient {
  background: linear-gradient(to right, #973c00 0%, #f54900 50%, #973c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
