/* Make <picture> a transparent layout wrapper so img classes/floats apply normally */
picture { display: contents; }

:root{
  --bg:#050505;
  --panel:#0d0d0d;
  --text:#c8c5c5;       /* matches logo's #afacac, lifted slightly */
  --muted:#5a5858;
  --accent:#c8c5c5;     /* monochrome — same as text */
  --border:rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.22);
  --shadow: 0 16px 48px rgba(0,0,0,0.7);
  --radius: 12px;
  --font-display: 'Cinzel', 'Cinzel Decorative', 'Trajan Pro', 'Times New Roman', serif;
  /* Badge accent — soft warm white, easy to retheme */
  --badge-bg: rgba(255,255,255,0.07);
  --badge-border: rgba(255,255,255,0.22);
  --badge-text: #e8e4e4;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #050505 0%, #111111 50%, #050505 100%);
  background-repeat: no-repeat;
  background-size: 100% 220vh;
  color:var(--text);
  line-height:1.6;
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
  text-align:center;
}

.site-header{
  padding:52px 0 24px;
  border-bottom:1px solid var(--border);
  text-align:center;
}

.logo-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}

.site-logo{
  width: clamp(260px, 55vw, 640px);
  height:auto;
  display:block;
}

.tagline{
  margin:0;
  color:var(--muted);
  font-size:0.9rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

/* ===== Site nav ===== */
.site-nav{
  border-bottom:1px solid var(--border);
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner{
  display:flex;
  align-items:center;
  gap:4px;
  padding:10px 0;
  text-align:left;
}

.nav-link{
  display:inline-block;
  padding:7px 14px;
  border-radius:7px;
  text-decoration:none;
  font-size:0.78rem;
  font-weight:600;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--muted);
  transition: color .15s ease, background .15s ease;
}

.nav-link:hover{
  color:var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-link--active{
  color:var(--text);
}

.nav-link--active:hover{
  background: rgba(255,255,255,0.05);
}

/* Coming-soon nav links — visible but non-interactive.
   Remove this class (and the matching --soon in HTML/build.js) to go live. */
.nav-link--soon{
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Right-side button group (Instagram + Patreon) — pushed to far right */
.nav-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
}

.nav-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 16px;
  border-radius:7px;
  text-decoration:none;
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--text);
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  transition: transform .12s ease, background .14s ease, border-color .14s ease;
}

.nav-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.32);
}

.nav-btn:focus-visible,
.nav-link:focus-visible{
  outline:2px solid rgba(200,197,197,0.5);
  outline-offset:2px;
}

main{ padding:28px 0 56px; }

/* ===== Section header (heading + status line row) ===== */
.section-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  margin-bottom:20px;
}

/* Status line: "Latest update this week: Book Title" */
.status-line{
  margin:0;
  font-size:0.78rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--muted);
}

/* ===== Badge ===== */
.badge{
  display:inline-block;
  padding:3px 9px;
  border-radius:4px;
  font-size:0.68rem;
  font-weight:700;
  letter-spacing:0.1em;
  text-transform:uppercase;
  background:var(--badge-bg);
  border:1px solid var(--badge-border);
  color:var(--badge-text);
}

.badge.recently-posted{
  background: rgba(255,255,255,0.08);
  border-color: rgba(200,197,197,0.35);
  color: #f0ecec;
  animation: badge-pulse 3s ease-in-out infinite;
}

/* Release date badge — same style as Recently Posted */
.badge.release-date{
  background: rgba(255,255,255,0.08);
  border-color: rgba(200,197,197,0.35);
  color: #f0ecec;
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse{
  0%, 100% { opacity:1; }
  50%       { opacity:0.65; }
}

.books h2{
  margin:0 0 20px;
  font-size:1rem;
  font-family: var(--font-display);
  letter-spacing:0.2em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:18px;
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}

.card:hover{
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 24px 60px rgba(0,0,0,0.85);
}

.cover-wrap{
  position:relative;
  overflow:hidden;
}

.cover{
  aspect-ratio: 2 / 3;
  width:100%;
  object-fit: cover;
  display:block;
  background:#111;
}

.cover--placeholder{
  background: linear-gradient(160deg, #1c1c1c 0%, #111 100%);
}

.coming-soon-banner{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:12px 0;
  background:rgba(0,0,0,0.72);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  color:rgba(200,197,197,0.75);
  font-family: var(--font-display);
  font-size:0.8rem;
  font-weight:700;
  letter-spacing:0.22em;
  text-transform:uppercase;
  text-align:center;
  border-top:1px solid rgba(255,255,255,0.08);
}

.card-body{
  padding:14px 14px 16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  flex:1;
  text-align:center;
}

.title{
  margin:0;
  font-size:1.05rem;
  font-family: var(--font-display);
  letter-spacing:0.05em;
  font-weight:700;
  color:var(--text);
}

.actions{
  margin-top:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 8px;
  text-decoration:none;
  font-weight:600;
  font-size:0.85rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,0.14);
  color:var(--text);
  background: rgba(255,255,255,0.03);
  transition: transform .12s ease, background .14s ease, border-color .14s ease;
  flex: 1 1 140px;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.32);
}

.btn:focus-visible{
  outline: 2px solid rgba(200,197,197,0.5);
  outline-offset: 2px;
}

/* Monochrome — no color distinction between RR and Tapas */
.btn.rr{ border-color: rgba(255,255,255,0.16); }
.btn.rr:hover{ background: rgba(255,255,255,0.08); }

