/* Cooper Brothers Band — static site styles */

:root {
  --ink: #212121;
  --heading: #333333;
  --accent: #960101;
  --accent-dark: #5b0000;
  --nav: #191919;
  --nav-hover: #757575;
  --bar: #ededed;
  --panel: #262626;
  --panel-line: #333333;
  --base: #1b1b1b;
  --wrap: 1160px;
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;
  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
}

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font: 400 16px/25px var(--font-body);
}

img { max-width: 100%; height: auto; display: block; }
a { color: #000000; }
a:hover { color: #777777; }
::selection { background: var(--accent); color: #ffffff; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: #ffffff; padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; z-index: 100; }

/* ---------- Top bar ---------- */

.topbar { background: var(--bar); }
.topbar .wrap { display: flex; justify-content: flex-end; }

.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: grid; place-items: center;
  width: 36px; height: 40px;
  color: var(--accent);
}
.social a:hover { color: var(--accent-dark); }
.social svg { width: 17px; height: 17px; }

/* ---------- Header and navigation ---------- */

.site-header { background: #ffffff; border-bottom: 1px solid #e8e8e8; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 100px;
}
.logo img { width: 270px; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 10px; cursor: pointer;
  color: #777777;
}
.nav-toggle svg { width: 28px; height: 28px; display: block; }

.nav > ul { display: flex; list-style: none; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav > ul > li > a,
.nav > ul > li > button {
  display: block;
  padding: 37px 14px 35px;
  border: 0; border-top: 3px solid transparent; background: none;
  font: 600 18px/25px var(--font-head);
  color: var(--nav); text-decoration: none; cursor: pointer;
}
.nav > ul > li:hover > a,
.nav > ul > li:hover > button,
.nav > ul > li:focus-within > button { color: var(--nav-hover); border-top-color: var(--nav-hover); }
.nav > ul > li > a[aria-current="page"] { color: #898989; border-top-color: #898989; }

.nav .sub {
  display: none;
  position: absolute; left: 0; top: 100%; z-index: 20;
  min-width: 220px;
  list-style: none; margin: 0; padding: 0;
  background: var(--panel);
}
.nav li:hover > .sub,
.nav li:focus-within > .sub { display: block; }
.nav .sub a {
  display: block; padding: 11px 18px;
  border-bottom: 1px solid var(--panel-line);
  font: 500 16px/22px var(--font-head);
  color: #e0e0e0; text-decoration: none;
}
.nav .sub a:hover { color: #ffffff; }

/* ---------- Sections ---------- */

.section { padding: 70px 0; }
.section-lg { padding: 100px 0; }
.center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: var(--heading); margin: 0; }

.lead {
  font-size: 30px; line-height: 1.35;
  max-width: 1130px; margin: 24px auto 0;
}

.poster { display: inline-block; margin: 32px 0 36px; }
.poster img { width: 367px; }

/* Outline buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  border: 2px solid #191919;
  font: 400 14px/1 var(--font-body);
  color: #191919; text-decoration: none; text-transform: uppercase;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: #bcbcbc; border-color: #bcbcbc; color: #ffffff; }
.btn svg { width: 15px; height: 15px; }

/* Discography band with fixed background */
.discography {
  background: #e9e9e9 url("../images/parallax-bg.jpg") center / cover no-repeat fixed;
}
.albums {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 40px;
  list-style: none; margin: 0; padding: 0;
}
.albums a { display: block; text-decoration: none; color: var(--heading); }
.albums img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.albums h3 {
  margin-top: 14px;
  font-size: 18px; line-height: 1.4; text-align: center;
  color: inherit;
}
.albums a:hover { color: #777777; }

/* Band photos */
.band {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px; align-items: start;
}
.thumbs {
  display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  list-style: none; margin: 0 0 30px; padding: 0;
}
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumbs a:hover img { opacity: .8; }

.video {
  margin: 30px 0;
  aspect-ratio: 16 / 9;
  background: #000000;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Photo viewer */
dialog.viewer {
  border: 0; padding: 0; background: transparent;
  max-width: 94vw; max-height: 94vh;
}
dialog.viewer::backdrop { background: rgba(0, 0, 0, .85); }
dialog.viewer img { max-width: 94vw; max-height: 88vh; margin: 0 auto; }
dialog.viewer button {
  display: block; margin: 10px auto 0;
  background: none; border: 1px solid #ffffff; color: #ffffff;
  padding: 8px 18px; font: 400 14px/1 var(--font-body); cursor: pointer;
}

/* ---------- Inner pages ---------- */

.titlebar { background: #f9f9f9; border-bottom: 1px solid #efefef; padding: 26px 0; }
.titlebar h1 { font-size: 30px; font-weight: 700; line-height: 1.3; }

/* Page rows and the 12-column grid inside them */
.cols {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 40px; align-items: start;
}
.cols .cols { column-gap: 30px; }
.c-12 { grid-column: span 12; } .c-10 { grid-column: span 10; } .c-9 { grid-column: span 9; }
.c-8 { grid-column: span 8; }  .c-6 { grid-column: span 6; }  .c-4 { grid-column: span 4; }
.c-3 { grid-column: span 3; }  .c-2 { grid-column: span 2; }

.row h2 { font-size: 30px; line-height: 1.3; margin: 0 0 14px; }
.row h3 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; }
.row h4 { font-size: 18px; line-height: 1.4; margin: 0 0 10px; }
.row h4 a { color: inherit; text-decoration: none; }
.row h4 a:hover { color: #777777; }
.row p { margin: 0 0 20px; }
.row hr { border: 0; border-top: 1px solid #e5e5e5; margin: 0 0 40px; }
.row audio { width: 100%; height: 40px; display: block; }
.row p:has(> audio) { margin: 0; }
.cols:has(> .c-10 audio) { align-items: center; }
.row .center img { width: 100%; }
.space { width: 100%; }

.alignright { float: right; margin: 5px 0 20px 30px; }
.alignleft { float: left; margin: 5px 30px 20px 0; }
.aligncenter { margin-inline: auto; }

.row .btn { margin-bottom: 6px; }
.btn-sm { padding: 11px 16px; font-size: 12px; }
.btn-xs { padding: 8px 12px; font-size: 11px; }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.video + .space, .space + .video { margin-top: 0; }
.row .video { margin: 0; }

/* News list */
.news-item {
  display: grid; grid-template-columns: 310px minmax(0, 1fr);
  gap: 40px; padding: 0 0 60px; margin: 0 0 60px;
  border-bottom: 1px solid #efefef;
}
.news-item:last-child { border-bottom: 0; margin-bottom: 0; }
.news-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.news-item h2 { font-size: 22px; margin: 6px 0 12px; }
.news-item h2 a { color: var(--heading); text-decoration: none; }
.news-item h2 a:hover { color: var(--accent); }
.news-item .more { white-space: nowrap; text-decoration: none; }
.date { color: #999999; font-size: 12px; font-weight: 600; text-transform: uppercase; }

/* Single news post */
.post { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 80px; align-items: start; }
.post-image { width: 100%; margin: 0 0 30px; }
.post article h2 { font-size: 24px; }
.post aside h3 { font: 400 14px/1.4 var(--font-body); color: var(--ink); margin: 0 0 10px; }
.post aside ul { list-style: none; margin: 0; padding: 0; }
.post aside li { border-bottom: 1px solid #efefef; }
.post aside a { display: block; padding: 10px 0; color: #777777; text-decoration: none; font-size: 15px; }
.post aside a:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer { background: var(--panel); color: #888888; padding: 56px 0; }
.site-footer img { width: 300px; margin: 0 auto; }
.site-footer p { margin: 14px 0 0; font-size: 14px; }

.copyright { background: var(--base); color: #777777; font-size: 13px; }
.copyright .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.copyright .social a { color: #999999; }
.copyright .social a:hover { color: #cccccc; }

/* ---------- Small screens ---------- */

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-header .wrap { flex-wrap: wrap; min-height: 0; }
  .logo, .nav-toggle { height: 100px; display: flex; align-items: center; }
  .logo img { width: 220px; }

  /* the open menu spans the full screen width, edge to edge */
  .nav { display: none; flex: none; width: calc(100% + 40px); margin: 0 -20px; background: var(--panel); }
  .nav.open { display: block; }
  .nav > ul { display: block; }
  .nav > ul > li > a,
  .nav > ul > li > button {
    width: 100%; text-align: left;
    padding: 13px 20px;
    border-top: 0; border-bottom: 1px solid var(--panel-line);
    font: 500 16px/22px var(--font-head);
    color: #e0e0e0;
  }
  .nav > ul > li:hover > a,
  .nav > ul > li:hover > button,
  .nav > ul > li:focus-within > button { color: #ffffff; }
  .nav > ul > li > a[aria-current="page"] { color: #ffffff; }
  .nav .sub { display: block; position: static; }
  .nav .sub a { padding-left: 40px; }

  .section { padding: 48px 0; }
  .section-lg { padding: 60px 0; }
  .lead { font-size: 22px; }
  .poster img { width: min(367px, 100%); }

  .discography { background-attachment: scroll; }
  .albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .band > img { max-width: min(420px, 100%); margin: 0 auto; }

  .titlebar h1 { font-size: 24px; }
  .cols, .cols .cols { column-gap: 20px; row-gap: 20px; }
  .cols > [class^="c-"] { grid-column: span 12; }
  /* a track's player keeps its Buy button beside it */
  .cols:has(> .c-2 .btn) > .c-10 { grid-column: span 9; }
  .cols:has(> .c-2 .btn) > .c-2 { grid-column: span 3; }
  /* album covers on the Music page sit two to a row */
  .cols:not(:has(> .c-9)) > .c-3 { grid-column: span 6; }
  .cols .cols + .cols { margin-top: 14px; }
  .cols .cols + .cols:has(audio) { margin-top: 2px; }
  .row h3 { font-size: 21px; }
  .row h4 { font-size: 16px; }
  .alignright, .alignleft { float: none; margin: 0 auto 20px; }
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 40px; margin-bottom: 40px; }
  .post { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .copyright .wrap { flex-direction: column; justify-content: center; gap: 4px; padding: 14px 0; }
}

@media (max-width: 480px) {
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .thumbs[style*="--cols:8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-footer img { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .discography { background-attachment: scroll; }
  .btn { transition: none; }
}
