/* Layout: an exhibition. A living, blurred colour field behind everything (moves with the music, takes the colour of the
   beat you hover or play). Each beat is shown as a work with a museum wall label. On a beat's page the whole site takes its theme. */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #0b0b0d; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #17171b; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: #efece6; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #8c8a86; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #efece6; }
:root {
  --bg: #0b0b0d; --surface: #17171b; --fg: #efece6; --muted: #8c8a86; --accent: #efece6;
  --line: color-mix(in srgb, var(--fg) 14%, transparent);
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --beat-font: var(--serif); --beat-style: italic; --beat-weight: 400;
  color-scheme: dark;
  transition: --bg .9s ease, --surface .9s ease, --fg .9s ease, --muted .9s ease, --accent .9s ease;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { :root { transition: none; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body.has-player { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
body::after { content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 60; opacity: .09; animation: grain 1s steps(5) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cap { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1; margin: 6px 0 0; }
.mark { display: block; aspect-ratio: 1400 / 429; background: url("/assets/logo.webp") center / contain no-repeat; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; mix-blend-mode: difference; color: #fff; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.logo { display: block; text-decoration: none; }
.logo .mark { height: 28px; }
nav.main { display: flex; gap: 26px; }
nav.main a { text-decoration: none; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; padding: 4px 0; }
nav.main a:hover, nav.main a[aria-current="page"] { opacity: 1; }

[data-view] { display: none; }
[data-view].active { display: block; animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
section.block { padding-block: clamp(40px, 6vw, 80px); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; padding: 10px 16px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; text-decoration: none; cursor: pointer; background: none; transition: background .2s, color .2s, border-color .2s; }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.ghost { border-color: color-mix(in srgb, currentColor 35%, transparent); }
.btn.ghost:hover { border-color: currentColor; }
.btn svg { width: 12px; height: 12px; }
.pbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: transparent; display: grid; place-items: center; cursor: pointer; color: inherit; flex: none; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.pbtn:hover { border-color: currentColor; transform: scale(1.06); }
.pbtn[aria-pressed="true"] { background: var(--pa, var(--fg)); color: var(--pb, var(--bg)); border-color: transparent; }
.pbtn svg { width: 14px; height: 14px; }

/* Intro: the logo alone */
.intro { padding-block: clamp(56px, 12vw, 150px) clamp(40px, 8vw, 100px); }
.intro .mark { width: 100%; max-width: 1100px; margin: 0 auto; animation: breathe 7s ease-in-out infinite alternate; }
@keyframes breathe { from { filter: blur(0); transform: scale(1); } to { filter: blur(2.5px); transform: scale(1.015); } }

/* Feature: newest work with its wall label */
.feature .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.tilt { transition: transform .5s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; will-change: transform; }
.feature img { width: 100%; max-width: 560px; aspect-ratio: 1; display: block; box-shadow: 0 50px 100px -40px rgba(0,0,0,.9); }
.label-card { background: var(--lb); color: var(--lf); padding: 22px 22px 20px; max-width: 360px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); --pa: var(--lf); --pb: var(--lb); }
.label-card .artist { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.label-card .work { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.05; margin: 8px 0 10px; }
.label-card .work span { font-style: normal; font-family: var(--sans); font-size: 14px; }
.label-card p { margin: 10px 0 0; opacity: .8; }
.label-card .foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--lf) 20%, transparent); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.label-card .foot .cap { color: inherit; opacity: .6; }
.label-card .acts { display: flex; gap: 8px; align-items: center; }
.label-card .btn.ghost { color: var(--lf); }
.label-card .pbtn { width: 38px; height: 38px; }

/* Works: each a full bar in its own theme */
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tools input { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; min-width: 0; width: 180px; }
.tools input:focus { outline: none; border-color: var(--fg); }
.chip { border: 0; background: none; padding: 6px 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--fg); text-decoration: underline; text-underline-offset: 6px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.row { background: var(--rb); color: var(--rf); --pa: var(--ra); --pb: var(--rb); position: relative; overflow: hidden; display: grid; grid-template-columns: 52px 44px 76px minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 12px 22px 12px 18px; transition: transform .35s cubic-bezier(.2, .7, .2, 1), padding .35s; }
.row::after { content: ""; position: absolute; inset: 0 0 0 40%; background: var(--rimg) center/cover; filter: blur(26px) saturate(1.3); opacity: .5; -webkit-mask-image: linear-gradient(to right, transparent, #000 75%); mask-image: linear-gradient(to right, transparent, #000 75%); pointer-events: none; transition: opacity .4s; }
.row > * { position: relative; z-index: 1; }
.row:hover { padding-block: 18px; }
.row:hover::after { opacity: .8; }
.row.current { box-shadow: inset 3px 0 0 var(--ra); }
.row .no { font-size: 11px; letter-spacing: .14em; color: var(--rm); }
.row img { width: 76px; height: 76px; display: block; transition: transform .35s; }
.row:hover img { transform: scale(1.08) rotate(-2deg); }
.row .title { font-family: var(--r-font); font-style: var(--r-style); font-weight: var(--r-weight); font-size: clamp(28px, 3.4vw, 40px); line-height: 1; text-decoration: none; display: block; overflow-wrap: anywhere; }
.row .sub { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--rm); margin-top: 4px; }
.row .info { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--rm); text-align: right; white-space: nowrap; }
.row .go { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 9px 14px; border: 1px solid color-mix(in srgb, var(--rf) 40%, transparent); white-space: nowrap; }
.row .go:hover { background: var(--rf); color: var(--rb); }
.empty { padding: 32px 0; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 20px; }

/* Beat page */
.beat-page .wrap { padding-block: clamp(20px, 4vw, 48px); }
.back { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 24px; }
.back:hover { color: var(--fg); }
.beat-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.beat-top img.cover { width: 100%; aspect-ratio: 1; display: block; box-shadow: 0 60px 120px -40px rgba(0,0,0,.9); }
.beat-title { font-family: var(--beat-font); font-style: var(--beat-style); font-weight: var(--beat-weight); font-size: clamp(60px, 9vw, 124px); line-height: .9; margin: 10px 0 18px; overflow-wrap: anywhere; }
.plaque { font-size: 14px; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 26px; }
.plaque i { font-family: var(--serif); font-size: 19px; }
.plaque .m { color: var(--muted); }
.wave-box { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; --pa: var(--accent); --pb: var(--bg); }
.wave-box .pbtn { width: 52px; height: 52px; }
canvas.wave { width: 100%; height: 56px; display: block; cursor: pointer; }
.wave-time { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; color: var(--muted); margin: 6px 0 0 66px; }

.lic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lic { border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lic.pop { border-color: var(--accent); }
.lic h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; margin: 0; line-height: 1; }
.lic .price { font-size: 20px; font-weight: 500; }
.lic ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: color-mix(in srgb, var(--fg) 78%, transparent); flex: 1; }
.shop-note { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }

.more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.more a { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.more img { width: 100%; aspect-ratio: 1; display: block; transition: transform .4s; }
.more a:hover img { transform: scale(1.03) rotate(-1deg); }
.more .t { font-family: var(--mf); font-style: var(--ms); font-weight: var(--mw); font-size: 24px; line-height: 1; }

/* Licenses */
.table-scroll { overflow-x: auto; margin-top: 32px; }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 14px; }
th, td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
th { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td:first-child { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 80px); }
.addr { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-family: var(--serif); font-style: italic; font-size: 28px; margin: 20px 0 28px; }
.socials { display: flex; flex-direction: column; }
.socials a { padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.socials a:hover { color: var(--accent); }
form.cform { display: grid; gap: 16px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; width: 100%; min-width: 0; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); }
.form-msg { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); min-height: 1.4em; margin: 0; }

footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 40px 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
footer .mark { height: 22px; }
footer .soc { display: flex; gap: 20px; flex-wrap: wrap; }
footer .soc a { text-decoration: none; }
footer .soc a:hover { color: var(--fg); }

/* Player */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--p-bg) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--p-fg); --pa: var(--p-accent); --pb: var(--p-bg); padding-bottom: env(safe-area-inset-bottom, 0px); transition: background .6s; }
.player .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.6fr) auto; gap: 16px; align-items: center; padding-block: 12px; }
.player .now { display: flex; gap: 12px; align-items: center; min-width: 0; text-decoration: none; }
.player .now img { width: 44px; height: 44px; flex: none; }
.player .now .t { font-family: var(--p-font); font-style: var(--p-style); font-weight: var(--p-weight); font-size: 20px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now .m { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 11px; color: var(--p-muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; height: 20px; cursor: pointer; --pct: 0%; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--p-accent) var(--pct), color-mix(in srgb, var(--p-fg) 20%, transparent) var(--pct)); }
input[type="range"]::-moz-range-track { height: 2px; background: linear-gradient(to right, var(--p-accent) var(--pct), color-mix(in srgb, var(--p-fg) 20%, transparent) var(--pct)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--p-fg); margin-top: -4px; border: 0; }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--p-fg); border: 0; }
.vol { width: 100px; }

