<?php
/**
 * Admin-editable brand color overrides. Linked as a stylesheet AFTER the
 * static CSS files so these :root values win. Falls back to the site's
 * default black/red palette if no custom colors have been set.
 */
require_once __DIR__ . '/../../includes/functions.php';
header('Content-Type: text/css; charset=UTF-8');

$primary = setting('color_primary', '#0a0a0a');
$accent = setting('color_accent', '#c8102e');
$accentLight = hex_adjust_brightness($accent, 0.35);
$accentDark = hex_adjust_brightness($accent, -0.2);
?>
:root {
  --color-black: <?= $primary ?>;
  --color-black-pure: <?= $primary ?>;
  --color-red: <?= $accent ?>;
  --color-red-dark: <?= $accentDark ?>;
  --color-red-light: <?= $accentLight ?>;
  --color-accent: <?= $accent ?>;
  --color-accent-light: <?= $accentLight ?>;
  --color-accent-dark: <?= $accentDark ?>;
  --color-danger: <?= $accent ?>;
}
