/* ==========================================================================
   Afterlight Records - base design system
   Two themes on one token set: black (default, `:root`) and white (`:root[data-theme="light"]`).
   Sections: 1 tokens (1a layout and type, 1b colour themes), 2 reset, 3 typography, 4 layout primitives,
   5 header, 6 footer, 7 buttons, 8 forms, 9 chips + notices, 10 release card + grid, 11 pagination,
   12 table, 13 dl, 14 breadcrumbs, 15 empty state, 16 modal, 17 404, 18 motion
   Per-page CSS lives in css/pages/<name>.css, never here. Colours live ONLY in section 1b.
   A background picture or texture is set in css/theme-bg.css (loaded after this file), see docs/DESIGN.md.
   ========================================================================== */

/* ---------- 1a. Tokens that do not depend on the theme ------------------- */
:root {
  /* Breakpoints (custom properties cannot be used in media queries, so use these literals):
     sm 30em (480)  md 45em (720)  lg 64em (1024, also where the menu becomes a row)  xl 90em (1440) */

  /* Type */
  /* Display type: one serif small-caps face with Latin and Cyrillic. The blackletter lives in the logo itself.
     --font-brand is used for catalogue numbers, band and album names; --font-display for headings.
     The files are self-hosted: @font-face rules and the "... Fallback" face are in css/fonts.css. */
  --font-brand:   "Alegreya SC", "Alegreya SC Fallback", Georgia, "Times New Roman", serif;
  --font-display: var(--font-brand);
  --fw-display:   700;
  --font-body:    "Onest", "Onest Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-xs:   .75rem;
  --fs-sm:   .875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.375rem;
  --fs-xl:   clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  --fs-2xl:  clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --fs-3xl:  clamp(2.75rem, 1.7rem + 5vw, 5rem);

  /* Spacing: 4px base */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;   --s-9: 6rem;

  /* Shape: one radius for everything (sleeve corners), pills are not used */
  --radius: 8px;
  --radius-card: 14px;

  /* Layers */
  --z-header: 50;
  --z-panel: 49;
  --z-skip: 200;
  --z-grain: 100;

  /* Layout */
  --container: 80rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4.75rem;

  /* Motion */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
}


/* ---------- 1b. Colour themes --------------------------------------------
   Every colour on the site is a token defined in these two blocks and nowhere else. The default theme is BLACK
   (`:root`); the white theme overrides the same tokens under `:root[data-theme="light"]`. The attribute is set
   before first paint by js/theme-init.js (choice kept in localStorage under "al-theme").
   The `[data-theme-preview]` selectors let /_styleguide show both palettes on one page.
   scripts/check-contrast.php reads these two blocks: keep the token lists identical and run it after edits. */
:root,
[data-theme-preview="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --bg:           #07090d;                 /* page */
  --bg-sunken:    #05070a;                 /* footer, release spine */
  --field-bg:     #07090d;                 /* inputs */
  --surface:      #0e1218;                 /* sleeve, panels, dialog */
  --surface-2:    #171d26;                 /* raised, cover placeholder, chips */
  /* Lines: --line and --line-strong are decorative, --control-border is the 3:1 edge of form fields */
  --line:         #202833;
  --line-strong:  #3a4656;
  --control-border: #68778a;
  --sleeve-edge:  #2c3644;                 /* thin edge that lifts dark cover art off the black page */
  --stripe-a:     #171d26;                 /* hatching of a cover placeholder (a card without a cover) */
  --stripe-b:     #0e1218;
  /* Text */
  --text:         #dce2e9;
  --text-muted:   #9aa5b3;
  --text-faint:   #818d9d;
  --text-strong:  #f6f9fc;

  --accent:       #9ccbd8;
  --accent-hot:   #c4e4ec;
  --accent-ink:   #06131a;                 /* text on --accent */
  --accent-soft:  rgba(156, 203, 216, .13);
  --focus:        var(--accent);           /* focus ring */
  --selection-bg: var(--accent);
  --selection-fg: var(--accent-ink);
  /* Status */
  --danger:       #ef6a56;
  --danger-soft:  rgba(239, 106, 86, .12);
  --ok:           #93c27d;
  --ok-soft:      rgba(147, 194, 125, .12);
  /* Effects */
  --shade:        #000000;
  --header-bg:    color-mix(in srgb, var(--bg) 97%, transparent);
  --footer-bg:    var(--bg-sunken);
  --hover-wash:   color-mix(in srgb, var(--text) 3.5%, transparent);   /* row and card hover */
  --backdrop:     color-mix(in srgb, var(--shade) 78%, transparent);
  --shadow-1:     0 1px 0 var(--hover-wash) inset, 0 8px 24px -12px color-mix(in srgb, var(--shade) 80%, transparent);
  --shadow-2:     0 18px 40px -18px color-mix(in srgb, var(--shade) 95%, transparent), 0 2px 0 var(--hover-wash) inset;
  --shadow-header: 0 14px 30px -18px color-mix(in srgb, var(--shade) 95%, transparent);
  --scrollbar-thumb: #2c3644;
  --scrollbar-track: var(--bg);
  /* Texture: off by default. To switch the grain on: --grain-display: block and --grain-opacity: .06 (theme-bg.css) */
  --grain:        var(--text);
  --grain-opacity: .07;
  --grain-display: none;
  /* Background picture hook, set in css/theme-bg.css; default is the plain --bg colour */
  --bg-image:      none;
  --bg-size:       auto;
  --bg-position:   center;
  --bg-repeat:     no-repeat;
  --bg-attachment: scroll;
  --bg-overlay:    transparent;            /* veil over the picture so text stays readable */
}

