/* ==========================================================================
   yves matisse · site.css
   Black, helvetica, lowercase. The artwork is the only color on the page,
   and the accent (--tone) is taken from whichever cover is showing.
   ========================================================================== */

:root {
  --ink: #000;
  --paper: #efeee9;
  --dim: rgba(239, 238, 233, 0.58);
  --faint: rgba(239, 238, 233, 0.32);
  --line: rgba(239, 238, 233, 0.14);
  --tone: #efeee9;
  --face: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cover: min(72vh, 42vw);
  --pad-x: clamp(20px, 2.6vw, 40px);
  --pad-y: clamp(18px, 3.4vh, 34px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
body {
  font: 400 14px/1.4 var(--face);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--paper); color: var(--ink); }
:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ==========================================================================
   THE SCREEN
   ========================================================================== */
.app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cover) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: clamp(28px, 4vw, 72px);
  padding: calc(env(safe-area-inset-top, 0px) + var(--pad-y)) var(--pad-x) calc(env(safe-area-inset-bottom, 0px) + var(--pad-y));
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}
.app > *,
.more > * { pointer-events: auto; }
.app > .cover-slot { pointer-events: none; }
.more { display: contents; }

.app > *:not(.cover-slot):not(.more),
.more > * {
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.ready .app > *:not(.cover-slot):not(.more),
.ready .more > * { opacity: 1; }
.ready .app > .releases { transition-delay: 0.5s; }
.ready .app > .info { transition-delay: 0.7s; }

.name {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- the artwork ---------- */
.cover-slot {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  position: relative;
  width: var(--cover);
  height: var(--cover);
  margin: 0;
}
.cover-img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.no-fluid .cover-img { display: block; }
.no-fluid.is-playing .cover-img { animation: breathe 0.9s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.02); } }
.hint {
  position: absolute;
  left: 0;
  bottom: -30px;
  font-size: 12px;
  color: var(--faint);
  transition: opacity 1.2s;
}
.hint.gone,
.no-fluid .hint { opacity: 0; }

