/* ==========================================================================
   The Real JFK Conspiracy — author site
   Base layout + three theme systems (Dossier / Editorial / Noir)
   ========================================================================== */

:root {
  --maxw: 1120px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 3px;
}

/* ---------- Theme: DOSSIER (declassified-file colors, Noir's prestige-serif typography) --- */
body[data-theme="dossier"] {
  --bg: #f4f0e6;
  --bg-alt: #ece5d3;
  --bg-hero: #f4f0e6;
  --panel: #fffdf8;
  --ink: #201c16;
  --ink-soft: #5b5344;
  --rule: #d8cfb8;
  --accent: #a13324;       /* muted brick red, not comic red */
  --accent-ink: #fff8f0;
  --accent-2: #3b4c5a;     /* steel blue-gray */
  --gold: #a1893a;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-meta: "Lora", Georgia, serif;
  --radius: 2px;
  --btn-radius: 2px;
  --tracking: 0.14em;
}

/* ---------- Theme: EDITORIAL (bold single-accent color block, no red dominance) -- */
body[data-theme="editorial"] {
  --bg: #f7f4ee;
  --bg-alt: #eee8dc;
  --bg-hero: #1f3a5f;
  --panel: #ffffff;
  --ink: #1c1e26;
  --ink-soft: #4d5261;
  --rule: #dcd5c4;
  --accent: #1f3a5f;       /* federal blue */
  --accent-ink: #ffffff;
  --accent-2: #c33c2f;     /* small red flourish only */
  --gold: #1f3a5f;
  --font-display: "Barlow Condensed", "Archivo Black", Arial, sans-serif;
  --font-body: "Source Sans 3", "Inter", Arial, sans-serif;
  --font-meta: "Source Sans 3", Arial, sans-serif;
  --radius: 6px;
  --btn-radius: 999px;
  --tracking: 0.03em;
}

/* ---------- Theme: NOIR (moody prestige-thriller, brass + ember red accent) ---------- */
body[data-theme="noir"] {
  --bg: #e4dfd1;
  --bg-alt: #dad3bf;
  --bg-hero: #171310;
  --panel: #f3efe4;
  --ink: #1c1712;
  --ink-soft: #5c5340;
  --rule: #cfc4a8;
  --accent: #8e3226;       /* ember red — the real accent, not near-black */
  --accent-ink: #f4efe4;
  --accent-2: #b08d57;     /* brass — secondary metal detail only */
  --gold: #b08d57;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-meta: "Lora", Georgia, serif;
  --radius: 2px;
  --btn-radius: 2px;
  --tracking: 0.14em;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--ink);
}
p { margin: 0 0 1.1em; }
.eyebrow {
  font-family: var(--font-meta);
  font-size: 12.5px;
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .9em;
  display: inline-block;
}
body[data-theme="editorial"] .eyebrow { color: var(--accent-2); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px;
  padding-top: 14px; padding-bottom: 14px;
  gap: 16px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 33px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
}
body[data-theme="dossier"] .wordmark { letter-spacing: .05em; text-transform: uppercase; font-size: 30px; }
body[data-theme="editorial"] .wordmark { text-transform: uppercase; letter-spacing: .01em; font-size: 32px; }
body[data-theme="noir"] .wordmark { text-transform: uppercase; letter-spacing: .05em; font-size: 30px; }

.wordmark-tag {
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-left: 12px;
  vertical-align: middle;
  display: inline-block;
}
body[data-theme="editorial"] .wordmark-tag { color: var(--accent-2); }

nav.primary-nav { display: flex; gap: 30px; }
nav.primary-nav a {
  text-decoration: none;
  font-family: var(--font-meta);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:hover, nav.primary-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
body[data-theme="editorial"] nav.primary-nav a:hover,
body[data-theme="editorial"] nav.primary-nav a.active { border-bottom-color: var(--accent-2); }

.nav-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px; height: 30px;
  background: none; border: none; padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-meta);
  font-size: 13.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--btn-radius);
  border: 1.5px solid var(--ink);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
body[data-theme="noir"] .btn { border-radius: 2px; }
body[data-theme="editorial"] .btn { border-width: 0; font-weight: 700; }
body[data-theme="editorial"] .btn-outline { border: 2px solid var(--ink); }

