/* Two Sides. One seam: centre = home, right edge = side A, left edge = side B.
   For About the seam parts: the edge of A goes left, the edge of B goes right.
   All of that movement is driven from sides.js, which moves only the parts that move.
   Panels, filters and dialogs come from styles.css and discography.css. */

:root { --turn: cubic-bezier(.7, 0, .15, 1); }
html, body.ts { height: 100%; }
body.ts { overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.record { position: fixed; inset: 0; z-index: 1; }
[data-view="home"] .record { touch-action: pinch-zoom; user-select: none; -webkit-user-select: none; }

body.notes-open .record { visibility: hidden; transition: visibility 0s .85s; }
body.notes-open .record .layer .scroll { visibility: hidden; transition: visibility 0s .85s; }

.layer { isolation: isolate; position: absolute; inset: 0; overflow: hidden; background: var(--ground); color: var(--fg); }
.a { --ground: #0b0b0a; --base: #0b0b0a; --ink: #f2f2ee; --fg: #f2f2ee; --soft: rgba(242,242,238,.6); --off: rgba(242,242,238,.45); }
.b { --ground: #eeeae1; --base: #eeeae1; --ink: #191714; --fg: #191714; --soft: rgba(25,23,20,.68); --off: rgba(25,23,20,.5); --accent: #a8341f; --line: rgba(25,23,20,.18); clip-path: inset(0 0 0 50%); }

/* Home: each photo fills its half, then widens to become that side's opening screen */
.face { isolation: isolate; position: absolute; inset: 0; overflow: hidden; }
[data-view="a"] .a .face, [data-view="b"] .b .face { pointer-events: none; }
.face picture { display: contents; }
.face img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; transform-origin: 0 0; will-change: transform, opacity; transition: opacity .7s ease; -webkit-user-drag: none; }
.b .face img { object-position: 50% 25%; }
.face::before, .face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--ground) 75%, transparent)); }
.face::before { z-index: 1; opacity: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--ground) 80%, transparent), color-mix(in srgb, var(--ground) 12%, transparent) 70%); transition: opacity .9s ease .2s; }
[data-view="a"] .a .face::before, [data-view="b"] .b .face::before { opacity: 1; }
.face-label { position: absolute; z-index: 2; bottom: 34px; display: flex; flex-direction: column; gap: 4px; transition: opacity .5s; }
.face-label span:first-child { font-size: 14px; line-height: 1.3; color: var(--soft); }
.face-label span:last-child { position: relative; padding-bottom: 8px; font-size: clamp(22px, 2.2vw, 34px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.face-label span:last-child::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: currentColor; transform: scaleX(.16); transform-origin: left; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.b .face-label span:last-child::after { transform-origin: right; }
/* The side being leaned towards comes forward, the other fades into its ground */
[data-view="home"] [data-lean="a"] .b .face img, [data-view="home"] [data-lean="b"] .a .face img { opacity: .62; }
[data-view="home"] [data-lean="a"] .b .face-label, [data-view="home"] [data-lean="b"] .a .face-label { opacity: .45; }
[data-lean="a"] .a .face-label span:last-child::after, [data-lean="b"] .b .face-label span:last-child::after, .face:focus-visible .face-label span:last-child::after { transform: none; }
.a .face-label { left: var(--gutter); }
.b .face-label { right: var(--gutter); text-align: right; }
.seam-link { position: absolute; z-index: 2; bottom: 34px; padding: 10px 0; margin-bottom: -10px; font-size: 14px; font-weight: 500; transition: opacity .35s; }
.seam-link:hover { text-decoration: underline 1px; text-underline-offset: 5px; }
.seam-link { will-change: transform; }
.a .seam-link { right: 22px; transform: translateX(-50vw); }
.b .seam-link { left: 22px; transform: translateX(50vw); }
.wordmark { position: absolute; left: 50%; top: 68%; width: clamp(260px, 36vw, 560px); transform: translate(-50%, -50%); pointer-events: none; will-change: opacity; transition: opacity .35s; }
body:not([data-view="home"]) :is(.face-label, .wordmark, .seam-link) { opacity: 0; }
body:not([data-view="home"]) .seam-link { visibility: hidden; }

/* Inside a side */
.scroll { z-index: 1; position: absolute; inset: 0; overflow: hidden auto; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
[data-view="a"] .a .scroll, [data-view="b"] .b .scroll { opacity: 1; visibility: visible; transition: opacity .4s ease .22s; }
.bar { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); transition: opacity .5s; }
[data-view="home"] .layer .bar { opacity: 0; visibility: hidden; }
.switch { display: flex; gap: clamp(16px, 2.2vw, 30px); font-size: 14px; font-weight: 500; }
.switch a { color: var(--soft); transition: color .2s; }
.switch a:hover, .switch a[aria-current] { color: var(--fg); }

.ts .disco-hero h1 { font-weight: 700; line-height: 1.05; }
.ts .filters { padding-left: 0; margin-top: 10px; }
.ts .filters button { color: var(--off); }
.ts .filters button:hover, .ts .filters button[aria-pressed="true"] { color: var(--fg); }
.panels { position: relative; }
/* The page colour is one screen-sized sheet that travels with you; colours fade in on top of each other */
.wash { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; background: var(--base); pointer-events: none; }
.wash i { position: absolute; inset: 0; will-change: opacity; }
.panels > :not(.wash) { position: relative; z-index: 1; }
.a .cover-btn { box-shadow: none; }
.ts .rel { transition: none; }
.ts .rel .side > *, .ts .rel .stage { opacity: 1; transform: none; transition: none; }
.cover-btn picture { display: contents; }
.ts .rel { scroll-margin-top: 0; }
.ts .rel h2 .t { font-size: clamp(32px, 3.6vw, 54px); font-weight: 700; padding: 0; margin: 0; letter-spacing: -.035em; }
.ts .rel h2 .k { font-size: clamp(22px, 2.2vw, 32px); font-weight: 300; margin-top: 4px; letter-spacing: -.025em; }
.ts .rel .with, .ts .rel .blurb, .ts .rel-meta { padding-left: 0; }
.ts .rel p.ph { margin-left: 0; }
.b .rel .side { order: 2; }
.b .cover-btn { box-shadow: 0 30px 70px -34px rgba(25,23,20,.45); }
.ts .all-mixes a { color: var(--soft); border-color: var(--line); }
.ts .all-mixes a:hover { color: var(--fg); }
.ts .pager { padding-bottom: clamp(56px, 8vw, 110px); }

/* Selected works: the words rise in and out; the line itself stays put */
.ts .sel-line, .ts .sel-line.on, .ts .sel-line.out { transform: none; transition: none; }

/* The shelf */
.shelf { min-height: min(100svh, 640px); display: flex; align-items: center; padding: 84px 0 56px; overflow: hidden; }
.shelf-row { width: 100%; display: flex; gap: clamp(14px, 1.6vw, 24px); padding: 10px var(--gutter) 14px; overflow-x: auto; scrollbar-width: none; cursor: grab; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row.dragging { cursor: grabbing; }
.shelf-row.dragging .sleeve { pointer-events: none; }
.sleeve { flex: none; width: clamp(170px, min(20vw, 40svh), 340px); color: var(--fg); transition: opacity .35s ease; user-select: none; -webkit-user-select: none; }
.shelf.in .sleeve { animation: slide-in .7s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i) * 30ms); }
.b .shelf.in .sleeve { --from: -50px; }
@keyframes slide-in { from { transform: translateX(var(--from, 50px)); } }
.sleeve[hidden] { display: none; }
.sleeve img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin-bottom: 14px; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.sleeve-tag { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.sleeve-title { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.sleeve-meta { display: block; margin-top: 3px; font-size: 13px; color: var(--soft); }
@media (hover: hover) {
  .sleeve:hover img { transform: translateY(-8px); }
  .shelf-row:has(.sleeve:hover) .sleeve:not(:hover) { opacity: .5; }
  /* With a mouse or trackpad the row is moved from sides.js, so it never traps a vertical scroll */
  .shelf-row { overflow: hidden; }
}

/* End of each side */
.ends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px clamp(40px, 7vw, 120px); padding: clamp(72px, 10vw, 140px) var(--gutter) 0; }
.ends h2 { font-size: clamp(22px, 2.2vw, 32px); margin-bottom: 18px; letter-spacing: -.025em; }
.ends .link-list li > *, .index .link-list li > * { padding: 13px 0; font-size: 17px; }
.ends .contacts li, .index .contacts li { padding: 13px 0; }
.ends .c-mail, .index .c-mail { font-size: 17px; }
.ends .dates, .index .dates { margin: 0; }
.ends .dates li > * { grid-template-columns: 100px minmax(0, 1.6fr) minmax(0, .7fr) 16px; gap: 12px; padding: 13px 0; }
.d-at { display: block; font-weight: 400; color: var(--soft); }
.shows { margin-top: clamp(56px, 8vw, 96px); scroll-margin-top: 92px; }
.shows .dates { margin: 0 0 44px; }
.shows .dates li > * { grid-template-columns: 140px minmax(0, 2fr) minmax(0, 1fr) 16px; padding: 13px 0; }
.shows .d-at { display: inline; margin-left: .7em; }
.past .dates { color: var(--soft); }
.past .d-date, .past .d-venue { font-weight: 400; }
.past .dates a { transition: color .2s, padding .3s; }
.past .dates a:hover { color: var(--fg); }
.none { margin: 0 0 14px; padding: 13px 0; border-block: 1px solid var(--line); color: var(--soft); }
.b .panels { --muted: rgba(25,23,20,.68); }
.b .panels .ph { color: var(--soft); border-color: var(--soft); }
.ts .all-mixes { padding-top: 48px; }

/* About: lies under the record and shows when the two sides part */
.notes { --fg: #f4ece6; --soft: rgba(244,236,230,.66); --muted: rgba(244,236,230,.66); --line: rgba(244,236,230,.2); --accent: #f08a73; --bg-2: #3a1216; position: fixed; inset: 0; z-index: 0; overflow: hidden auto; background: #2b0c0f; color: var(--fg); visibility: hidden; transition: visibility 0s .85s; scrollbar-width: none; overscroll-behavior: contain; }
.notes::-webkit-scrollbar { display: none; }
.notes-open .notes { visibility: visible; transition: none; }
.notes > * { opacity: 0; transition: opacity .4s; }
.notes-open .notes > * { opacity: 1; transition: opacity .8s ease .55s; }
.notes .bar { position: sticky; top: 0; background: #2b0c0f; }
.notes .ph { color: var(--soft); border-color: var(--soft); opacity: .8; }
.notes .sheet { padding: clamp(24px, 5vh, 60px) var(--gutter) 48px; display: flex; flex-direction: column; gap: clamp(72px, 9vw, 128px); }
.notes .about { align-items: start; }
.notes .about-img { aspect-ratio: auto; height: min(72svh, 760px); }
.notes .about-text h2 { margin-top: 0; }
.notes .about-text p:not(.ph):first-of-type { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--fg); }
.notes .about-text p:not(.ph) { font-size: 16px; }
.index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(32px, 5vw, 80px); align-items: start; }
.connect { scroll-margin-top: 92px; min-height: calc(100svh - 190px); }
.connect > h2 { margin-bottom: clamp(32px, 6vh, 64px); }
.index h3, .shows h3 { font-size: 17px; font-weight: 400; color: var(--soft); letter-spacing: 0; margin-bottom: 14px; }
.notes .sheet-foot { display: flex; gap: 20px; font-size: 13px; color: var(--soft); }

/* Phone: the seam runs across */
@media (max-width: 860px) {
  .b { clip-path: inset(50% 0 0 0); }
  .face img { object-position: 50% 28%; }
  .b .face img { object-position: 50% 30%; }
  .a .face::after { background: none; }
  .face::before { background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--ground) 88%, transparent) 80%); }
  .a .face-label { top: 24px; bottom: auto; }
  .face-label span:last-child { font-size: 26px; }
  .b .face-label span:last-child::after { transform-origin: left; }
  .b .face-label { bottom: 26px; right: auto; left: var(--gutter); text-align: left; }
  .wordmark { top: 50%; width: 64vw; }
  .seam-link { transform: none !important; }
  .a .seam-link { right: var(--gutter); top: 14px; bottom: auto; margin: 0; }
  .b .seam-link { left: auto; right: var(--gutter); bottom: 26px; }
  .ends .dates li > *, .shows .dates li > * { grid-template-columns: minmax(0, 1fr) 16px; gap: 2px 12px; }
  .shows .d-at { display: block; margin: 0; }
  .ts .dates .d-date { grid-column: 1; font-size: 13px; font-weight: 400; color: var(--soft); }
  .ts .dates .d-venue { grid-column: 1; }
  .ts .dates .d-city { grid-column: 1; grid-row: auto; }
  .ts .dates .d-arrow { grid-column: 2; grid-row: 1; }
  .a .scroll { overscroll-behavior: contain; }
  .shelf { min-height: 0; padding-bottom: 24px; }
  .sleeve { width: min(54vw, 40svh); }
  .ends, .index { grid-template-columns: minmax(0, 1fr); }
  .notes .about-img { height: auto; aspect-ratio: 4 / 3; }
  .ts .selected { padding-left: 0; }
  .b .rel .side { order: 0; }
  .switch { gap: 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .ts *, .ts *::before, .ts *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
