/* Liunga Pipare - public pages.
   Palette from the ensemble's own things: the bottle-green cloth on their music
   stands, the limewashed church walls they play against, and the red ink of
   early printed music. Headings are set in a revival of 17th-century Fell types. */

@font-face { font-family: "Fell"; src: url(fonts/im-fell-double-pica-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url(fonts/im-fell-double-pica-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-style: italic; src: url(fonts/alegreya-sans-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --lime: #f3f4ef;      /* limewash */
  --tint: #e6eae0;
  --ink: #1b2126;
  --muted: #56615b;
  --green: #1e4b3c;     /* stand cloth */
  --green-deep: #153529;
  --red: #a3242b;       /* rubric red */
  --line: #cfd5c9;
  --display: "Fell", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--lime); color: var(--ink); font: 400 1.1875rem/1.55 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.1; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); margin-bottom: 1.6rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--lime); padding: .5rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

.btn { background: none; border: 1.5px solid currentColor; border-radius: 2px; padding: .55rem 1.2rem; font-weight: 500; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--lime); }

/* ---------- Masthead and hero ---------- */
.mast { background: var(--green); color: var(--lime); }
.mast :focus-visible, .sec-green :focus-visible, .foot :focus-visible, .lb :focus-visible { outline-color: var(--lime); }
.mast a:hover, .foot a:hover { color: #fff; }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: .4rem 2rem; padding: 1.3rem 0; }
.nav ul { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.nav li a { text-decoration: none; padding: .25rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.nav li a:hover { border-bottom-color: currentColor; }

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-top: clamp(1.5rem, 4vw, 3.5rem); }
.hero-text { padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(3.4rem, 1.6rem + 7.4vw, 7rem); line-height: .92; letter-spacing: -.01em; }
.tagline { font: italic 400 clamp(1.35rem, 1.1rem + 1vw, 1.8rem)/1.25 var(--display); margin: 1.4rem 0 1.1rem; max-width: 22ch; }
.intro { max-width: 34ch; margin: 0; color: #d9e0d4; }
.hero-photo { grid-column: 2; grid-row: 1; margin: 0 0 -4.5rem; align-self: end; position: relative; }
.hero-photo img { width: 100%; max-height: 38rem; object-fit: cover; object-position: center 30%; outline: 6px solid var(--lime); outline-offset: -6px; }
.hero-photo figcaption { position: absolute; right: 6px; bottom: 6px; background: var(--lime); color: var(--ink); font-size: .9rem; line-height: 1.3; padding: .3rem .7rem; max-width: 70%; }
.hero-seal { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; width: clamp(8.5rem, 15vw, 12.5rem); aspect-ratio: 1; margin: 0 0 -6.6rem clamp(-6.25rem, -7.5vw, -4.25rem); background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 5px var(--green); position: relative; z-index: 1; }
.hero-seal span, .foot-seal { display: block; background: var(--green-deep); -webkit-mask: url(seal.png) center / contain no-repeat; mask: url(seal.png) center / contain no-repeat; }
.hero-seal span { position: absolute; inset: 5%; }
.mast + main > .sec:first-child { padding-top: 9rem; }

.hero-plain { grid-template-columns: 1fr auto; }
.hero-plain .hero-seal { margin: 0 0 2.5rem; align-self: center; box-shadow: none; }
.mast:has(.hero-plain) + main > .sec:first-child { padding-top: 5rem; }

.mast-small .hero h1 { font-size: clamp(3rem, 1.6rem + 5.5vw, 5.2rem); }
.mast-small .hero-photo img { max-height: 26rem; }

/* ---------- Sections ---------- */
.sec { padding: 5rem 0; }
.sec-tint { background: var(--tint); }
.sec-green { background: var(--green); color: var(--lime); }
.prose { max-width: 38rem; }
.prose a, .notice-body a { color: var(--red); }

/* Notices */
.notices { border-bottom: 1px solid var(--line); max-width: 60rem; }
.notice { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.notice:has(.notice-img) { grid-template-columns: 6.5rem minmax(0, 1fr) minmax(8rem, 13rem); }
.notice-date { margin: 0; color: var(--red); line-height: 1; }
.nd-day { display: block; font: 400 3.6rem/.9 var(--display); }
.nd-month { display: block; margin-top: .35rem; font-weight: 500; font-size: 1.05rem; }
.nd-mark { display: block; width: .9rem; height: .9rem; background: var(--red); transform: rotate(45deg); margin: .55rem 0 0 .3rem; }
.notice h3 { font-size: 1.75rem; margin-bottom: .3rem; }
.notice-when { font-weight: 700; margin-bottom: .6rem; }
.notice-body { max-width: 36rem; }
.notice-body > :last-child { margin-bottom: 0; }
.more { font-weight: 700; }
.notice-img img { width: 100%; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 19rem); gap: 3rem clamp(2rem, 6vw, 6rem); align-items: start; }
.members { border-top: 3px solid var(--red); padding-top: 1rem; }
.members h3 { font-size: 1.5rem; margin-bottom: .7rem; }
.members li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.members li span { color: var(--muted); font-style: italic; }
.members li span::before { content: "– "; }

/* Gallery: rows of equal height, each picture as wide as its shape asks for */
.year { color: var(--red); font-size: 1.7rem; margin: 2.2rem 0 .7rem; }
h2 + .year { margin-top: 0; }
.gal { display: flex; flex-wrap: wrap; gap: 6px; }
.gal::after { content: ""; flex-grow: 1000; }
.ph { --row: 13.5rem; height: var(--row); flex: var(--r) 1 calc(var(--r) * var(--row)); background: var(--line); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph:hover img { filter: brightness(1.08); }
.gal-more { margin: 2.2rem 0 0; }

/* Lightbox */
.lb { border: 0; padding: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #0e1512f5; color: var(--lime); }
.lb[open] { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4rem; align-items: center; }
.lb::backdrop { background: #0e1512; }
.lb figure { margin: 0; display: grid; justify-items: center; gap: .8rem; padding: 3.2rem 0 1.2rem; height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
.lb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; align-self: center; }
.lb figcaption { text-align: center; max-width: 52rem; font-size: 1rem; line-height: 1.4; padding: 0 .5rem; }
.lb figcaption strong { font: 400 1.35rem/1.2 var(--display); display: block; }
.lb-date { display: block; color: #c4cdbf; }
.lb-cap { display: block; margin-top: .3rem; color: #c4cdbf; }
.lb button { background: none; border: 0; width: 3.2rem; height: 3.2rem; border-radius: 50%; position: relative; justify-self: center; }
.lb button:hover { background: #ffffff1f; }
.lb-x { position: absolute !important; top: .5rem; right: .6rem; z-index: 2; }
.lb-x::before, .lb-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.5rem; height: 2px; background: currentColor; }
.lb-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.lb-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lb-nav::before { content: ""; position: absolute; left: 50%; top: 50%; width: .9rem; height: .9rem; border: solid currentColor; border-width: 2px 2px 0 0; }
.lb-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.lb-next::before { transform: translate(-70%, -50%) rotate(45deg); }

/* ---------- Music player ---------- */
.player { max-width: 52rem; }
.player-top { display: flex; align-items: center; gap: 1rem; }
.pl-now { flex: 1; min-width: 0; }
.pl-title { font: 400 1.6rem/1.2 var(--display); margin: 0; }
.pl-time { margin: .15rem 0 0; color: #c4cdbf; font-variant-numeric: tabular-nums; }
.pl-btn { flex: none; border: 1.5px solid var(--lime); background: none; border-radius: 50%; width: 2.75rem; height: 2.75rem; position: relative; }
.pl-btn:hover { background: #ffffff1f; }
.pl-play { width: 4rem; height: 4rem; background: var(--lime); }
.pl-play:hover { background: #fff; }
.pl-btn span { position: absolute; left: 50%; top: 50%; }
.pl-play span { border-style: solid; border-color: transparent transparent transparent var(--green-deep); border-width: .65rem 0 .65rem 1.05rem; transform: translate(-38%, -50%); }
.is-playing .pl-play span { border: 0; width: 1.1rem; height: 1.25rem; transform: translate(-50%, -50%); background: linear-gradient(90deg, var(--green-deep) 36%, transparent 36% 64%, var(--green-deep) 64%); }
.pl-prev span, .pl-next span { width: .9rem; height: .8rem; transform: translate(-50%, -50%); background: var(--lime); clip-path: polygon(0 0, 78% 50%, 78% 0, 100% 0, 100% 100%, 78% 100%, 78% 50%, 0 100%); }
.pl-prev span { transform: translate(-50%, -50%) scaleX(-1); }

/* The position bar is a five-line staff; the note travels along it. */
.staff { --lines: linear-gradient(currentColor, currentColor) 0 0 / 100% 1px, linear-gradient(currentColor, currentColor) 0 25% / 100% 1px, linear-gradient(currentColor, currentColor) 0 50% / 100% 1px, linear-gradient(currentColor, currentColor) 0 75% / 100% 1px, linear-gradient(currentColor, currentColor) 0 100% / 100% 1px;
  position: relative; height: 2.5rem; margin: 2.4rem .6rem 2.8rem; color: #ffffff80; background: var(--lines); background-repeat: no-repeat; }
.staff::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); color: var(--lime); background: var(--lines); background-repeat: no-repeat; background-size: 100% 1px; }
.staff-note { position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 0; height: 0; }
.staff-note::before { content: ""; position: absolute; left: -.5rem; top: -.5rem; width: 1rem; height: 1rem; background: var(--lime); transform: rotate(45deg) scale(.82); }
.staff-note::after { content: ""; position: absolute; left: -1px; bottom: .45rem; width: 2px; height: 1.7rem; background: var(--lime); }
.staff input { position: absolute; inset: -.6rem; width: calc(100% + 1.2rem); height: calc(100% + 1.2rem); margin: 0; opacity: 0; cursor: pointer; }
.staff:focus-within { outline: 3px solid var(--lime); outline-offset: .7rem; }

.tracks { max-width: 52rem; border-top: 1px solid #ffffff40; }
.tracks li { border-bottom: 1px solid #ffffff40; padding: .35rem 0; }
.trk { display: flex; align-items: baseline; gap: .9rem; width: 100%; text-align: left; background: none; border: 0; padding: .5rem .2rem; }
.trk:hover .trk-title { text-decoration: underline; text-underline-offset: .18em; }
.trk-ico { flex: none; width: 0; height: 0; border-style: solid; border-color: transparent transparent transparent currentColor; border-width: .38rem 0 .38rem .62rem; align-self: center; }
.is-on .trk-ico { border: 0; width: .62rem; height: .76rem; background: linear-gradient(90deg, currentColor 35%, transparent 35% 65%, currentColor 65%); }
.is-on.is-paused .trk-ico { background: none; border-style: solid; border-color: transparent transparent transparent currentColor; border-width: .38rem 0 .38rem .62rem; width: 0; height: 0; }
.trk-main { flex: 1; min-width: 0; }
.trk-title { font: 400 1.35rem/1.25 var(--display); }
.is-on .trk-title { font-style: italic; }
.trk-comp { color: #c4cdbf; margin-left: .5rem; }
.trk-dur { color: #c4cdbf; font-variant-numeric: tabular-nums; }
.trk-desc { margin: -.2rem 0 .5rem 1.75rem; color: #c4cdbf; font-size: 1.05rem; max-width: 44rem; }

/* ---------- Groups of recordings and videos ----------
   The first group is open; the others show only their name until clicked. */
.grp { max-width: 52rem; border-top: 1px solid var(--line); }
.grp:last-of-type { border-bottom: 1px solid var(--line); }
.grp + .grp { margin-top: 0; }
.grp summary { display: flex; align-items: baseline; gap: 1rem; padding: .9rem .2rem; cursor: pointer; list-style: none; }
.grp summary::-webkit-details-marker { display: none; }
.grp summary::before { content: ""; flex: none; width: .55rem; height: .55rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2rem) rotate(-45deg); transition: transform .15s; }
.grp[open] > summary::before { transform: translateY(-.35rem) rotate(45deg); }
.grp-name { flex: 1; min-width: 0; font: 400 1.55rem/1.2 var(--display); }
.grp summary:hover .grp-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.grp-count { color: var(--muted); font-size: 1rem; white-space: nowrap; }
.grp[open] > summary { padding-bottom: 1rem; }
.grp > .tracks, .grp > .vids { margin-bottom: 1.6rem; }
.grp > .tracks li:last-child { border-bottom: 0; }
#video .grp { max-width: none; }
.sec-green .grp, .sec-green .grp:last-of-type { border-color: #ffffff40; }
.sec-green .grp-count { color: #c4cdbf; }
@media (prefers-reduced-motion: reduce) { .grp summary::before { transition: none; } }

/* ---------- Video ---------- */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 2.4rem 1.6rem; }
.vid-frame { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.vid-frame img, .vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.vid-play { position: absolute; left: 1rem; bottom: 1rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--lime); }
.vid-play::before { content: ""; position: absolute; left: 50%; top: 50%; border-style: solid; border-color: transparent transparent transparent var(--green-deep); border-width: .5rem 0 .5rem .85rem; transform: translate(-38%, -50%); }
.vid-frame:hover .vid-play { background: #fff; }
.vid h3 { font-size: 1.4rem; margin: .8rem 0 .25rem; }
.vid p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.45; }

/* ---------- Programmes ---------- */
.programs { max-width: 46rem; border-top: 1px solid var(--line); }
.programs li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.pr-year { color: var(--red); font-weight: 500; font-variant-numeric: tabular-nums; }
.pr-title { font: 400 1.35rem/1.3 var(--display); }

/* ---------- Contact and footer ---------- */
.contact-text { max-width: 36rem; }
.contact-list { display: flex; flex-wrap: wrap; gap: .4rem 2.2rem; font: 400 1.6rem/1.3 var(--display); margin-top: 1.4rem; }
.contact-list a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }

.foot { background: var(--green-deep); color: #d9e0d4; padding: 2.2rem 0; font-size: 1.05rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; }
.foot-seal { width: 3.4rem; height: 3.4rem; background: #d9e0d4; flex: none; }
.foot p { margin: 0; }
.foot-links { margin-left: auto !important; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }

/* ---------- Small screens ---------- */
@media (max-width: 52rem) {
  body { font-size: 1.125rem; }
  .sec { padding: 3.5rem 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding-bottom: 2rem; }
  .hero-photo, .hero-seal { grid-column: 1; grid-row: 2; }
  .hero-photo { margin-inline: -1.25rem; margin-bottom: -3rem; }
  .hero-photo img { outline: 0; max-height: 26rem; }
  .hero-photo figcaption { right: 0; bottom: 0; max-width: calc(100% - 8rem); }
  .hero-seal { margin: 0 0 -5.2rem -.2rem; width: 6.5rem; }
  .mast + main > .sec:first-child { padding-top: 7.5rem; }
  .hero-plain { grid-template-columns: 1fr; }
  .hero-plain .hero-seal { grid-row: auto; margin: 0 0 2rem; }
  .about { grid-template-columns: 1fr; }
  .notice, .notice:has(.notice-img) { grid-template-columns: 4.4rem minmax(0, 1fr); }
  .nd-day { font-size: 2.7rem; }
  .notice-img { grid-column: 2; max-width: 16rem; }
  .ph { --row: 8.5rem; }
  .lb[open] { grid-template-columns: 2.9rem minmax(0, 1fr) 2.9rem; }
  .lb button { width: 2.7rem; height: 2.7rem; }
  .pl-title { font-size: 1.3rem; }
  .foot-links { margin-left: 0 !important; }
}
