/* Maliasili brand tokens for web and HTML outputs (sites, internal apps, dashboards, reports).
   Values mirror tokens.json (consolidation decisions D1-D8, 2026-10).
   Fonts: Barlow Condensed (display) + Libre Franklin (body) + Caveat Brush (stickies only). */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;1,600&family=Libre+Franklin:ital,wght@0,400;0,500;0,700;1,400&family=Caveat+Brush&display=swap");

:root {
  /* core */
  --m-mountain-blue: #426c8d;
  --m-ocean-turquoise: #509983;
  --m-flame-orange: #d97d1d;
  --m-leaf-green: #c1c223;
  /* text */
  --m-black: #000000;
  --m-grey: #4a4a4a;
  /* backgrounds */
  --m-white: #ffffff;
  --m-cream: #efefe4;
  --m-pale-blue: #dbe6d8;
  --m-pale-green: #deebc5;
  --m-pale-yellow: #faf19b;
  /* highlights */
  --m-sky-blue: #9ad2cf;
  --m-accent-blue: #63c4b5;
  --m-accent-green: #9bc555;
  --m-accent-orange: #fdcb67;

  /* semantic roles */
  --m-bg: var(--m-white);            /* default background is white */
  --m-bg-alt: var(--m-cream);
  --m-surface: var(--m-white);
  --m-callout: var(--m-pale-green);
  --m-text: var(--m-black);
  --m-text-soft: var(--m-grey);
  --m-heading: var(--m-mountain-blue);
  --m-accent: var(--m-ocean-turquoise);
  --m-emphasis: var(--m-flame-orange);
  --m-rule: var(--m-pale-blue);
  --m-action: var(--m-mountain-blue);
  --m-action-text: var(--m-white);

  --m-font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --m-font-body: "Libre Franklin", Arial, sans-serif;
  --m-font-hand: "Caveat Brush", cursive;

  --m-radius: 6px;
  --m-space: 8px;
}

/* Dark mode for apps and dashboards only (not used in decks or print).
   Brand colours keep their hue; Mountain Blue lifts so headings stay readable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --m-bg: #1d2620; --m-bg-alt: #26302a; --m-surface: #2c372f;
    --m-text: var(--m-cream); --m-text-soft: #bfc6b8; --m-heading: #8fb3d1;
    --m-rule: #3c4a40; --m-action: var(--m-ocean-turquoise);
  }
}
:root[data-theme="dark"] {
  --m-bg: #1d2620; --m-bg-alt: #26302a; --m-surface: #2c372f;
  --m-text: var(--m-cream); --m-text-soft: #bfc6b8; --m-heading: #8fb3d1;
  --m-rule: #3c4a40; --m-action: var(--m-ocean-turquoise);
}

body { background: var(--m-bg); color: var(--m-text); font: 400 1.0625rem/1.5 var(--m-font-body); }
h1, h2, h3 { font-family: var(--m-font-display); font-weight: 600; color: var(--m-heading); line-height: 0.9; }
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); }
h1 em, h2 em { font-style: normal; color: var(--m-emphasis); }   /* the two-part headline */
small, figcaption, .m-caption { color: var(--m-text-soft); font-size: 0.8rem; }
.m-eyebrow { font: 600 0.85rem/1.2 var(--m-font-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--m-accent); }
.m-card { background: var(--m-surface); border-radius: var(--m-radius); padding: calc(var(--m-space) * 3); }
.m-callout { background: var(--m-callout); border-radius: var(--m-radius); padding: calc(var(--m-space) * 2.5); }
.m-stat { font: 700 2.75rem/1 var(--m-font-display); color: var(--m-heading); }

/* Sticky note: always the real sticky graphic, always square. Never a CSS
   colour fill, never stretched. 1-4 per screen, always with words.
   <div class="m-sticky" data-colour="pink" style="--tilt:4deg">Text</div>
   Paths assume this file sits next to graphics/; adjust if copied elsewhere. */
.m-sticky {
  --tilt: -3deg;
  aspect-ratio: 1 / 1; width: min(14rem, 40vw);
  background: url("graphics/sticky-yellow.png") center / 100% 100% no-repeat;
  color: var(--m-black); font: 400 1.25rem/1.25 var(--m-font-hand);
  padding: 12% 10% 10%; display: grid; place-content: center; text-align: center;
  transform: rotate(var(--tilt));
}
.m-sticky[data-colour="orange"] { background-image: url("graphics/sticky-orange.png"); }
.m-sticky[data-colour="pink"] { background-image: url("graphics/sticky-pink.png"); }
.m-sticky[data-colour="blue"] { background-image: url("graphics/sticky-blue.png"); }
.m-sticky[data-colour="green"] { background-image: url("graphics/sticky-green.png"); }

.m-icon { width: 2.5rem; height: 2.5rem; color: var(--m-black); }  /* line icons: black, or white on dark; never brand colours */
