/* ============================================================
   SoundLab Asia — LIGHT THEME (Acoustic Metrology)
   Warm mineral paper (#F5F3EE), carbon ink (#121316),
   anodized crimson (#8E1128 / #B01835), brushed aluminum grid.
   ============================================================ */

:root {
  color-scheme: light;

  --bg:            #F5F3EE;
  --bg-subtle:     #ECE9E1;
  --bg-elev:       #FCFBF8;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #FFFFFF;

  --text:          #121316;
  --text-dim:      #464852;
  --text-faint:    #5E616D;

  --burgundy:      #8E1128;
  --burgundy-lt:   #B01835;
  --burgundy-soft: rgba(142, 17, 40, 0.08);
  --burgundy-glow: rgba(176, 24, 53, 0.22);
  --silver:        #262830;
  --silver-dim:    #5E616D;

  --border:        rgba(18, 19, 22, 0.11);
  --border-strong: rgba(18, 19, 22, 0.24);
  --border-ui:     rgba(18, 19, 22, 0.38);

  /* Canvas palette — bare "r,g,b" triples consumed by main.js */
  --rgb-dim:        70,72,82;
  --rgb-silver:     38,40,48;
  --rgb-grid:       18,19,22;
  --rgb-accent:     176,24,53;
  --rgb-burgundy:   142,17,40;
  --rgb-silver-dim: 94,97,109;
  --rgb-faint:      94,97,109;
}

/* Subtle calibrated acoustic drafting grid on the mineral paper ground */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(18, 19, 22, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 19, 22, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  background-attachment: scroll;
}

/* Subtle mineral paper tooth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.016;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Subtle architectural grid overlay inside instrument canvases */
.demo-canvas-wrap {
  background-color: #FAF9F6;
  background-image:
    linear-gradient(to right, rgba(18, 19, 22, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 19, 22, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Reinforce contrast for users who request more contrast */
@media (prefers-contrast: more) {
  :root {
    --text-dim: #262830;
    --text-faint: #3A3D47;
    --border: rgba(18, 19, 22, 0.28);
    --border-strong: rgba(18, 19, 22, 0.48);
  }
}
