/* joshsager.com — shared styles for all pages */

:root {
  --ground: #F4F2EE;
  --ink: #1D1D1B;
  --muted: #5F5C57;
  --rule: #DAD6CE;
  --accent: #3E5A6B;
  --card: #FFFFFF;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ---------- header ---------- */
.site-header {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
}
.wordmark { font-family: var(--serif); font-size: 28px; text-decoration: none; color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- type helpers ---------- */
.label {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead { margin: 24px 0 0; color: var(--muted); font-size: 19px; max-width: 600px; }
.muted { color: var(--muted); }
.section { padding-top: 112px; }
.section-title { font-size: 34px; line-height: 1.15; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 28px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--ink); color: var(--ground); border: 1.5px solid var(--ink);
}
.btn:hover { background: #000; color: var(--ground); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- home ---------- */
.hero { padding-top: 96px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.08; max-width: 18ch; }

.sides { display: flex; flex-wrap: wrap; gap: 48px; }
.side { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.side .label { margin: 4px 0 0; }
.side h2 { font-size: 34px; line-height: 1.15; }
.side p { margin: 0; color: var(--muted); }
.side .more { font-weight: 600; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }

.cover-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 2px; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; background: var(--ink);
}
.cover-grid img { width: 100%; height: 100%; object-fit: cover; }
.cover-grid span { background: #2A2C30; }

.callout {
  margin-top: 112px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 48px 0; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center;
}
.callout > div { flex: 1 1 520px; min-width: 0; }
.callout h2 { font-size: 34px; line-height: 1.15; margin-bottom: 10px; }
.callout p { margin: 0; color: var(--muted); max-width: 600px; }

.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split > h2 { flex: 1 1 240px; font-size: 34px; }
.split > div { flex: 2 1 520px; min-width: 0; }
.about-text { margin: 0; font-size: 19px; line-height: 1.6; }

/* ---------- bluegrass ---------- */
.page-intro { padding-top: 80px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.page-intro > div { flex: 1 1 440px; min-width: 0; }
.page-intro > .photo { flex: 1 1 440px; min-width: 0; }
.page-intro h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.08; }
.page-intro .lead { color: var(--ink); max-width: 520px; }

.open-call {
  margin-top: 112px; background: var(--card); border: 1px solid var(--rule); border-radius: 4px;
  padding: 48px; display: flex; flex-wrap: wrap; gap: 40px;
}
.open-call > div { flex: 1 1 380px; min-width: 0; }
.open-call h2 { font-size: 38px; line-height: 1.1; margin-bottom: 14px; }
.open-call p { margin: 0 0 24px; color: var(--muted); }
.facts {
  flex: 1 1 380px; min-width: 0; margin: 0; display: grid; grid-template-columns: auto 1fr;
  gap: 14px 28px; align-content: start; font-size: 16px;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- ambient ---------- */
.ambient-intro { padding-top: 80px; }
.ambient-intro h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.08; max-width: 20ch; }
.ambient-intro .lead { max-width: 640px; }

.series { padding-top: 88px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.series-art { flex: 1 1 400px; min-width: 0; max-width: 480px; }
.series-art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; }
.series-body { flex: 1 1 440px; min-width: 0; }
.series-body h2 { font-size: 44px; line-height: 1.1; }
.series-body > p { margin: 18px 0 0; color: var(--muted); max-width: 520px; }

.chapters { margin: 28px 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
.chapters li { border-top: 1px solid var(--rule); }
.chapter {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 0; color: var(--ink); text-decoration: none;
}
.chapter a.chapter-title { color: var(--ink); text-decoration: none; }
.chapter a.chapter-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.chapter-meta a { color: var(--accent); font-weight: 500; }
.chapter-left { display: flex; align-items: center; gap: 14px; }
.chapter-left img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; }
.chapter-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.chapter-title { font-weight: 500; }
.chapter-meta { color: var(--muted); }
.chapter-art-empty { width: 42px; height: 42px; border-radius: 2px; border: 1px dashed #B9B3A8; }
.chapter.soon .chapter-meta { font-style: italic; }

.grid { display: grid; gap: 32px 28px; }
.grid-releases { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-media { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 24px; }

.card { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.card img { width: 100%; border-radius: 3px; object-fit: cover; }
.card .cover { aspect-ratio: 1 / 1; margin-bottom: 4px; }
.card .thumb { aspect-ratio: 16 / 9; margin-bottom: 2px; background: #1D1D1B; }
.card-title { font-size: 18px; font-weight: 500; line-height: 1.35; }
.card-meta { font-size: 14px; color: var(--muted); }
.card-blurb { font-size: 14px; color: var(--muted); line-height: 1.45; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 4px; }

.line-link {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none;
}
.line-link span:first-child { font-weight: 500; }
.line-link span:last-child { color: var(--muted); }
.line-link:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.site-footer { padding-top: 112px; padding-bottom: 48px; }
.footer-inner {
  border-top: 1px solid var(--rule); padding-top: 40px;
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-end;
}
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact .footer-title { font-family: var(--serif); font-size: 30px; }
.footer-contact a { font-size: 18px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.copyright { margin: 40px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .site-header { padding-left: 16px; padding-right: 16px; }
  .site-nav { gap: 18px; }
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .section, .site-footer { padding-top: 72px; }
  .callout, .open-call { margin-top: 72px; }
  .open-call { padding: 28px 20px; }
  .page-intro, .ambient-intro { padding-top: 48px; }
  .series { padding-top: 56px; gap: 32px; }
  .series-body h2 { font-size: 36px; }
  .side h2, .callout h2, .section-title, .split > h2 { font-size: 30px; }
  .sides, .split { gap: 32px; }
  .grid-releases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .grid-releases .card-title { font-size: 16px; }
  .grid-media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .grid-media .card-title { font-size: 15px; }
  .side, .page-intro > div, .page-intro > .photo, .series-art, .series-body,
  .split > div, .callout > div, .open-call > div, .facts { flex-basis: 100%; }
}