.btn.tapas{ border-color: rgba(255,255,255,0.10); }
.btn.tapas:hover{ background: rgba(255,255,255,0.08); }

.btn.patreon{ border-color: rgba(255,255,255,0.16); }
.btn.patreon:hover{ background: rgba(255,255,255,0.08); }

/* Disabled state — Coming Soon buttons */
.btn[aria-disabled="true"]{
  opacity:0.35;
  cursor:not-allowed;
  pointer-events:none;
}

/* ===== Footer links ===== */
.site-footer a{
  color:var(--muted);
  text-decoration:none;
  transition: color .15s ease;
}
.site-footer a:hover{ color:var(--text); }
.site-footer a:focus-visible{
  outline:2px solid rgba(200,197,197,0.5);
  outline-offset:2px;
  border-radius:2px;
}

.site-footer{
  border-top:1px solid var(--border);
  padding:24px 0;
  color:var(--muted);
  text-align:center;
  font-size:0.8rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

/* =============================================================
   UPDATES SECTION
   To rename: change the <h2> text in index.html. No CSS edits needed.
   ============================================================= */

.updates{
  margin-top:56px;
}

.updates h2{
  margin:0 0 20px;
  font-size:1rem;
  font-family: var(--font-display);
  letter-spacing:0.2em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
}

/* ── Updates grid ─────────────────────────────────────────── */

.updates-list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:18px;
}

@media (max-width:720px){
  .updates-list{ grid-template-columns: 1fr; }
}

/* ── Update card ──────────────────────────────────────────── */

.update-card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:20px 22px 22px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
  text-align:left;
  transform: translateY(0);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.update-card:hover{
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 22px 56px rgba(0,0,0,0.8);
}

/* Future items in preview mode */
.update-card--scheduled{
  opacity:0.5;
  filter: grayscale(25%);
}

/* ── Card header row (type badge + date) ──────────────────── */

.update-card__meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.update-card__date{
  font-size:0.72rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted);
  margin-left:auto;          /* push date to the right */
}

/* ── Card content ─────────────────────────────────────────── */

.update-card__title{
  margin:0;
  font-size:0.97rem;
  font-family: var(--font-display);
  letter-spacing:0.05em;
  font-weight:700;
  color:var(--text);
  line-height:1.3;
}

.update-card__summary{
  margin:0;
  font-size:0.85rem;
  color: rgba(200,197,197,0.75);
  line-height:1.6;
}

/* ── Optional platform byline ─────────────────────────────── */

.update-card__platform{
  font-size:0.72rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--muted);
}

/* ── Link button inside card ──────────────────────────────── */

.update-card__link{
  align-self:flex-start;
  margin-top:4px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  border-radius:7px;
  text-decoration:none;
  font-weight:600;
  font-size:0.78rem;
  letter-spacing:0.07em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,0.14);
  color:var(--text);
  background: rgba(255,255,255,0.03);
  transition: transform .12s ease, background .14s ease, border-color .14s ease;
}

.update-card__link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.32);
}

.update-card__link:focus-visible{
  outline:2px solid rgba(200,197,197,0.5);
  outline-offset:2px;
}

/* ── No-content placeholder ───────────────────────────────── */

.updates-empty{
  color:var(--muted);
  font-size:0.85rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  text-align:center;
  padding:32px 0;
  grid-column: 1 / -1;
}

/* ── Badges — type label ──────────────────────────────────── */

/* Generic type badge (Lore Drop, Announcement, Character, Playlist …) */
.badge.type{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: rgba(232,228,228,0.85);
}

/* "Scheduled" badge — preview mode only, never deployed to production */
.badge.scheduled{
  background: rgba(180,160,60,0.12);
  border-color: rgba(200,180,80,0.35);
  color: rgba(220,205,130,0.9);
  letter-spacing:0.1em;
}

/* =============================================================
   BOOK COVER LIGHTBOX  (index.html)
   ============================================================= */

.book-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  cursor: zoom-out;
}
.book-lightbox.open {
  display: flex;
}
.book-lightbox__img {
  max-width: min(72vw, 480px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 80px rgba(0,0,0,0.9);
  display: block;
  cursor: default;
}
.book-lightbox__caption {
  color: rgba(200, 197, 197, 0.75);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: min(90vw, 560px);
  line-height: 1.6;
  cursor: default;
  margin: 0;
}
.book-lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(200,197,197,0.55);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 4px 8px;
}
.book-lightbox__close:hover { color: var(--text); }
.book-lightbox__close:focus-visible {
  outline: 2px solid rgba(200,197,197,0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================================
   DETAIL PAGES  (lore/{id}.html, characters/{id}.html)
   Generated by build.js from the body[] array in scheduled.json.
   ============================================================= */

.detail-article{
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 0 72px;
  text-align: left;
}

.detail-header{
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.detail-meta{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-title{
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.detail-date{
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-body{
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(200, 197, 197, 0.88);
}

.detail-body p{
  margin: 0 0 1.4em;
}

.detail-body p:last-child{
  margin-bottom: 0;
}

.detail-footer{
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.detail-back{
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

.detail-back:hover{
  color: var(--text);
}

.detail-back:focus-visible{
  outline: 2px solid rgba(200,197,197,0.5);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Character detail page layout helpers ─────────────────────────────────── */
.detail-article--wide    { max-width: 880px; }
.char-back-wrap          { margin-bottom: 32px; }
.detail-meta--centered   { justify-content: center; margin-bottom: 28px; }
.char-pub-date           { margin-left: 10px; }
.char-controls-hidden    { display: none; }

