/* 978 Live — Mill City heritage theme.
   Palette from the 978 Live badge: mill brick, canal slate, loom-cotton cream, cast iron.
   Every color is a token; dark mode only swaps token values. */

@font-face { font-family: "Zilla Slab"; font-weight: 500; font-display: swap;
  src: url("../fonts/zilla-slab-500.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-display: swap;
  src: url("../fonts/zilla-slab-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400 700; font-style: italic; font-display: swap;
  src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); }

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --bg: #F3ECDF;            /* cotton */
  --surface: #FBF7F0;
  --surface-2: #E9E0CF;
  --ink: #1E1C1A;           /* iron */
  --ink-soft: #4A4540;      /* 8.4:1 on bg */
  --brick: #9C3B2A;         /* 8.7:1 on bg */
  --brick-bright: #C0442F;  /* badge red; large/decorative use */
  --canal: #2F4F5F;         /* 7.4:1 on bg */
  --brass: #B08D57;         /* decorative only */
  --line: #D6CAB4;
  --btn-bg: #9C3B2A;
  --btn-ink: #F3ECDF;
  --band: #1E1C1A;          /* header/footer band, always dark like the badge */
  --band-ink: #F3ECDF;
  --band-soft: #CFC6B6;
  --shadow: 0 1px 0 rgba(30, 28, 26, .08), 0 8px 24px -12px rgba(30, 28, 26, .35);
  --radius: 6px;
  --wrap: 72rem;
  --font-head: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1E1C1A; --surface: #282522; --surface-2: #322E2A;
    --ink: #F3ECDF; --ink-soft: #CFC6B6;
    --brick: #E07A5F; --canal: #8FB8C9; --line: #403A34;
    --btn-bg: #A8402C; --btn-ink: #F3ECDF;
    --band: #141312; --band-soft: #B9B0A1;
    --shadow: 0 8px 24px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1E1C1A; --surface: #282522; --surface-2: #322E2A;
  --ink: #F3ECDF; --ink-soft: #CFC6B6;
  --brick: #E07A5F; --canal: #8FB8C9; --line: #403A34;
  --btn-bg: #A8402C; --btn-ink: #F3ECDF;
  --band: #141312; --band-soft: #B9B0A1;
  --shadow: 0 8px 24px -12px rgba(0, 0, 0, .7);
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--canal); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brick); }
:focus-visible { outline: 3px solid var(--brick-bright); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); color: var(--brick); }
h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .6rem 1rem;
  background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.kicker { font: 700 .8rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .5rem; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; }
.meta { color: var(--ink-soft); font-size: .95rem; }
.empty { padding: 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }

/* ------------------------------------------------------------ motifs */
/* Sawtooth roofline (Boott Mills) at the edge of the dark bands */
.roofline { display: block; width: 100%; height: 14px; fill: var(--band); background: var(--bg); }
.roofline--flip { transform: scaleY(-1); }
/* The badge's three red stripes */
.stripes { display: grid; gap: 4px; width: 4.5rem; margin: 1rem 0; }
.stripes span { height: 4px; background: var(--brick-bright); border-radius: 1px; }
/* Brick-course rule under section heads */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin: 2.5rem 0 1.25rem; padding-bottom: .6rem;
  border-bottom: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--brass) 0 22px, transparent 22px 26px) 6; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; display: inline-flex; gap: .35rem; align-items: center; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.15rem;
  background: var(--btn-bg); color: var(--btn-ink); border: 2px solid var(--btn-bg);
  border-radius: var(--radius); font-weight: 700; text-decoration: none; line-height: 1.2; }
