/* 90s cyberpunk: rave-flyer blue, console silver, hot orange.
   One theme on purpose (no light/dark switch). */
:root {
  --blue: #1b1270;
  --navy: #150d57;
  --ink: #120a4a;
  --silver: #c8ced8;
  --orange: #ff5a1f;
  --cyan: #7fe6ff;
  --violet: #8a6bff;
  --rust: #7a2400; /* orange dark enough to read on silver */
  --header: 72px; /* its height: one row, or 124px for two */
  --white: #ffffff;
  --display: Michroma, "Arial Black", sans-serif;
  --side: clamp(20px, 3.4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--blue); color: var(--white);
  font: 1.125rem/1.5 "Saira Semi Condensed", system-ui, sans-serif;
}
body > * { width: 100%; }
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 16px; }
a { color: inherit; text-underline-offset: 4px; }
main a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
/* Orange rings vanish on orange and fade on silver. */
.event :focus-visible, .band :focus-visible, header.site :focus-visible, footer.site :focus-visible { outline-color: var(--ink); }
.empty { margin: 0; font-size: 1.2rem; }

/* Header and footer */
header.site, footer.site { background: var(--silver); color: var(--navy); }
header.site { padding: 14px var(--side); }
header.site { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--display); font-size: clamp(0.85rem, 4.3vw, 1rem); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { display: flex; align-items: center; min-height: 44px; padding: 0 18px; font-weight: 600; text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { background: var(--navy); color: var(--white); }
nav a[aria-current="page"], .btn {
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
/* clip-path would cut an outside outline off. */
nav a[aria-current="page"]:focus-visible, .btn:focus-visible { outline-color: currentColor; outline-offset: -6px; }

/* Hero: a tunnel of CC outlines. The negative delays spread the layers out, so
   pausing it (reduced motion) still leaves a drawn tunnel. */
.hero { position: relative; min-height: min(780px, calc(100svh - var(--header))); overflow: hidden; display: flex; align-items: flex-end; }
.hero .text { position: relative; padding: max(24px, 8svh) var(--side) 36px; }
.hero h1, .page-title h1 { letter-spacing: -0.04em; transform: skewX(-8deg); transform-origin: left bottom; text-shadow: 0.045em 0.045em 0 var(--navy); }
.hero h1 {
  margin: 0 0 20px; font-size: clamp(2.3rem, min(8.2vw, 15svh), 7.4rem); line-height: 1.02;
}
.hero p { margin: 0; font-size: 1.5rem; font-weight: 600; text-shadow: 0 0 4px var(--blue), 0 0 8px var(--blue); }
/* "cocoshy", stacked and flipped like a sign read from behind. */
.mirror { position: absolute; right: var(--side); top: 36px; height: clamp(170px, min(52vw, 100svh - 180px), 620px); transform: scaleX(-1); fill: none; stroke: var(--orange); stroke-width: 12; stroke-linejoin: miter; }
.tunnel { position: absolute; right: -60px; top: -40px; width: 860px; height: 860px; color: var(--cyan); }
.tunnel svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: fly 14s linear infinite; }
.tunnel svg:nth-child(2) { animation-delay: -2.8s; color: var(--violet); }
.tunnel svg:nth-child(3) { animation-delay: -5.6s; }
.tunnel svg:nth-child(4) { animation-delay: -8.4s; color: var(--violet); }
.tunnel svg:nth-child(5) { animation-delay: -11.2s; }
.tunnel.paused svg { animation-play-state: paused; }
@keyframes fly {
  0% { transform: scale(0.03) rotate(-60deg); opacity: 0; }
  20% { opacity: 0.9; }
  85% { opacity: 0.75; }
  100% { transform: scale(2.6) rotate(60deg); opacity: 0; }
}

/* Events */
#events { padding: 56px 0 0; }
#events > h2, #events .empty, #past { padding-inline: var(--side); }
#events noscript .empty, #upcoming > .empty { padding-bottom: 56px; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* The orange bar with a cut corner: events, episodes, and .band on the other pages. */
.event, .band {
  padding: 36px var(--side); background: var(--orange); color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 0 100%);
}
.event { display: flex; flex-wrap: wrap; gap: 16px 64px; align-items: center; }
.bands { display: grid; gap: 8px; }
.band p { margin: 0 0 8px; max-width: 60ch; font-size: 1.2rem; }
.band p:last-child { margin-bottom: 0; }
main .band a:hover { color: var(--ink); text-decoration-thickness: 3px; }
.event .date { font: 400 clamp(2.5rem, 6.4vw, 5.75rem)/1 var(--display); letter-spacing: -0.05em; }
.event .info { flex: 1 1 300px; min-width: 0; }
.event :is(h2, h3) { margin: 0 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.event p { margin: 0; font-size: 1.2rem; font-weight: 600; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 32px; background: var(--ink); color: var(--white); font-weight: 600; text-decoration: none; }
main .btn:hover { background: var(--white); color: var(--ink); }
.songs { flex: 1 1 100%; }
.songs summary { width: fit-content; padding: 8px 0; font-size: 1.2rem; }
.songs ol { columns: 2 340px; column-gap: 64px; max-width: 1000px; margin: 8px 0 0; padding-left: 2em; font-size: 1.1rem; }
.songs li { padding-bottom: 6px; break-inside: avoid; }
#past details { padding-block: 24px; }
summary { cursor: pointer; font-weight: 600; }

/* The coconut shy, under the tagline. */
.shy { position: relative; display: flex; width: fit-content; gap: clamp(5px, 1.6vw, 28px); margin-top: 24px; }
.nut { width: clamp(42px, min(7vw, 12svh), 88px); min-height: 50px; padding: 0; border: 0; background: none; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
/* Every other coconut faces the other way. On the image, as the svg's own
   transform is used by the dance. 72 is the width of the drawing. */
.nut:nth-child(odd) image, .member:nth-child(odd) image { transform: matrix(-1, 0, 0, 1, 72, 0); }
.nut svg { width: 100%; }
.nut svg, .member > svg, .credit > svg { display: block; overflow: visible; }
.nut svg { filter: drop-shadow(0 0 1px var(--white)) drop-shadow(0 0 1px var(--white)); } /* a thin pale edge: dark brown fades into the blue */
.nut:not([aria-disabled="true"]):focus-visible { filter: brightness(1.25); }
/* Touch screens keep :hover on the last tap, which would leave that head bright. */
@media (hover: hover) { .nut:not([aria-disabled="true"]):hover { filter: brightness(1.25); } }
.nut:disabled, .nut[aria-disabled="true"] { cursor: default; }
.nut.down .shell { animation: shatter 0.5s steps(7) forwards; }
.nut .shell { pointer-events: none; } /* the still button takes the tap, not the dancing drawing */
.shy.dancing .nut:not([aria-disabled="true"]) .shell { transform-origin: 50% 100%; animation: dance 0.56s ease-in-out 4; }
.shy.dancing .nut:nth-child(even):not([aria-disabled="true"]) .shell { animation-direction: reverse; } /* neighbours sway opposite ways */
@keyframes dance {
  0%, 50%, 100% { transform: none; }
  25% { transform: translateY(-16%) rotate(-11deg); }
  75% { transform: translateY(-16%) rotate(11deg); }
}
@keyframes shatter { to { transform: scale(1.9) rotate(50deg); opacity: 0; } }
.disc { position: absolute; z-index: 2; left: 0; top: 0; width: 60px; height: 60px; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The footer: the CC logo on the left, each ring turning its own way, and
   Instagram in the middle. Ring sizes are fractions of the logo, measured
   from the original. img/logo.svg is the same logo, still, for the top bar. */
footer.site { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 24px var(--side); }
footer.site a { display: grid; place-items: center; min-width: 56px; min-height: 56px; }
footer.site .credits { justify-self: end; font-weight: 600; }
footer.site a svg { width: 40px; fill: none; stroke: currentColor; stroke-width: 2; }
footer.site a .dot { fill: currentColor; stroke: none; }
footer.site a:hover { color: var(--rust); }
footer.site a[aria-current="page"] { text-decoration: none; }
.cc-logo { --size: 64px; position: relative; width: var(--size); height: var(--size); perspective: calc(var(--size) * 2.5); }
.ring {
  --box: calc(var(--size) * var(--d));
  position: absolute; top: 50%; left: 50%; width: var(--box); height: var(--box);
  margin: calc(var(--box) / -2) 0 0 calc(var(--box) / -2);
  border: calc(var(--size) * var(--t)) solid var(--navy); border-radius: 50%;
  animation: turn 9s linear infinite;
}
.ring.c { clip-path: polygon(0 0, 100% 0, 100% var(--gap-top), 50% var(--gap-top), 50% var(--gap-bottom), 100% var(--gap-bottom), 100% 100%, 0 100%); }
.r1 { --d: 1; --t: 0.085; --gap-top: 34.7%; --gap-bottom: 50.3%; --axis: 0, 1, 0; }
.r2 { --d: 0.758; --t: 0.1005; --axis: 1, 0, 0; }
.r3 { --d: 0.502; --t: 0.065; --gap-top: 29.9%; --gap-bottom: 56.6%; --axis: 0, 0, 1; }
.r4 { --d: 0.329; --t: 0.065; --axis: 1, 1, 0; }
/* Sideways, end over end, flat and diagonal: two turns each, then a rest with the logo whole. */
@keyframes turn {
  from { transform: rotate3d(var(--axis), 0deg); }
  80%, to { transform: rotate3d(var(--axis), 720deg); }
}

/* The other pages */
.page { padding: 72px var(--side); }
.page-title h1 { margin: 0 0 16px; font-size: clamp(2.2rem, 7vw, 5.5rem); }
.page:has(+ .events, + .bands) { padding-bottom: 0; }
.page-title p { margin: 0 0 48px; max-width: 48ch; font-size: 1.35rem; font-weight: 600; }
.members { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; max-width: 1000px; }
.member > svg { width: 120px; }
.credit { display: flex; gap: 32px; align-items: flex-start; }
.credit > svg { flex: none; width: clamp(64px, 14vw, 120px); }
.member img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.member h2 { margin: 12px 0 2px; font-size: 1.25rem; }
.band .member p { font-size: 1rem; }
.member .role { font-weight: 600; }

/* Too short for the sign and the headline side by side. */
@media (max-height: 420px) { .mirror { display: none; } }
/* The tagline can reach the sign here, so the sign stays above it. */
@media (max-width: 800px) { .mirror { height: clamp(150px, min(52vw, 100svh - 330px), 620px); } }
/* Brand above nav at a set width, so --header matches once the web font is in. */
@media (max-width: 840px) {
  :root { --header: 124px; }
  header.site { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .hero { min-height: min(620px, calc(100svh - var(--header))); }
  .tunnel { width: 560px; height: 560px; }
  nav { gap: 0; }
  /* Keep the wrap: the wider fallback font needs it until the web font loads. */
  nav a { padding: 0 clamp(5px, calc((100vw - 280px) / 8), 14px); white-space: nowrap; } /* four links in one row at 320px, in the web font */
  .members { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  /* Two columns: alternate in both directions, not column by column. */
  .member:nth-child(n) image { transform: none; }
  .member:is(:nth-child(4n + 1), :nth-child(4n)) image { transform: matrix(-1, 0, 0, 1, 72, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tunnel svg { animation-play-state: paused; }
  .ring { animation: none; }
  .shy.dancing .nut:not([aria-disabled="true"]) .shell { animation: none; }
  .nut.down .shell { animation: none; visibility: hidden; }
}
