/* Automotive Edition dark theme (Steve, 2026-09-27): the whole Automotive Edition
   section runs dark, not the site's light tan paper. Applied by adding
   body.theme-dark to: the /rebirth/automotive-edition/ subpage, its nine work
   pages, /films/automotive/ and every film page under it (including the
   unlisted Volvo and Datsun 510 commission pages). #0c0c0c matches the print
   plate colour exactly, so the page background and the print's own black plate
   read as one surface with no visible seam.

   Both stylesheets this loads alongside (styles.css and film-pages-v02.css)
   already read colour off --paper / --paper-deep / --ink / --muted / --line,
   so overriding those custom properties here re-themes almost everything
   automatically. Only the handful of places below that hardcode a light
   colour directly need a fix. */

body.theme-dark {
  --black: #0c0c0c; /* the print plate, so prints and their frame read as one surface */
  --paper: #0c0c0c;
  --paper-deep: #141414;
  --ink: #f2eee8;
  --muted: rgba(242, 238, 232, 0.62);
  --line: rgba(242, 238, 232, 0.18);
  --blue: #7fb3e0;
  background: var(--paper);
  color: var(--ink);
}

/* styles.css: the sidebar/header carries a hardcoded light gradient over a
   painting thumbnail as a paper-texture wash; swap it for a dark equivalent. */
body.theme-dark .site-header {
  background:
    linear-gradient(180deg, rgba(12, 12, 12, 0.97), rgba(20, 20, 20, 0.92)),
    url('../paintings/thumbs/201905_Steve_Baylis.jpg');
  background-size: cover;
  background-blend-mode: normal, luminosity;
}

@media (max-width: 1000px) {
  body.theme-dark .site-header,
  body.theme-dark .site-nav { background: var(--paper); }
}

/* Focus outlines: --blue above is already the dark-mode value; make sure both
   stylesheets' focus rules (styles.css uses the variable, film-pages-v02.css
   hardcodes its own navy) both resolve to a visible outline on black. */
body.theme-dark a:focus-visible,
body.theme-dark button:focus-visible,
body.theme-dark input:focus-visible,
body.theme-dark video:focus-visible {
  outline-color: var(--blue);
}

/* film-pages-v02.css hardcodes body copy as a near-black grey, illegible on a
   near-black background. */
body.theme-dark .film-notes p,
body.theme-dark .collection-intro {
  color: rgba(242, 238, 232, 0.78);
}

/* The commission callout and work-meta rows must stay a distinct, readable
   box on dark, not just blend into the page. */
body.theme-dark .commission-callout {
  background: var(--paper-deep);
  border-color: var(--line);
}

body.theme-dark .work-meta div,
body.theme-dark .work-pagination a {
  background: var(--paper-deep);
}

/* Card art / film frame plates already sit on near-black (#050505); keep them
   a hair darker than the page so the print's own plate still reads as the
   brightest black in the frame. */
body.theme-dark .film-frame,
body.theme-dark .card-art { background: #050505; }

body.theme-dark .work-item img { background: var(--paper); }
