/*
Theme Name: Real Audiobooks
Theme URI: https://realaudiobooks.com
Description: Distinct streaming library theme for RealAudiobooks
Version: 2.0.0
Author: RealAudiobooks
Text Domain: baud-audiobooks
*/

:root {
  --ink: #121826;
  --ink-soft: #3A4558;
  --muted: #6B7385;
  --line: #D5DBE6;
  --paper: #F0F3F7;
  --card: #FFFFFF;
  --signal: #0E7490;
  --signal-hot: #155E75;
  --glow: #22D3EE;
  --deck: #0F172A;
  --deck-line: #243047;
  --radius: 6px;
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --max: 1180px;
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(14, 116, 144, 0.10), transparent 50%),
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}

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

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.baud-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── Top bar (dark — unlike Cozy/Swift cream headers) ── */
.baud-top {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--top-h);
  border-bottom: 3px solid var(--glow);
}
.baud-top-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.baud-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.baud-mark:hover { color: #fff; }
.baud-mark-badge {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: linear-gradient(145deg, var(--glow), var(--signal));
  color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
}
.baud-mark-light { color: #fff; }
.baud-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}
.baud-nav a {
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
  font-weight: 550;
}
.baud-nav a:hover,
.baud-nav a.is-on { color: #fff; }
.baud-menu {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

/* ── Hero ── */
.baud-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: end;
}
.baud-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--signal);
  margin-bottom: 10px;
}
.baud-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.baud-lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 36ch; }

.baud-hero-search,
.baud-search-strip {
  position: relative;
}
.baud-search-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 8px;
}
.baud-search-form {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(18, 24, 38, 0.06);
}
.baud-search-form input {
  flex: 1;
  border: 0;
  padding: 14px 20px;
  font: inherit;
  background: transparent;
  outline: none;
  color: var(--ink);
}
.baud-search-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 0 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.baud-search-form button:hover { background: var(--signal-hot); }

.baud-search-dropdown {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(18, 24, 38, 0.12);
  z-index: 40;
  max-height: 360px;
  overflow: auto;
}
.cs-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.cs-item:hover, .cs-item.cs-active { background: #E8F7FA; }
.cs-thumb { width: 36px; height: 54px; object-fit: cover; border-radius: 3px; background: var(--line); flex-shrink: 0; }
.cs-thumb-empty { display: inline-block; }
.cs-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-title { font-weight: 650; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-author { font-size: 0.8rem; color: var(--muted); }
.cs-all { font-weight: 700; color: var(--signal); }

/* ── Categories as underline tabs ── */
.baud-cats {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 20px 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.baud-cat {
  flex-shrink: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.baud-cat:hover { color: var(--ink); }
.baud-cat.is-on { color: var(--ink); border-bottom-color: var(--glow); }

.baud-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.baud-page-head { margin-bottom: 22px; }
.baud-page-head h1 {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.baud-page-head p { color: var(--muted); margin-top: 6px; }

/* ── Shelf (dense tiles, not cozy soft cards) ── */
.baud-shelf {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px 14px;
}
.baud-tile { min-width: 0; }
.baud-tile-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: #CBD5E1;
  outline: 1px solid rgba(18,24,38,0.08);
}
.baud-tile-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.baud-tile:hover .baud-tile-cover img { transform: scale(1.04); }
.baud-tile-badge {
  position: absolute;
  left: 0; bottom: 0;
  background: var(--ink);
  color: var(--glow);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
}
.baud-tile-body { padding-top: 8px; }
.baud-tile-body h3 {
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 700;
}
.baud-tile-body h3 a { color: var(--ink); }
.baud-tile-body h3 a:hover { color: var(--signal); }
.baud-tile-by { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.baud-tile-by a { color: var(--muted); }
.baud-tile-cat {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--signal);
}

.baud-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}
.baud-pages a,
.baud-pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 650;
  font-size: 0.9rem;
}
.baud-pages .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.baud-surprise { margin-top: 48px; padding-top: 28px; border-top: 1px dashed var(--line); }
.baud-surprise-head { margin-bottom: 18px; }
.baud-surprise-head h2 {
  font-family: var(--display);
  font-size: 1.7rem;
}
.baud-surprise-head p { color: var(--muted); font-size: 0.92rem; }

/* ── Single ── */
.baud-crumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.baud-crumbs a { color: var(--ink-soft); }
.baud-single-top {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 28px;
}
.baud-single-side { position: static; }
.baud-cover {
  border-radius: 6px;
  overflow: hidden;
  outline: 1px solid rgba(18,24,38,0.1);
  background: #CBD5E1;
  max-width: 260px;
}
.baud-cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

/* Full-width player — scales with browser, not cover photo */
.baud-player-full {
  width: 100%;
  margin: 8px 0 36px;
}
.baud-player-full .baud-deck {
  width: 100%;
  max-width: none;
  padding: 24px 28px;
}
.baud-player-full .baud-console {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 18px;
}
.baud-player-full .baud-play {
  width: 96px;
  height: 96px;
}
.baud-player-full .baud-play svg {
  width: 38px;
  height: 38px;
}
.baud-player-full .baud-scrub {
  height: 14px;
}
.baud-player-full .baud-tracks {
  max-height: min(42vh, 420px);
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .baud-player-full .baud-tracks {
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
}

.baud-single-main h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.baud-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding: 14px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.baud-meta div { display: grid; gap: 2px; }
.baud-meta dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 750;
}
.baud-meta dd { font-size: 0.95rem; color: var(--ink); }
.baud-blurb { font-size: 1.02rem; color: var(--ink-soft); }
.baud-blurb p { margin-bottom: 1em; }
.baud-blurb strong { color: var(--ink); }

/* ── Player deck (dark console — distinct from Cozy bar) ── */
.baud-deck {
  background: var(--deck);
  color: #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--deck-line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}
.baud-deck-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94A3B8;
  font-weight: 700;
}
.baud-deck-count { color: var(--glow); }

.baud-resume {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.baud-resume p { font-size: 0.9rem; margin-bottom: 8px; }
.baud-resume-actions { display: flex; gap: 8px; }
.baud-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.baud-btn-solid { background: var(--glow); color: var(--ink); }
.baud-btn-ghost { background: transparent; color: #fff; border: 1px solid #64748B; }

.baud-player-error {
  color: #FCA5A5;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.baud-console {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.baud-play {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(145deg, var(--glow), var(--signal));
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.18);
}
.baud-play:hover { filter: brightness(1.05); }
.baud-play svg { width: 34px; height: 34px; }
.baud-icon-hidden { display: none !important; }
.baud-playpause-icons { display: grid; place-items: center; }

.baud-console-main { min-width: 0; }
.baud-scrub {
  height: 12px;
  background: #1E293B;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  outline: none;
}
.baud-scrub:focus-visible { box-shadow: 0 0 0 2px var(--glow); }
.baud-scrub-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--signal), var(--glow));
  border-radius: inherit;
}
.baud-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}
.baud-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.baud-tool {
  border: 1px solid var(--deck-line);
  background: #1E293B;
  color: #E2E8F0;
  border-radius: 999px;
  min-width: 44px;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.baud-tool:hover { border-color: var(--glow); color: #fff; }
.baud-speed { min-width: 44px; }
.baud-vol {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.baud-vol input {
  width: 110px;
  accent-color: var(--glow);
}

.baud-tracks {
  list-style: none;
  max-height: 380px;
  overflow: auto;
  border-top: 1px solid var(--deck-line);
  margin-top: 8px;
  padding-top: 10px;
}
.baud-tracks li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}
.baud-tracks li:hover { background: rgba(255,255,255,0.04); }
.baud-tracks li.playing {
  background: rgba(34, 211, 238, 0.1);
  border-left-color: var(--glow);
  color: #fff;
}
.baud-track-num {
  font-variant-numeric: tabular-nums;
  color: #64748B;
  font-size: 0.75rem;
  font-weight: 700;
}
.baud-track-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.baud-track-dur {
  color: #64748B;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.baud-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0 28px;
}
.baud-post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.baud-post-nav-next { text-align: right; }
.baud-post-nav-link span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 750;
}
.baud-post-nav-link strong { font-size: 0.95rem; font-weight: 700; }

.baud-related h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  margin-bottom: 16px;
}

