/* ---------- Base ---------- */

html {
  background: #0A0A0A;
}

body {
  margin: 0;
  background: #0A0A0A;
  color: #F4F4F2;
  font-family: 'Atkinson Hyperlegible Next', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Tilted cards and fanned photo piles poke outside their boxes, so clip sideways overflow here. */
.page {
  overflow-x: clip;
  min-height: 100vh;
}

/* Elements the script hides and shows use the hidden attribute. Keep it winning over display rules. */
[hidden] {
  display: none !important;
}

a {
  color: #F4F4F2;
}

a:hover {
  color: #A8A8A8;
}

/* Focus rings are white, except on white surfaces. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #F4F4F2;
  outline-offset: 3px;
}

.ink a:focus-visible,
.flyer a:focus-visible {
  outline-color: #161616;
}

img {
  display: block;
}

/* A section printed white with black ink */
.ink {
  background: #F4F4F2;
  color: #161616;
}

.ink a {
  color: #161616;
}

.ink a:hover {
  color: #555555;
}

/* A section on the near-black */
.alt {
  background: #161616;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
  box-sizing: border-box;
}

/* Headings */
.h {
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  min-width: 0;
}

/* Small uppercase labels */
.hand {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Labels that are links get enough padding for a 44px tap target. */
a.hand {
  display: inline-block;
  padding-top: 13px;
  padding-bottom: 13px;
}

.muted {
  opacity: 0.8;
}

.pill {
  display: inline-block;
  border: 2px solid #F4F4F2;
  color: #F4F4F2;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.pill-dashed {
  border-style: dashed;
  opacity: 0.75;
}

.btn {
  display: inline-block;
  background: #161616;
  color: #F4F4F2;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.btn:hover {
  color: #A8A8A8;
}

/* The strip of grey tape at the top of a card */
.tape {
  position: absolute;
  top: -13px;
  left: 42%;
  width: 92px;
  height: 28px;
  background: rgba(140, 140, 140, 0.75);
  transform: rotate(-4deg);
}

/* Wavy edge between two sections. The path is filled with the colour of the section below. */
.edge {
  display: block;
  width: 100%;
  height: 64px;
}

.edge-on-alt {
  background: #161616;
}

/* "No upcoming gigs" sentence */
.empty {
  margin: 0;
  padding: 20px 0 0;
  font-size: 20px;
  max-width: 540px;
}

/* ---------- Header ---------- */

.nav {
  padding-top: 14px;
  padding-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: block;
}

.logo-link img {
  width: 84px;
  height: 60px;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

.nav nav a {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 2px;
}

.nav nav a[aria-current="page"] {
  border-bottom: 2px solid #F4F4F2;
}

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

footer {
  background: #161616;
  padding: 34px 0 44px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  align-items: center;
}

.footer-links a {
  padding-top: 10px;
  padding-bottom: 10px;
}

.footer-links .pill {
  font-weight: 800;
}

/* ---------- Home: hero ---------- */

.hero {
  padding-top: 12px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 48px;
}

.hero-logo {
  flex: 3 1 380px;
  min-width: 0;
  transform: rotate(-3deg);
}

.hero-logo .logo {
  display: block;
  width: 100%;
  max-width: 660px;
  height: auto;
}

.hero-text {
  flex: 2 1 260px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}

.hero-line {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  font-weight: 600;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* The hero logo draws itself in: each shape is traced by a thin stroke while its fill fades up. */
.logo path,
.logo polygon,
.logo rect,
.logo circle {
  fill: #F4F4F2;
  fill-opacity: 0;
  stroke: #F4F4F2;
  stroke-width: 0.7;
  stroke-dasharray: 9000;
  stroke-dashoffset: 9000;
  animation: trace 1.4s ease-in forwards, ink 1.4s ease-in forwards;
}

@keyframes trace {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes ink {
  to {
    fill-opacity: 1;
    stroke-opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo path,
  .logo polygon,
  .logo rect,
  .logo circle {
    animation: none;
    stroke: none;
    fill-opacity: 1;
  }
}

/* ---------- Next gig flyer (Home and Gigs) ---------- */

.flyer-section {
  padding-bottom: 84px;
}

.flyer-section-gigs {
  padding-top: 34px;
  padding-bottom: 80px;
}

.flyer {
  position: relative;
  background: #F4F4F2;
  color: #161616;
  max-width: 820px;
  padding: 34px clamp(20px, 4vw, 44px) 30px;
  transform: rotate(-1.4deg);
  box-shadow: 6px 8px 0 #3A3A3A;
}

/* On desktop the Home flyer sits a little in from the left edge */
.flyer-home {
  margin-left: max(0px, calc(8vw - 40px));
}

.flyer-venue {
  font-size: clamp(24px, 6.4vw, 60px);
  margin-top: 6px;
}

.flyer-foot {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

.flyer-when {
  font-weight: 600;
}

/* The larger version on the Gigs page */
.flyer-large {
  max-width: 900px;
  padding: 40px clamp(20px, 4vw, 48px) 34px;
  transform: rotate(-1.2deg);
}

.flyer-large .flyer-venue {
  font-size: clamp(24px, 6.8vw, 76px);
}

.flyer-large .flyer-when {
  margin-top: 14px;
  font-size: 20px;
}

.flyer-large .flyer-address {
  margin-top: 10px;
  max-width: 620px;
}

/* ---------- Home: music ---------- */

.music {
  padding-bottom: 70px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}

.section-head-split {
  justify-content: space-between;
  gap: 4px 24px;
}

.music h2 {
  font-size: clamp(56px, 10vw, 128px);
}

.music-label {
  display: inline-block;
  transform: rotate(-3deg);
}

.music-body {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 44px 56px;
  align-items: flex-start;
}

.songs {
  position: relative;
  flex: 1 1 300px;
  background: #F4F4F2;
  color: #161616;
  padding: 30px 28px 24px;
  transform: rotate(1.2deg);
  box-shadow: 5px 7px 0 #3A3A3A;
}

.songs .tape {
  left: 12%;
  transform: rotate(-9deg);
}

.songs ol {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.songs li {
  padding: 14px 0;
  border-bottom: 2px dashed #161616;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  align-items: baseline;
  justify-content: space-between;
}

.songs li:last-child {
  border-bottom: 0;
}

.song-title {
  font-weight: 800;
  font-size: 22px;
}

.song-status {
  color: #555555;
}

.embeds {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Dashed boxes where the Spotify and YouTube embeds will go */
.embed {
  border: 3px dashed #F4F4F2;
  border-radius: 22px;
  min-height: 200px;
  padding: 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.embed + .embed {
  margin-left: clamp(0px, 3vw, 40px);
}

.embed-name {
  font-weight: 600;
  opacity: 0.8;
}

.embed .h {
  font-size: 44px;
}

/* ---------- Home: photos ---------- */

.photos-home {
  padding: 40px 0 90px;
}

.photos-home h2 {
  font-size: clamp(52px, 9vw, 112px);
}

.photos-home .stacks {
  margin-top: 56px;
}

/* ---------- Home: upcoming gigs (on white) ---------- */

.gigs-home {
  padding: 30px 0 90px;
}

.gigs-home h2 {
  font-size: clamp(44px, 7vw, 88px);
}

.all-gigs {
  margin-top: 16px;
}

/* ---------- Gig rows ---------- */

.gig-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  min-height: 90px; /* keeps the page from jumping while the gigs load */
}

.gig {
  padding: 22px 0;
  border-bottom: 2px dashed #F4F4F2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  align-items: center;
}

.gig-date {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  min-width: 150px;
}

.gig-time {
  font-weight: 600;
  font-size: 18px;
}

.gig-info {
  flex: 1 1 260px;
  min-width: 0;
}

.gig-venue {
  font-weight: 800;
  font-size: 22px;
}

.gig-address {
  opacity: 0.85;
}

/* Home: smaller rows on the white section */
.gig-list-small {
  margin-top: 18px;
}

.gig-list-small .gig {
  padding: 16px 0;
  border-bottom-color: #161616;
  gap: 0 22px;
  align-items: baseline;
}

.gig-list-small .gig-date {
  font-size: 28px;
  min-width: 110px;
}

.gig-list-small .gig-venue {
  font-weight: 600;
  font-size: 18px;
}

.gig-list-small .gig-address {
  opacity: 1;
  color: #555555;
}

/* Gigs page: past gigs, quieter */
.gig-list-past {
  margin-top: 16px;
}

.gig-list-past .gig {
  padding: 16px 0;
  border-bottom-color: #3A3A3A;
  gap: 4px 30px;
}

.gig-list-past .gig-date {
  font-weight: 600;
  font-size: 18px;
  opacity: 0.8;
}

.gig-list-past .gig-venue {
  font-size: 18px;
}

.gig-list-past .gig-address {
  opacity: 0.8;
}

/* ---------- Gigs page ---------- */

.gigs-page {
  padding-top: 34px;
  padding-bottom: 80px;
}

.gigs-page h1 {
  font-size: clamp(52px, 9vw, 120px);
}

.past {
  padding: 36px 0 90px;
}

.past h2 {
  font-size: clamp(40px, 6.5vw, 80px);
}

/* ---------- Photo piles ---------- */

.stacks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 76px 64px;
  padding: 0 18px;
  min-height: 200px; /* keeps the page from jumping while the sets load */
}

/* Every second and third pile is tilted and nudged so the row looks hand placed */
.stacks > :nth-child(3n+2) {
  transform: rotate(2deg);
  margin-top: 30px;
}

.stacks > :nth-child(3n) {
  transform: rotate(-2.5deg);
  margin-top: 10px;
}

/* One pile: three prints with the cover on top. The whole pile is one link. */
.stack {
  position: relative;
  display: block;
  width: 100%;
  max-width: 340px; /* so one or two sets do not become giant piles */
  aspect-ratio: 1 / 1.14;
  color: #161616;
  text-decoration: none;
}

.stack:focus-visible {
  outline-offset: 10px;
}

/* A print: white border, thin on three sides and thick at the bottom */
.ph {
  position: absolute;
  inset: 0;
  background: #F4F4F2;
  padding: 10px 10px 54px;
  box-sizing: border-box;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ph:nth-child(1) {
  transform: rotate(-7deg) translate(-10px, 6px);
}

.ph:nth-child(2) {
  transform: rotate(5deg) translate(8px, 0);
}

.stack:hover .ph:nth-child(1),
.stack:focus-visible .ph:nth-child(1) {
  transform: rotate(-13deg) translate(-34px, 8px);
}

.stack:hover .ph:nth-child(2),
.stack:focus-visible .ph:nth-child(2) {
  transform: rotate(11deg) translate(32px, 2px);
}

/* The photo inside a print. Grey until the image arrives. */
.shot {
  display: block;
  width: 100%;
  height: 100%;
  background: #2A2A2A;
  object-fit: cover;
}

.cap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  color: #161616;
}

/* Dark overlay over the cover on hover and keyboard focus */
.reveal {
  position: absolute;
  inset: 10px 10px 54px;
  background: rgba(10, 10, 10, 0.86);
  color: #F4F4F2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.reveal-name {
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
}

.stack:hover .reveal,
.stack:focus-visible .reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ph,
  .reveal {
    transition: none;
  }
}

/* ---------- Photos page ---------- */

.strip-wrap {
  padding-top: 10px;
}

.strip {
  background: #F4F4F2;
  color: #161616;
  text-decoration: none;
  padding-left: 18px;
  padding-right: 18px;
  transform: rotate(-1deg);
}

.strip:hover {
  color: #555555;
}

.photos-page {
  padding-top: 44px;
  padding-bottom: 120px;
}

.photos-page h1 {
  font-size: clamp(60px, 11vw, 140px);
}

.photos-label {
  display: inline-block;
  margin: 6px 0 0;
  transform: rotate(-1.5deg);
}

.photos-page .stacks {
  margin-top: 64px;
}

/* One open photo set */
.set-page {
  padding-top: 40px;
  padding-bottom: 120px;
}

.set-page h1 {
  font-size: clamp(44px, 8vw, 104px);
  margin-top: 26px;
}

.set-meta {
  margin: 8px 0 0;
  opacity: 0.85;
}

.prints {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px 26px;
}

.print {
  display: block;
  background: #F4F4F2;
  padding: 10px 10px 36px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.print .shot {
  height: auto;
  aspect-ratio: 4 / 5;
}

.prints > :nth-child(odd) {
  transform: rotate(-1.4deg);
}

.prints > :nth-child(3n) {
  transform: rotate(1.8deg);
}

/* ---------- Privacy ---------- */

.privacy {
  padding-top: 44px;
  padding-bottom: 100px;
}

.privacy-text {
  max-width: 720px;
}

.privacy h1 {
  font-size: clamp(44px, 8vw, 96px);
}

.privacy h2 {
  font-size: 28px;
  line-height: 1.1;
}

.privacy section {
  margin-top: 40px;
}

.privacy p {
  margin: 12px 0 0;
}

.privacy .updated {
  margin-top: 14px;
  opacity: 0.8;
}

.privacy .intro {
  margin-top: 22px;
  font-size: 20px;
}

/* ---------- Not found ---------- */

.not-found {
  padding-top: 44px;
  padding-bottom: 100px;
  min-height: 50vh;
}

.not-found h1 {
  font-size: clamp(44px, 8vw, 96px);
}

.not-found p {
  margin: 22px 0 0;
  font-size: 20px;
}

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

/* Browsers that support cross-document view transitions cross-fade between pages
   instead of cutting. The header keeps its place; the rest of the page fades.
   Other browsers change instantly, as before. */
@view-transition {
  navigation: auto;
}

.nav {
  view-transition-name: header;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

/* Things the script adds after the page loads ease in rather than popping. */
#next-gig,
#next-gig-strip,
.gig,
.stack,
.print {
  animation: appear 0.4s ease-out;
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  #next-gig,
  #next-gig-strip,
  .gig,
  .stack,
  .print {
    animation: none;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav nav {
    gap: 0 16px;
  }

  .tape {
    width: 70px;
  }

  .flyer-home {
    margin-left: 0;
  }

  .stacks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 30px;
    padding: 0 16px;
  }

  .stacks > :nth-child(3n+2),
  .stacks > :nth-child(3n) {
    margin-top: 0;
  }

  .ph {
    padding: 6px 6px 40px;
  }

  .cap {
    font-size: 13px;
    bottom: 8px;
  }

  .reveal {
    display: none;
  }

  .prints {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .print {
    padding: 6px 6px 22px;
  }
}

/* Touch screens have no hover, so no overlay: the caption names the pile and a tap opens it. */
@media (hover: none) {
  .reveal {
    display: none;
  }
}
