/* Plain, airy layout: section titles in a left column, content on the right,
   no rules, one Helvetica-style face throughout. */
:root {
  --paper: #ffffff;
  --paper-2: #f2f2f0;
  --ink: #111111;
  --ink-2: #333333;
  --ink-3: #8a8a8a;
  --accent: #111111;
  --track: #cfcfcf;
  --veil: rgba(255, 255, 255, 0.98);
  /* Background texture: a fine neutral stipple grain over plain white. */
  --grain: 0.16;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --thin: 300;
  --measure: 100rem;
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

/* Everything is set in rem, so the root size scales the whole page up */
html {
  font-size: 106.25%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

@media (min-width: 760px) {
  html {
    font-size: 112.5%;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
  font-weight: var(--thin);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ink-3);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.label {
  font-size: 0.8rem;
  font-style: normal;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
}

.bar__name {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---------- Background texture ---------- */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 0;
}

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  column-gap: var(--gutter);
  align-items: start;
  padding: clamp(2.25rem, 4.2vw, 4rem) 0 0;
}

.section > * {
  grid-column: 2;
}

.section > .section__head {
  grid-column: 1;
  grid-row: 1 / span 10;
}

.section__head h2 {
  margin: 0;
  font-weight: var(--thin);
  font-size: clamp(2rem, 3.6vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

@media (max-width: 760px) {
  main {
    padding-top: 3.5rem;
  }
  .section {
    grid-template-columns: minmax(0, 1fr);
  }
  .section > *,
  .section > .section__head {
    grid-column: 1;
    grid-row: auto;
  }
  .section__head {
    margin-bottom: 1rem;
  }
}

.js .section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .section.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- About ---------- */

.about {
  max-width: 64rem; /* same width as the Documentation photo */
}

.about__portrait {
  margin: 0 auto 2rem;
  max-width: 32rem;
}

.about__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1143 / 1600;
  background: var(--paper-2);
}

.about__portrait figcaption {
  margin-top: 0.5rem;
  color: var(--ink-2);
}

.about__bio {
  margin: 0;
  font-size: inherit;
  line-height: 1.5;
}

.about__more {
  margin: 0.9rem 0 0;
  color: var(--ink-2);
}

/* ---------- Records ---------- */

.covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.1rem;
  max-width: 64rem;
}

/* The link is flattened so the image, caption and player share the figure's
   grid: the player sits on the bottom edge of the cover, the caption below. */
.cover {
  display: grid;
  margin: 0;
}

.cover > a {
  display: contents;
}

.cover img,
.cover .player {
  grid-area: 1 / 1;
}

.cover a:focus-visible img {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
  transition: opacity 0.3s;
}

.cover a:hover img {
  opacity: 0.85;
}

.cover figcaption {
  grid-row: 2;
  margin-top: 0.5rem;
  color: var(--ink-3);
}

.cover figcaption em {
  color: var(--ink);
}

/* Minimal preview player: play/pause, a hairline scrubber and the time.
   Hidden until the cover is hovered or focused; stays up while playing.
   Touch screens can't hover, so there it's always shown. */
.player {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.55rem 0.3rem 0.3rem;
  background: var(--veil);
  font-size: 0.7rem;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.3s;
}

.cover:hover .player,
.cover:focus-within .player,
.player.is-playing {
  opacity: 1;
}

@media (hover: none) {
  .player {
    opacity: 1;
  }
}

.player__btn {
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Outlined triangle for play, two bars for pause */
.player__btn::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.25rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent var(--ink-2);
}

.player__btn::after {
  content: "";
  position: absolute;
  left: 0.48rem;
  top: 0.48rem;
  border-style: solid;
  border-width: 0.22rem 0 0.22rem 0.37rem;
  border-color: transparent transparent transparent var(--paper);
}

.player.is-playing .player__btn::before {
  left: 0.4rem;
  width: 0.2rem;
  height: 0.85rem;
  border: 0;
  background: var(--ink-2);
  box-shadow: 0.38rem 0 0 var(--ink-2);
}

.player.is-playing .player__btn::after {
  display: none;
}

.player__seek {
  --p: 0%;
  width: 100%;
  height: 1rem;
  margin: 0;
  background: none;
  appearance: none;
  cursor: pointer;
}

.player__seek::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(var(--ink-2), var(--ink-2)) 0 0 / var(--p) 100% no-repeat, var(--track);
}

.player__seek::-moz-range-track {
  height: 1px;
  background: var(--track);
}

.player__seek::-moz-range-progress {
  height: 1px;
  background: var(--ink-2);
}

.player__seek::-webkit-slider-thumb {
  appearance: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.25rem;
  border-radius: 50%;
  background: var(--ink-2);
}

.player__seek::-moz-range-thumb {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink-2);
}

