/**
 * Host-site neutralisation.
 *
 * Hand-authored, and deliberately NOT run through bin/scope-css.py: tokens.css,
 * site.css and catalogue.css are generated from the standalone site's originals
 * and get regenerated whenever the scoper changes, which would silently drop
 * anything added to them by hand.
 *
 * Everything here exists because the section installs onto a site whose
 * GeneratePress settings are saved and are not ours. Loaded last.
 */

/* --------------------------------------------------------------- palette */

/*
 * GeneratePress builds ~12 KB of inline CSS from the host's saved
 * generate_settings and references these seven variables 42 times across it --
 * links, buttons, navigation, containers, footer. Redefining them on the
 * section turns all of that output to the BADCC palette at once, which is far
 * more durable than chasing GeneratePress's individual selectors.
 *
 * This is what badcc_global_colors() used to do through generate_option_defaults.
 * That only ever worked because the standalone site had never saved any
 * GeneratePress settings; a saved value always beats a filtered default.
 */
.badcc-scope{
  --contrast:#F2F2ED;
  --contrast-2:#A6AC9E;
  --contrast-3:#6E8161;
  --base:#1C201A;
  --base-2:#0B0D0B;
  --base-3:#0B0D0B;
  --accent:#D7965A;
}

/* ------------------------------------------------------------ background */

/*
 * The host paints a wood texture onto the body and, because this section runs
 * in one-container mode, onto .container as well
 * (generatepress/inc/css-output.php:383). The design is a flat dark ground, so
 * strip the image and let the body colour through.
 */
body.badcc-scope{ background-image:none; }

/*
 * body-prefixed deliberately. GeneratePress's rule is
 * `.one-container .container` at (0,2,0) and `.badcc-scope .container` ties it,
 * leaving us winning on load order alone -- which has already gone wrong on
 * this project more than once. `body.badcc-scope .container` is (0,2,1) and
 * wins wherever it loads.
 */
body.badcc-scope .container,
body.badcc-scope .site-content,
body.badcc-scope .inside-article,
body.badcc-scope .page-header,
body.badcc-scope .inside-page-header,
body.badcc-scope .inside-footer-widgets{
  background-image:none;
  background-color:transparent;
}

/* ------------------------------------------------------------ typography */

/*
 * GeneratePress writes `body, button, input, select, textarea` and
 * `.main-navigation a` font-family rules from the host's saved font manager.
 * The second is two classes, so beating it needs three. The standalone site
 * never hit this: with no saved settings the theme emits no font rules at all
 * and everything simply inherits from body.
 */
.badcc-scope button,
.badcc-scope input,
.badcc-scope select,
.badcc-scope textarea{ font-family:var(--badcc-body); }

.badcc-scope .main-navigation a,
.badcc-scope .main-navigation .menu-toggle,
.badcc-scope .main-navigation .menu-bar-items{ font-family:var(--badcc-body); }
