@charset "utf-8";

/* ==========================================================================
   The Workshop HQ - typeface and palette chooser. DRAFT BUILDS ONLY.
   --------------------------------------------------------------------------
   Review scaffolding, exactly like the ig-* stand-in photographs. Three
   mechanical gates keep it out of a live build - see assets/js/theme-demo.js.

   The site is one of THREE typefaces and one of TWO palettes. There is no
   "current" option and no fallback theme: styles.css itself now ships
   option 1 (Fann Street) on palette A (Workshop), so this file carries only
   the DIFFERENCES for the other two typefaces and the other palette.

   That is why there is no [data-theme-type="fann-street"] block and no
   [data-theme-palette="workshop"] block. Selecting either simply matches
   nothing here, and the base stylesheet applies. Do not add empty blocks
   for them - the absence is the mechanism.

   Load order: this file comes AFTER styles.css and availability.css, so its
   overrides win at equal specificity.

   Every palette here is verified with `node scripts/check-contrast.mjs` and
   passes every gated pair. Do not hand-edit a hex without re-running it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Palette B - Oak, oxblood and aged brass

   A deeper reading of the same four materials the palette was sampled from -
   oiled oak, dark painted timber, oxblood brick, aged brass - as one warm hue
   family on a single lightness ladder. Still understated, still not a dark
   theme.

   Known risk, and it is not a token problem: a deeper, redder ground subtracts
   more warmth from every image it carries, so any cool-cast photograph reads
   distinctly bluer against it. Commissioned photography would need grading to
   suit this palette.
   -------------------------------------------------------------------------- */

html[data-theme-palette="oak"] {
  --ink: #1a140d;
  --ink-soft: #3c3326;
  --muted: #746655;
  --muted-strong: #66594a;
  --paper: #f2ede7;
  --paper-2: #faf7f2;
  --shell: #e4dcd2;
  --shell-2: #c8b8a3;
  --line: #d0c5b6;
  --line-strong: #b8a892;
  --line-control: #7d6e59;
  --brick: #702a1f;
  --brass: #a5863f;
  --ok: #234e3b;
  --warn: #695413;
  --let: #564e43;

  --ok-tint: #e3e6e0;
  --warn-tint: #ebe7dc;
  --let-tint: #e9e6e1;
  --unknown-tint: #e8e3dc;

  --ink-70: rgba(26, 20, 13, 0.7);
  --ink-12: rgba(26, 20, 13, 0.12);
  --paper-16: rgba(242, 237, 231, 0.16);
}

/* --------------------------------------------------------------------------
   2. Typefaces 2 and 3

   One shared scale across all three, so the demo isolates the one variable
   being chosen. Option 1 (Sanchez + Archivo) lives in styles.css.
   -------------------------------------------------------------------------- */

/* Option 2. Besley - Bitter display, Archivo text. Same text voice as option 1,
   a narrower and more economical slab.

   Do not describe this to the client as "a Clarendon": its slab lineage is
   genealogical rather than a revival. Measured stroke contrast is 1.42 against
   roughly 1.7 for a true Clarendon, and its stem weight is barely
   distinguishable from Archivo's. */
html[data-theme-type="besley"] {
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
}

/* Option 3. Prospectus - Source Serif 4 throughout, Source Sans 3 for the
   markings only. Bringhurst's prescription where the subject, not the type, is
   the premium: the display line is nothing more than the text face enlarged,
   so the type never competes with the building. */
html[data-theme-type="prospectus"] {
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-label: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  /* Source Sans 3's uppercase is narrower than Archivo's, so the markings go
     back to the wider tracking the label texture was originally drawn around. */
  --tracking-label: 0.12em;
}

/* Prospectus sets h4 in the serif at 600 rather than dropping to a sans, so a
   fourth level still reads as a level rather than as a label. */
html[data-theme-type="prospectus"] h4 {
  font-family: var(--font-display);
  font-weight: 600;
}

/* The workshop marking channel. Options 1 and 2 set labels in Archivo, their own
   text face, so they need nothing here. Prospectus routes them to Source Sans 3,
   which is the only reason --font-label exists.

   This selector list is every rule in styles.css carrying --tracking-label,
   plus .status from availability.css. */
html[data-theme-type="prospectus"] .eyebrow,
html[data-theme-type="prospectus"] .link-arrow,
html[data-theme-type="prospectus"] .skip-link,
html[data-theme-type="prospectus"] .brand-est,
html[data-theme-type="prospectus"] .nav-toggle,
html[data-theme-type="prospectus"] .nav-link,
html[data-theme-type="prospectus"] .hero-kicker,
html[data-theme-type="prospectus"] .btn,
html[data-theme-type="prospectus"] .fact dt,
html[data-theme-type="prospectus"] .fact-term,
html[data-theme-type="prospectus"] .field-label,
html[data-theme-type="prospectus"] .footer-tagline,
html[data-theme-type="prospectus"] .footer-heading,
html[data-theme-type="prospectus"] .status,
html[data-theme-type="prospectus"] .moment::before {
  font-family: var(--font-label);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. The chooser panel

   Deliberately not built from site components: it must read as a tool sitting
   on top of the design, never as part of the design being judged. Its own
   colours are hard-coded for the same reason - it must look identical whichever
   palette is being previewed.
   -------------------------------------------------------------------------- */

.theme-demo {
  position: fixed;
  z-index: 200;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  justify-items: end;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.theme-demo-toggle {
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  color: #f5f2ec;
  background: #191713;
  border: 1px solid #191713;
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-demo-toggle:hover {
  background: #302b24;
}

.theme-demo-toggle:focus-visible {
  outline: 3px solid #a8894f;
  outline-offset: 2px;
}

.theme-demo-body {
  width: 17rem;
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  color: #f5f2ec;
  background: #191713;
  border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.theme-demo-note {
  margin: 0 0 0.85rem;
  color: rgba(245, 242, 236, 0.72);
  font-size: 12px;
}

.theme-demo-group {
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
}

.theme-demo-group:last-child {
  margin-bottom: 0;
}

.theme-demo-legend {
  padding: 0 0 0.4rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8894f;
}

.theme-demo-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.4rem 0;
  cursor: pointer;
}

.theme-demo-option input {
  margin: 0.15rem 0 0;
  accent-color: #a8894f;
}

.theme-demo-option-text {
  display: grid;
  gap: 0.1rem;
}

.theme-demo-option-label {
  font-weight: 700;
}

.theme-demo-option-detail {
  color: rgba(245, 242, 236, 0.66);
  font-size: 12px;
}

.theme-demo-option input:focus-visible {
  outline: 3px solid #a8894f;
  outline-offset: 2px;
}

@media print {
  .theme-demo {
    display: none;
  }
}