/* ---------- Hero (home) ---------- */
.hero {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--rule);
}
body[data-theme="editorial"] .hero,
body[data-theme="noir"] .hero { border-bottom: none; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
  padding-top: clamp(50px, 7vw, 90px);
  padding-bottom: clamp(50px, 7vw, 90px);
}
body[data-theme="noir"] .hero,
body[data-theme="noir"] .hero h1,
body[data-theme="noir"] .hero p,
body[data-theme="noir"] .hero .eyebrow { color: var(--accent-ink); }
body[data-theme="noir"] .hero .eyebrow { color: var(--gold); }
body[data-theme="editorial"] .hero { color: #fff; }
body[data-theme="editorial"] .hero h1,
body[data-theme="editorial"] .hero p { color: #fff; }
body[data-theme="editorial"] .hero .eyebrow { color: #ffd7ce; }

/* hero CTAs need their own contrast pass on dark/color-block heroes,
   since --accent doubles as --bg-hero in these two themes */
body[data-theme="noir"] .hero .btn-primary { background: var(--gold); border-color: var(--gold); color: #181410; }
body[data-theme="noir"] .hero .btn-outline { color: var(--accent-ink); border-color: var(--accent-ink); }
body[data-theme="noir"] .hero .btn-outline:hover { background: var(--accent-ink); color: var(--bg-hero); }

body[data-theme="editorial"] .hero .btn-primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
body[data-theme="editorial"] .hero .btn-outline { color: #fff; border-color: #fff; }
body[data-theme="editorial"] .hero .btn-outline:hover { background: #fff; color: var(--accent); }

.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  text-transform: uppercase;
  letter-spacing: .01em;
}
body[data-theme="dossier"] .hero h1 { text-transform: none; font-style: italic; letter-spacing: 0; }
body[data-theme="noir"] .hero h1 { text-transform: none; font-style: italic; letter-spacing: 0; }
.hero .subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 1.1em;
}
body[data-theme="noir"] .hero .subtitle,
body[data-theme="editorial"] .hero .subtitle { color: rgba(255,255,255,.82); }

.hero .dek { font-size: 18px; max-width: 46ch; }
.hero .cta-row { display: flex; gap: 16px; margin-top: 1.6em; flex-wrap: wrap; }

.hero-cover {
  position: relative;
  display: flex; justify-content: center;
}
.hero-cover img {
  width: min(320px, 80%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
}
body[data-theme="dossier"] .hero-cover img { box-shadow: 0 26px 54px -22px rgba(32,26,18,.4); }
body[data-theme="editorial"] .hero-cover img { box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
body[data-theme="noir"] .hero-cover img { box-shadow: 0 0 0 1px rgba(176,141,87,.5), 0 30px 70px -15px rgba(0,0,0,.7); }

/* ---------- Rating badge / pullquote ---------- */
.rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 1.4em; }
.stars { color: var(--gold); font-size: 18px; letter-spacing: 2px; }
body[data-theme="noir"] .stars, body[data-theme="editorial"] .stars { color: var(--gold); }
.rating-score { font-family: var(--font-meta); font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
body[data-theme="noir"] .rating-score, body[data-theme="editorial"] .rating-score { color: rgba(255,255,255,.7); }

.pullquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 .6em;
}
body[data-theme="editorial"] .pullquote { border-left-color: var(--accent-2); }
.pullquote cite { display: block; font-family: var(--font-meta); font-style: normal; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-top: .6em; }

/* ---------- Sections ---------- */
.section { padding: clamp(50px, 7vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 62ch; margin-bottom: 2.2em; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
body[data-theme="editorial"] .section-head h2 { text-transform: uppercase; }
.rule { border: none; border-top: 1px solid var(--rule); margin: 3.2em 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

/* About page: Full Story paragraphs flow into two balanced columns on desktop */
.full-story-columns { column-count: 2; column-gap: 48px; max-width: 90ch; }
.full-story-columns p { break-inside: avoid; }

/* Publications page: cover image + buy panel stacked in column 1, synopsis fills column 2 */
.book-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.book-cover-col { grid-column: 1; grid-row: 1; }
.book-buy-col { grid-column: 1; grid-row: 2; }
.book-synopsis-col { grid-column: 2; grid-row: 1 / span 2; }

@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero .wrap { grid-template-columns: 1fr; }
  .full-story-columns { column-count: 1; }
  .book-layout { grid-template-columns: 1fr; }
  .book-cover-col, .book-synopsis-col, .book-buy-col { grid-column: 1; grid-row: auto; }

  .wordmark { font-size: 21px; }
  body[data-theme="dossier"] .wordmark { font-size: 18px; letter-spacing: .02em; }
  body[data-theme="editorial"] .wordmark { font-size: 21px; }
  body[data-theme="noir"] .wordmark { font-size: 23px; }
  .wordmark-tag { font-size: 9.5px; margin-left: 7px; }

  .nav-toggle { display: flex; }
  nav.primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  nav.primary-nav.open { max-height: 320px; }
  nav.primary-nav a {
    padding: 16px var(--pad);
    border-bottom: 1px solid var(--rule);
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { font-size: 19px; margin-bottom: .5em; }
.card .num { font-family: var(--font-meta); font-size: 12px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }

/* fact list (about page) */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-meta);
  font-size: 14px;
}
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts .k { width: 120px; flex: none; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; padding-top: 2px; }

/* buy panel */
.buy-panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
}
.retailers { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0 0; padding: 0; list-style: none; }
.retailers a {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: var(--btn-radius);
  padding: 7px 14px;
  color: var(--ink-soft);
  transition: color .15s ease, border-color .15s ease;
}
.retailers a:hover { color: var(--ink); border-color: var(--ink-soft); }

/* press release block */
.release {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
}
.release h3 { font-size: 20px; }
.release .dateline { font-family: var(--font-meta); font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.4em; display: block; }

.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 1.6em; }
.asset-card { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.asset-card img { width: 100%; height: 170px; object-fit: cover; object-position: center 20%; }
.asset-card .cap { padding: 12px 14px; font-family: var(--font-meta); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 760px) { .asset-grid { grid-template-columns: 1fr; } }

/* contact form */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-family: var(--font-meta); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; font-family: var(--font-body); font-size: 16px;
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--panel); color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field select { cursor: pointer; }
.form-status {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 20px;
}
.form-status.error { color: var(--accent); border-color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.site-footer p { margin: 0; font-family: var(--font-meta); font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-family: var(--font-meta); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }

/* page hero (non-home pages) */
.page-hero { padding: clamp(46px, 6vw, 72px) 0 clamp(10px,1.5vw,15px); }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 52px); }
body[data-theme="editorial"] .page-hero h1 { text-transform: uppercase; }
.page-hero .subtitle { font-style: italic; color: var(--ink-soft); }

/* tighter top padding for the section immediately following a page-hero */
.section-tight-top { padding-top: clamp(25px, 3.5vw, 48px); }
