/* ==========================================================================
   Blackline Mastering — editorial/catalog theme
   Reference points: boomkat.com (dense typographic catalog listings,
   monospace metadata, utilitarian information density) and 032c.com
   (bold oversized grotesk headlines, high-contrast editorial grid).
   Strict white & black, no accent color, sharp corners throughout.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --text: #111111;
  --text-muted: #5a5a5a;
  --border: rgba(0, 0, 0, 0.22);
  --border-strong: #111111;
  --radius: 0px;
  --font-display: "Archivo", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--text-muted); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 640px; }

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}

.brand span { color: var(--text-muted); }

.site-nav { display: flex; gap: 28px; }

.site-nav a {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover { border-bottom-color: var(--text); color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* Hero */
.hero {
  padding: 90px 0 64px;
  border-bottom: 1px solid var(--border-strong);
}

.hero-inner { max-width: 820px; }

.hero-compact { padding: 40px 0; }

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-compact h1 { font-size: 2.6rem; margin: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.eyebrow::before { content: "— "; color: var(--text-muted); }

.hero h1 { font-size: 4rem; margin-bottom: 24px; }

.lede { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; }

.hero-actions { display: flex; gap: 14px; margin-top: 28px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--bg); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: var(--text); color: var(--bg); }

.btn-small { padding: 6px 12px; font-size: 0.72rem; }

.btn-danger { background: transparent; border-color: var(--border-strong); color: var(--text-muted); }
.btn-danger:hover { background: var(--text); color: var(--bg); }

