/* 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 { height: 100%; scroll-behavior: auto; scroll-padding: 0; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body.ts { height: 100%; overflow: hidden; background: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.record { position: fixed; inset: 0; z-index: 1; }

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: the sleeve. It lies over everything and lifts. */
html.cover { overflow: hidden; background: #eeeae1 !important; }
html:not([data-open]) { background: #eeeae1; }
html:not([data-open]):has(.notes-open) { background: #2b0c0f; }
.front { position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 100vh; height: 100lvh; background: #eeeae1; color: #191714; transform: translateY(-101%); visibility: hidden; transition: transform .85s var(--turn), visibility 0s .85s; overscroll-behavior: none; touch-action: pinch-zoom; }
html.cover .front { transform: none; visibility: visible; transition: transform .85s var(--turn); }
html.lifted .front { display: none; }
html.cover .record { opacity: 0; transition: opacity 0s .85s; }
html.landed .record, html.landed .notes { position: absolute; }
html.landed body.ts { position: relative; height: 100vh; height: 100lvh; overflow: hidden; }
html:not(.ready) .front { transition: none !important; }
.front-in { position: absolute; inset: 0 0 auto; height: 100vh; height: 100svh; padding: clamp(36px, 4vw, 56px) var(--gutter); display: grid; grid-template: auto 1fr auto / 1fr auto; align-items: end; }
.front h1 { grid-column: 1 / -1; justify-self: start; }
.front h1 .amalle-logo { width: min(43vw, 78svh, 720px); }
.front-sides { grid-row: 3; display: grid; font-size: clamp(24px, 2.4vw, 38px); font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.front-sides a { display: grid; grid-template-columns: 1.15em auto; padding: .12em 0; transition: opacity .3s; }
.front-sides span { font-weight: 300; opacity: .5; transition: opacity .3s; }
.front-more { grid-row: 3; grid-column: 2; display: flex; gap: 30px; padding-bottom: 8px; font-size: 16px; font-weight: 500; }
.front-more a { text-underline-offset: 5px; }
.front-more a:hover { text-decoration: underline 1px; }
@media (hover: hover) { .front-sides:has(a:hover) a:not(:hover) { opacity: .35; } }

.face { isolation: isolate; position: absolute; inset: 0 0 auto; height: 100vh; height: 100lvh; overflow: hidden; }
.face picture { display: contents; }
.face img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; }
.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 { background: linear-gradient(90deg, color-mix(in srgb, var(--ground) 80%, transparent), color-mix(in srgb, var(--ground) 12%, transparent) 70%); }

/* An open side is the page itself: it scrolls natively, the photo, the colour and the bar stay put behind and above it.
   The other side lies on top, fixed, until the seam has carried it off. */
html[data-open] { height: auto; }
html[data-open="a"] { background: #0b0b0a; }
html[data-open="b"] { background: #eeeae1; }
html[data-open] body.ts { height: auto; overflow: visible; background: none; }
html[data-open] .record { position: relative; }
html[data-open="a"] .layer.a, html[data-open="b"] .layer.b { position: relative; inset: auto; overflow: visible; z-index: 1; background: none; }
html[data-open="a"] .layer.b, html[data-open="b"] .layer.a { position: fixed; z-index: 2; }
html[data-open="a"] .a .scroll, html[data-open="b"] .b .scroll { position: relative; inset: auto; overflow: visible; }
html[data-open="a"] .a :is(.face, .wash, .bar), html[data-open="b"] .b :is(.face, .wash, .bar) { position: fixed; }
html[data-open="a"] .a .wash, html[data-open="b"] .b .wash { bottom: auto; height: 100vh; height: 100lvh; }
html[data-open="a"] .a.deep .face, html[data-open="b"] .b.deep .face { visibility: hidden; }
html[data-open] .layer.away { visibility: hidden; position: absolute; bottom: auto; height: 100svh; }
.layer.away * { visibility: hidden !important; }

/* One flick, one record: every screen settles in place */
@media (min-width: 861px) {
  html[data-open] { scroll-snap-type: y mandatory; }
  .disco-hero, .shelf, .rel, .closing { scroll-snap-align: start; }
  .shelf, .rel { scroll-snap-stop: always; }
}

/* Inside a side */
.scroll { z-index: 1; position: absolute; inset: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
[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; }
.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: two flat sheets behind the page, mixed by how far it has moved */
.wash { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; }
[data-view="a"] .a .wash, [data-view="b"] .b .wash { opacity: 1; }
.wash i { position: absolute; inset: 0; }
.wash i + i { will-change: opacity; }
.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: 100svh; 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 */
.closing { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; }
.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: max(6.6em, 104px) minmax(0, 1.5fr) minmax(0, .8fr) 16px; gap: 12px; padding: 13px 0; }
.d-date { white-space: nowrap; }
.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; }
.shows { padding-bottom: 20px; }
.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); }
.unfold { display: inline-flex; align-items: center; gap: 10px; padding: 18px 0 14px; font-size: 14px; font-weight: 500; color: var(--soft); transition: color .2s; }
.unfold:hover, .unfold[aria-expanded="true"] { color: var(--fg); }
.unfold svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.unfold[aria-expanded="true"] svg { transform: rotate(180deg); }
.fold { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.fold > * { min-height: 0; overflow: hidden; }
.unfold[aria-expanded="true"] + .fold { grid-template-rows: 1fr; opacity: 1; }
.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 .6s ease .22s; }
.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; }
  /* Phone: everything on the centre line */
  .front-in { grid-template: 1fr auto auto auto 1fr / 1fr; justify-items: center; text-align: center; padding-bottom: 30px; }
  .front h1 { grid-row: 2; justify-self: center; }
  .front h1 .amalle-logo { width: min(74vw, 340px); }
  .front-sides { grid-row: 3; gap: 26px; margin-top: clamp(64px, 12svh, 120px); font-size: 27px; justify-items: center; }
  .front-sides a { grid-template-columns: auto; gap: 5px; padding: 0 12px; }
  .front-sides span { font-size: 14px; font-weight: 400; letter-spacing: 0; opacity: .6; }
  .front-sides span::before { content: "Side "; }
  .front-more { grid-row: 5; grid-column: 1; gap: 34px; padding: 0; }
  .face::before { background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--ground) 88%, transparent) 80%); }
  .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; }
  html[data-open="a"] { overscroll-behavior-y: none; }
  .closing { min-height: 0; }
  .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; }
}