.player__time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .covers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.subhead {
  margin: 2rem 0 0.4rem;
  font-size: inherit;
  font-weight: inherit;
  color: var(--ink-3);
}

/* A subhead that opens a section lines up with the section title */
.subhead--first {
  margin-top: 0;
}

.plain .year {
  color: var(--ink-3);
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

/* ---------- News ---------- */

.news {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.news li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
}

.news time {
  color: var(--ink-3);
}

.news__type {
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------- Documentation ---------- */

/* overflow clips the separator that would hang before the first tab of each
   wrapped row; the padding/negative margin pair keeps focus outlines visible */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  margin: -0.3rem -0.3rem 0.1rem;
  padding: 0.3rem;
  overflow: hidden;
}

.tab {
  position: relative;
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ink-3);
  cursor: pointer;
}

/* A "|" centred in the gap between set titles */
.tab + .tab::before {
  content: "|";
  content: "|" / "";
  position: absolute;
  left: -0.875rem;
  transform: translateX(-50%);
  color: var(--ink-3);
  font-style: normal;
  pointer-events: none;
}

.tab:hover {
  color: var(--ink-2);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  font-style: italic;
}

.gallery__credit {
  margin: 0;
  max-width: 60ch;
  font-size: 0.85em;
  color: var(--ink-2);
}

.tabs {
  margin-bottom: 0.9rem;
}

/* One photo at a time, with previous / next */
.carousel {
  position: relative;
  max-width: 64rem;
}

.carousel__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.7rem;
}

.carousel__stage {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
}

.carousel__stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.carousel__stage img.is-loaded {
  opacity: 1;
}

.carousel [hidden] {
  display: none;
}

.carousel__video {
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
}

.carousel__video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.carousel__nav {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.carousel__nav button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.2rem 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s;
}

.carousel__nav button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--veil);
  color: var(--ink);
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: fade 0.35s var(--ease);
}

.lightbox::backdrop {
  background: transparent;
}

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

.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 4rem 4.5rem 2rem;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 8.5rem);
  width: auto;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.lightbox__figure img.is-loaded {
  opacity: 1;
}

.lightbox__figure figcaption {
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0.03em;
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.25s;
}

.lightbox__btn:hover {
  opacity: 1;
}

.lightbox__close {
  top: 1.25rem;
  right: var(--gutter);
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  padding: 1rem;
}

.lightbox__prev {
  left: 0.5rem;
}
.lightbox__next {
  right: 0.5rem;
}

@media (max-width: 640px) {
  .lightbox__figure {
    padding: 3.5rem 0.75rem 4.5rem;
  }
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }
}

/* ---------- Press (inside About) ---------- */

.press {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem var(--gutter);
  margin-top: 1.5rem;
}

/* Reviews flow across two of the three grid columns; matching gaps keep them aligned */
.press__reviews {
  grid-column: span 2;
}

.press__reviews ul {
  columns: 2;
  column-gap: var(--gutter);
}

.press__reviews li {
  break-inside: avoid;
}

.press h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.press ul {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}

@media (max-width: 560px) {
  .press {
    grid-template-columns: 1fr;
  }

  .press__reviews {
    grid-column: auto;
  }

  .press__reviews ul {
    columns: 1;
  }
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 4rem;
  margin: 0;
}

.contact dt {
  margin-bottom: 0.2rem;
  color: var(--ink-3);
}