/* Sections */
.section { padding: 60px 0; border-bottom: 1px solid var(--border); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Credit grid (featured, with cover art) */
.credit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.credit-card {
  background: var(--bg);
  display: block;
  text-decoration: none;
  transition: background 0.12s ease;
}

.credit-card:hover { background: var(--text); }
.credit-card:hover .credit-artist,
.credit-card:hover .credit-title { color: var(--bg); }

.credit-art {
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.credit-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.credit-art-placeholder { font-size: 2.2rem; color: var(--border); }

.credit-info { padding: 14px 16px; }

.credit-artist {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 3px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.credit-title {
  margin: 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.credit-card:hover .credit-title { color: var(--bg); opacity: 0.75; }

/* Homepage image grid — hover reveals artist/title over the cover art.
   The overlay keeps a dark scrim and light text in BOTH themes: it sits
   on album art, which is arbitrary colour, so a light scrim would be
   unreadable over pale covers. */
.grid-section { padding-top: 0; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  overflow: hidden;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--border);
}

.tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tile:hover .tile-overlay,
.tile:focus-visible .tile-overlay {
  opacity: 1;
}

.tile-artist {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  margin: 0 0 3px;
}

.tile-title {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin: 0;
}

/* Alphabetical "also worked with" name list — a short intro line, then
   names one per line, wrapped into airy columns since the list can run
   long. */
.name-list-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 24px;
}

.name-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-width: 220px;
  column-gap: 40px;
}

.name-list li {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 2.1;
  /* 0.48 rather than 0.45: against the black background that's 4.89:1,
     clearing the 4.5:1 WCAG AA minimum for normal-size text. 0.45 came
     out at 4.43:1 — just under. The difference is imperceptible, so the
     list keeps its deliberately light, recessive weight. */
  color: rgba(0, 0, 0, 0.56);
  break-inside: avoid;
  white-space: nowrap;
}

/* Services tiers */
.tier-list { margin-top: 24px; }

.tier {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.tier:first-child { border-top: none; }

.turnaround-note {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Checkbox group (quote form delivery formats) */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.message-scope {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* Credit list (everything else — dense catalog-style text rows) */
.credit-list { border-top: 1px solid var(--border-strong); }

.credit-list-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

a.credit-list-row:hover { background: var(--text); color: var(--bg); }

.credit-list-artist { font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.credit-list-title { color: var(--text-muted); text-align: right; }
a.credit-list-row:hover .credit-list-title { color: var(--bg); opacity: 0.75; }
.credit-list-row-plain { cursor: default; }

.empty-state {
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}

.pricing-card {
  background: var(--bg);
  padding: 28px;
}

.pricing-card.featured { background: var(--text); color: var(--bg); }
.pricing-card.featured h3,
.pricing-card.featured .price,
.pricing-card.featured li { color: var(--bg); }
.pricing-card.featured .price span,
.pricing-card.featured li { color: rgba(0, 0, 0, 0.6); }
.pricing-card.featured .btn-primary { background: var(--bg); color: var(--text); border-color: var(--bg); }
.pricing-card.featured .btn-primary:hover { background: var(--text); color: var(--bg); }

.pricing-card .price {
  font-size: 2rem;
  color: var(--text);
  font-weight: 900;
  font-family: var(--font-display);
  text-transform: uppercase;
}
.pricing-card .price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; text-transform: none; font-family: var(--font-body); }

.pricing-card ul { list-style: none; padding: 0; margin: 16px 0 24px; }
.pricing-card li { padding: 8px 0; border-top: 1px solid var(--border); font-size: 0.85rem; font-family: var(--font-mono); }
.pricing-card li:first-child { border-top: none; }

/* Forms */
.form { margin-top: 24px; }

.form-field { margin-bottom: 20px; }

.form-field-checkbox { display: flex; align-items: center; gap: 10px; }
.form-field-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--text);
}

.field-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -14px 0 20px;
}

.form-field label {
  /* inline-block so a trailing .required-mark sits on the same line as
     the label text instead of wrapping beneath it. The inputs below are
     display:block, so the field still stacks correctly. */
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.form-field-checkbox label { display: inline; margin-bottom: 0; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="file"],
.form-field textarea {
  display: block;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.04);
}

.form-error { color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; margin: 6px 0 0; text-transform: uppercase; }

.form-actions { display: flex; gap: 12px; }

.current-cover {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.current-cover img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

/* Flash messages */
.flash-container { max-width: 1180px; margin: 20px auto 0; padding: 0 24px; }

.flash {
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.flash-success::before { content: "OK — "; font-weight: 600; }
.flash-error::before { content: "ERROR — "; font-weight: 600; }

/* Admin */
.admin-auth { padding-top: 40px; }

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-bar-actions { display: flex; gap: 10px; align-items: center; }

/* Dashboard: featured credits and everything else as two visually
   distinct sections, rather than one combined table, so the small
   hand-curated featured grid stays easy to scan once "other credits"
   grows into the hundreds via Discogs imports. */
.admin-section { margin-bottom: 48px; }

.admin-section-secondary {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.admin-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.admin-section .field-hint { margin: 0 0 16px; }

.badge {
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-strong);
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-thumb img, .admin-thumb-placeholder {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.admin-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  color: var(--border);
}

.admin-row-actions { display: flex; gap: 8px; }
.admin-row-actions form { margin: 0; }

.message-list { display: flex; flex-direction: column; gap: 14px; }

.message-card {
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.message-card.unread { border-color: var(--border-strong); }

.message-actions { display: flex; gap: 8px; margin-top: 12px; }
.message-actions form { margin: 0; }

.message-release {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 4px;
}

.message-meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.message-meta strong { color: var(--text); text-transform: uppercase; }
.message-date { color: var(--text-muted); margin-left: auto; }
.message-body { color: var(--text); white-space: pre-wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-strong); padding: 24px 0; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-link { color: var(--text-muted); text-decoration: none; }
.admin-link:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-strong);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .site-nav.open { display: flex; }

  .hero h1 { font-size: 2.4rem; }
  .hero-compact h1 { font-size: 2rem; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); }

  .credit-list-row { flex-direction: column; gap: 2px; }
  .credit-list-title { text-align: left; }
}

@media (max-width: 420px) {
  .tile-grid { grid-template-columns: 1fr; }
}

/* Form-level error summary (see templates/partials/form_errors.html).
   Exists mainly so a failed CSRF check can't fail silently. */
.form-errors {
  border: 1px solid var(--border-strong);
  padding: 16px 18px;
  margin-bottom: 28px;
}

.form-errors-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  margin: 0;
}

.form-errors ul { margin: 12px 0 0; padding-left: 20px; }

.form-errors li {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-errors li strong { color: var(--text); font-weight: 600; }

.required-mark {
  color: var(--text);
  margin-left: 4px;
  font-weight: 600;
}

/* Honeypot: off-screen rather than display:none, since some bots skip
   fields that are explicitly hidden. Invisible to people either way. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
