/* minanima · theme.
   The whole colour scheme comes from two key colours, set in the site editor (Page text > Colours and fonts):
   --primary, a deep colour for the frame of the site, and --accent, a softer colour for highlights.
   Every other shade below is worked out from those two, and the warm neutrals stay fixed.
   The server writes the chosen colours and fonts into each page, after this file, so they override these defaults.
   .theme-scope lets the site editor preview a scheme inside one element without touching its own colours. */

:root, .theme-scope {
  --primary: #21142a;
  --accent: #c98d9c;
  --font-heading: 'Cormorant Garamond';
  --font-body: 'Inter';

  /* Fallbacks for browsers without relative colours: the key colours themselves still apply */
  --primary-950: #170e1c;
  --primary-800: #2f1d3b;
  --primary-700: #4a3352;
  --primary-650: #3d2945;
  --primary-600: #3a2648;
  --text: #2b2129;
  --text-2: #6a5a63;
  --accent-soft: #ead0d6;
  --accent-pale: #dfc0c8;
  --accent-mid: #cfa9b3;
  --accent-deep: #9a5e70;

  /* Fixed warm neutrals behind the reading sections and on the Paris house */
  --paper: #f6f1eb;
  --sand: #ece4da;
  --line: #dacfc4;
  --stone-2: #d3c4b6;
  --warm-light: #f0d6c8;
}

/* Each shade keeps the key colour's hue and saturation, shifted in lightness (tuned so the defaults match the original design exactly) */
@supports (color: oklch(from red l c h)) {
  :root, .theme-scope {
    --primary-950: oklch(from var(--primary) calc(l - .0366) calc(c * .684) calc(h + 2.6));
    --primary-800: oklch(from var(--primary) calc(l + .0488) calc(c * 1.295) calc(h + .3));
    --primary-700: oklch(from var(--primary) calc(l + .1409) calc(c * 1.322) calc(h + 6.8));
    --primary-650: oklch(from var(--primary) calc(l + .0975) calc(c * 1.218) calc(h + 5.6));
    --primary-600: oklch(from var(--primary) calc(l + .0892) calc(c * 1.417) h);
    --text: oklch(from var(--primary) calc(l + .0431) calc(c * .459) calc(h + 22.8));
    --text-2: oklch(from var(--primary) calc(l + .2666) calc(c * .549) calc(h + 32.9));
    --accent-soft: oklch(from var(--accent) calc(l + .1742) calc(c * .399) calc(h - .7));
    --accent-pale: oklch(from var(--accent) calc(l + .1299) calc(c * .488) calc(h - 2.2));
    --accent-mid: oklch(from var(--accent) calc(l + .065) calc(c * .615) calc(h - 2.1));
    --accent-deep: oklch(from var(--accent) calc(l - .1528) calc(c * 1.081) calc(h - 2.1));
  }
}
