/* ============================================================
   Biome.blue — Theme scopes (semantic aliases)
   The product wears a BOTANICO-STEAMPUNK register:
     · LIGHT  = aged parchment + sepia ink + bronze frames
     · DARK   = "midnight greenhouse" — mossy charcoal + brass + glow
   Maps 1:1 to a Vuetify light/dark theme (see guidelines/vuetify.*).
   The brand cyan→blue gradient stays constant across both themes;
   bronze is the ornament/frame accent.
   ============================================================ */

/* ---------- LIGHT (default) ---------- */
:root,
[data-theme="light"],
.v-theme--biomeLight {
  --surface-app:      var(--bb-parchment);     /* the desk / canvas */
  --surface-card:     var(--bb-parchment-3);   /* raised plate */
  --surface-sunken:   var(--bb-parchment-2);   /* recessed well */
  --surface-raised:   #FFFDF6;
  --surface-inverse:  var(--bb-bark);
  --surface-eden:     var(--bb-eden-bg);

  --text-strong:      var(--bb-bark);
  --text-body:        var(--bb-bark-2);
  --text-muted:       var(--bb-bark-3);
  --text-faint:       #9C8E6D;
  --text-on-brand:    #FBF7EC;
  --text-on-eden:     #D7F6DD;
  --text-on-frame:    #FBF7EC;

  --brand:            var(--bb-blue);
  --brand-strong:     var(--bb-blue-deep);
  --brand-accent:     var(--bb-cyan);
  --life:             var(--bb-forest);

  /* steampunk frame system */
  --frame:            var(--bb-bronze);
  --frame-strong:     var(--bb-copper);
  --frame-hi:         var(--bb-bronze-2);

  --border-subtle:    color-mix(in srgb, var(--bb-bronze) 32%, var(--bb-parchment-2));
  --border-strong:    color-mix(in srgb, var(--bb-bronze) 70%, transparent);

  --focus-ring:       color-mix(in srgb, var(--bb-azure) 55%, transparent);

  /* aged-paper grain — drop onto a surface via background-image */
  --paper-texture:
    radial-gradient(rgba(120,96,52,0.05) 1px, transparent 1px); /* @kind other */
  --paper-texture-size: 4px 4px;

  /* chip label colors (badge text) — tuned per theme for contrast */
  --chip-neutral:  var(--bb-bark-3);
  --chip-brand:    var(--bb-blue);
  --chip-ok:       var(--bb-ok);
  --chip-info:     var(--bb-info);
  --chip-warning:  #946B12;
  --chip-anomaly:  #9A4D14;
  --chip-critical: var(--bb-critical);
  --chip-life:     var(--bb-forest);
}

/* ---------- DARK (midnight greenhouse) ---------- */
[data-theme="dark"],
.v-theme--biomeDark {
  --surface-app:      var(--bb-night);
  --surface-card:     var(--bb-night-2);
  --surface-sunken:   var(--bb-night-3);
  --surface-raised:   #232B1E;
  --surface-inverse:  var(--bb-paper-glow);
  --surface-eden:     #060D08;

  --text-strong:      var(--bb-paper-glow);
  --text-body:        #CFC9B4;
  --text-muted:       #968F76;
  --text-faint:       #6E6A52;
  --text-on-brand:    #FBF7EC;
  --text-on-eden:     #D7F6DD;
  --text-on-frame:    #FBF7EC;

  --brand:            var(--bb-azure);
  --brand-strong:     var(--bb-blue);
  --brand-accent:     var(--bb-cyan);
  --life:             var(--bb-life);

  --frame:            var(--bb-bronze-2);
  --frame-strong:     var(--bb-bronze);
  --frame-hi:         #E0AE6E;

  --border-subtle:    var(--bb-night-line);
  --border-strong:    color-mix(in srgb, var(--bb-bronze-2) 60%, transparent);

  --focus-ring:       color-mix(in srgb, var(--bb-cyan) 50%, transparent);

  --paper-texture:    radial-gradient(rgba(255,243,214,0.035) 1px, transparent 1px); /* @kind other */
  --paper-texture-size: 4px 4px;

  /* chip label colors brightened for dark plates */
  --chip-neutral:  #B7AF92;
  --chip-brand:    var(--bb-cyan);
  --chip-ok:       #6FE39A;
  --chip-info:     #7FC4FF;
  --chip-warning:  #F0C04E;
  --chip-anomaly:  #F0995A;
  --chip-critical: #F08A72;
  --chip-life:     var(--bb-life);

  /* status tints go translucent so chips read on dark plates */
  --bb-ok-tint:        color-mix(in srgb, var(--bb-ok) 22%, transparent);
  --bb-info-tint:      color-mix(in srgb, var(--bb-info) 24%, transparent);
  --bb-warning-tint:   color-mix(in srgb, var(--bb-warning) 22%, transparent);
  --bb-anomaly-tint:   color-mix(in srgb, var(--bb-anomaly) 22%, transparent);
  --bb-critical-tint:  color-mix(in srgb, var(--bb-critical) 24%, transparent);

  /* shadows need a darker base on night surfaces */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 6px rgba(0,0,0,0.42);
  --shadow-md:   0 6px 18px rgba(0,0,0,0.46);
  --shadow-lg:   0 16px 40px rgba(0,0,0,0.52);
}