:root[data-theme="light"],
[data-theme-preview="light"] {
  color-scheme: light;

  --bg:           #f6f7f5;
  --bg-sunken:    #eaedeb;
  --field-bg:     #ffffff;
  --surface:      #ffffff;
  --surface-2:    #e3e8e7;
  --line:         #d5dcdb;
  --line-strong:  #b2bdbd;
  --control-border: #6f7d80;
  --sleeve-edge:  #c2cbca;
  --stripe-a:     #eaedeb;
  --stripe-b:     #ffffff;
  --text:         #141a1f;
  --text-muted:   #465257;
  --text-faint:   #566268;
  --text-strong:  #000000;
  --accent:       #1b5f73;
  --accent-hot:   #0f4556;
  --accent-ink:   #f6fbfc;
  --accent-soft:  rgba(27, 95, 115, .11);
  --focus:        var(--accent);
  --selection-bg: var(--accent);
  --selection-fg: var(--accent-ink);
  --danger:       #b3261e;
  --danger-soft:  rgba(179, 38, 30, .08);
  --ok:           #2f6a22;
  --ok-soft:      rgba(47, 106, 34, .09);
  --shade:        #17232a;
  --header-bg:    color-mix(in srgb, var(--bg) 96%, transparent);
  --footer-bg:    var(--bg-sunken);
  --hover-wash:   color-mix(in srgb, var(--text) 4%, transparent);
  --backdrop:     color-mix(in srgb, var(--shade) 55%, transparent);
  --shadow-1:     0 1px 2px color-mix(in srgb, var(--shade) 14%, transparent), 0 10px 24px -14px color-mix(in srgb, var(--shade) 36%, transparent);
  --shadow-2:     0 2px 4px color-mix(in srgb, var(--shade) 14%, transparent), 0 22px 40px -18px color-mix(in srgb, var(--shade) 48%, transparent);
  --shadow-header: 0 12px 28px -18px color-mix(in srgb, var(--shade) 45%, transparent);
  --scrollbar-thumb: #b2bdbd;
  --scrollbar-track: var(--bg);
  --grain:        var(--text);
  --grain-opacity: .05;
  --grain-display: none;
  --bg-image:      none;
  --bg-size:       auto;
  --bg-position:   center;
  --bg-repeat:     no-repeat;
  --bg-attachment: scroll;
  --bg-overlay:    transparent;
}