.contact dd {
  margin: 0;
}

/* Newsletter signup (Netlify Forms) */
.newsletter {
  margin-top: 2.5rem;
  max-width: 28rem;
}

.newsletter__label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-3);
}

.newsletter__row {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  border-bottom: 1px solid var(--track);
  transition: border-color 0.3s;
}

.newsletter__row:focus-within {
  border-color: var(--ink);
}

.newsletter__input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: none;
  padding: 0.35rem 0;
  font: inherit;
  color: var(--ink);
  outline: none;
}

.newsletter__input::placeholder {
  color: var(--ink-3);
}

.newsletter__btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.35rem 0;
  font-family: inherit;
  font-weight: inherit;
  color: var(--ink);
  cursor: pointer;
}

.newsletter__btn:disabled {
  color: var(--ink-3);
  cursor: default;
}

.newsletter__status {
  min-height: 1.2em;
  margin: 0.5rem 0 0;
  color: var(--ink-3);
}

.link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  column-gap: var(--gutter);
  max-width: var(--measure);
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding: 1rem var(--gutter) 1.5rem;
}

.foot__line {
  grid-column: 2;
  display: flex;
  gap: 1.75rem;
}

@media (max-width: 760px) {
  .foot__line {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .section {
    opacity: 1;
    transform: none;
  }
}

/* ---------- High Society (private page) ---------- */

/* Same light palette and grain as the main page. The wordmark and kicker sit
   small in the left column, like the section titles on the main page. */
.hs__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.hs__title img {
  display: block;
  width: 100%;
  max-width: 15rem;
  height: auto;
}

.hs__kicker {
  margin: 0.9rem 0 0;
  max-width: 15rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.hs__kicker strong {
  font-weight: 700;
}

/* Photo and player side by side, between the intro and the rest of the text */
.hs-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
  margin: 2rem 0;
}

.hs-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  margin-top: 2.5rem;
}

.hs-media img,
.hs-photos img {
  width: 100%;
  background: var(--paper-2);
}

@media (max-width: 760px) {
  .hs-media,
  .hs-photos {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The shared preview player, always shown and without the cover veil */
.player--bar {
  opacity: 1;
  padding-left: 0;
  background: none;
}

.hs-tracks {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  counter-reset: track;
}

.hs-tracks button {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  width: 100%;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-3);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
  counter-increment: track;
}

.hs-tracks button::before {
  content: counter(track, decimal-leading-zero);
  font-size: 0.8rem;
}

.hs-tracks button:hover,
.hs-tracks button.is-current {
  color: var(--ink);
}

.hs-tracks__dur {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.hs-player__note {
  margin: 0.5rem 0 0;
  color: var(--ink-3);
}

/* Off-screen rather than display: none so the audio keeps playing */
.hs-player__engine {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  border: 0;
}

/* Same plain white background and grain as the main page; only the
   text column is narrower. */
.page-hs {
  --measure: 72rem;
}

/* Document-like page, set a little smaller than the main page but with
   room to breathe */
html.hs-root {
  font-size: 100%;
}

@media (min-width: 760px) {
  html.hs-root {
    font-size: 106.25%;
  }
}

.page-hs {
  font-size: 1rem;
  line-height: 1.5;
}

.page-hs p {
  margin: 0 0 0.9em;
}

.page-hs main {
  padding-top: 3.5rem;
}

.page-hs .section {
  padding-top: 2.25rem;
}

.page-hs .about {
  max-width: 50rem;
}

.page-hs .about__bio {
  line-height: inherit;
}

.page-hs .subhead {
  margin: 1.9rem 0 0.5rem;
}

.page-hs .hs__title img,
.page-hs .hs__kicker {
  max-width: 13rem;
}

.page-hs .hs__kicker {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.page-hs .hs-media {
  margin: 1.75rem 0;
}

.page-hs .hs-photos {
  margin-top: 2rem;
}

.page-hs .hs-tracks button {
  padding: 0.35rem 0;
}

.page-hs .foot {
  margin-top: 3rem;
  font-size: 0.85rem;
}
