/* ===================================================================
   NightOwl Book CMS — dynamic catalog  ([nightowl_books])
   Fully scoped under .nightowl-books-catalog. Mirrors the existing
   manual .nob-book-* card system (4 / 3 / 2 / 1 columns, dark premium
   card, discreet gold accents) using the NightOwl palette:
     #030303  #090909  #c8942f  #edc36b  #eee3cf  #a99c87
   No JS dependency. No neon / glass / heavy motion.
   Every rule is prefixed with .nightowl-books-catalog so it beats the
   pages' un-scoped .nob-book-* rules deterministically without !important.
   =================================================================== */

.nightowl-books-catalog {
	--nbc-gold: var(--nightowl-gold);
	--nbc-gold-light: var(--nightowl-gold-light);
	--nbc-cream: var(--nightowl-cream);
	--nbc-muted: var(--nightowl-muted);
	--nbc-border: var(--nightowl-gold-border);
	--nbc-border-soft: var(--nightowl-gold-border-soft);

	display: block;
	width: 100%;
}
.nightowl-books-catalog *,
.nightowl-books-catalog *::before,
.nightowl-books-catalog *::after { box-sizing: border-box; }

/* --- Grid --- */
.nightowl-books-catalog .nob-book-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

/* --- Card --- */
.nightowl-books-catalog .nob-book-card {
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #111111, #0a0a0a);
	border: 1px solid var(--nbc-border);
	border-radius: 6px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.nightowl-books-catalog .nob-book-card:hover,
.nightowl-books-catalog .nob-book-card:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--nightowl-shadow-card);
	border-color: rgba(200, 148, 47, 0.6);
}

/* --- Cover (3:4, contain) --- */
.nightowl-books-catalog .nob-book-cover-link {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #0d0d0d;
}
.nightowl-books-catalog .nob-book-cover {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.nightowl-books-catalog .nob-book-cover--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--nightowl-font-display);
	font-size: clamp(48px, 8vw, 72px);
	line-height: 1;
	color: var(--nbc-gold-light);
	background:
		radial-gradient(80% 60% at 50% 30%, rgba(200, 148, 47, 0.14), rgba(3, 3, 3, 0) 70%),
		#0d0d0d;
}

/* --- Body --- */
.nightowl-books-catalog .nob-book-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 22px;
}
.nightowl-books-catalog .nob-book-title {
	margin: 0 0 6px;
	font-family: var(--nightowl-font-display);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.3px;
	line-height: 1.3;
	color: var(--nbc-gold);
	/* Reserve two lines so a 1-line and a 2-line title still leave the
	   series label / status badge on the same row across a grid row. */
	min-height: 2.6em;
}
/* Cards without a series label keep the same vertical rhythm: reserve the
   space the absent .nob-book-reihe line (~1 line + its 10px margin) would
   have taken, so the status badge, description and CTA align across the row. */
.nightowl-books-catalog .nob-book-card:not(:has(.nob-book-reihe)) .nob-book-title {
	margin-bottom: 34px;
}
.nightowl-books-catalog .nob-book-title a {
	color: inherit;
	text-decoration: none;
}
.nightowl-books-catalog .nob-book-title a:hover,
.nightowl-books-catalog .nob-book-title a:focus-visible { color: var(--nbc-gold-light); }

.nightowl-books-catalog .nob-book-reihe {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--nbc-muted);
}

.nightowl-books-catalog .nob-book-status {
	display: inline-block;
	align-self: flex-start;
	margin: 0 0 12px;
	padding: 2px 9px;
	font-size: 11px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--nbc-cream);
	border: 1px solid var(--nbc-border-soft);
	border-radius: 999px;
}

.nightowl-books-catalog .nob-book-desc {
	margin: 0 0 16px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--nbc-cream);
}

/* --- Button (gold outline) --- */
.nightowl-books-catalog .nob-book-btn {
	position: relative;
	overflow: hidden;
	margin-top: auto;
	align-self: flex-start;
	padding: 10px 16px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-align: center;
	text-decoration: none;
	color: var(--nbc-gold-light);
	border: 1px solid var(--nbc-gold);
	border-radius: 4px;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
/* Premium "Aufblitz" — one diagonal light sweep on hover/focus, matching
   the static-page primary CTAs (same 0.6s left→right timing). Decorative
   only: pointer-events off, disabled under prefers-reduced-motion. */
.nightowl-books-catalog .nob-book-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-20deg);
	transition: left 0.6s ease;
	pointer-events: none;
}
.nightowl-books-catalog .nob-book-btn:hover,
.nightowl-books-catalog .nob-book-btn:focus-visible {
	background-color: var(--nbc-gold);
	color: #000;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(200, 148, 47, 0.22);
}
.nightowl-books-catalog .nob-book-btn:hover::before,
.nightowl-books-catalog .nob-book-btn:focus-visible::before {
	left: 130%;
}

.nightowl-books-catalog a:focus-visible {
	outline: 2px solid var(--nbc-gold-light);
	outline-offset: 3px;
	border-radius: 2px;
}

/* --- Responsive: 4 / 3 / 2 / 1 --- */
@media (max-width: 1300px) {
	.nightowl-books-catalog .nob-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.nightowl-books-catalog .nob-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 640px) {
	.nightowl-books-catalog .nob-book-grid { grid-template-columns: 1fr; }
}

/* --- Motion --- */
@media (prefers-reduced-motion: reduce) {
	.nightowl-books-catalog .nob-book-card,
	.nightowl-books-catalog .nob-book-btn,
	.nightowl-books-catalog .nob-book-title a {
		transition: none;
	}
	.nightowl-books-catalog .nob-book-btn::before { content: none; }
}
