/* PEHLBEATS. Ink page, bone text, one orange accent (the piano keys, P and L in the logo). Archivo at its
   widest and heaviest for display type, Archivo for text, JetBrains Mono for tempo, key and time. */

@font-face {
	font-family: "Archivo";
	src: url("../fonts/archivo.woff2") format("woff2");
	font-weight: 400 900;
	font-stretch: 100% 125%;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("../fonts/jetbrains-mono.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
}

:root {
	--ink: #0d0c0b;
	--surface: #151412;
	--raised: #1d1b19;
	--raised-2: #272522;
	--line: rgba(243, 239, 231, 0.1);
	--line-strong: rgba(243, 239, 231, 0.22);
	--text: #f3efe7;
	--muted: #a9a297;
	--faint: #7a746c;
	--accent: #ff5a1f;
	--accent-hover: #ff7442;
	--accent-soft: rgba(255, 90, 31, 0.14);
	--ok: #86e0a0;
	--danger: #ff7b6b;
	--font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--radius: 14px;
	--radius-sm: 10px;
	--gutter: clamp(16px, 4vw, 40px);
	--header: 68px;
	--player: 0px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-bottom: var(--player);
	transition: padding-bottom 0.3s var(--ease);
}
body.has-player { --player: 84px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
html.js .no-js-only { display: none; }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }

/* ---------------------------------------------------------------- Type */

.display,
.hero-title,
.page-title,
.section-title,
.cta-title,
.beat-title {
	font-stretch: 125%;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	line-height: 0.94;
}
.hero-title em,
.page-title em,
.section-title em,
.cta-title em { font-style: normal; color: var(--accent); }
.mono,
.track-facts,
.track-time,
.player-time,
.player-facts,
.stats dd,
.spotlight-facts,
.card-facts,
.catalog-count { font-family: var(--mono); font-feature-settings: "zero" 0, "tnum" 1; letter-spacing: 0; }

.prose { color: var(--muted); max-width: 64ch; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 700; }
.prose em { font-style: normal; color: var(--accent); }
.prose-lg { font-size: 17px; }
.fine { color: var(--faint); font-size: 14px; margin-top: 18px; max-width: 70ch; }
.fine a, .notice a, .contact-note a, .empty a { color: var(--text); }

/* ---------------------------------------------------------------- Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-text { background: none; border: 0; padding: 8px 4px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { color: var(--text); }

.icon-btn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	transition: color 0.2s, background-color 0.2s;
}
.icon-btn:hover { color: var(--text); background: var(--raised); }

.btn-price {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 38px;
	padding: 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--ink);
	font-weight: 800;
	font-size: 14px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.2s;
}
.btn-price .icon { width: 17px; height: 17px; }
.btn-price:hover { background: var(--accent-hover); }
.btn-price.is-sold { background: var(--raised-2); color: var(--muted); }
.btn-price-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.link-arrow:hover { color: var(--text); }
.link-arrow:hover .icon { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.chip {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	color: var(--text);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.2s, background-color 0.2s;
}
.chip:hover { border-color: var(--text); }
.chip-quiet { border-color: var(--line); color: var(--muted); }
.chips-sm .chip { min-height: 30px; font-size: 13px; padding: 0 12px; }

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(13, 12, 11, 0.86);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header); }
.brand { display: inline-flex; color: var(--text); text-decoration: none; }
.brand-logo { height: 28px; width: auto; }
.brand-logo .b { fill: currentColor; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--muted);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--raised); }
.header-tools { display: flex; align-items: center; gap: 4px; }
.cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--ink);
	font-size: 11px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
}
.cart-btn.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
.menu-btn { display: none; }
.mobile-nav { display: none; }

@media (max-width: 760px) {
	.nav { display: none; }
	.header-tools { margin-left: auto; }
	.menu-btn { display: inline-grid; }
	.mobile-nav:not([hidden]) {
		display: grid;
		gap: 2px;
		padding: 8px var(--gutter) 18px;
		border-top: 1px solid var(--line);
	}
	.mobile-nav a { padding: 12px 0; font-size: 20px; font-weight: 800; font-stretch: 125%; text-transform: uppercase; text-decoration: none; }
	.mobile-nav a:last-child { font-size: 15px; font-weight: 600; font-stretch: 100%; text-transform: none; color: var(--muted); }
	.brand-logo { height: 23px; }
}

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

main { display: block; min-height: 60vh; outline: none; }
.section { padding-block: clamp(44px, 7vw, 88px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title { font-size: clamp(28px, 4vw, 44px); }
.section-text { margin: 12px 0 0; color: var(--muted); max-width: 58ch; }
.page-head { padding-block: clamp(36px, 6vw, 72px) clamp(20px, 3vw, 32px); }
.page-title { font-size: clamp(40px, 7vw, 84px); }
.page-intro { margin-top: 16px; color: var(--muted); font-size: 17px; max-width: 60ch; }
.page-intro p { margin: 0; }
.page-intro strong { color: var(--text); }
.block-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--muted); }

.empty { padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-title { color: var(--text); font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.empty p:last-child { margin: 0; }

.notice { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--line); color: var(--muted); }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--text); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---------------------------------------------------------------- Home */

.hero { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 7vw, 96px) clamp(8px, 2vw, 24px); }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } .hero-solo { grid-template-columns: 1fr; } }
.hero-title { font-size: clamp(42px, 5.6vw, 84px); }
.hero-text { margin: 22px 0 0; max-width: 46ch; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.spotlight { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
@media (min-width: 560px) and (max-width: 979px) { .spotlight { grid-template-columns: 220px minmax(0, 1fr); } }
.spotlight-cover { position: relative; aspect-ratio: 1; background: var(--raised); }
@media (min-width: 980px) { .spotlight-cover { aspect-ratio: 16 / 11; } }
.spotlight-cover img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-play,
.card-play,
.beat-play {
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--ink);
	transition: transform 0.2s var(--ease), background-color 0.2s;
}
.spotlight-play:hover, .card-play:hover, .beat-play:hover { background: var(--accent-hover); transform: scale(1.05); }
.spotlight-play { position: absolute; left: 18px; bottom: 18px; width: 60px; height: 60px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.spotlight-play .icon, .beat-play .icon { width: 26px; height: 26px; }
.spotlight-body { display: grid; gap: 6px; padding: 20px 22px 22px; }
.spotlight-label { margin: 0; color: var(--accent); font-size: 13px; font-weight: 700; }
.spotlight-title { font-size: 26px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: 1; text-decoration: none; }
.spotlight-title:hover { color: var(--accent); }
.spotlight-facts { margin: 0; color: var(--muted); font-size: 13px; }
.spotlight-wave { height: 44px; margin: 10px 0 6px; }
.spotlight-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spotlight-price, .beat-price { margin: 0; font-size: 26px; font-weight: 900; font-stretch: 112%; }
.spotlight-price span, .beat-price span { color: var(--muted); font-size: 14px; font-weight: 500; font-stretch: 100%; }

.licenses { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.license { display: flex; flex-direction: column; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.license-exclusive { border-color: rgba(255, 90, 31, 0.5); background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.license-name { font-size: 20px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: 1; }
.license-price { margin: 8px 0 0; font-size: 24px; font-weight: 800; }
.license-price .from { color: var(--muted); font-size: 13px; font-weight: 500; }
.license-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.license-files li { padding: 3px 9px; border-radius: 6px; background: var(--raised-2); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.license-terms { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.license-terms li { display: flex; gap: 8px; align-items: flex-start; }
.license-terms .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.license-notes { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

.about { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 860px) { .about:has(.about-photo) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-copy .prose { margin-top: 18px; }

.cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: clamp(28px, 5vw, 56px);
	border-radius: 22px;
	background: var(--accent);
	color: var(--ink);
}
.cta-title { font-size: clamp(30px, 4.6vw, 56px); }
.cta-text { margin: 12px 0 0; max-width: 52ch; font-size: 17px; }
.cta .btn-solid { background: var(--ink); color: var(--text); }
.cta .btn-solid:hover { background: #24221f; }

/* ---------------------------------------------------------------- Waveforms */

.wave { position: relative; height: 36px; --p: 0; }
.wave svg { width: 100%; height: 100%; fill: var(--line-strong); }
.wave-played { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--p) * 100%) 0 0); }
.wave-played svg { fill: var(--accent); }
[data-active] .wave svg:not(.wave-played svg) { fill: rgba(243, 239, 231, 0.32); }
.wave.is-seekable { cursor: pointer; }

/* ---------------------------------------------------------------- Track list */

.tracks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.track {
	display: grid;
	grid-template-columns: 30px 56px minmax(0, 1fr) minmax(120px, 220px) 140px 44px auto;
	align-items: center;
	gap: 16px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	transition: background-color 0.15s;
}
.track:hover { background: var(--surface); }
.track[data-active] { background: var(--surface); }
.track-n { color: var(--faint); font-family: var(--mono); font-size: 13px; text-align: right; }
.track[data-active] .track-n { color: var(--accent); }
.track-cover { position: relative; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--raised); }
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-cover-icon { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13, 12, 11, 0.55); color: var(--text); opacity: 0; transition: opacity 0.15s; }
.track:hover .track-cover-icon, .track[data-active] .track-cover-icon, .track-cover:focus-visible .track-cover-icon { opacity: 1; }
.track[data-active] .track-cover-icon { color: var(--accent); }
.track-main { min-width: 0; }
.track-title { display: block; overflow: hidden; font-weight: 800; font-size: 16px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.track-title:hover { color: var(--accent); }
.track-sub { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.track-wave { height: 30px; }
.track-facts { margin: 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-time { color: var(--faint); font-size: 12.5px; text-align: right; }
.track-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

@media (max-width: 1120px) { .track { grid-template-columns: 30px 56px minmax(0, 1fr) 140px 44px auto; } .track-wave { display: none; } }
@media (max-width: 880px) { .track { grid-template-columns: 30px 56px minmax(0, 1fr) auto; } .track-facts, .track-time { display: none; } }
@media (max-width: 560px) {
	.track { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 10px 4px; }
	.track-n { display: none; }
	.track-cover { width: 52px; height: 52px; }
	.track-actions [data-share] { display: none; }
	.track-cover-icon { opacity: 1; background: rgba(13, 12, 11, 0.35); }
}

/* ---------------------------------------------------------------- Cards */

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; }
.card-cover { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--raised); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.card:hover .card-cover img { transform: scale(1.03); }
.card-play { position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.card-body { min-width: 0; }
.card-title { display: block; overflow: hidden; font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.card-title:hover { color: var(--accent); }
.card-facts { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card .btn-price { align-self: flex-start; }

/* Play/pause icon pairs */
.when-playing { display: none; }
[data-active].is-playing .when-playing, .is-playing > .when-playing, .player.is-playing .player-toggle .when-playing { display: contents; }
[data-active].is-playing .when-paused, .player.is-playing .player-toggle .when-paused { display: none; }
.when-paused, .when-playing { line-height: 0; }

/* ---------------------------------------------------------------- Catalog */

.catalog-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.catalog-count { margin: 0; color: var(--muted); font-size: 14px; }
.filters { display: grid; gap: 12px; margin-bottom: 18px; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input {
	width: 100%;
	height: 52px;
	padding: 0 18px 0 48px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter select {
	appearance: none;
	height: 40px;
	padding: 0 34px 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a9a297' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
	font-size: 14px;
	font-weight: 600;
}
.filter select:focus { outline: none; border-color: var(--accent); }
.filter select.is-set { border-color: var(--text); background-color: var(--raised); }
.more { display: flex; margin: 24px auto 0; }

/* ---------------------------------------------------------------- Beat page */

.beat { display: grid; gap: clamp(24px, 4vw, 56px); padding-block: clamp(28px, 5vw, 56px) 0; }
@media (min-width: 900px) { .beat { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; } }
.beat-cover { aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--raised); }
.beat-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .beat-cover { position: sticky; top: calc(var(--header) + 24px); } }
.crumbs { display: flex; gap: 8px; color: var(--faint); font-size: 14px; margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beat-title { font-size: clamp(40px, 6vw, 76px); overflow-wrap: anywhere; }
.beat-by { margin: 10px 0 18px; color: var(--muted); }
.beat-player { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 22px 0; padding: 14px 18px 14px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.beat-play { width: 64px; height: 64px; }
.beat-wave { height: 44px; }
.beat-time { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.beat-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.beat-buy .beat-price { margin-right: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0 0; }
.stats div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stats dt { color: var(--faint); font-size: 12px; font-weight: 600; }
.stats dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.beat-description { margin-top: 22px; }

.offers { display: grid; gap: 10px; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.offer-exclusive { border-color: rgba(255, 90, 31, 0.5); }
.offer-name { font-size: 17px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.offer-summary { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.offer-price { margin: 0; font-size: 20px; font-weight: 800; white-space: nowrap; }
.offer .is-added { background: var(--raised-2); color: var(--text); }
@media (max-width: 600px) { .offer { grid-template-columns: minmax(0, 1fr) auto; } .offer .btn { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- Licenses page, FAQ */

.licenses-detailed { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.faq-list { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 700; font-size: 18px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--muted); transition: transform 0.25s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.faq-item .prose { padding-bottom: 22px; }

/* ---------------------------------------------------------------- Forms */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--faint); font-size: 13px; font-weight: 400; }
.field input,
.field select,
.field textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	font-size: 16px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a9a297' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check a { color: var(--text); }
.form-error { margin: 0; color: var(--danger); font-size: 14px; }
.form-done { margin: 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }
.inline-form { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .inline-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } .inline-form .form-error, .inline-form .form-done { grid-column: 1 / -1; } }

.contact { display: grid; gap: clamp(28px, 5vw, 64px); }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); align-items: start; } }
.contact-form .btn { justify-self: start; }
.contact-aside { display: grid; gap: 4px; }
.contact-line { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; overflow-wrap: anywhere; }
.contact-line .icon { color: var(--accent); }
.contact-line span { display: grid; }
.contact-line small { color: var(--faint); font-size: 12px; }
.contact-line:hover span { color: var(--accent); }
.contact-note { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- Checkout, order */

.checkout { display: grid; gap: clamp(24px, 4vw, 48px); padding-bottom: 24px; }
@media (min-width: 900px) { .checkout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; } }
.checkout-pay { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
@media (min-width: 900px) { .checkout-pay { position: sticky; top: calc(var(--header) + 24px); } }
.summary { display: grid; gap: 0; }
.line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--raised); }
.line-title { font-weight: 800; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-license { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.line-price { font-weight: 700; white-space: nowrap; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 0; font-size: 18px; font-weight: 800; }
.summary-total strong { font-size: 28px; font-stretch: 112%; }
.summary-problems { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255, 123, 107, 0.12); color: var(--text); font-size: 14px; }

.order { padding-bottom: 24px; }
.order-head { padding-inline: 0; }
.order-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(134, 224, 160, 0.14); color: var(--ok); font-size: 14px; font-weight: 700; }
.order-badge .icon { width: 18px; height: 18px; }
.order-badge.is-wait { background: var(--raised); color: var(--muted); padding-left: 12px; }
.downloads { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.download { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 820px) { .download { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.download-beat { display: flex; gap: 14px; align-items: center; min-width: 0; }
.download-beat img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.download-title { margin: 0; font-weight: 900; font-size: 18px; font-stretch: 112%; }
.download-license { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.download-files { display: flex; flex-wrap: wrap; gap: 8px; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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

.site-footer { margin-top: clamp(56px, 9vw, 120px); padding-block: 48px 40px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand .brand-logo { height: 26px; margin-bottom: 16px; color: var(--text); }
.footer-brand p { margin: 0; max-width: 34ch; }
.socials { display: flex; flex-wrap: wrap; gap: 2px; margin: 16px 0 0 -10px; padding: 0; list-style: none; }
.footer-links { display: grid; gap: 10px; align-content: start; }
.footer-links a, .footer-contact a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--text); }
.footer-contact { display: grid; gap: 10px; align-content: start; }
.footer-contact a { display: inline-flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.footer-contact .icon { width: 18px; height: 18px; }
.footer-copy { margin: 8px 0 0; color: var(--faint); font-size: 14px; }

/* ---------------------------------------------------------------- Player */

.player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	background: rgba(21, 20, 18, 0.94);
	backdrop-filter: saturate(1.4) blur(16px);
	-webkit-backdrop-filter: saturate(1.4) blur(16px);
	border-top: 1px solid var(--line);
	padding-bottom: env(safe-area-inset-bottom);
	transform: translateY(0);
	transition: transform 0.35s var(--ease);
}
.player.is-entering { transform: translateY(100%); }
.player-bar { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: transparent; cursor: pointer; display: none; }
.player-bar-fill { display: block; width: calc(var(--p, 0) * 100%); height: 100%; background: var(--accent); }
.player-inner {
	display: grid;
	grid-template-columns: minmax(180px, 280px) auto minmax(0, 1fr) 140px auto auto;
	align-items: center;
	gap: 20px;
	max-width: 1440px;
	height: 84px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--raised); flex: none; }
.player-text { min-width: 0; }
.player-title { display: block; overflow: hidden; font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.player-title:hover { color: var(--accent); }
.player-facts { margin: 1px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-toggle { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 999px; background: var(--accent); color: var(--ink); transition: background-color 0.2s; }
.player-toggle:hover { background: var(--accent-hover); }
.player-toggle .icon { width: 22px; height: 22px; }
.player-toggle .spinner { position: absolute; display: none; width: 48px; height: 48px; border-width: 2px; color: var(--ink); opacity: 0.4; }
.player.is-loading .player-toggle .spinner { display: block; }
.player-wave-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.player-wave { height: 34px; cursor: pointer; }
.player-wave .wave { height: 100%; }
.player-time { color: var(--muted); font-size: 12px; min-width: 36px; text-align: center; }
.player-volume { display: flex; align-items: center; gap: 4px; }
.player-volume input { width: 90px; accent-color: var(--accent); }
.when-muted { display: none; }
.player.is-muted .when-muted { display: contents; }
.player.is-muted .when-sound { display: none; }
.player-buy:empty { display: none; }

@media (max-width: 1060px) {
	.player-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr) auto auto; }
	.player-volume { display: none; }
}
@media (max-width: 760px) {
	body.has-player { --player: 72px; }
	.player-bar { display: block; }
	.player-inner { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; height: 72px; }
	.player-wave-wrap, .player-controls [data-p-prev], .player-controls [data-p-next] { display: none; }
	.player-toggle { width: 44px; height: 44px; }
	.player-buy .btn-price span { display: none; }
	.player-buy .btn-price { padding: 0 11px; }
	.player-close { width: 36px; }
}

/* ---------------------------------------------------------------- Drawers and modals */

dialog { padding: 0; border: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); height: 100%; margin: 0; }
.drawer[open] { animation: slide-in 0.32s var(--ease); }
@keyframes slide-in { from { transform: translateX(100%); } }
.drawer-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; background: var(--surface); border-left: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 18px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.drawer-beat { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-beat:empty { display: none; }
.drawer-beat img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.drawer-beat-title { margin: 0; font-weight: 900; font-size: 18px; font-stretch: 112%; overflow-wrap: anywhere; }
.drawer-beat-facts { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.drawer-body { overflow-y: auto; padding: 14px 20px 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-foot > a:not(.btn) { color: var(--muted); font-size: 14px; }

.pick { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pick-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.pick-item.is-in-cart { border-color: var(--accent); }
.pick-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pick-name { margin: 0; font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: 16px; }
.pick-price { margin: 0; font-weight: 800; font-size: 18px; white-space: nowrap; }
.pick-summary { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.pick-terms { margin: 0 0 12px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }
.pick-terms li::before { content: "– "; color: var(--faint); }
.pick-actions { display: flex; gap: 8px; align-items: center; }
.pick-actions .btn { flex: 1; }
.pick-more { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.cart-items { display: grid; margin: 0; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--raised); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; font-weight: 700; }
.cart-total strong { font-size: 24px; font-stretch: 112%; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--muted); }

.modal { position: fixed; inset: 0; margin: auto; width: min(460px, calc(100vw - 32px)); height: fit-content; }
.modal[open] { animation: pop 0.25s var(--ease); }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }
.modal-panel { display: grid; gap: 16px; padding: 0 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.modal-panel .drawer-head { margin: 0 -20px; }
.modal-text { margin: 0; color: var(--muted); font-size: 15px; }
.modal-text strong { color: var(--text); }

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--player) + 20px);
	z-index: 60;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--text);
	color: var(--ink);
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
	transform: translateX(-50%);
	animation: toast 0.3s var(--ease);
}
@keyframes toast { from { transform: translate(-50%, 10px); opacity: 0; } }

/* Page changes (site.js swaps <main>) */
main.is-leaving { opacity: 0.55; transition: opacity 0.15s; }
main.is-entering { animation: enter 0.35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.nav-progress { position: fixed; left: 0; top: 0; z-index: 70; height: 2px; width: 0; background: var(--accent); transition: width 0.3s var(--ease), opacity 0.3s; }

/* ---------------------------------------------------------------- The opener
   The first page of a visit (decided in <head>, header.php): the logo builds itself on an ink screen, then
   site.js flies it into the header logo. The stem rises like a fader, the P's bowl slides in and locks, the
   three keys are pressed one by one, the letters come up, and the P and L light up orange. A click or a key
   skips it. Without JavaScript or with reduced motion it never plays; if site.js fails, it fades by itself. */

.opener { display: none; }
html[data-intro="play"] .opener {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	background: var(--ink);
	cursor: pointer;
	transition: background-color 0.6s ease;
	animation: opener-out 0.4s ease 3.9s forwards;
}
html[data-intro="play"] .opener.is-leaving { background-color: transparent; }
html[data-intro="play"] .site-header .brand { visibility: hidden; animation: opener-brand 0s 4.3s forwards; }
@keyframes opener-out { to { opacity: 0; visibility: hidden; } }
@keyframes opener-brand { to { visibility: visible; } }
.opener-logo { width: min(80vw, 760px); height: auto; overflow: visible; }
.opener-logo path { transform-box: fill-box; }
.opener-logo .stem { transform-origin: 50% 100%; animation: o-rise 0.55s var(--ease) 0.15s both; }
.opener-logo .bowl { transform-origin: 0 50%; animation: o-bowl 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s both; }
.opener-logo .key { transform-origin: 50% 0; animation: o-key 0.42s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.opener-logo .key-1 { animation-delay: 1s; }
.opener-logo .key-2 { animation-delay: 1.14s; }
.opener-logo .key-3 { animation-delay: 1.28s; }
.opener-logo .letter { animation: o-letter 0.5s var(--ease) both; }
.opener-logo .letter.o { animation: o-letter 0.5s var(--ease) both, o-light 0.45s ease 2.15s both; }
.opener-logo .letter.letter-1 { animation-delay: 1.45s, 2.15s; }
.opener-logo .letter.letter-2 { animation-delay: 1.50s; }
.opener-logo .letter.letter-3 { animation-delay: 1.55s; }
.opener-logo .letter.letter-4 { animation-delay: 1.60s, 2.25s; }
.opener-logo .letter.letter-5 { animation-delay: 1.65s; }
.opener-logo .letter.letter-6 { animation-delay: 1.70s; }
.opener-logo .letter.letter-7 { animation-delay: 1.75s; }
.opener-logo .letter.letter-8 { animation-delay: 1.80s; }
.opener-logo .letter.letter-9 { animation-delay: 1.85s; }
@keyframes o-rise { from { transform: scaleY(0); } }
@keyframes o-bowl { from { transform: translateX(55%) scaleX(0.5); opacity: 0; } }
@keyframes o-key {
	0% { transform: translateY(-90%); opacity: 0; }
	55% { transform: translateY(12%); opacity: 1; }
	100% { transform: none; }
}
@keyframes o-letter { from { transform: translateY(40%); opacity: 0; } }
@keyframes o-light { from { fill: var(--text); } to { fill: var(--accent); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
