:root {
  --bg: #0e0f11;
  --surface: #17191c;
  --border: #2a2d32;
  --text: #e8e6e3;
  --muted: #8b9098;
  --accent: #e8a33d;
  --radius: 6px;
  --max: 1100px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--text); }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Header & footer */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.site-header nav a { margin-left: 1.5rem; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer a { color: var(--muted); }

/* Home */
.intro h1 { font-size: 1.5rem; font-weight: 500; color: var(--muted); margin: 0 0 2rem; }

.library-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card { display: block; text-decoration: none; }
.card img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; transition: opacity 0.15s; }
.card:hover img { opacity: 0.85; }
.card-title { display: block; margin-top: 0.75rem; font-weight: 600; }
.card-meta { display: block; color: var(--muted); font-size: 0.875rem; }

/* Coming soon */
.coming-soon { max-width: 36rem; margin: 4rem 0; }
.coming-soon h1 { font-size: 2.5rem; margin: 0 0 0.5rem; }
.coming-soon .lead { font-size: 1.25rem; color: var(--muted); margin-top: 0; }

/* Library page */
.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.cover { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; }
.library-info h1 { margin: 0 0 0.5rem; font-size: 2rem; line-height: 1.2; }
.summary { color: var(--muted); margin-top: 0; }

.specs { margin: 1.5rem 0; border-top: 1px solid var(--border); }
.specs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }

.buy { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
.price { font-size: 1.75rem; font-weight: 700; }
.fine-print { color: var(--muted); font-size: 0.8rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #111;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: #111; filter: brightness(1.1); }
.button.disabled { background: var(--border); color: var(--muted); cursor: default; }

.previews { margin-top: 3rem; }
.preview-list { list-style: none; margin: 0; padding: 0; }
.preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.preview-title { flex: 0 0 9rem; font-weight: 500; }
.preview audio { flex: 1; min-width: 0; height: 36px; }

.description { margin-top: 3rem; max-width: 70ch; }

/* Simple pages */
.narrow { max-width: 34rem; }
.resend-form { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.resend-form input {
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.resend-form .button { justify-self: start; }

@media (max-width: 720px) {
  .library-hero { grid-template-columns: 1fr; }
  .preview { flex-direction: column; align-items: stretch; }
  .preview-title { flex: none; }
  .preview audio { flex: none; width: 100%; }
  .site-header nav a { margin-left: 1rem; }
}

.site-header nav { white-space: nowrap; }
