:root {
  --bg: #09080c;
  --bg-elev: #14111a;
  --bg-card: #1a1522;
  --ink: #f7f1e8;
  --muted: #b3a89a;
  --line: rgba(232, 196, 140, 0.16);
  --accent: #e8b86d;
  --accent-deep: #c4893a;
  --accent-2: #9ec4d4;
  --ember: #ff6b4a;
  --ok: #7dcaa0;
  --warn: #d4b06a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 28px 60px rgba(0, 0, 0, 0.55);
  --font: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(196, 108, 58, 0.28) 0%, transparent 58%),
    radial-gradient(800px 480px at 92% 4%, rgba(78, 118, 160, 0.22) 0%, transparent 52%),
    radial-gradient(700px 500px at 50% 110%, rgba(120, 60, 90, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, #120e16 0%, var(--bg) 40%, #07060a 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

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

.skip {
  position: absolute; left: -999px; top: auto;
}
.skip:focus {
  left: 1rem; top: 1rem; z-index: 99;
  background: #000; color: #fff; padding: .55rem 1rem;
  border-radius: 999px;
}

.wrap { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }

header.hero {
  padding: 3.25rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; }
.eyebrow {
  margin: 0 0 .85rem;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.brand {
  font-family: var(--font);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 0.95;
  margin: 0 0 .85rem;
}
.brand em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  background: linear-gradient(120deg, #f0d19a, #e08a4f 55%, #f6c88a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tag {
  color: var(--muted);
  margin: 0;
  max-width: 40rem;
  font-size: 1.05rem;
}

.filter-board {
  margin-top: 1.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  backdrop-filter: blur(8px);
  display: grid;
  gap: .85rem;
}
.filter-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: .75rem;
  align-items: start;
}
.filter-label {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .65rem;
  font-weight: 600;
}
nav.filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
nav.filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(10, 8, 14, 0.55);
  color: var(--ink);
  border-radius: 999px;
  padding: .5rem 1rem;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
nav.filters button:hover { border-color: rgba(232,184,109,.45); transform: translateY(-1px); }
nav.filters button[aria-pressed="true"] {
  background: linear-gradient(135deg, #f0c27a, #d99245);
  color: #1a120c;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(200, 130, 50, 0.28);
}
nav.filters button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.section { padding: 2.75rem 0 1rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}
.section h2 {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  margin: 0;
  color: var(--ink);
  letter-spacing: .01em;
}
.section-count {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 28%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(232, 184, 109, 0.35);
}

.cover-wrap {
  aspect-ratio: 1600 / 2560;
  background: #07060a;
  position: relative;
  overflow: hidden;
}
.cover-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(transparent, rgba(8,6,12,.55));
  pointer-events: none;
}
.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .cover-wrap img { transform: scale(1.03); }

.badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.badge.live { background: rgba(125, 202, 160, 0.92); color: #082014; }
.badge.dev { background: rgba(212, 176, 106, 0.92); color: #1a1408; }
.badge.pending { background: #5a6a8a; color: #e8eef8; }

.body {
  padding: 1.05rem 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex: 1;
}
.pen {
  color: var(--muted);
  font-size: .78rem;
  margin: 0;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}
.title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}
.series {
  font-size: .82rem;
  color: var(--accent);
  margin: 0;
  font-weight: 500;
}
.blurb {
  color: #d9cfc2;
  font-size: .92rem;
  margin: .2rem 0 .55rem;
  flex: 1;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease;
}
.btn.primary {
  background: linear-gradient(135deg, #f0c27a, #d99245);
  color: #1a120c;
  box-shadow: 0 8px 18px rgba(200, 130, 50, 0.25);
}
.btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.shelves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.reading-order {
  background:
    linear-gradient(145deg, rgba(232,184,109,.08), transparent 40%),
    var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.2rem;
  position: relative;
  overflow: hidden;
}
.reading-order::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--ember));
}
.reading-order .shelf-title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 .55rem;
  padding-left: .35rem;
}
.reading-order ol {
  margin: 0;
  padding-left: 1.55rem;
  color: #ddd3c6;
}
.reading-order li { margin: .4rem 0; }
.reading-order li em { color: var(--muted); font-style: normal; font-size: .9em; }

footer {
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.footer-inner { max-width: 40rem; }
.footer-brand {
  font-family: var(--font);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 .35rem;
}
.note { font-size: .8rem; color: var(--muted); }

.title-card {
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(232,184,109,.18), transparent 45%),
    linear-gradient(160deg, #2d2438 0%, #121018 70%);
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.title-card-inner {
  border: 1px solid rgba(232,184,109,.4);
  border-radius: 12px;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  gap: .65rem;
  box-shadow: inset 0 0 40px rgba(232,184,109,.06);
}
.title-card-series {
  margin: 0;
  color: #e8b86d;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}
.title-card-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  line-height: 1.15;
  color: #f7f1e8;
  max-width: 12ch;
  font-weight: 600;
}
.title-card-pen { margin: 0; color: #cfc3b4; font-size: .95rem; }
.title-card-soon {
  margin: .5rem 0 0;
  color: #a79f96;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 640px) {
  header.hero { padding-top: 2.25rem; }
  .filter-row { grid-template-columns: 1fr; gap: .35rem; }
  .filter-label { padding-top: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
  .blurb { display: none; }
  .body { padding: .8rem; }
  .title { font-size: 1.1rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .cover-wrap img, nav.filters button, .btn { transition: none; }
  .card:hover { transform: none; }
  .card:hover .cover-wrap img { transform: none; }
}
