/* OttoCore — paper.css: the Otto family "Sketchbook" sheets as CSS tokens.
 *
 * One source for every web surface (the WebView apps and ottoengineering.xyz).
 * Cream paper is the default sheet; dark paper applies under
 * <html data-theme="dark">. otto-paper.js switches sheets and paints the tooth.
 *
 * Provenance
 *   Neutrals  otto::pal::paperNeutrals / darkNeutrals (juce/Palette.h L32–68),
 *             verbatim. Change them there first, then here.
 *   Web-only  --text-bright, --label, --hover-bg, --viz-bg have no Palette.h
 *             entry; they come from the Habitat/Streams web UIs (identical in
 *             both). --otto-red / --otto-green likewise.
 *   Family    --otto-<product> is each product's identity pigment, copied from
 *             its own palette (Streams/Habitat static/index.html --accent,
 *             OttoVerb/DelOtto/OttoLoop *LookAndFeel.h accent). --otto-sleep
 *             is Sleep's night-sky indigo, sourced from swift/OttoPaper
 *             Pigment.sleep (Sleep is a SwiftUI app themed through that
 *             package); change it there first, then here.
 *   Shape     card/button/chip radii and shadows from juce/LookAndFeel.h and the
 *             overlay cards (DropShadow(shadow, 12, {0,3})).
 *
 * Adoption  link this file BEFORE an app's own <style>; an app then keeps only
 *           its own hues (--accent etc.) and may delete its copy of these
 *           neutrals. --paper-img stays `none` here: otto-paper.js sets it at
 *           runtime (show it with background-size: 480px 480px).
 */

:root {
  /* Sheet neutrals: cream paper */
  --bg:           #f3eee3;  --bg-rgb:     243, 238, 227;   /* paper */
  --bg-light:     #efe9dc;                                 /* zone fill */
  --panel:        #eae3d4;  --panel-rgb:  234, 227, 212;   /* chips, cards, menus */
  --panel-border: #cfc5b3;                                 /* faint pencil rule */
  --ink:          #3a342d;  --ink-rgb:    58, 52, 45;      /* text */
  --text-dim:     #8a8072;                                 /* light pencil labels */
  --knob-track:   #d5cbb8;
  --knob-thumb:   #4a433a;                                 /* dark ink dot */
  --slider-bg:    #e6dfcf;
  --pencil:       #b3a893;  --pencil-rgb: 179, 168, 147;   /* visible outlines */
  --on-accent:    #3a342d;
  --shadow:       rgba(58, 52, 45, 0.18);                  /* warm ink */
  --shadow-rgb:   58, 52, 45;
  --scrim:        rgba(243, 238, 227, 0.88);
  --shade:        #3a342d;  --shade-rgb:  58, 52, 45;      /* relief / darkening */
  --text-bright:  #241f1a;                                 /* web-only: more ink than --ink */
  --label:        #5a5248;                                 /* web-only: param labels */
  --hover-bg:     #e2dac9;                                 /* web-only: chip hover */
  --viz-bg:       #ede7da;                                 /* web-only: canvas wells */
  --otto-red:     #b8432e;  --otto-red-rgb:   184, 67, 46; /* vermilion */
  --otto-green:   #5e8a3a;  --otto-green-rgb: 94, 138, 58; /* sap green */

  /* Family identity pigments: cream paper */
  --otto-streams:  #3e6e96;  --otto-streams-rgb:  62, 110, 150;   /* azure */
  --otto-habitat:  #307252;  --otto-habitat-rgb:  48, 114, 82;    /* viridian */
  --otto-ottoverb: #b07d2e;  --otto-ottoverb-rgb: 176, 125, 46;   /* ochre */
  --otto-delotto:  #3d6b8c;  --otto-delotto-rgb:  61, 107, 140;   /* Prussian (Digital voice) */
  --otto-ottoloop: #7d5f98;  --otto-ottoloop-rgb: 125, 95, 152;   /* heather */
  --otto-sleep:    #4e4b8b;  --otto-sleep-rgb:    78, 75, 139;    /* indigo */

  /* Shape (sheet-independent) */
  --otto-radius-card: 8px;
  --otto-radius-btn:  4px;
  --otto-radius-chip: 3px;
  --otto-pencil-width: 1.1px;                              /* overlay-card outline (strokeInk width) */
  --otto-cream: #f3eee3;                                   /* the two sheets' base colours, sheet-independent: */
  --otto-dark:  #3b3834;                                   /* a cream badge on dark paper, theme-color metas */
  --otto-shadow-card: 0 3px 12px var(--shadow);
  --otto-shadow-chip: 0 1px 3px var(--shadow);

  /* A piece of paper laid on the sheet (web-only). The tooth tile is lit from
     the top-left (makePaperTile), so a cut edge catches that light: a lit top
     edge, a shaded underside, a tight contact shadow, then the card shadow.
     -lift is the same paper raised a little (hover on a card that is a link). */
  --otto-shadow-paper:      inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(var(--shade-rgb), .05),
                            0 1px 1px rgba(var(--shade-rgb), .10), 0 3px 12px var(--shadow);
  --otto-shadow-paper-lift: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(var(--shade-rgb), .05),
                            0 2px 2px rgba(var(--shade-rgb), .10), 0 8px 20px var(--shadow);

  /* Paper tooth tile, set at runtime by otto-paper.js */
  --paper-img:    none;
}