/* Preview scope (styleguide): a block that shows one palette regardless of the page theme */
[data-theme-preview] { background: var(--bg); color: var(--text); }

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); -webkit-tap-highlight-color: var(--accent-soft); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
/* The logo ships in two drawings: white for the dark theme and black for the light one (templates/partials/logo.php). */
.logo-art--ink, :root[data-theme="light"] .logo-art--light { display: none; }
:root[data-theme="light"] .logo-art--ink { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* The page background is the --bg colour; css/theme-bg.css may add a picture or texture on top through the
   --bg-image tokens (first layer: the --bg-overlay veil, second layer: the picture). */
body {
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), var(--bg-image);
  background-repeat: no-repeat, var(--bg-repeat);
  background-size: 100% 100%, var(--bg-size);
  background-position: 0 0, var(--bg-position);
  background-attachment: var(--bg-attachment), var(--bg-attachment);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain (off by default, see --grain-display): fixed, non-interactive, never on scrolling containers.
   The noise is only an alpha mask, its colour comes from --grain. */
body::before {
  content: "";
  display: var(--grain-display);
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: var(--grain-opacity);
  background: var(--grain);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
.btn--primary:focus-visible { outline-color: var(--text); }
#main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--s-4); top: var(--s-4); z-index: var(--z-skip);
  background: var(--accent); color: var(--accent-ink); padding: var(--s-3) var(--s-4);
  font-weight: 600; border-radius: var(--radius); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.icon--inline { display: inline-block; width: .95em; height: .95em; margin-left: .3em; vertical-align: -.1em; }

/* ---------- 3. Typography ------------------------------------------------ */
h1, h2, h3, h4 { text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: var(--fw-display); font-synthesis: none; line-height: 1.05; letter-spacing: .005em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
h4 { font-size: var(--fs-base); font-weight: 600; line-height: 1.35; }
p, li, dd { text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hot); }

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.display { font-family: var(--font-display); font-weight: var(--fw-display); font-synthesis: none; line-height: 1.05; }
.tnum { font-variant-numeric: tabular-nums; }
.measure { max-width: 65ch; }

/* Catalogue number as set on a record spine */
.catno {
  display: inline-block; font-weight: 600; font-size: var(--fs-sm); letter-spacing: .12em;
  font-variant-numeric: tabular-nums; color: var(--accent);
  border: 1px solid var(--accent); padding: .1rem .5rem; border-radius: var(--radius);
}

/* ---------- 4. Layout primitives ---------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.container--narrow { max-width: 50rem; }
.site-main { flex: 1 0 auto; padding-block: var(--s-6) var(--s-8); }

.section { padding-block: var(--s-7); }
.stack > * + * { margin-top: var(--stack-gap, var(--s-4)); }
.stack--lg { --stack-gap: var(--s-6); }
.stack--sm { --stack-gap: var(--s-2); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--s-3)); }
.grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
@media (min-width: 45em) { .grid--2, .grid--3 { --cols: 2; } }
@media (min-width: 64em) { .grid--3 { --cols: 3; } }

/* Page head: big blackletter title, ember stub rule */
.page-head { padding-bottom: var(--s-5); margin-bottom: var(--s-6); border-bottom: 1px solid var(--line); position: relative; display: grid; gap: var(--s-3); }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 35%, transparent) 30%, transparent 75%); }
.page-title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-3xl); line-height: .98; }
.page-lede { color: var(--text-muted); font-size: var(--fs-md); max-width: 62ch; }

/* Section title with a trailing count */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); margin-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.section-title__count { color: var(--text-faint); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

.divider { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-6); }

/* Long-form content */
.prose { max-width: 68ch; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-lg); font-family: var(--font-body); font-weight: 600; }
.prose a { text-decoration: underline; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: var(--s-4); color: var(--text-muted); font-style: italic; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose strong { color: var(--text-strong); font-weight: 600; }

/* ---------- 5. Header / nav --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-med) var(--ease);
}
.site-header::before { content: ""; display: block; height: 3px; background: var(--accent); }
.site-header[data-scrolled] { box-shadow: var(--shadow-header); }

.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand__logo { height: 4.25rem; width: auto; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .75rem;
  background: transparent; border: 1px solid var(--control-border); border-radius: var(--radius);
  color: var(--text); font-weight: 500; font-size: var(--fs-sm);
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle__close { display: none; }
.js .nav-toggle { display: inline-flex; }
/* Narrow phones (320-384px): the bar (mark + name + menu button) must fit the viewport without a horizontal scroll */
@media (max-width: 24em) {
  .site-header__bar { gap: var(--s-2); }
  .brand { gap: .5rem; min-width: 0; min-height: 44px; }
  .brand__logo { height: 3.25rem; }
  .nav-toggle { gap: .35rem; padding: 0 .6rem; }
}
.site-header[data-open] .nav-toggle__open { display: none; }
.site-header[data-open] .nav-toggle__close { display: block; }

.site-header__panel { display: flex; flex-direction: column; gap: var(--s-5); }

/* Mobile and tablet: panel drops below the bar when JS is present */
.js .site-header__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line-strong);
  padding: var(--s-4) var(--gutter) var(--s-6);
  max-height: calc(100dvh - var(--header-h) - 3px); overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-.5rem);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  z-index: var(--z-panel);
}
.js .site-header[data-open] .site-header__panel {
  visibility: visible; opacity: 1; transform: none;
  transition-delay: 0s;
}
html.nav-open { overflow: hidden; }
html:not(.js) .site-header__bar { flex-wrap: wrap; padding-block: var(--s-3); }
html:not(.js) .site-header__panel { width: 100%; }

