/* ============================================================
   CCM Soundcheck — site styles
   Clean, modern, dark. Mobile-first and responsive.
   ============================================================ */

:root {
  --bg: #0f1117;
  --bg-elevated: #171a23;
  --bg-card: #1c2030;
  --text: #f2f4f8;
  --text-muted: #9aa3b2;
  --border: #2a2f3d;
  --accent: #5b8def;
  --accent-hover: #7aa4ff;
  --radius: 14px;
  --wrap: 1080px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}
.site-brand__wordmark {
  height: 60px;
  width: auto;
  display: block;
  border-radius: 6px;
}
@media (max-width: 480px) {
  .site-brand__wordmark {
    height: 48px;
  }
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--text);
}
@media (max-width: 560px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  margin: 24px 0 34px;
}
.hero__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.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;
}

@media (max-width: 620px) {
  .hero {
    margin: 16px 0 24px;
  }
}

/* ---------- Search ---------- */
.search {
  margin: 12px auto 36px;
  max-width: 560px;
}
.search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.search__input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search__input::placeholder {
  color: var(--text-muted);
}
.search__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}

/* ---------- Episode grid ---------- */
.episode-grid {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.episode-card {
  min-width: 0;
}
.tile {
  display: block;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

/* Placeholder tile art */
.tile__art {
  aspect-ratio: 1 / 1;
  background: var(--tile-bg, #333);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  position: relative;
  isolation: isolate;
}
.tile__art::after {
  /* subtle depth so solid tiles don't look flat */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.28));
  z-index: -1;
}
.tile__num {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.9;
}
.tile__song {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.tile__artist {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
}
.tile__artist em {
  font-style: normal;
  opacity: 0.85;
  font-weight: 500;
}
.tile__year {
  font-size: 0.85rem;
  opacity: 0.85;
}
.tile__img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
}
.tile__caption {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tile__caption-num {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
.tile__caption-song {
  font-weight: 700;
}
.tile__caption-artist {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 0 60px;
}

/* ---------- Simple content pages (About, etc.) ---------- */
.prose {
  max-width: 760px;
  margin: 20px 0 40px;
}
.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 10px 0 12px;
  line-height: 1.1;
}
.prose h2 {
  font-size: 1.4rem;
  margin: 34px 0 10px;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 22px 0 6px;
  color: var(--accent);
}
.prose .aside {
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

/* ---------- Suggest a Song form ---------- */
.suggest-form {
  max-width: 560px;
  margin: 8px 0 48px;
}
.suggest-form__hp {
  display: none;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}
.field .req {
  color: var(--accent);
}
.field .opt {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:active {
  transform: translateY(1px);
}
.prose .lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.prose p {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 22px;
}
.prose li {
  margin-bottom: 8px;
}

/* ---------- Episode page ---------- */
.backlink {
  margin: 26px 0 8px;
}
.episode-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
}
.episode-header__art .tile__art,
.episode-header__art .tile__img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.episode-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  margin: 0 0 6px;
}
.episode-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 6px;
  line-height: 1.1;
}
.episode-artist {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.episode-artist .feat {
  opacity: 0.85;
}
.episode-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.episode-facts li {
  font-size: 0.95rem;
}
.episode-facts span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

/* Video */
.episode-video {
  margin-bottom: 34px;
}
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* Audio */
.episode-audio {
  margin-bottom: 34px;
}
.episode-audio audio {
  width: 100%;
}

/* Episode body (rendered from markdown) */
.episode-body {
  max-width: 760px;
}
.section-heading {
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.episode-body h2 {
  font-size: 1.5rem;
  margin: 40px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.episode-body h3 {
  font-size: 1.15rem;
  margin: 26px 0 8px;
  color: var(--text);
}
.episode-body h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.episode-body ul {
  padding-left: 22px;
}
.episode-body li {
  margin-bottom: 8px;
}
.episode-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 34px 0;
}
.episode-body a {
  word-break: break-word;
}
.episode-body strong {
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 26px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .episode-header {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .episode-header__art {
    max-width: 260px;
  }
}
