/* Sofia Records — design system
   Direction: a pressing-plant docket for a serious club label. Isometric
   wireframe geometry echoing the logo's cube-built S, monospace catalog
   data, editorial serif for titles and liner notes, near-black ground so
   the eleven covers carry the color. One committed look, no light mode —
   the near-black ground is identity, not a default. */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  /* color */
  --bg: #0d0c0a;
  --surface: #171512;
  --surface-2: #211f1a;
  --text: #f2ede4;
  --muted: #a89d8a;
  --accent: #d19916;
  --accent-hover: #e5ac2c;
  --border: #2c2820;

  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* scale: 1.25 ratio from a 16px base */
  --size-0: 0.8rem;
  --size-1: 1rem;
  --size-2: 1.25rem;
  --size-3: 1.563rem;
  --size-4: 1.953rem;
  --size-5: 2.441rem;
  --size-6: 3.052rem;
  --size-7: 4.5rem;

  /* space: 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --radius: 2px;
  --measure: 68ch;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

* { box-sizing: border-box; }

/* Chrome on Android applies its own themed control chrome (a blue-tinted
   bevel) to plain <button> elements unless appearance is explicitly reset —
   custom background/border alone isn't enough to opt out of it. Without
   this, transport and play buttons look native/system-styled on mobile
   Chrome instead of matching the flat bordered look used everywhere else. */
button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: clamp(var(--size-5), 6vw, var(--size-7)); font-weight: 400; }
h2 { font-size: var(--size-4); }
h3 { font-size: var(--size-2); }