.site-nav__list { display: flex; flex-direction: column; }
.site-nav__list li + li { border-top: 1px solid var(--line); }
.site-nav__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.25rem; padding: .5rem 0; color: var(--text); text-decoration: none; font-size: var(--fs-md); font-weight: 500;
}
.site-nav__link:hover { color: var(--accent-hot); }
.site-nav__link[aria-current="page"] { color: var(--accent); }
.site-nav__link[aria-current="page"]::after { content: ""; width: .5rem; height: .5rem; background: var(--accent); }

.site-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

/* Theme toggle (black / white). Needs JavaScript, so without it the button is hidden and the site stays black.
   The icon shows the theme the click switches to: sun while the page is black, moon while it is white. */
.theme-toggle {
  display: none; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-muted);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.js .theme-toggle { display: inline-grid; }
.theme-toggle:hover { color: var(--text); border-color: var(--control-border); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle .icon { width: 1.35rem; height: 1.35rem; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }
/* Language switch: RU | EN, two small links with a hairline between them; the current one is ember */
.lang-switch { display: inline-flex; align-items: center; flex: none; }
.lang-switch__link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  padding: 0 .35rem; color: var(--text-muted); text-decoration: none;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .08em; line-height: 1;
  transition: color var(--t-fast);
}
.lang-switch__link:hover { color: var(--text); }
.lang-switch__link[aria-current="true"] { color: var(--accent); }
.lang-switch__sep { width: 1px; height: 1rem; background: var(--line-strong); }

@media (min-width: 64em) { /* --bp-nav */
  .nav-toggle, .js .nav-toggle { display: none; }
  .site-header__panel, .js .site-header__panel {
    position: static; display: flex; flex-direction: row; align-items: center; gap: var(--s-4);
    background: transparent; border: 0; padding: 0; max-height: none; overflow: visible;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  html.nav-open { overflow: auto; }
  .site-nav__list { flex-direction: row; gap: .1rem; }
  .site-nav__list li + li { border: 0; }
  .site-nav__link {
    min-height: var(--header-h); padding: 0 .5rem; font-size: .9rem; color: var(--text-muted); position: relative; white-space: nowrap;
  }
  .site-nav__link:hover { color: var(--text); }
  .site-nav__link[aria-current="page"] { color: var(--text); }
  .site-nav__link[aria-current="page"]::after { position: absolute; left: .5rem; right: .5rem; bottom: 0; width: auto; height: 2px; }
  .site-tools { flex-wrap: nowrap; gap: .25rem; }
  .lang-switch__link { min-width: 38px; }
}

/* ---------- 6. Footer ---------------------------------------------------- */
/* Two columns on wide screens: About the label (anchor #about) on the left, navigation and contacts on the right */
.site-footer { flex: none; border-top: 1px solid var(--line); background: var(--footer-bg); margin-top: var(--s-8); }
.site-footer__grid { display: grid; gap: var(--s-7); padding-block: var(--s-8) var(--s-7); }
.site-footer__about { display: grid; gap: var(--s-5); align-content: start; scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
.site-footer__logo { width: 13rem; height: auto; }
.site-footer__about-title { font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.site-footer__about-text { max-width: 54ch; }
.site-footer__about-text p { color: var(--text-muted); }
.site-footer__about-text p + p { margin-top: var(--s-3); }
.site-footer__side { display: grid; gap: var(--s-7); align-content: start; }
.site-footer__nav ul { display: grid; gap: .15rem; }
.site-footer__nav a { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--text-muted); text-decoration: none; }
.site-footer__nav a:hover, .site-footer__nav a[aria-current="page"] { color: var(--text); }
.site-footer__heading { font-weight: 600; margin-bottom: var(--s-2); }
.site-footer__contact p + p { margin-top: var(--s-2); }
.site-footer__contact a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-5); border-top: 1px solid var(--line); color: var(--text-faint); font-size: var(--fs-sm); }
@media (min-width: 45em) {
  .site-footer__about { grid-template-columns: auto minmax(0, 1fr); gap: var(--s-6); }
  .site-footer__logo { width: 15rem; }
  .site-footer__side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
}
@media (min-width: 64em) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-9); }
  .site-footer__side { grid-template-columns: auto auto; justify-content: end; gap: var(--s-8); }
}