.btn:hover { color: var(--btn-ink); filter: brightness(1.1); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { color: var(--bg); background: var(--ink); filter: none; }

/* ------------------------------------------------------------ header / footer */
.site-header { background: var(--band); color: var(--band-ink); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--band-ink); text-decoration: none; margin-right: auto; }
.brand img { width: 56px; height: 56px; }
.brand__name, .site-footer__name { font: 700 1.6rem/1 var(--font-head); color: var(--band-ink); margin: 0; }
.brand__name em, .site-footer__name em, .links-page__head h1 em { color: var(--brick-bright); font-style: italic; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .5rem .7rem; color: var(--band-ink); text-decoration: none; font-weight: 600; border-radius: var(--radius); }
.site-nav a:hover { background: rgba(243, 236, 223, .1); color: var(--band-ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brick-bright); }
@media (max-width: 44rem) {
  .site-nav { order: 3; width: 100%; margin-inline: -.7rem; }
  .site-nav ul { flex-wrap: nowrap; overflow-x: auto; }
}
.theme-toggle { background: none; border: 2px solid rgba(243, 236, 223, .35); color: var(--band-ink);
  border-radius: 50%; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; cursor: pointer; }
.theme-toggle__light { display: none; }
:root[data-theme="dark"] .theme-toggle__light { display: inline; }
:root[data-theme="dark"] .theme-toggle__dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__light { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle__dark { display: none; }
}

.site-footer { background: var(--band); color: var(--band-soft); }
main { padding-bottom: 4rem; }
.hero h1 em { color: var(--ink); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 2.5rem 1rem; }
.site-footer__inner p { max-width: 28rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--band-ink); }
.site-footer a:hover { color: var(--brick-bright); }
.site-footer__fine { font-size: .85rem; padding-bottom: 2rem; margin: 0 auto; }

/* ------------------------------------------------------------ home */
.hero { padding-block: 2.5rem 1rem; }
.hero__inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .hero__inner { grid-template-columns: 1fr 1.1fr; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: grid; }
.feature__media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--band); }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__media .feature__logo { object-fit: contain; padding: 1rem; }
.feature__body { padding: 1.25rem 1.5rem 1.5rem; }
.feature__title { font-size: 1.6rem; }
.feature__title a { color: var(--ink); text-decoration: none; }
.feature__title a:hover { color: var(--brick); text-decoration: underline; }
.feature__excerpt { color: var(--ink-soft); }
.feature audio { width: 100%; margin-top: .25rem; }

.home-grid { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .home-grid { grid-template-columns: minmax(0, 1fr) 20rem; } }
.home-grid__side { display: grid; gap: 1.25rem; align-content: start; margin-top: 2.5rem; }

.panel { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--canal);
  border-radius: var(--radius); padding: 1.25rem; }
.panel h2 { font-size: 1.3rem; }
.panel__more { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; margin-top: .75rem; }
.panel--weather { display: flex; gap: .9rem; align-items: center; text-decoration: none; color: var(--ink); border-top-color: var(--brass); }
.panel--weather .icon { width: 2.4rem; height: 2.4rem; color: var(--canal); }
.panel--weather strong { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--brick); }
.panel--weather:hover strong { text-decoration: underline; }

.picks { list-style: none; margin: 0; padding: 0; }
.picks li { display: grid; grid-template-columns: 4.6rem 1fr; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.picks__when { font-weight: 700; font-size: .85rem; color: var(--brick); line-height: 1.3; }
.picks__when span { display: block; text-transform: uppercase; letter-spacing: .08em; }
.picks__what { font-weight: 600; line-height: 1.3; }
.picks__where { display: block; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }

.quick-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.quick-links a { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; font-weight: 600; }

/* ------------------------------------------------------------ cards */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--band); }
.card--audio .card__media { aspect-ratio: 4 / 3; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brick-bright);
  background: repeating-linear-gradient(0deg, #2A2724 0 10px, #24211F 10px 12px); }
.card__placeholder .icon { width: 3rem; height: 3rem; }
.card__badge { position: absolute; left: .6rem; bottom: .6rem; display: inline-flex; gap: .35rem; align-items: center;
  background: rgba(20, 19, 18, .85); color: #F3ECDF; font-size: .8rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; }
.card__body { padding: .9rem 1rem 1rem; }
.card__body p { margin: 0; }
.card__title { font-size: 1.15rem; margin: .1rem 0 .35rem; }
.card__title a { color: var(--ink); text-decoration: none; }
/* Whole card is clickable via the title link */
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__title a { color: var(--brick); text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--brick-bright); outline-offset: 2px; }
/* Venue links sit above the whole-card overlay link */
.card .meta a { position: relative; z-index: 1; }
.card .card__title a:focus-visible { outline: none; }

/* ------------------------------------------------------------ inner pages */
.page { padding-top: 2.25rem; }
.page--narrow { max-width: 46rem; }
.page-head { margin-bottom: 1.5rem; }
.crumbs { font-size: .95rem; margin-bottom: 1.25rem; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chips a { padding: .4rem .9rem; border: 2px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; background: var(--surface); }
.chips a:hover { border-color: var(--brick); color: var(--brick); }
.chips a[aria-current="page"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }

.episode { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .episode { grid-template-columns: 20rem minmax(0, 1fr); } }
.episode__art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius);
  background: var(--band); box-shadow: var(--shadow); }
