/* Deep Thought. The look comes from the legacy per-browser stylesheets
   (httpdocs/Styles/safari.css): the Marshall-amp tile over dark green on the
   page and the header, Carlsberg for the strapline, Source Sans for text and
   Bitter for headings. All three fonts are served from here: the old site
   loaded the last two from Google over http, which browsers block on https. */

@font-face {
  font-family: "Carlsberg";
  src: url("../fonts/carlsberg.woff") format("woff");
  font-display: swap;
}

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

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

@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/bitter-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Bitter";
  font-style: italic;
  font-weight: 400;
  src: url("../fonts/bitter-italic.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* The admin's Settings can change these two (theme.css, after this file). */
  --green: #003300;
  --tile: url("../background.png");
  --text: #ffffff;
  --link: #dfdfdf;
  --panel: rgba(0, 20, 0, 0.78);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--green) var(--tile) repeat;
  font-family: "Source Sans 3", "Source Sans Pro", Verdana, sans-serif;
  font-size: 1.1rem;
  line-height: 1.5;
}

a {
  color: var(--link);
}

a:hover,
a:focus {
  color: var(--text);
}

/* ---- Header and menu ---- */

.site-header {
  background: var(--green) var(--tile) repeat;
  border-bottom: 1px solid #000;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.logo {
  flex: 1 1 18rem;
  max-width: 720px;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.strapline {
  margin: 0;
  max-width: 13em;
  font-family: "Carlsberg", "Bitter", serif;
  font-size: 1rem;
}

.strapline a {
  color: var(--text);
  text-decoration: none;
}

/* Phones: the menu folds behind a three-bar button (a checkbox, no script). */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  cursor: pointer;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  background: var(--text);
}

.nav-toggle:focus-visible + .site-nav {
  outline: 2px solid var(--text);
}

.site-nav {
  display: none;
  padding: 0 1rem 0.75rem;
}

.nav-toggle:checked ~ .site-nav {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul ul {
  padding-left: 1rem;
}

.site-nav a,
.site-nav .section-label {
  display: block;
  padding: 0.45rem 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav .section-label {
  color: var(--link);
  font-weight: 400;
  font-style: italic;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
}

/* ---- Page ---- */

main {
  max-width: 50rem;
  margin: 1.5rem auto;
  padding: 1rem 1.5rem;
}

h1,
h2,
h3 {
  font-family: "Bitter", serif;
  font-weight: 400;
}

img,
iframe {
  max-width: 100%;
}

dt {
  font-weight: 600;
}

dd {
  margin: 0 0 0.75rem 1.5rem;
}

.missing {
  font-style: italic;
  color: var(--link);
}

/* News and gigs: the history, newest first. */
.news-list,
.gig-list,
.track-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.news-list li,
.gig-list li,
.track-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.news-list time,
.gig-list time {
  display: block;
  color: var(--link);
  font-weight: 600;
}

.news-list h3 {
  margin: 0.2rem 0 0.4rem;
}

.gig-year {
  margin: 2rem 0 0;
}

.gig-venue {
  font-weight: 600;
}

.gig-media {
  display: flex;
  gap: 1rem;
  margin: 0.4rem 0 0;
}

.track-title {
  margin: 0;
  font-weight: 600;
}

.track-time {
  font-weight: 400;
  color: var(--link);
}

.track-list audio {
  width: 100%;
  margin-top: 0.5rem;
}

/* ---- Galleries ---- */

.gallery-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-index li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  text-decoration: none;
}

.gallery-card img {
  width: 120px;
  height: auto;
  border: 1px solid #000;
}

.gallery-card-body {
  display: flex;
  flex-direction: column;
}

.gallery-title {
  font-family: "Bitter", serif;
  font-size: 1.15rem;
  color: var(--text);
}

.gallery-count {
  color: var(--link);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #000;
}

.photo-caption {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

/* ---- Lightbox (photos, flyers, set lists) ---- */

dialog.lightbox {
  border: 0;
  padding: 0;
  background: #0a0a0a;
  max-width: 94vw;
  max-height: 94vh;
}

dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.lightbox-image {
  display: block;
  max-width: 86vw;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0.5rem 1rem 1rem;
  color: #fff;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close {
  top: 0.6rem;
  right: 0.6rem;
}

.lightbox-prev {
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}

footer {
  max-width: 50rem;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  font-size: 0.9rem;
}

/* ---- Tablet and up: the menu is a bar with drop-downs ---- */

@media (min-width: 48rem) {
  .nav-toggle-label {
    display: none;
  }

  .site-nav {
    display: block;
    padding: 0;
  }

  .site-nav > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2rem;
    max-width: 62rem;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .site-nav > ul > li {
    position: relative;
  }

  .site-nav > ul > li > a,
  .site-nav > ul > li > .section-label {
    padding: 0.6rem 0;
    color: var(--text);
    font-style: normal;
    font-weight: 600;
    cursor: default;
  }

  .site-nav > ul > li > a {
    cursor: pointer;
  }

  /* A drawn caret marks a heading as a drop-down. */
  .site-nav > ul > li > .section-label::after {
    content: "";
    display: inline-block;
    margin-left: 0.4em;
    border: 0.3em solid transparent;
    border-top-color: var(--link);
    border-bottom: 0;
    vertical-align: 0.2em;
  }

  .site-nav > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: -1rem;
    min-width: 14rem;
    padding: 0.4rem 1rem 0.6rem;
    /* The page itself has no panel, but a drop-down sits over page text,
       so it keeps the tile under a dark panel to read clearly. */
    background:
      linear-gradient(var(--panel), var(--panel)),
      var(--green) var(--tile) repeat;
    border: 1px solid #000;
    z-index: 10;
  }

  .site-nav li:hover > ul,
  .site-nav li:focus-within > ul {
    display: block;
  }
}

@media (max-width: 40rem) {
  main {
    margin: 1rem;
    padding: 0.75rem 1rem;
  }
}