/* ── Footer ── */
.baud-foot {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  margin-top: 40px;
  padding: 40px 20px 24px;
}
.baud-foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.baud-foot h4 {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.baud-foot a { color: rgba(255,255,255,0.72); }
.baud-foot a:hover { color: var(--glow); }
.baud-foot-brand p { margin-top: 12px; font-size: 0.92rem; max-width: 36ch; }
.baud-foot li { margin-bottom: 6px; font-size: 0.9rem; }
.baud-foot-copy {
  max-width: var(--max);
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* Contact / pages reuse */
.page-contact .baud-main,
.page .baud-main { padding-top: 32px; }

@media (max-width: 1100px) {
  .baud-shelf { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .baud-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .baud-single-top { grid-template-columns: 1fr; gap: 20px; }
  .baud-cover { max-width: 220px; margin: 0 auto; }
  .baud-player-full .baud-console { grid-template-columns: 64px 1fr; gap: 12px; }
  .baud-player-full .baud-play { width: 64px; height: 64px; }
  .baud-player-full .baud-play svg { width: 26px; height: 26px; }
  .baud-player-full .baud-deck { padding: 16px; }
  .baud-player-full .baud-scrub { height: 8px; }
  .baud-player-full .baud-tracks { grid-template-columns: 1fr; max-height: 260px; }
  .baud-shelf { grid-template-columns: repeat(3, 1fr); }
  .baud-foot-inner { grid-template-columns: 1fr; }
  .baud-meta { grid-template-columns: 1fr; }
  .baud-menu { display: inline-flex; }
  .baud-nav {
    display: none;
    position: absolute;
    top: var(--top-h);
    left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    gap: 10px;
    border-bottom: 3px solid var(--glow);
  }
  .baud-nav.is-open { display: flex; }
  .baud-top-inner { position: relative; }
  .baud-console { grid-template-columns: 64px 1fr; gap: 12px; }
  .baud-play { width: 64px; height: 64px; }
  .baud-play svg { width: 26px; height: 26px; }
  .baud-deck { padding: 14px; border-radius: 10px; }
  .baud-scrub { height: 8px; }
  .baud-tool { min-width: 36px; height: 32px; font-size: 0.8rem; }
  .baud-tracks { max-height: 260px; }
  .baud-tracks li { font-size: 0.86rem; padding: 8px; }
  .baud-vol input { width: 80px; }
}
@media (max-width: 560px) {
  .baud-shelf { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .baud-console { grid-template-columns: 56px 1fr; }
  .baud-play { width: 56px; height: 56px; }
  .baud-post-nav { grid-template-columns: 1fr; }
}