/* ---------- the releases ---------- */
.releases {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list button {
  display: grid;
  grid-template-columns: 30px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--dim);
  transition: color 0.25s, padding 0.45s var(--ease);
}
.rel-list .th {
  width: 30px;
  height: 30px;
  background: #111 center / cover no-repeat;
  opacity: 0.55;
  transition: opacity 0.3s, transform 0.45s var(--ease);
}
.rel-list .th-soon {
  background: repeating-linear-gradient(135deg, rgba(239, 238, 233, 0.16) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rel-list .d { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rel-list .t { font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-list .s { font-size: 11px; color: var(--faint); }
.rel-list .is-soon .t { color: var(--faint); }
.rel-list button:hover,
.rel-list button:focus-visible,
.rel-list button.is-shown { color: var(--paper); padding-left: 8px; }
.rel-list button:hover .th,
.rel-list button.is-shown .th { opacity: 1; }
.rel-list button.is-shown .th { transform: scale(1.12); }
.rel-list .is-soon button.is-shown .t,
.rel-list .is-soon button:hover .t { color: var(--paper); }
.rel-list button[aria-pressed="true"] .t::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--tone);
  vertical-align: middle;
  transition: background 0.6s;
}

/* ---------- the selected release ---------- */
.info {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
  max-width: 340px;
}
.kind { margin: 0 0 10px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.title {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.credit { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.count {
  margin: 16px 0 0;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.play {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 13px;
}
.play .ico {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tone);
  transition: background 0.6s, transform 0.35s var(--ease);
}
.play .ico::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-left: 13px solid #000;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.is-playing .play .ico::before {
  left: 14px;
  top: 14px;
  width: 4px;
  height: 14px;
  border: 0;
  background: #000;
  box-shadow: 9px 0 0 #000;
}
.play:hover .ico { transform: scale(1.06); }
.bar { height: 1px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--tone); transform: scaleX(0); transform-origin: left; }
.time { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.tracks { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: t; }
.tracks li { counter-increment: t; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.tracks li:last-child { border-bottom: 1px solid var(--line); }
.tracks li::before { content: counter(t, decimal-leading-zero); display: inline-block; width: 30px; font-size: 11px; color: var(--faint); }
.tracks li.tba { color: var(--faint); }
.tracks li.soon::before { content: none; }

.links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.links a { font-size: 13px; text-decoration: none; color: var(--paper); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.3s; }
.links a span { margin-left: 3px; font-size: 10px; color: var(--faint); }
.links a:hover { border-color: var(--tone); }

/* ---------- artist links + alerts ---------- */
.more-toggle { display: none; }
.artist-links { grid-column: 3; grid-row: 1; justify-self: end; }
.artist-links .links { margin: 0; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.alerts { grid-column: 3; grid-row: 3; justify-self: end; align-self: end; width: min(100%, 300px); }
.alerts label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--dim); }
.alerts .field { display: flex; align-items: center; border-bottom: 1px solid var(--dim); }
.alerts .field:focus-within { border-color: var(--paper); }
.alerts input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--paper);
  font: 400 15px var(--face);
}
.alerts input::placeholder { color: var(--faint); }
.alerts button { padding: 6px 0 6px 10px; border: 0; background: none; font-size: 16px; cursor: pointer; }
.alerts-msg { min-height: 1em; margin: 6px 0 0; font-size: 12px; color: var(--dim); }
.alerts.done .field { display: none; }
.alerts.done .alerts-msg { color: var(--paper); font-size: 14px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  display: grid;
  gap: 2px;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  background: rgba(16, 16, 17, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast small { font-size: 11px; color: var(--faint); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   NARROWER DESKTOPS
   ========================================================================== */
@media (min-width: 761px) and (max-width: 1080px) {
  :root { --cover: min(64vh, 40vw); }
  .rel-list button { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .rel-list .d { display: none; }
  .rel-list .th { width: 26px; height: 26px; }
}
@media (min-width: 761px) and (max-height: 640px) {
  .rel-list button { padding: 4px 0; }
  .player { margin-top: 16px; }
  .links { margin-top: 16px; }
}

/* ==========================================================================
   PHONES: the artwork on top, the release you're on, the strip of releases
   ========================================================================== */
@media (max-width: 760px) {
  :root { --cover: calc(100vw - 32px); }
  .app {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
    row-gap: 0;
  }
  .name { grid-column: 1; grid-row: 1; font-size: 19px; align-self: center; }
  .more-toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
    padding: 6px 0;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--dim);
    cursor: pointer;
  }
  .cover-slot { grid-column: 1 / -1; grid-row: 2; align-self: start; margin-top: 14px; }
  .hint { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; }
  .info { grid-column: 1 / -1; grid-row: 3; align-self: start; max-width: none; margin-top: 18px; }
  .kind { margin-bottom: 6px; }
  .title { font-size: 40px; }
  .player { margin-top: 16px; }
  .links { margin-top: 16px; gap: 6px 14px; }
  .tracks { margin-top: 12px; }
  .tracks li { padding: 4px 0; font-size: 14px; }

  .releases { grid-column: 1 / -1; grid-row: 5; align-self: end; margin: 0 -16px; }
  .rel-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 16px 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .rel-list::-webkit-scrollbar { display: none; }
  .rel-list li { flex: none; scroll-snap-align: start; }
  .rel-list button {
    grid-template-columns: 34px auto;
    grid-template-rows: auto auto;
    column-gap: 9px;
    row-gap: 1px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--line);
    width: auto;
  }
  .rel-list button:hover,
  .rel-list button:focus-visible,
  .rel-list button.is-shown { padding-left: 6px; }
  .rel-list button.is-shown { border-color: var(--tone); }
  .rel-list .th { grid-row: 1 / 3; width: 34px; height: 34px; }
  .rel-list .t { grid-column: 2; grid-row: 1; font-size: 14px; }
  .rel-list .d { grid-column: 2; grid-row: 2; }
  .rel-list .s { display: none; }
  .rel-list button[aria-pressed="true"] .t::after { display: none; }

  /* links + alerts as a sheet */
  .more {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    top: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 58px) 16px 22px;
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-102%);
    visibility: hidden;
    transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
  }
  .more-open .more { transform: none; visibility: visible; transition: transform 0.45s var(--ease), visibility 0s; }
  .more-toggle { position: relative; z-index: 21; }
  .more > * { width: 100%; justify-self: stretch; }
  .artist-links .links { justify-content: flex-start; flex-wrap: wrap; white-space: normal; margin: 0 0 18px; }
  .artist-links .links a { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