/* Studio */
.hint { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 19px; margin: 0; }
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.sform { display: grid; gap: 16px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sform h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; margin: 0; }
.sform .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sform select { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; width: 100%; color: var(--fg); }
.sform select option { background: var(--surface); }
.drops { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.drop { position: relative; border: 1px dashed color-mix(in srgb, var(--fg) 30%, transparent); min-height: 150px; display: grid; place-items: center; text-align: center; cursor: pointer; overflow: hidden; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: border-color .2s; padding: 12px; }
.drop:hover, .drop:focus-within { border-color: var(--fg); }
.drop small { display: block; margin-top: 6px; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.drop.cover { aspect-ratio: 1; min-height: 0; padding: 0; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.colours { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.colours label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.colours input { width: 52px; height: 36px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }
.sacts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn:disabled { opacity: .5; cursor: wait; }
.snote { margin: 0; font-size: 14px; color: var(--muted); }
.snote.bad { color: #ff9a9a; }
.slist { display: flex; flex-direction: column; gap: 6px; }
.sitem { background: var(--rb); color: var(--rf); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px; }
.sitem img { width: 44px; height: 44px; display: block; object-fit: cover; }
.sitem .t { font-size: 20px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitem .m { font-size: 12px; color: var(--rm); }
.sitem .btn { padding: 7px 10px; font-size: 11px; }
.noimg { display: block; width: 76px; height: 76px; border: 1px dashed color-mix(in srgb, var(--rf) 30%, transparent); }
.pbtn.loading { opacity: .5; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 1; } }
@media (max-width: 960px) { .studio { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .sform .two, .drops { grid-template-columns: minmax(0, 1fr); } .drop.cover { max-width: 220px; } }

@media (max-width: 960px) {
  .lic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row .info { display: none; }
  .row { grid-template-columns: 44px 44px 64px minmax(0, 1fr) auto; }
  .row img { width: 64px; height: 64px; }
}
@media (max-width: 760px) {
  .feature .wrap, .beat-top, .contact { grid-template-columns: minmax(0, 1fr); }
  .label-card { max-width: none; }
  .row { grid-template-columns: 44px 56px minmax(0, 1fr); gap: 12px; padding: 10px 14px 10px 10px; }
  .row:hover { padding-block: 10px; }
  .row img { width: 56px; height: 56px; }
  .row .no, .row .go { display: none; }
  .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .player .seek { grid-column: 1 / -1; order: 3; }
  .player .vol { display: none; }
}
@media (max-width: 480px) {
  .lic-grid { grid-template-columns: minmax(0, 1fr); }
  nav.main { gap: 16px; }
  .logo .mark { height: 22px; }
}

/* Studio page */
[data-mode="studio"] nav.main, [data-mode="studio"] footer { display: none; }
.login { max-width: 420px; }
.sacts .linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