/* ---------- 7. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: .6rem 1.25rem; white-space: nowrap;
  font-size: var(--fs-base); font-weight: 600; line-height: 1.2; text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; color: var(--text);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { border-color: var(--accent); color: var(--accent-hot); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: var(--accent-ink); }
.btn--quiet { border-color: transparent; color: var(--text-muted); }
.btn--quiet:hover { border-color: transparent; color: var(--text); background: var(--surface); }
.btn--sm { min-height: 36px; padding: .35rem .9rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- 8. Forms ----------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: .4rem; }
.label { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.label__opt { font-weight: 400; color: var(--text-faint); }
.input, .textarea {
  width: 100%; min-height: 44px; padding: .65rem .85rem;
  background: var(--field-bg); color: var(--text);
  border: 1px solid var(--control-border); border-radius: var(--radius);
  font-size: var(--fs-base); line-height: 1.4;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); opacity: 1; }
.input:hover, .textarea:hover { border-color: var(--text-muted); }
.input:focus-visible, .textarea:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.textarea { min-height: 9rem; resize: vertical; }
.field__hint { font-size: var(--fs-sm); color: var(--text-muted); }
.field__error { font-size: var(--fs-sm); color: var(--danger); font-weight: 500; }
.field--error .input, .field--error .textarea { border-color: var(--danger); background: var(--danger-soft); }
.input:disabled, .textarea:disabled { opacity: .5; cursor: not-allowed; }
/* Browser autofill paints its own yellow/blue box: keep the field in the theme */
.input:-webkit-autofill, .textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  box-shadow: 0 0 0 100px var(--field-bg) inset; -webkit-box-shadow: 0 0 0 100px var(--field-bg) inset;
}
.check { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--accent); flex: none; }

/* Contact form pieces shared by /contacts and the dialog */
.form .textarea { min-height: 9rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.form__actions .btn svg { margin-right: -.1rem; }
@media (max-width: 29.99em) { .form__actions .btn { flex: 1 1 100%; } }
.field__error { position: relative; padding-left: 1rem; }
.field__error::before { content: ""; position: absolute; left: 0; top: .5em; width: .45rem; height: .45rem; background: var(--danger); }
.field--error .label { color: var(--danger); }
.form__status:empty { display: none; }
.form__status .notice { display: grid; gap: .25rem; }
.form__status .notice__title { margin-bottom: 0; }
.form__status p { margin: 0; color: var(--text-muted); }
.form__status a { overflow-wrap: anywhere; }

/* ---------- 9. Chips / notices ------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 1.75rem; padding: .1rem .6rem;
  font-size: var(--fs-sm); line-height: 1.2; color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent;
}
a.chip:hover { color: var(--accent-hot); border-color: var(--accent); }
.chip--accent { color: var(--accent); border-color: var(--accent); }
.chip--solid { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.notice { padding: var(--s-4) var(--s-5); border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: var(--radius); background: var(--surface); color: var(--text); }
.notice--info { border-left-color: var(--accent); }
.notice--ok { border-left-color: var(--ok); background: var(--ok-soft); }
.notice--error { border-left-color: var(--danger); background: var(--danger-soft); }
.notice__title { font-weight: 600; margin-bottom: .15rem; }

/* ---------- 10. Release card and grid ----------------------------------- */
.release-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5) var(--s-3);
}
@media (min-width: 40em) { .release-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); } }
@media (min-width: 64em) { .release-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); } }