.player { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: 1.25rem 0 1.75rem;
  padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--brick-bright); border-radius: var(--radius); }
.player audio { flex: 1 1 18rem; min-width: 0; }
.player__dl { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; }
.transcript { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.transcript summary { cursor: pointer; padding: .9rem 1.1rem; font: 700 1.15rem var(--font-head); }
.transcript .prose { padding: 0 1.1rem 1rem; }
.prose { max-width: 42rem; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: 1.25rem 0; padding-left: 1rem; border-left: 4px solid var(--brass); font-style: italic; }
.more { margin-top: 3.5rem; }

.video .yt { margin-bottom: 1.75rem; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.yt__poster { position: absolute; inset: 0; display: block; }
.yt__poster img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; gap: .6rem; align-items: center;
  padding: .85rem 1.35rem; background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; font-size: 1.1rem; border-radius: 999px; box-shadow: var(--shadow); }
.yt__play .icon { width: 1.6rem; height: 1.6rem; }
.yt__poster:hover .yt__play { filter: brightness(1.12); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__body { max-width: 46rem; }

.not-found { text-align: left; padding-block: 3rem; }

/* ------------------------------------------------------------ /links (TikTok bio target) */
.page-links main { padding: 2rem 1rem 1rem; }
.links-page { max-width: 34rem; margin-inline: auto; }
.links-page__head { text-align: center; display: grid; justify-items: center; }
.links-page__head img { width: 160px; height: 160px; }
.links-page__head h1 { margin: .75rem 0 .25rem; color: var(--ink); }
.links-page__head p { color: var(--ink-soft); margin: 0; }
.link-group { margin-top: 1.75rem; }
.link-group:first-of-type { margin-top: 1.25rem; }
.link-group__title { display: flex; align-items: center; gap: .75rem; margin: 0 0 .75rem;
  font: 700 .8rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.link-group__title::after { content: ""; flex: 1; height: 4px;
  background: repeating-linear-gradient(90deg, var(--brass) 0 16px, transparent 16px 20px); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.link-btn { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; min-height: 3.75rem;
  background: var(--band); color: var(--band-ink); text-decoration: none; font-weight: 700; font-size: 1.1rem;
  border-radius: var(--radius); border-left: 6px solid var(--brick-bright); box-shadow: var(--shadow);
  transition: transform .12s ease; }
.link-btn:hover { color: var(--band-ink); transform: translateX(3px); }
.link-btn .icon { width: 1.5rem; height: 1.5rem; color: var(--brick-bright); }
.link-btn__text small { display: block; font-weight: 400; font-size: .9rem; color: var(--band-soft); }
.link-btn--alt { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-left-width: 6px; border-left-color: var(--canal); }
.link-btn--alt:hover { color: var(--ink); }
.link-btn--alt .icon { color: var(--canal); }
.link-btn--alt small { color: var(--ink-soft); }
.page-links main { padding-bottom: 3rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------ venues */
.venue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.venue-list a { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.15rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--canal);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.venue-list a:hover { border-left-color: var(--brick-bright); }
.venue-list a:hover .venue-list__name { color: var(--brick); text-decoration: underline; }
.venue-list__name { font: 700 1.2rem/1.2 var(--font-head); }
.venue-list__count { color: var(--ink-soft); font-size: .95rem; }

/* "This weekend in Lowell" leads the main column on the homepage */
.panel--weekend { margin-top: 2.5rem; }
.panel--weekend .picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); column-gap: 1.5rem; }
