/*
Theme Name:        ProductionVenues
Theme URI:         https://productionvenues.example/
Description:       "Signal Edition" child theme for Directorist — a NYC corporate-event venue directory with production-grade specs, four-channel scoring (RIGGING / POWER / AV-LABOR / DATA) and GO / LIMITED / NO GO / UNVERIFIED verdicts. Child theme of GeneratePress. Design tokens generated from field-map/fields.json v1.0 (direction 3b, 5d meter-pin logo).
Author:            ProductionVenues
Author URI:        https://productionvenues.example/
Template:          generatepress
Version:           1.0.0-draft
Requires at least: 6.2
Tested up to:      6.8
Requires PHP:      8.1
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       productionvenues
Tags:              directory, dark-mode, custom-colors
*/

/* -------------------------------------------------------------------------
 * DESIGN TOKENS — single CSS source, generated from field-map/fields.json.
 * Raw channel colors NEVER change with theme; text tints do (FIELD-MAP §1:
 * "On light backgrounds, TEXT uses darkened tints. Fills/borders always use
 * raw channel colors.").
 * Theme switching: `data-theme="light|dark"` on <html>, set before paint by
 * the inline bootstrap in functions.php; the media query below covers no-JS.
 * ---------------------------------------------------------------------- */

:root {
  /* Channel colors — raw, theme-invariant (fields.json colors) */
  --pv-go:      #39B54A;
  --pv-limited: #F7941D;
  --pv-no:      #EF4136;
  --pv-info:    #1B44E8;

  /* On-light darkened text tints (fields.json colors.onLightText) */
  --pv-tint-go:      #1a8a2e;
  --pv-tint-limited: #c47008;
  --pv-tint-no:      #c22a1e;

  /* Fader gradient ends (component library C7) */
  --pv-go-deep:      #1f6b2c;
  --pv-limited-deep: #9c5a0e;
  --pv-info-deep:    #12288a;

  /* Named surfaces (fields.json colors) */
  --pv-console:  #14181F;
  --pv-panel-dk: #1E222B;
  --pv-daylight: #EEF0F2;
  --pv-cream:    #EDEAE2;

  /* Ink used on GO-green buttons (component library C3) */
  --pv-ink-on-go: #0c1409;

  /* Type stacks (Poppins is wordmark-only and lives outlined in the SVGs) */
  --pv-font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --pv-font-ui:      'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --pv-font-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

/* ---- Light ("work lights") — the default ---- */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --pv-bg:        var(--pv-daylight);
  --pv-panel:     #ffffff;
  --pv-ink:       #14181F;        /* primary text */
  --pv-muted:     #4d5156;
  --pv-muted-2:   #8b919c;
  --pv-muted-3:   #7a8087;
  --pv-border:    #d8dce0;
  --pv-border-2:  #c3c9cf;
  --pv-hairline:  #e4e7ea;
  --pv-photo-a:   #e2e5e9;        /* image placeholder stripes */
  --pv-photo-b:   #d9dde2;
  --pv-led-off:   #c3c9cf;
  --pv-track:     #e4e7ea;        /* horizontal fader track */

  /* Verdict/channel TEXT colors on this surface (tints on light) */
  --pv-text-go:      var(--pv-tint-go);
  --pv-text-limited: var(--pv-tint-limited);
  --pv-text-no:      var(--pv-tint-no);
  --pv-text-info:    var(--pv-info);

  --pv-glow: 0 0 0 rgba(0,0,0,0);   /* LEDs don't glow on light surfaces */
}

/* ---- Dark ("house lights") ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --pv-bg:        var(--pv-console);
  --pv-panel:     var(--pv-panel-dk);
  --pv-ink:       var(--pv-cream);
  --pv-muted:     #8b919c;
  --pv-muted-2:   #5a606c;
  --pv-muted-3:   #8b919c;
  --pv-border:    #363c48;
  --pv-border-2:  #363c48;
  --pv-hairline:  #262b35;
  --pv-photo-a:   #232833;
  --pv-photo-b:   #1b1f28;
  --pv-led-off:   #3a3f4a;
  --pv-track:     #262b35;

  /* Raw colors read fine on dark — no tinting (FIELD-MAP §1) */
  --pv-text-go:      var(--pv-go);
  --pv-text-limited: var(--pv-limited);
  --pv-text-no:      var(--pv-no);
  --pv-text-info:    var(--pv-info);

  --pv-glow: 1;  /* flag consumed by component styles that add LED glow */
}

/* No-JS fallback: honor the OS preference when the bootstrap never ran */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --pv-bg:        var(--pv-console);
    --pv-panel:     var(--pv-panel-dk);
    --pv-ink:       var(--pv-cream);
    --pv-muted:     #8b919c;
    --pv-muted-2:   #5a606c;
    --pv-muted-3:   #8b919c;
    --pv-border:    #363c48;
    --pv-border-2:  #363c48;
    --pv-hairline:  #262b35;
    --pv-photo-a:   #232833;
    --pv-photo-b:   #1b1f28;
    --pv-led-off:   #3a3f4a;
    --pv-track:     #262b35;
    --pv-text-go:      var(--pv-go);
    --pv-text-limited: var(--pv-limited);
    --pv-text-no:      var(--pv-no);
    --pv-text-info:    var(--pv-info);
  }
}

/* -------------------------------------------------------------------------
 * BASE — square corners everywhere ("no radii in this system", C3), body
 * surfaces, and parent-theme neutralisation kept to a minimum.
 * ---------------------------------------------------------------------- */

body {
  background-color: var(--pv-bg);
  color: var(--pv-ink);
  font-family: var(--pv-font-ui);
}

.pv-scope,
.pv-scope * {
  border-radius: 0 !important;
  box-sizing: border-box;
}

/* Zero-specificity link defaults (:where) so any single component class
 * (.pv-btn--ink, .pv-filtersheet__row, …) can recolor an anchor. */
:where(.pv-scope) a {
  color: var(--pv-ink);
}
:where(.pv-scope) a:hover {
  color: var(--pv-info);
}

/* Component styles live in assets/css/components.css (C3–C10). */
