/*
Theme Name: BBJ Journal
Author: Journal desk
Description: Ivory editorial theme for the BIG BOSS JUDI Journal. Not the primary website.
Version: 1.5.6
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: bbj-journal
*/

:root {
  --ink: #0c1018;
  --navy: #132033;
  --gold: #b8893d;
  --gold-soft: #e7d3a1;
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --text: #1c1914;
  --muted: #5e584e;
  --line: rgba(18, 22, 32, 0.16);
  --serif: Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.staging-flag {
  background: #6d1d1d;
  color: #fff8ef;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  margin: 0;
}

.mast { background: var(--ink); color: var(--paper); }
.mast-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(231, 211, 161, 0.28);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.brand-row {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px);
  gap: 32px;
  align-items: end;
  padding: 28px 0 8px;
}
.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin: 0;
}
.brand a { text-decoration: none; }
.brand span {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.search { display: flex; align-items: center; border-bottom: 1px solid var(--gold); }
.search input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--paper);
  padding: 8px 0;
  outline: none;
}
.search input::placeholder { color: rgba(243, 239, 230, 0.55); }
.nav-toggle {
  display: none;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--gold);
  padding: 8px 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 8px 0 12px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  border-top: 1px solid rgba(231, 211, 161, 0.28);
}
.nav a {
  display: block;
  color: var(--paper);
  text-decoration: none;
  padding: 14px 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}
.nav a[aria-current="page"] { color: var(--gold-soft); }

.hero { padding: 88px 0 20px; max-width: 40rem; }
.hero h1 { max-width: 11em; }
.desk-note { margin: 18px 0 0; color: #6d4e16; font-size: 13px; letter-spacing: 0.03em; }
footer .desk-note { color: var(--gold-soft); }
.kicker {
  margin: 0 0 12px;
  color: #6d4e16;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}
footer .kicker { color: var(--gold-soft); }
h1, .story h2, .band h2, .about h2, .section-head h2, .entry-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.hero h1, .entry-head h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.96;
  margin: 0 0 18px;
}
.dek { font-size: 20px; line-height: 1.45; max-width: 38rem; margin: 0 0 18px; }
.meta { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.badge {
  display: inline-block;
  margin-right: 8px;
  border: 1px solid var(--gold);
  color: #6d4e16;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 6px;
  vertical-align: 1px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--ink);
  margin-top: 36px;
  padding-top: 14px;
}
.section-head h2, .about h2, .band h2 { font-size: 32px; line-height: 1.1; margin: 0; }
.section-note { color: var(--muted); font-size: 14px; margin: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 8px 0 8px;
}
.story { padding: 22px 0; border-bottom: 1px solid var(--line); }
.story h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; margin: 8px 0; }
.story-lead h2 { font-size: clamp(34px, 3.6vw, 52px); }
.feature-grid .story:not(.story-lead) h2 { font-size: clamp(26px, 2.2vw, 34px); }
.story h2 a, .latest a, .related a { text-decoration: none; }
.story h2 a:hover, .latest a:hover, .related a:hover { text-decoration: underline; }
.story p, .latest p { margin: 0; color: var(--muted); }
.cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
  margin-bottom: 16px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(160deg, rgba(184, 137, 61, 0.18), transparent 46%),
    var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
}
.story-lead .cover { min-height: 228px; padding: 22px 22px 18px; }
.cover-kicker {
  margin: 0;
  color: #6d4e16;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cover-title {
  max-width: 16em;
  margin: 28px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.12;
}
.story img, .entry-body img.feature { width: 100%; margin-bottom: 14px; }

.latest { list-style: none; margin: 0; padding: 0; }
.latest li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.latest h3 { font-family: var(--serif); font-size: 26px; line-height: 1.15; font-weight: 500; margin: 4px 0 6px; }

.bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; padding: 18px 0 12px; }
.band { border-top: 3px solid var(--ink); padding-top: 14px; }
.band p { color: var(--muted); margin: 10px 0 0; }
.band h2 a { color: inherit; text-decoration: none; }
.band h2 a:hover { text-decoration: underline; }
.band-link a { color: #6d4e16; }
.empty-line { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.empty-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
}

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  margin: 28px 0 56px;
  padding: 28px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.about p { margin: 0 0 1em; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; list-style: none; margin: 0 0 22px; padding: 0; font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; color: var(--gold); }
.crumbs a { color: #6d4e16; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-areas: "head toc" "body toc";
  gap: 12px 40px;
  width: min(1040px, calc(100% - 48px));
  margin: 36px auto 64px;
}
.entry-head { grid-area: head; max-width: 40rem; }
.toc { grid-area: toc; align-self: start; position: sticky; top: 24px; padding-top: 8px; }
.toc h2 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; text-decoration: none; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.toc .toc-h3 { padding-left: 12px; }
.entry-body { grid-area: body; max-width: 66ch; font-size: 18px; line-height: 1.75; }
.entry-head .dek { margin-top: 18px; }
.entry-body p { margin: 0 0 1.15em; }
.entry-body h2 { font-family: var(--serif); font-size: 32px; line-height: 1.15; font-weight: 500; margin: 1.7em 0 0.5em; }
.entry-body h3 { font-family: var(--serif); font-size: 24px; line-height: 1.25; font-weight: 500; margin: 1.35em 0 0.45em; }
.entry-body a { color: #6d4e16; text-underline-offset: 0.16em; }
.byline { margin: 0; }

.related { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--ink); }
.related h2 { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 12px 0; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.related a { text-underline-offset: 0.14em; }

.listing { width: min(var(--wrap), calc(100% - 48px)); margin: 36px auto 64px; }
.listing h1 { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); line-height: 1; font-weight: 500; margin: 0 0 12px; }
.listing article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.listing h2 { font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.15; margin: 6px 0; }
.listing h2 a { text-decoration: none; }
.listing h2 a:hover { text-decoration: underline; }

footer { background: var(--navy); color: var(--paper); padding: 42px 0 28px; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
footer h2 { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 0 0 8px; }
footer p, footer li { color: rgba(243, 239, 230, 0.78); }
footer a { color: var(--gold-soft); }
footer ul { margin: 8px 0 0; padding: 0; list-style: none; }
footer li { margin: 8px 0; }
.colophon { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(231, 211, 161, 0.28); font-size: 13px; color: rgba(243, 239, 230, 0.78); }
.colophon p { margin: 0 0 8px; }

@media (max-width: 900px) {
  .feature-grid, .bands { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 12px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; flex-direction: column; gap: 0; border-top: 0; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid rgba(231, 211, 161, 0.2); }
  .article-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "toc" "body";
    width: min(100% - 40px, 1040px);
  }
  .toc { position: static; }
  .hero { max-width: none; }
}

@media (max-width: 640px) {
  .wrap, .listing { width: min(100% - 32px, var(--wrap)); }
  .article-layout { width: min(100% - 32px, 1040px); }
  .brand-row, .feature-grid, .bands, .foot, .latest li { grid-template-columns: 1fr; }
  .mast-top { flex-direction: column; gap: 4px; }
  .hero { padding-top: 36px; max-width: none; }
  .hero h1, .entry-head h1 { font-size: 36px; }
  .band-desc, .cover-title { display: none; }
  .cover, .story-lead .cover { min-height: 84px; padding: 16px; }
  .toc { padding: 4px 0 8px; }
  .dek { font-size: 18px; }
  .section-head { flex-direction: column; }
}

.feature-grid.feature-single { grid-template-columns: 1fr; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