/* Release card: one rounded panel (cover, text, cart button), the catalogue number is a badge on the cover.
   On hover the panel lifts and gets a soft accent glow, the cover slowly zooms in. */
.release-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: var(--s-2); box-shadow: var(--shadow-1);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.release-card__link { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit; text-decoration: none; border-radius: calc(var(--radius-card) - 4px); }
.release-card__link:hover { color: inherit; }
.release-card__link:focus-visible { outline-offset: 3px; }

.release-card__cover { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; border-radius: calc(var(--radius-card) - 4px); }
.release-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.release-card__cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent); pointer-events: none; }
.release-card__cover--empty {
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--surface-2)) 0%, var(--surface-2) 60%);
}
.release-card__cover--empty .release-card__placeholder { width: 50%; height: auto; object-fit: contain; opacity: .28; }
.release-card__catno {
  position: absolute; left: .5rem; top: .5rem; max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: .2rem .55rem; border-radius: 99px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(8px);
  color: var(--text); font-size: .6875rem; font-weight: 600; letter-spacing: .1em; font-variant-numeric: tabular-nums;
}

.release-card__catno { max-width: calc(62% - 1rem); }
.release-card__format {
  position: absolute; right: .5rem; top: .5rem; max-width: calc(38% - .5rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: .2rem .55rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink);
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em;
}

.release-card__body { display: grid; gap: .2rem; padding: var(--s-3) var(--s-2) var(--s-2); }
.release-card__artist { font-family: var(--font-brand); font-weight: var(--fw-display); font-synthesis: none; font-size: .95rem; letter-spacing: .04em; color: var(--accent); line-height: 1.2; overflow-wrap: anywhere; }
.release-card__album { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; color: var(--text-strong); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.release-card__meta { color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.release-card__foot { display: flex; gap: var(--s-2); margin-top: var(--s-2); font-size: var(--fs-sm); }
.release-card__cost { color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (hover: hover) {
  .release-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-4px); box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 18px 40px -24px var(--accent); }
  .release-card__link:hover .release-card__cover img:not(.release-card__placeholder) { transform: scale(1.04); }
}

/* ---------- 11. Pagination ---------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.pagination__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; }
.pagination__item, .pagination__gap {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .5rem;
  font-variant-numeric: tabular-nums; font-weight: 500; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text-muted); text-decoration: none;
}
.pagination__gap { color: var(--text-faint); min-width: 1.5rem; padding: 0; }
a.pagination__item:hover { color: var(--text); border-color: var(--line-strong); }
.pagination__item.is-current { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pagination__step { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .5rem; color: var(--text); text-decoration: none; font-weight: 500; }
a.pagination__step:hover { color: var(--accent-hot); }
.pagination__step.is-disabled { color: var(--text-faint); opacity: .5; }
@media (max-width: 29.99em) { .pagination__step span { display: none; } .pagination__step { border: 1px solid var(--line-strong); border-radius: var(--radius); justify-content: center; min-width: 44px; } }

/* ---------- 12. Table ---------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.table { min-width: 36rem; font-size: var(--fs-sm); }
.table caption { text-align: left; padding: var(--s-3) var(--s-4); color: var(--text-muted); caption-side: top; }
.table th, .table td { padding: .75rem var(--s-4); text-align: left; vertical-align: top; }
.table thead th { background: var(--surface); color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table tbody tr + tr td, .table tbody tr + tr th { border-top: 1px solid var(--line); }
.table tbody th { font-weight: 600; }
.table tbody tr:hover { background: var(--hover-wash); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Stacked rows on phones: add .table--stack and data-label="Column" on each td */
@media (max-width: 44.99em) {
  .table-wrap--stack { overflow: visible; border: 0; }
  .table--stack { min-width: 0; }
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td, .table--stack th { display: block; }
  .table--stack tr { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-2) 0; margin-bottom: var(--s-3); background: var(--surface); }
  .table--stack tbody tr + tr td, .table--stack tbody tr + tr th { border-top: 0; }
  .table--stack td, .table--stack th { display: flex; justify-content: space-between; gap: var(--s-4); padding: .4rem var(--s-4); text-align: right; }
  .table--stack td::before { content: attr(data-label); color: var(--text-faint); text-align: left; flex: none; }
}

