/* Project: Mandy theme for Forgejo, built on Forgejo's dark theme.
   Values follow ART.md: black first, #0a0a0a panels, 1px #1f1f1f borders, Geist and Geist Mono,
   and one accent, the pink -> orange gradient, kept for the main action. */
@import url("./theme-forgejo-dark.css");

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --is-dark-theme: true;
  --fonts-proportional: "Geist", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --fonts-monospace: "Geist Mono", "Cascadia Mono", Consolas, monospace;
  --border-radius: 8px;
  --border-radius-medium: 12px;

  /* Forgejo's dark theme derives most colours from a blue-grey "steel" scale; Mandy is neutral black and grey. */
  --steel-900: #050505;
  --steel-850: #080808;
  --steel-800: #0a0a0a;
  --steel-750: #0f0f0f;
  --steel-700: #141414;
  --steel-650: #1a1a1a;
  --steel-600: #1f1f1f;
  --steel-550: #2e2e2e;
  --steel-500: #3a3a3a;
  --steel-450: #444444;
  --steel-400: #575757;
  --steel-350: #6e6e6e;
  --steel-300: #858585;
  --steel-250: #a1a1a1;
  --steel-200: #b8b8b8;
  --steel-150: #d4d4d4;
  --steel-100: #ededed;

  /* Actions logs, cards, selection */
  --color-console-bg: #050505;
  --color-console-fg: #ededed;
  --color-console-fg-subtle: #a1a1a1;
  --color-console-border: #1f1f1f;
  --color-console-hover-bg: #111111;
  --color-console-active-bg: #1a1a1a;
  --color-console-menu-bg: #0a0a0a;
  --color-console-menu-border: #2e2e2e;
  --fancy-card-bg: #0a0a0a;
  --fancy-card-border: #1f1f1f;
  --color-header-wrapper-transparent: rgba(0, 0, 0, 0);
  --color-secondary-bg: #111111;
  --color-secondary-nav-bg: #000000;
  --color-selection-bg: rgba(255, 46, 126, 0.35);
  --color-selection-fg: #ffffff;
  --color-text-focus: #ffffff;
  --color-label-bg: #1a1a1a;
  --color-label-hover-bg: #1f1f1f;
  --color-label-active-bg: #2e2e2e;
  --color-reaction-bg: rgba(255, 255, 255, 0.04);
  --color-reaction-hover-bg: rgba(255, 46, 126, 0.12);
  --color-reaction-active-bg: rgba(255, 46, 126, 0.20);

  /* surfaces, back to front */
  --color-body: #000000;
  --color-box-body: #0a0a0a;
  --color-box-body-highlight: #111111;
  --color-box-header: #0a0a0a;
  --color-header-wrapper: #000000;
  --color-footer: #000000;
  --color-nav-bg: rgba(0, 0, 0, 0.72);
  --color-nav-hover-bg: #111111;
  --color-menu: #0a0a0a;
  --color-card: #0a0a0a;
  --color-button: #0a0a0a;
  --color-light: rgba(255, 255, 255, 0.03);
  --color-light-border: #1f1f1f;
  --color-hover: #111111;
  --color-active: #1a1a1a;
  --color-code-bg: #050505;
  --color-markup-code-block: #111111;
  --color-markup-code-inline: #1a1a1a;
  --color-markup-table-row: rgba(255, 255, 255, 0.02);
  --color-timeline: #1f1f1f;
  --color-tooltip-bg: #0a0a0a;
  --color-tooltip-text: #ededed;
  --color-overlay-backdrop: rgba(0, 0, 0, 0.8);
  --color-shadow: rgba(0, 0, 0, 0.9);

  /* text */
  --color-text-dark: #ffffff;
  --color-text: #ededed;
  --color-text-light: #a1a1a1;
  --color-text-light-1: #a1a1a1;
  --color-text-light-2: #6e6e6e;
  --color-text-light-3: #6e6e6e;

  /* the pink: focus, toggles, selection, links */
  --color-primary: #ff2e7e;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #ff4a90;
  --color-primary-dark-2: #ff66a2;
  --color-primary-dark-3: #ff82b4;
  --color-primary-dark-4: #ff9ec6;
  --color-primary-dark-5: #ffbad8;
  --color-primary-dark-6: #ffd6ea;
  --color-primary-dark-7: #fff0f7;
  --color-primary-light-1: #e6286f;
  --color-primary-light-2: #cc2362;
  --color-primary-light-3: #b31f56;
  --color-primary-light-4: #991a49;
  --color-primary-light-5: #80163d;
  --color-primary-light-6: #661130;
  --color-primary-light-7: #4d0d24;
  --color-primary-alpha-10: rgba(255, 46, 126, 0.10);
  --color-primary-alpha-20: rgba(255, 46, 126, 0.20);
  --color-primary-alpha-30: rgba(255, 46, 126, 0.30);
  --color-primary-alpha-40: rgba(255, 46, 126, 0.40);
  --color-primary-alpha-50: rgba(255, 46, 126, 0.50);
  --color-primary-alpha-60: rgba(255, 46, 126, 0.60);
  --color-primary-alpha-70: rgba(255, 46, 126, 0.70);
  --color-primary-alpha-80: rgba(255, 46, 126, 0.80);
  --color-primary-alpha-90: rgba(255, 46, 126, 0.90);
  --color-accent: #ff2e7e;
  --color-small-accent: rgba(255, 46, 126, 0.25);
  --color-highlight-bg: rgba(255, 46, 126, 0.12);
  --color-highlight-fg: #ffd6ea;
  --color-caret: #ff2e7e;

  /* greys: the lines of the layout */
  --color-secondary: #1f1f1f;
  --color-secondary-dark-1: #2e2e2e;
  --color-secondary-dark-2: #383838;
  --color-secondary-dark-3: #444444;
  --color-secondary-dark-4: #555555;
  --color-secondary-dark-5: #6e6e6e;
  --color-secondary-dark-6: #8a8a8a;
  --color-secondary-dark-7: #a1a1a1;
  --color-secondary-dark-8: #b8b8b8;
  --color-secondary-dark-9: #cfcfcf;
  --color-secondary-dark-10: #e0e0e0;
  --color-secondary-dark-11: #ededed;
  --color-secondary-dark-12: #f5f5f5;
  --color-secondary-dark-13: #fafafa;
  --color-secondary-light-1: #1a1a1a;
  --color-secondary-light-2: #141414;
  --color-secondary-light-3: #111111;
  --color-secondary-light-4: #0a0a0a;
  --color-secondary-alpha-10: rgba(31, 31, 31, 0.10);
  --color-secondary-alpha-20: rgba(31, 31, 31, 0.20);
  --color-secondary-alpha-30: rgba(31, 31, 31, 0.30);
  --color-secondary-alpha-40: rgba(31, 31, 31, 0.40);
  --color-secondary-alpha-50: rgba(31, 31, 31, 0.50);
  --color-secondary-alpha-60: rgba(31, 31, 31, 0.60);
  --color-secondary-alpha-70: rgba(31, 31, 31, 0.70);
  --color-secondary-alpha-80: rgba(31, 31, 31, 0.80);
  --color-secondary-alpha-90: rgba(31, 31, 31, 0.90);

  /* fields */
  --color-input-background: #0a0a0a;
  --color-input-border: #2e2e2e;
  --color-input-border-hover: #444444;
  --color-input-text: #ededed;
  --color-input-toggle-background: #1a1a1a;

  /* status as a tint, never a second accent */
  --color-green: #46d39a;
  --color-yellow: #f5b83d;
  --color-orange: #ff8a3d;
  --color-red: #e5484d;
  --color-pink: #ff2e7e;
  --color-success-bg: rgba(70, 211, 154, 0.10);
  --color-success-border: rgba(70, 211, 154, 0.20);
  --color-success-text: #46d39a;
  --color-warning-bg: rgba(245, 184, 61, 0.10);
  --color-warning-border: rgba(245, 184, 61, 0.20);
  --color-warning-text: #f5b83d;
  --color-error-bg: rgba(229, 72, 77, 0.10);
  --color-error-border: rgba(229, 72, 77, 0.20);
  --color-error-text: #e5484d;
  --color-info-bg: rgba(255, 255, 255, 0.04);
  --color-info-border: #2e2e2e;
  --color-info-text: #ededed;

  --mandy-gradient: linear-gradient(90deg, #ff2e7e 0%, #ff8a3d 100%);
  --mandy-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

::selection {
  background: rgba(255, 46, 126, 0.35);
}

/* Backdrop: a pink-to-orange glow in the upper right corner and fine dots fading downward. Never a picture. */
body {
  background-color: #000000;
  background-image:
    radial-gradient(ellipse 60% 45% at 92% 0%, rgba(255, 46, 126, 0.16), rgba(255, 138, 61, 0.06) 45%, transparent 75%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(#262626 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}

/* Header: glass over the backdrop, with a hairline below. */
#navbar {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1f1f1f;
}

/* Type: big titles tight, small labels wide. */
h1, h2, .ui.header, .repo-header .repo-title {
  letter-spacing: -0.02em;
}
.ui.label, .ui.labels .label, .counter, .ui.menu .item > .label {
  font-variant-numeric: tabular-nums;
}

/* The one accent: the main action of a view carries the gradient. */
.ui.primary.button,
.ui.primary.buttons .button {
  background: var(--mandy-gradient);
  color: #ffffff;
  border: 0;
  box-shadow: 0 8px 28px -10px rgba(255, 46, 126, 0.7);
  transition: filter 150ms var(--mandy-ease-out), transform 150ms var(--mandy-ease-out);
}
.ui.primary.button:hover,
.ui.primary.buttons .button:hover,
.ui.primary.button:focus-visible {
  background: var(--mandy-gradient);
  color: #ffffff;
  filter: brightness(1.08) saturate(1.1);
}

/* Press feedback, as in the UI kit. */
.ui.button:active {
  transform: scale(0.97);
}

/* Panels: 1px borders everywhere. */
.ui.segment,
.ui.attached.segment,
.ui.attached.header,
.ui.card,
.ui.cards > .card {
  border-color: #1f1f1f;
}

/* Progress bars use the gradient too. */
.ui.progress .bar,
progress::-webkit-progress-value {
  background: var(--mandy-gradient);
}
progress::-moz-progress-bar {
  background: var(--mandy-gradient);
}

/* The sign-up captcha is drawn on white: invert it so it sits on black like the rest. */
.captcha-img {
  filter: invert(1) hue-rotate(180deg);
  border: 1px solid #2e2e2e;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .ui.button:active { transform: none; }
}
