/* ==========================================================================
   ThetaRev — Theme & font preview (TEMPORARY)
   Font sets B–D and the switcher panel. Shown locally, or with ?theme=/?font=.
   Once a font set is chosen, copy its values into theme.css and delete this
   file, js/preview.js and their two lines in index.html.
   (Color themes are permanent and live in themes.css.)
   ========================================================================== */

/* B — Fraunces / Manrope / IBM Plex Mono: softer, warmer */
html[data-font="b"] {
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans:  "Manrope", system-ui, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, monospace;
  --text-display: clamp(2.5rem, 6.5vw, 5.25rem);
  --text-headline: clamp(1.9rem, 4.4vw, 3.25rem);
}

/* C — Cormorant Garamond / DM Sans / DM Mono: classic, private-bank */
html[data-font="c"] {
  --font-serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --font-sans:  "DM Sans", system-ui, sans-serif;
  --font-mono:  "DM Mono", ui-monospace, monospace;
  --font-serif-weight: 500;
  --text-display: clamp(2.9rem, 7.5vw, 5.6rem);
  --text-headline: clamp(2.3rem, 5.5vw, 4.1rem);
  --text-title: clamp(1.8rem, 3.4vw, 2.5rem);
}

/* D — Newsreader / Inter Tight / IBM Plex Mono: research journal */
html[data-font="d"] {
  --font-serif: "Newsreader", Georgia, serif;
  --font-sans:  "Inter Tight", system-ui, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, monospace;
  --text-display: clamp(2.5rem, 6.2vw, 4.75rem);
}

/* ---- Switcher ------------------------------------------------------------ */

.preview-switcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: grid;
  gap: 4px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--color-rule);
  border-radius: 14px;
  background: var(--color-paper);
  box-shadow: 0 6px 24px rgba(var(--ink-rgb), 0.08);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--color-mist);
}

.preview-switcher .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-switcher .name {
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.preview-switcher .choices {
  display: flex;
  gap: 4px;
}

.preview-switcher button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  font: inherit;
  color: var(--color-ink);
  text-transform: uppercase;
  cursor: pointer;
}

.preview-switcher button.swatch {
  border-color: var(--color-rule);
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
}

.preview-switcher button[aria-pressed="true"] {
  border-color: var(--color-accent-strong);
  color: var(--color-accent-strong);
  box-shadow: 0 0 0 2px var(--color-paper), 0 0 0 3px var(--color-accent-strong);
}

.preview-switcher button.swatch[aria-pressed="true"] {
  border-color: transparent;
}