/* ---------- 13. Definition list ----------------------------------------- */
.dl { display: grid; grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr); column-gap: var(--s-5); }
.dl dt, .dl dd { padding-block: .6rem; border-top: 1px solid var(--line); }
.dl dt { color: var(--text-muted); font-size: var(--fs-sm); padding-top: .75rem; }
.dl dt:first-of-type, .dl dt:first-of-type + dd { border-top: 0; }
.dl dd { overflow-wrap: anywhere; }

/* ---------- 14. Breadcrumbs --------------------------------------------- */
.breadcrumbs { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s-4); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .2rem .5rem; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-hot); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* ---------- 15. Empty state --------------------------------------------- */
.empty { padding: var(--s-8) var(--s-5); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--text-muted); display: grid; gap: var(--s-3); justify-items: center; }
.empty__title { font-family: var(--font-display); font-weight: var(--fw-display); font-synthesis: none; font-size: var(--fs-xl); color: var(--text); line-height: 1.1; }

/* ---------- 16. Modal (native <dialog>: contact form) -------------------- */
html.modal-open { overflow: hidden; }
.modal {
  width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.modal[open] { display: flex; }
.modal::backdrop { background: var(--backdrop); }
.modal__panel { display: grid; gap: var(--s-5); align-content: start; width: 100%; padding: var(--s-5); overflow-y: auto; overscroll-behavior: contain; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.modal__title { font-size: var(--fs-xl); }
.modal__close {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; margin-right: -.5rem;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-muted);
}
.modal__close:hover { color: var(--text); border-color: var(--line-strong); }
.modal__mail { font-size: var(--fs-sm); }
@media (max-width: 44.99em) {
  .modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-width: 0; border-top-width: 3px; }
  .modal__panel { padding: var(--s-4) max(var(--gutter), env(safe-area-inset-left)) var(--s-6); }
}

/* ---------- 17. 404 ------------------------------------------------------ */
.not-found { display: grid; gap: var(--s-6); align-items: center; padding-block: var(--s-6); }
.not-found__art img { width: min(15rem, 50vw); height: auto; opacity: .9; }
.not-found__code { font-family: var(--font-brand); font-weight: var(--fw-display); font-synthesis: none; font-size: var(--fs-xl); color: var(--accent); line-height: 1; }
@media (min-width: 45em) { .not-found { grid-template-columns: auto minmax(0, 1fr); gap: var(--s-8); padding-block: var(--s-7); } .not-found__art img { width: 18rem; } }

/* ---------- 18. Motion preferences -------------------------------------- */
/* While the theme is being switched nothing animates (app.js sets the class for a moment) */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .release-card:hover { transform: none; }
}
@media (forced-colors: active) {
  .btn--primary, .pagination__item.is-current { border: 2px solid ButtonText; }
}

/* Label motto, in the footer and under the logo on the home page */
.slogan { font-family: Georgia, "Times New Roman", serif; font-style: italic; color: var(--accent); letter-spacing: .02em; }
.site-footer__brand { display: grid; gap: var(--s-3); justify-items: center; align-content: start; width: max-content; max-width: 100%; }
.site-footer__slogan { font-size: var(--fs-md); }
/* Social links: official brand marks in round buttons. Calm by default (text colour), the brand colour on hover and focus. */
.social-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.site-footer__contact a.social-link {
  justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.brand-icon { width: 1.3rem; height: 1.3rem; flex: none; }
.social-link--vk { --brand: #0077ff; }
.social-link--telegram { --brand: #26a5e4; }
.social-link--instagram { --brand: #ff0069; }
.social-link--youtube { --brand: #ff0000; }
.social-link--bandcamp { --brand: #408294; }
.site-footer__contact a.social-link:hover, .site-footer__contact a.social-link:focus-visible {
  color: #fff; background: var(--brand); border-color: var(--brand);
}
@media (forced-colors: active) {
  .site-footer__contact a.social-link { border-color: ButtonText; }
}
