/* Self-hosted fonts (SIL Open Font License; licence files in /assets/fonts/).
   Variable weights; Latin and Latin Extended subsets, each loaded only if a page uses it. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  /* Palette drawn from the site hero: ivory, blush, antique gold, deep umber */
  --color-bg: #faf5ec;
  --color-bg-alt: #f3e7d8;
  --color-surface: #fffdf9;
  --color-surface-raised: #ffffff;

  --color-text: #3a2c24;
  --color-text-muted: #6b5b4d;
  --color-text-faint: #6e5d4c;

  --color-primary: #a97c50;
  --color-primary-dark: #7f5c37;
  --color-primary-light: #c9a06f;
  /* Always dark enough for white text — kept separate from --color-primary-dark,
     which doubles as hover-state text color and must stay light in dark mode. */
  --color-button-bg: #7f5c37;
  --color-button-bg-hover: #a1615d;

  --color-accent: #c98c86;
  --color-accent-soft: #f1d9d4;
  --color-accent-deep: #813f3b;

  --color-border: #e6d6c2;
  --color-border-soft: #eee2d1;
  --color-link: #764f28;
  --color-link-visited: #7a5a54;

  --color-focus: #7f5c37;

  /* Accessory-family accents (timeline markers, filters) */
  --fam-head-hair: #965a56; /* was #a1615d: 4.41:1 on --color-bg, under the 4.5:1 minimum for the small timeline labels */
  --fam-hands-arms: #8a6a2f;
  --fam-feet-legs: #4c7069;
  --fam-carried: #7f5c37;
  --fam-fasteners: #5d6290;
  --fam-finishing-pieces: #8f5578;
  --fam-practical-optical: #3e6d8a;
  --fam-general: #6b5b4d;

  --font-display: "Playfair Display", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;

  --shadow-sm: 0 1px 2px rgba(58, 44, 36, 0.08);
  --shadow-md: 0 6px 20px rgba(58, 44, 36, 0.10);
  --shadow-lg: 0 16px 40px rgba(58, 44, 36, 0.14);

  --content-max: 72ch;
  --page-max: 1180px;
  --article-max: 64rem; /* text column + side column */

  /* Footer: a dark band in both colour schemes */
  --color-footer-bg: #2e231c;
  --color-footer-text: #e9dfd3;
  --color-footer-muted: #c4b3a1;
  --color-footer-rule: #4a3a2e;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #211a15;
    --color-bg-alt: #2a221b;
    --color-surface: #2a221b;
    --color-surface-raised: #322921;

    --color-text: #f2e9df;
    --color-text-muted: #cdbdac;
    --color-text-faint: #a5947f;

    --color-primary: #d9ac78;
    --color-primary-dark: #c9945c;
    --color-primary-light: #e6c497;
    --color-button-bg: #7a5530;
    --color-button-bg-hover: #8a4a46;

    --color-accent: #d9a09a;
    --color-accent-soft: #4a3530;
    --color-accent-deep: #e0b3ae;

    --color-border: #453729;
    --color-border-soft: #3a2f26;
    --color-link: #e0b578;
    --color-link-visited: #d3a49d;

    --color-focus: #e6c497;

    --fam-head-hair: #e0a29d;
    --fam-hands-arms: #d6b26a;
    --fam-feet-legs: #8fc0b6;
    --fam-carried: #d9ac78;
    --fam-fasteners: #a9aee0;
    --fam-finishing-pieces: #d9a3c4;
    --fam-practical-optical: #8fbedb;
    --fam-general: #cdbdac;

    --color-footer-bg: #15100c;
    --color-footer-rule: #3a2f26;

    color-scheme: dark;
  }
}
