/* Vile Richard: "roadhouse gig poster" theme. */

:root {
  --ground: #15130f;
  --ground-deep: #0e0c0a;
  --surface: #201d18;
  --line: #2e2923;
  --line-strong: #5a5348;
  --ink: #f2ede4;
  --ink-soft: #c9c2b6;
  --ink-muted: #a39b8e;
  --accent: #f2b33d;
  --on-accent: #15130f;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 32px);
}

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

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

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

img { max-width: 100%; height: auto; }
img.counter { position: absolute; width: 1px; height: 1px; }

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

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 10px 16px; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

/* Type helpers */
.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.display--xl { font-size: clamp(60px, 9vw, 128px); line-height: 0.88; }
.display--lg { font-size: clamp(48px, 6vw, 80px); line-height: 0.92; }
.display--md { font-size: clamp(32px, 4vw, 44px); line-height: 1; }
.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--muted { color: var(--ink-muted); }
.lede { margin: 0; max-width: 34ch; font-size: 20px; color: var(--ink-soft); }
.accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn--light { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn--light:hover { color: var(--ground); filter: brightness(0.92); }
.btn--dark { background: var(--ground); border-color: var(--ground); color: var(--ink); }
.btn--dark:hover { color: var(--accent); }
.btn--outline-dark { border: 2px solid var(--ground); color: var(--ground); }
.btn--outline-dark:hover { color: var(--ground); background: rgba(0, 0, 0, 0.08); border-color: var(--ground); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 32px;
  padding-block: 20px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.site-nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 4px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a { display: inline-block; padding: 10px 0; text-decoration: none; white-space: nowrap; }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav a.nav-festive { color: #f05a4a; }
.site-nav a.nav-festive[aria-current="page"] { box-shadow: inset 0 -2px 0 #f05a4a; }
.site-nav a.nav-festive:hover { color: var(--ink); }

@media (max-width: 1200px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .wordmark { font-size: 26px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; margin-inline: calc(var(--gutter) * -1); overflow-x: auto; }
  .site-nav ul { justify-content: flex-start; padding-inline: var(--gutter); gap: 0 22px; white-space: nowrap; }
}

/* Home: hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-block: 40px 72px;
}
.hero__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero__art { flex: 1 1 440px; min-width: 0; position: relative; }
.poster {
  display: block;
  transform: rotate(1.5deg);
  border: 6px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.poster img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sticker {
  position: absolute;
  left: -12px;
  bottom: -22px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
  text-decoration: none;
  transform: rotate(-3deg);
}
.sticker:hover { color: var(--on-accent); }

.filmstrip { border-top: 1px solid var(--line); }
.filmstrip img {
  display: block;
  width: 100%;
  height: clamp(96px, 12.2vw, 176px);
  object-fit: cover;
}

/* Home: next-show banner */
.show-banner { background: var(--accent); color: var(--on-accent); }
.show-banner a:not(.btn) { color: var(--on-accent); }
.show-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  padding-block: 28px;
}
.show-banner__info { flex: 1 1 360px; min-width: 0; }
.show-banner__info p { margin: 4px 0 0; }
.show-banner .eyebrow { color: var(--on-accent); }
.datebox {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  font-family: var(--display);
  font-weight: 900;
  line-height: 1;
}
.datebox__month { font-size: 16px; letter-spacing: 0.08em; }
.datebox__day { font-size: 40px; }

/* Home: sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--ruled { border-block: 1px solid var(--line); }
.single { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.single__cover {
  flex: 0 1 400px;
  min-width: 0;
  width: 400px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.single__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.single__text p { margin: 0; max-width: 46ch; color: var(--ink-soft); }
.player { width: 100%; max-width: 480px; height: 42px; border: 0; border-radius: 6px; }

.hockey { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 64px; }
.hockey h2 { flex: 1 1 520px; min-width: 0; }
.hockey__text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hockey__text p { margin: 0; color: var(--ink-soft); }
.hockey__text .small { font-size: 14px; color: var(--ink-muted); }
.hockey__text .small a { color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 200px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid #3a342b;
  border-radius: 6px;
  text-decoration: none;
}
.card:hover { border-color: var(--accent); color: var(--ink); }
.card__title { font-family: var(--display); font-weight: 900; font-size: 36px; line-height: 1; text-transform: uppercase; }
.card__meta { font-size: 15px; color: var(--ink-soft); }

/* Inner pages */
.page { padding-block: 32px 96px; }
.page__title {
  margin: 0 0 32px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.92;
  text-transform: uppercase;
  max-width: 18ch;
}
.page__byline { margin: -16px 0 32px; color: var(--ink-muted); }

.prose { max-width: 760px; color: var(--ink-soft); }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.prose a:hover { color: var(--accent); }
.prose h2,
.prose h3 {
  margin: 1.8em 0 0.5em;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.prose h2 { font-size: 40px; }
.prose h3 { font-size: 28px; }
.prose h3 small { font-family: var(--body); font-weight: 500; font-size: 15px; text-transform: none; color: var(--ink-muted); }
.prose b,
.prose strong { color: var(--ink); }
.prose ul,
.prose ol { padding-left: 1.2em; }
.prose li { margin-block: 0.3em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--ink); }
.prose iframe { max-width: 100%; }
.prose table { border-collapse: collapse; max-width: 100%; }
.prose td { padding: 6px 12px 6px 0; vertical-align: top; }
.prose img { border-radius: 4px; }
.prose input,
.prose select { font: inherit; padding: 8px 10px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.prose input[type="submit"],
.prose input[type="image"] { cursor: pointer; }
.prose input[type="submit"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Discography */
.prose table.albums { width: 100%; }
.prose .albums td { padding: 0 0 56px; vertical-align: top; }
.prose .albums td.albums__cover { width: 232px; padding-right: 32px; }
.albums__cover img {
  display: block;
  width: 200px;
  max-width: none;
  height: 200px;
  object-fit: cover;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.prose .albums td > h3:first-child { margin-top: 0; }

/* Gigs page */
.shows { display: grid; gap: 16px; margin: 0 0 56px; padding: 0; list-style: none; }
.show {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid #3a342b;
  border-radius: 6px;
}
.show .datebox { color: var(--accent); }
.show__info { flex: 1 1 280px; min-width: 0; }
.show__info h3 { margin: 0 0 6px; font-size: 30px; }
.show__info p { margin: 2px 0; }
.show__poster { flex: 1 1 100%; }
.show__poster img { display: block; width: 100%; max-width: 560px; }
.shows-empty { margin: 0 0 56px; }

.gig-archive { width: 100%; }
.gig-archive tr.gig_spacer td { padding: 14px 0 0; border-top: 1px solid var(--line); }
.gig-archive td:first-child:not([colspan]) { width: 6.5em; color: var(--ink-muted); }
.gig-archive center { text-align: left; color: var(--ink); font-weight: 600; }

/* Vile Christmas page: same theme, festive accent */
.layout-christmas { --accent: #f05a4a; --holly: #3fa66b; }
.lights {
  height: 34px;
  margin-top: -6px;
  background:
    radial-gradient(circle at 50% 70%, #f05a4a 0 6px, transparent 7px) 0 0 / 120px 34px repeat-x,
    radial-gradient(circle at 50% 70%, var(--holly) 0 6px, transparent 7px) 40px 0 / 120px 34px repeat-x,
    radial-gradient(circle at 50% 70%, #f2b33d 0 6px, transparent 7px) 80px 0 / 120px 34px repeat-x,
    radial-gradient(ellipse 70px 14px at 50% 0, transparent 12px, #3a342b 13px 14px, transparent 15px) 0 0 / 40px 34px repeat-x;
}
@media (prefers-reduced-motion: no-preference) {
  .lights { animation: twinkle 2.4s steps(1) infinite; }
  @keyframes twinkle { 50% { filter: brightness(0.6) saturate(0.8); } }
}
.xmas-cover { transform: rotate(-2deg); }
.xmas-cover img { aspect-ratio: 1 / 1; }
.xmas-hero .hero__art { flex-basis: 380px; max-width: 480px; }
.xmas-hero h1 { font-size: clamp(52px, 7vw, 100px); overflow-wrap: anywhere; }

.xmas-tracks { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-start; }
.xmas-tracks > div { flex: 1 1 280px; }
.tracklist {
  flex: 2 1 420px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: track;
}
.tracklist li {
  counter-increment: track;
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  text-transform: uppercase;
}
.tracklist li::before {
  content: counter(track, decimal-leading-zero);
  min-width: 2ch;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.tracklist li span { font-family: var(--body); font-weight: 500; font-size: 15px; text-transform: none; color: var(--ink-muted); }
.xmas-player { display: block; width: 100%; max-width: 760px; height: 352px; margin-top: 48px; border: 0; border-radius: 12px; }
.xmas-aside {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.xmas-aside a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.xmas-aside a:hover { color: var(--ink); }
.xmas-note { margin: 16px 0 32px; color: var(--ink-soft); }
.xmas-shows { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* Photo galleries */
.page__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}
.page__eyebrow { margin-bottom: 8px; }
.page__eyebrow + .page__title { margin-top: 0; }

.gallery-intro { max-width: 60ch; margin: 0 0 12px; color: var(--ink-soft); }
.gallery-intro a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.gallery-total { margin: 0 0 40px; font-size: 14px; color: var(--ink-muted); }
.gallery-intro + .gallery { margin-top: 40px; }

/* The page's .prose column is narrow; galleries use the full container. */
.page .prose:has(.gallery, .gallery-cards) { max-width: none; }

.gallery-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 32px 24px;
}
.gallery-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.gallery-card:hover { color: var(--ink); }
.gallery-card__image { position: relative; display: block; margin-bottom: 10px; }
.gallery-card__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  transition: filter 160ms;
}
.gallery-card:hover img { filter: brightness(1.12); }
.gallery-card__count {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
}
.gallery-card__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}

/* Justified rows: photos stay in order left to right, keep their shape, and
   each row shares a height. --r (width / height) is set per photo. */
.gallery { --row: 240px; display: flex; flex-wrap: wrap; gap: 16px; }
.gallery::after { content: ""; flex: 999 1 0; }
.gallery__item { flex: calc(var(--r) * 240) 1 calc(var(--r) * var(--row)); min-width: 0; margin: 0; }
.gallery__item > a { display: block; border-radius: 4px; overflow: hidden; }
.gallery__item img { display: block; width: 100%; height: auto; border-radius: 4px; transition: filter 160ms; }
.gallery__item > a:hover img { filter: brightness(1.12); }
.gallery__item { scroll-margin-top: 24px; }
.gallery__item:target img { outline: 3px solid var(--accent); outline-offset: 3px; }
.gallery__item figcaption { padding-top: 8px; font-size: 14px; color: var(--ink-muted); }

.gallery-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.prose .gallery-nav__link {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
}
.gallery-nav__link span {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.gallery-nav__link--older { margin-left: auto; align-items: flex-end; text-align: right; }

/* Photo viewer (static/js/gallery.js) */
.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 20px clamp(16px, 2vw, 28px) 24px;
  border: 0;
  background: rgba(11, 10, 8, 0.97);
  color: var(--ink);
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; }
.viewer::backdrop { background: rgba(11, 10, 8, 0.85); }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.viewer__title { margin: 0; font-size: 14px; color: var(--ink-muted); }
.viewer__back {
  margin-right: 8px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.viewer__back:hover,
.viewer__back:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.viewer__actions { display: flex; gap: 8px; }
.viewer__full,
.viewer__copy,
.viewer__close,
.viewer__prev,
.viewer__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid #3a342b;
  background: transparent;
  color: var(--ink);
  font: 600 14px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.viewer__full,
.viewer__copy { padding: 0 16px; }
.viewer__copy:hover { border-color: var(--accent); }
.viewer__full[hidden] { display: none; }
.viewer__full:hover,
.viewer__close:hover { border-color: var(--accent); color: var(--ink); }
.viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 72px;
  touch-action: pan-y;
}
.viewer__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  user-select: none;
}
.viewer__prev,
.viewer__next {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  background: var(--surface);
}
.viewer__prev { left: 0; }
.viewer__next { right: 0; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.viewer__prev:hover { border-color: var(--accent); }
.viewer__next:hover { filter: brightness(1.08); }
.viewer__prev:disabled,
.viewer__next:disabled { visibility: hidden; }
.viewer__caption { margin: 0; text-align: center; font-size: 15px; color: var(--ink-soft); }
.viewer__hint { margin: 0; text-align: center; font-size: 12px; color: var(--ink-muted); }

@media (max-width: 600px) {
  .viewer__stage { padding: 0; }
  .viewer__prev,
  .viewer__next { top: auto; bottom: 8px; transform: none; width: 48px; height: 48px; }
  .viewer__hint { display: none; }
  .gallery { --row: 100px; gap: 8px; }
  .viewer__back { display: block; margin: 0; font-size: 17px; }
  .viewer__full,
  .viewer__copy { white-space: nowrap; padding: 0 12px; }
}

/* Footer */
.site-footer { margin-top: 0; background: var(--ground-deep); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-block: 64px 40px;
}
.site-footer__book { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; font-size: 18px; }
.site-footer nav ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 15px; }
.site-footer nav a { display: inline-block; padding: 4px 0; text-decoration: none; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}
.site-footer__legal a { color: var(--ink-muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { gap: 40px; padding-top: 16px; }
  .hero__art { order: -1; }
  .btn-row .btn { flex: 1 1 auto; }
  .sticker { font-size: 17px; bottom: -14px; left: -6px; }
  .datebox { width: 68px; height: 68px; }
  .datebox__day { font-size: 32px; }
  .single__cover { width: 100%; }

  /* Legacy layout tables (discography, photos) stack instead of squeezing. */
  .prose table:not(.gig-archive),
  .prose table:not(.gig-archive) > tbody,
  .prose table:not(.gig-archive) > tbody > tr,
  .prose table:not(.gig-archive) > tbody > tr > td { display: block; width: auto; }
  .prose table:not(.gig-archive) td { padding: 0 0 12px; }
  .prose .albums td.albums__cover { width: auto; padding: 0 0 20px; }
  .prose table.albums td { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .card, a { transition: color 120ms, border-color 120ms, filter 120ms; }
}
