/*
  Curatores design tokens.
  Three surfaces: the cinnabar wall (brand red), night panels (oxblood) and
  parchment, sampled from the scroll in the Curatores logo.
*/
:root {
  /* Wall */
  --wall: #9c2e25;
  --wall-deep: #7e241e;
  --wall-glow: #b9402f;

  /* Night panels */
  --night: #211110;
  --night-2: #2c1715;
  --night-3: #3a201c;

  /* Parchment (logo scroll) */
  --parchment: #f2e6cc;
  --parchment-2: #e7d4ac;
  --parchment-3: #d8bd86;
  --ink: #23150f;
  --ink-muted: #5e4634;

  /* Accents */
  --plaster: #f6ecdc;
  --gold: #e3b04b;
  --gold-bright: #f0c46a;
  --gold-ink: #8a5d12; /* gold for text on parchment (4.6:1) */
  --wrong: #e0705a; /* errors on night (5.1:1) */

  /* Text and rules by surface */
  --on-wall-muted: rgb(246 236 220 / 0.86);
  --on-night-muted: rgb(246 236 220 / 0.7);
  --rule-wall: rgb(246 236 220 / 0.28);
  --rule-night: rgb(246 236 220 / 0.12);
  --rule-parchment: rgb(35 21 15 / 0.14);

  /* Type */
  --font-display: "Marcellus", "Optima", Georgia, serif;
  --font-text: "EB Garamond", Garamond, Georgia, serif;
  --font-ui: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.1875rem;
  --text-md: 1.375rem;
  --text-lg: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
  --text-xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-2xl: clamp(2.6rem, 1.5rem + 4.2vw, 4.75rem);

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: clamp(4.5rem, 3rem + 6vw, 8rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --max-width: 76rem;
  --header-h: 4.5rem;

  /* Shape and depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(20 6 4 / 0.3), 0 6px 14px -8px rgb(20 6 4 / 0.5);
  --shadow-md: 0 2px 4px rgb(20 6 4 / 0.22), 0 20px 44px -20px rgb(20 6 4 / 0.7);
  --shadow-lg: 0 4px 10px rgb(20 6 4 / 0.2), 0 44px 90px -34px rgb(20 6 4 / 0.8);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 0.07);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Textures: lime-plaster grain and fresco mottling for the wall, fibre for parchment. */
  --fresco-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .02 0 0 0 0 .02 0 0 0 -2.4 1.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.2'/%3E%3C/svg%3E");
  --fresco-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='m' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0045' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .04 0 0 0 0 .03 0 0 0 1.5 -.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='.45'/%3E%3C/svg%3E");
  --parchment-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='p' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .04' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .1 0 0 0 1.2 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.35'/%3E%3C/svg%3E");
  /* A torn parchment edge, used as a mask along the top and bottom of parchment sections. */
  --torn-edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V13l18-4 14 6 21-8 16 5 11-7 24 9 15-6 19 4 13-9 22 8 17-3 12 6 20-10 18 7 14-4 23 6 16-8 12 5 21-6 17 9 15-7 24 5 13-6 19 8 16-5 22 4 14-9 18 7 20-4 13 6 17-8 15 5 10-3 16 5 12-4 13 6V24z'/%3E%3C/svg%3E");
}
