/* =============================================================================
   Bachmann Design & IT – Branding für Forgejo
   Verwaltet in customizing/ (siehe PROTOKOLL.md) – nicht auf dem Server editieren.
   Markenfarbe #FF6527 (bachmanndesign.de). Für Text/Buttons auf Weiß wird eine
   abgedunkelte Variante genutzt (Kontrast ≥ 4,5:1, WCAG AA).
   ========================================================================== */

:root {
  --bduit-orange: #ff6527;
  --bduit-dark: #3c3c3b;
}

/* ---------- Helle Themes ---------- */
:root:not([data-theme*="dark"]) {
  --color-primary: #d63d00;            /* 4,6:1 auf Weiß */
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #cc3b00;
  --color-primary-dark-2: #b33300;
  --color-primary-dark-3: #b33300;
  --color-primary-dark-4: #992c00;
  --color-primary-dark-5: #802500;
  --color-primary-dark-6: #802500;
  --color-primary-dark-7: #802500;
  --color-primary-light-1: #ff6527;    /* Markenfarbe */
  --color-primary-light-2: #ff753d;
  --color-primary-light-3: #ff9266;
  --color-primary-light-4: #ffb699;
  --color-primary-light-5: #ffc8b3;
  --color-primary-light-6: #ffdbcc;
  --color-primary-light-7: #ffede5;
  --color-primary-alpha-10: #d63d0019;
  --color-primary-alpha-20: #d63d0033;
  --color-primary-alpha-30: #d63d004b;
  --color-primary-alpha-40: #d63d0066;
  --color-primary-alpha-50: #d63d0080;
  --color-primary-alpha-60: #d63d0099;
  --color-primary-alpha-70: #d63d00b3;
  --color-primary-alpha-80: #d63d00cc;
  --color-primary-alpha-90: #d63d00e1;
  --color-primary-hover: var(--color-primary-dark-2);
  --color-primary-active: var(--color-primary-dark-4);
  --color-accent: var(--bduit-orange);
}

/* ---------- Dunkle Themes (und „auto“ bei dunklem System) ---------- */
@media (prefers-color-scheme: dark) {
  :root[data-theme*="auto"] {
    --color-primary: #ff6527;          /* 6:1 auf dunklem Grund */
    --color-primary-contrast: #18181b;
    --color-primary-hover: #ff753d;
    --color-primary-active: #ff9266;
    --color-primary-alpha-10: #ff652719;
    --color-primary-alpha-20: #ff652733;
    --color-primary-alpha-30: #ff65274b;
    --color-primary-alpha-40: #ff652766;
    --color-primary-alpha-50: #ff652780;
    --color-primary-alpha-60: #ff652799;
    --color-primary-alpha-70: #ff6527b3;
    --color-primary-alpha-80: #ff6527cc;
    --color-primary-alpha-90: #ff6527e1;
    --color-accent: #ff6527;
  }
}
:root[data-theme*="dark"] {
  --color-primary: #ff6527;
  --color-primary-contrast: #18181b;
  --color-primary-hover: #ff753d;
  --color-primary-active: #ff9266;
  --color-primary-alpha-10: #ff652719;
  --color-primary-alpha-20: #ff652733;
  --color-primary-alpha-30: #ff65274b;
  --color-primary-alpha-40: #ff652766;
  --color-primary-alpha-50: #ff652780;
  --color-primary-alpha-60: #ff652799;
  --color-primary-alpha-70: #ff6527b3;
  --color-primary-alpha-80: #ff6527cc;
  --color-primary-alpha-90: #ff6527e1;
  --color-accent: #ff6527;
}

/* ---------- Footer komplett ausblenden ---------- */
.page-footer { display: none !important; }

/* ---------- Navigationsleiste ---------- */
/* Breites Firmenlogo statt der quadratischen Bildmarke (Template bleibt unverändert,
   das Bild wird ausgeblendet und das Logo als Hintergrund des Links gezeigt). */
#navbar #navbar-logo {
  min-width: 128px;
  background: url("../img/bduit/logo.svg") no-repeat 10px center / auto 32px;
}
#navbar #navbar-logo img { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme*="auto"] #navbar #navbar-logo { background-image: url("../img/bduit/logo-mono.svg"); }
}
:root[data-theme*="dark"] #navbar #navbar-logo { background-image: url("../img/bduit/logo-mono.svg"); }

/* „Erkunden“ und „Hilfe“ ausblenden (nur die Links in der Leiste) */
#navbar .navbar-left > a.item[href$="/explore/repos"],
#navbar .navbar-left > a.item[href$="/explore/organizations"],
#navbar .navbar-left > a.item[href^="https://forgejo.org/docs"] { display: none !important; }

/* ---------- Login-Seite: Logo + Begrüßung ---------- */
.bduit-welcome { text-align: center; padding: 12px 0 4px; }
.bduit-welcome .bduit-logo { width: 240px; max-width: 70%; height: auto; }
.bduit-welcome .bduit-logo-mono { display: none; }
.bduit-welcome h1 { font-size: 1.35rem; font-weight: 600; margin: 18px 0 6px; color: var(--color-text); }
.bduit-welcome p { margin: 0 auto; max-width: 46ch; color: var(--color-text-light-1); line-height: 1.5; }
.bduit-welcome p + p { margin-top: 0.9em; }

@media (prefers-color-scheme: dark) {
  :root[data-theme*="auto"] .bduit-welcome .bduit-logo-color { display: none; }
  :root[data-theme*="auto"] .bduit-welcome .bduit-logo-mono { display: inline; }
}
:root[data-theme*="dark"] .bduit-welcome .bduit-logo-color { display: none; }
:root[data-theme*="dark"] .bduit-welcome .bduit-logo-mono { display: inline; }
