/* Crystal Sanctuary design tokens. The one source: brand/tokens.css (the site uses a copy at css/tokens.css,
   written by tools/build_site.py). Read brand/DESIGN.md before changing a value.

   Two themes:
   - paper (default): the light galleries. Warm ivory paper, warm ink, one oxblood accent.
   - night: the one dark room (walk.html). Set it with <html data-theme="night">.
   There is no automatic dark mode: the museum is light by design, and the dark room is a place, not a setting. */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/BodoniModa.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/BodoniModa-Italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/Newsreader.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/Newsreader-Italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/LibreFranklin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* ---- colour: paper ---- */
  --paper:      #f5f1e8;   /* the page */
  --paper-2:    #fbf8f2;   /* a plate, a raised panel, an input */
  --sweep-top:  #e4ddd0;   /* back of the studio ground */
  --sweep-mid:  #f1ede5;   /* where the ground turns to floor */
  --ink:        #1d1a16;   /* text, rules that carry weight, the Facet's edges */
  --ink-2:      #6a6257;   /* secondary text, captions, labels */
  --ink-3:      #8f8678;   /* tertiary: scale ticks, disabled. Never for reading text */
  --rule:       #cbbfac;   /* hairlines */
  --accent:     #7a2a1c;   /* oxblood: labels, plate marks, the Facet's lit face, one link state */
  --on-accent:  #f5f1e8;
  --shadow:     58 46 34;  /* contact-shadow tint, as R G B for rgb(var(--shadow) / a) */
  --focus:      #7a2a1c;

  /* ---- type ---- */
  --f-display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  /* Bodoni is set at a text optical size and weight 500, never its default display cut: at 96 px the default's
     hairlines break up and the headline stops reading (James, 3 Dec: "not very readable"). */
  --d-weight: 500;
  --d-opsz:   "opsz" 28;
  --f-text:    "Newsreader", Georgia, "Times New Roman", serif;
  --f-label:   "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --t-hero:  clamp(44px, 6.2vw, 96px);   /* Bodoni, one per page at most */
  --t-h1:    clamp(36px, 4.4vw, 64px);   /* Bodoni */
  --t-h2:    clamp(28px, 3vw, 44px);     /* Bodoni */
  --t-h3:    clamp(22px, 1.9vw, 28px);   /* Bodoni */
  --t-num:   clamp(64px, 8vw, 132px);    /* lot numbers: Newsreader 300, never Bodoni (its 1 reads as I) */
  --t-lede:  clamp(19px, 1.55vw, 23px);  /* Newsreader */
  --t-body:  18px;                       /* Newsreader */
  --t-small: 15px;                       /* Newsreader: captions, notes */
  --t-label: 11px;                       /* Libre Franklin 500, capitals, tracked */
  --t-data:  13px;                       /* Libre Franklin 400: Hz, figures in tables */
  --track-label: .22em;
  --track-mark:  .3em;
  --lh-body: 1.6;
  --lh-tight: 1.06;

  /* ---- space and shape ---- */
  --gutter: clamp(16px, 4vw, 56px);      /* page side margin; 16 px on a phone */
  --measure: 62ch;                       /* longest reading line */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px; --s-5: 64px; --s-6: 104px; --s-7: 168px;
  --hair: 1px;                           /* every rule is a hairline; one heavier ink rule opens a fact block */
  --rule-strong: 1.5px;
  --radius: 0;                           /* paper has square corners; controls get 2px at most */
  --radius-control: 2px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---- the one dark room ---- */
[data-theme="night"] {
  --paper:      #0b0a08;
  --paper-2:    #13110e;
  --sweep-top:  #0b0a08;
  --sweep-mid:  #0b0a08;
  --ink:        #ece5d8;   /* bone */
  --ink-2:      #a39a8b;
  --ink-3:      #6f685d;
  --rule:       rgba(236, 229, 216, .16);
  --accent:     #c98a72;   /* oxblood raised to an ember, so it reads on black */
  --on-accent:  #0b0a08;
  --shadow:     0 0 0;
  --focus:      #ece5d8;
}