:root[data-theme="dark"] {
  /* Sheet neutrals: dark paper */
  --bg:           #3b3834;  --bg-rgb:     59, 56, 52;
  --bg-light:     #3f3c37;
  --panel:        #45413b;  --panel-rgb:  69, 65, 59;
  --panel-border: #605a51;
  --ink:          #ece5d6;  --ink-rgb:    236, 229, 214;
  --text-dim:     #aaa090;
  --knob-track:   #645e54;
  --knob-thumb:   #e6decf;                                 /* light chalk dot */
  --slider-bg:    #47433d;
  --pencil:       #857c6f;  --pencil-rgb: 133, 124, 111;
  --on-accent:    #ece5d6;
  --shadow:       rgba(16, 13, 10, 0.40);
  --shadow-rgb:   16, 13, 10;
  --scrim:        rgba(59, 56, 52, 0.88);
  --shade:        #120f0c;  --shade-rgb:  18, 15, 12;
  --text-bright:  #f8f3e9;
  --label:        #d2c9b9;
  --hover-bg:     #4e4a43;
  --viz-bg:       #35322e;
  --otto-red:     #de7a62;  --otto-red-rgb:   222, 122, 98;
  --otto-green:   #8db86a;  --otto-green-rgb: 141, 184, 106;

  /* Family identity pigments: dark paper (lifted, never neon) */
  --otto-streams:  #7da6c8;  --otto-streams-rgb:  125, 166, 200;
  --otto-habitat:  #83c5a2;  --otto-habitat-rgb:  131, 197, 162;
  --otto-ottoverb: #c9984a;  --otto-ottoverb-rgb: 201, 152, 74;
  --otto-delotto:  #6f9ab8;  --otto-delotto-rgb:  111, 154, 184;
  --otto-ottoloop: #a68cc0;  --otto-ottoloop-rgb: 166, 140, 192;
  --otto-sleep:    #9e9bd4;  --otto-sleep-rgb:    158, 155, 212;

  /* Paper edges on dark paper: a fainter lit edge, a deeper underside */
  --otto-shadow-paper:      inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(0, 0, 0, .18),
                            0 1px 1px rgba(0, 0, 0, .30), 0 3px 12px var(--shadow);
  --otto-shadow-paper-lift: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(0, 0, 0, .18),
                            0 2px 2px rgba(0, 0, 0, .30), 0 8px 20px var(--shadow);
}