p { margin: 0 0 var(--space-4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.container {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* isometric wireframe motif — derived from the logo's cube construction,
   used as a structural rule between sections, never decoration alone */
.iso-rule {
  border: none;
  height: 1px;
  background: var(--border);
  margin: var(--space-7) 0;
  position: relative;
}
.iso-rule::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

/* header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  gap: var(--space-5);
}
.site-header .logo-mark {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-header .logo-mark img { width: 28px; height: auto; }
.site-header .wordmark {
  font-family: var(--font-mono);
  font-size: var(--size-1);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--size-0);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; row-gap: var(--space-3); }
  .site-nav { gap: var(--space-4); }
}
.site-nav a { color: var(--muted); transition: color var(--duration) var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0 calc(var(--space-9) + 64px);
  margin-top: var(--space-8);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--size-0);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* catalog grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0;
}
.catalog-card { display: block; }
.catalog-card .art {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.catalog-card .art img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms var(--ease);
}
.catalog-card:hover .art img { transform: scale(1.03); }
.catalog-card .meta { padding: var(--space-3) 0 0; }
.catalog-card .cat-num {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-1);
}
.catalog-card .title {
  font-family: var(--font-display);
  font-size: var(--size-2);
  margin: 0;
}
.catalog-card .artist { color: var(--muted); font-size: var(--size-0); margin-top: var(--space-1); }

.latest-card {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: var(--space-6);
  align-items: center;
}
.latest-card .title { font-size: var(--size-4); }
@media (max-width: 640px) {
  .latest-card { grid-template-columns: 1fr; }
}

/* release detail */
.release-hero {
  display: grid;
  grid-template-columns: minmax(0, 26rem) 1fr;
  gap: var(--space-7);
  align-items: start;
  padding: var(--space-7) 0 var(--space-6);
}
.release-hero .art img {
  width: 100%;
  border: 1px solid var(--border);
}
.release-hero .cat-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: var(--size-1);
  display: block;
  margin-bottom: var(--space-3);
}
.release-hero .artist {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: var(--size-2);
  display: block;
  margin-bottom: var(--space-4);
}
/* .buy-link: reusable bordered CTA, not just for the release-hero buy link
   (also used as the contact form's submit button) */
.buy-link {
  display: inline-block;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--size-0);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.buy-link:hover { background: var(--accent); color: var(--bg); }
.release-hero .vinyl-note {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  color: var(--muted);
  margin-top: var(--space-2);
}

/* tracklist */
.tracklist { list-style: none; margin: var(--space-6) 0; padding: 0; }
.track {
  display: grid;
  grid-template-columns: 2rem 2.25rem 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.track .num { font-family: var(--font-mono); color: var(--muted); font-size: var(--size-0); }
.track .play-btn {
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
  font-size: var(--size-1);
  padding: 0;
}
.track .play-btn:hover { border-color: var(--accent); color: var(--accent); }
.track.is-playing .play-btn { border-color: var(--accent); color: var(--accent); }
.track.is-unavailable .play-btn { border-color: var(--border); color: var(--border); cursor: not-allowed; }
.track .title { font-family: var(--font-mono); font-size: var(--size-1); }
.track.is-unavailable .title { color: var(--muted); }
.track .unavailable-tag {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  color: var(--muted);
  margin-left: var(--space-2);
}
.track .duration { font-family: var(--font-mono); color: var(--muted); font-size: var(--size-0); }

/* liner notes / credits */
.liner-notes { font-family: var(--font-mono); margin: var(--space-6) 0; white-space: pre-line; color: var(--text); }
.credits {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  color: var(--muted);
  white-space: pre-line;
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-6);
}

/* release prev/next: floating chevrons for quick desktop crate-digging,
   shown only once the viewport gutter is wide enough that they can't
   overlap the container's own content (container caps at 78rem + its own
   1.5rem padding; below ~1400px there isn't reliable clearance) */
.release-nav {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--size-3);
  line-height: 1;
  z-index: 50;
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.release-nav:hover, .release-nav:focus-visible { border-color: var(--accent); color: var(--accent); }
.release-nav-prev { left: var(--space-5); }
.release-nav-next { right: var(--space-5); }

@media (min-width: 1400px) {
  .release-nav { display: flex; }
}

/* release prev/next: always-visible row above the release content, doubles
   as the only affordance on touch/narrow viewports (which get the floating
   chevrons hidden above, and swipe instead) */
.release-pager {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--size-0);
}
.release-pager a { color: var(--muted); max-width: 45%; }
.release-pager a:hover { color: var(--accent); }
.release-pager-next { text-align: right; }

/* people grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-6);
  margin: var(--space-6) 0;
}
.person { border-top: 1px solid var(--border); padding-top: var(--space-4); }
.person .name { font-family: var(--font-display); font-size: var(--size-3); margin: 0; }
.person .real-name { color: var(--muted); font-size: var(--size-0); font-family: var(--font-mono); margin-top: var(--space-1); }
.person .role { color: var(--accent); font-family: var(--font-mono); font-size: var(--size-0); margin: var(--space-2) 0; text-transform: uppercase; letter-spacing: 0.04em; }
.person .note { color: var(--muted); font-size: var(--size-0); margin-top: var(--space-2); }
.person .appearances { margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.person .appearances a {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: var(--space-1) var(--space-2);
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.person .appearances a:hover { border-color: var(--accent); color: var(--accent); }

/* hero (home) */
.hero {
  padding: var(--space-8) 0 var(--space-7);
}
.hero .eyebrow { margin-bottom: var(--space-3); }
.hero h1 { font-family: var(--font-display); }
.hero .cyrillic { color: var(--muted); font-weight: 400; }
.hero p.lede { font-size: var(--size-2); color: var(--muted); max-width: 50ch; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}
.section-heading a { font-family: var(--font-mono); font-size: var(--size-0); color: var(--muted); }
.section-heading a:hover { color: var(--accent); }

/* 404 */
.error-page { padding: var(--space-9) 0; text-align: left; }
.error-page .eyebrow { color: var(--accent); }

/* player bar — persists across pjax navigation, lives outside <main> */
#player-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  z-index: 100;
}
#player-bar.is-active { display: block; }
#player-bar .bar-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
}
#player-bar .transport { display: flex; gap: var(--space-2); }
#player-bar button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 2.25rem; height: 2.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--size-1);
}
#player-bar button:hover { border-color: var(--accent); color: var(--accent); }
#player-bar .now-playing { min-width: 0; }
#player-bar .now-playing .track-title {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player-bar .now-playing .release-title {
  display: block;
  color: var(--muted);
  font-size: var(--size-0);
  font-family: var(--font-mono);
  width: fit-content;
}
#player-bar .now-playing .release-title:hover { color: var(--accent); }
#player-bar .seek-row { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-1); }
#player-bar .seek-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 2px;
  background: var(--border);
}
#player-bar .time { font-family: var(--font-mono); font-size: var(--size-0); color: var(--muted); min-width: 3.5em; }
#player-bar .volume { display: flex; align-items: center; gap: var(--space-2); }
#player-bar .volume input[type="range"] { width: 5rem; accent-color: var(--accent); }

/* About page: body copy in mono, matching the release pages' tracklist/liner
   notes; h1/h2 stay on --font-display (Fraunces), untouched. */
.about-page p { font-family: var(--font-mono); }

/* contact form (About page) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 32rem;
  margin-top: var(--space-5);
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-1);
  padding: var(--space-3);
  border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease);
}
.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--muted);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form button {
  align-self: flex-start;
  cursor: pointer;
}
.contact-form button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Honeypot — off-screen, not display:none (some bots skip hidden fields but
   still probe for offscreen ones; keep it out of tab order and a11y tree). */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-family: var(--font-mono);
  font-size: var(--size-0);
  margin: 0;
}
.form-status.sending { color: var(--muted); }
.form-status.success { color: var(--accent); }
.form-status.error { color: var(--accent); font-weight: 600; }

@media (max-width: 720px) {
  .release-hero { grid-template-columns: 1fr; }
  #player-bar .bar-inner { grid-template-columns: auto 1fr; }
  #player-bar .volume { display: none; }
  .track { grid-template-columns: 1.5rem 2rem 1fr auto; }
}
