/* =========================================================
   O'LearyBooks Family Media Library — theme stylesheet
   ========================================================= */

:root {
	/* Sampled directly from the background of the logo and dragon artwork,
	   so the site's green matches the artwork instead of the other way round. */
	--olb-green-900: #0e2b2d;
	--olb-green-800: #2d4748;
	--olb-green-700: #435a5b;
	--olb-green-600: #566b6c;
	--olb-gold-500: #d8a653;
	--olb-gold-400: #e4b65e;
	--olb-gold-300: #f2d58f;
	--olb-gold-100: #f7efd9;
	--olb-cream: #ead7a8;
	--olb-brown-700: #7a4228;
	--olb-brown-600: #8e3f2b;
	--olb-ink: #18392d;
	--olb-text-on-dark: #f3ecd8;
	--olb-text-muted: #c9d6cc;
	--olb-radius: 14px;
	--olb-radius-sm: 8px;
	--olb-shadow: 0 10px 30px rgba(16, 51, 42, 0.25);
	--olb-font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
	--olb-font-body: 'Lora', Georgia, serif;
	--olb-max: 1240px;
}

/* ---- Reset-ish basics ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--olb-font-body);
	background: var(--olb-gold-100);
	color: var(--olb-ink);
	line-height: 1.6;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
	font-family: var(--olb-font-display);
	line-height: 1.25;
	margin: 0 0 .5em;
	letter-spacing: .01em;
}
button { font-family: inherit; cursor: pointer; }

.olb-site { display: flex; flex-direction: column; min-height: 100vh; }
.olb-container { max-width: var(--olb-max); margin: 0 auto; padding: 0 24px; }
.olb-icon svg, .olb-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---- Buttons ---- */
.olb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: var(--olb-radius-sm);
	font-family: var(--olb-font-display);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .02em;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.olb-btn--primary {
	background: var(--olb-gold-400);
	color: var(--olb-green-900);
}
.olb-btn--primary:hover { background: var(--olb-gold-300); transform: translateY(-1px); }
.olb-btn--ghost {
	border-color: var(--olb-green-700);
	color: var(--olb-green-700);
	margin-top: 28px;
}
.olb-btn--ghost:hover { background: var(--olb-green-700); color: var(--olb-text-on-dark); }

/* =========================================================
   Header
   ========================================================= */
.olb-header {
	background: var(--olb-green-800);
	color: var(--olb-text-on-dark);
	border-bottom: 3px solid var(--olb-gold-500);
	position: sticky;
	top: 0;
	z-index: 50;
}
.olb-header__inner {
	max-width: var(--olb-max);
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 28px;
}
.olb-header__inner { padding-top: 10px; padding-bottom: 10px; }
.olb-brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.olb-brand__mark { width: 92px; height: 92px; flex: none; margin: -6px 0; }
.olb-brand__mark img { width: 100%; height: 100%; object-fit: contain; }

.olb-header__dragon { width: 92px; height: 92px; flex: none; opacity: .95; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); margin: -6px 0; }
.olb-header__dragon img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 980px) { .olb-header__dragon { display: none; } }
@media (max-width: 480px) { .olb-brand__mark { width: 64px; height: 64px; } }
.olb-brand__text { display: flex; flex-direction: column; }
.olb-brand__name { font-family: var(--olb-font-display); font-weight: 700; font-size: 20px; color: var(--olb-gold-300); }
.olb-brand__tagline { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--olb-text-muted); }

.olb-nav__list { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.olb-nav__list a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14.5px;
	font-weight: 500;
	transition: background-color .15s ease, color .15s ease;
}
.olb-nav__list a:hover,
.olb-nav__list .current-menu-item > a { background: rgba(216, 166, 83, .16); color: var(--olb-gold-300); }
.olb-nav__icon { width: 16px; height: 16px; flex: none; opacity: .9; }

.olb-nav__list li { position: relative; }
.olb-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 190px;
	margin: 4px 0 0;
	padding: 6px;
	list-style: none;
	background: var(--olb-green-800);
	border: 1px solid rgba(216, 166, 83, .25);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
	z-index: 60;
}
.olb-nav__list li:hover > .sub-menu,
.olb-nav__list li:focus-within > .sub-menu { display: block; }
.olb-nav__list .sub-menu li { width: 100%; }
.olb-nav__list .sub-menu a { padding: 8px 10px; white-space: nowrap; }

.olb-header__actions { display: flex; align-items: center; gap: 6px; }
.olb-icon-btn {
	width: 38px; height: 38px;
	display: flex; align-items: center; justify-content: center;
	background: transparent; border: none; border-radius: 50%;
	color: var(--olb-text-on-dark);
}
.olb-icon-btn:hover { background: rgba(255,255,255,.08); color: var(--olb-gold-300); }
.olb-menu-toggle { display: none; background: none; border: none; width: 38px; height: 38px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.olb-menu-toggle span { width: 22px; height: 2px; background: var(--olb-gold-300); display: block; }

.olb-search-bar { background: var(--olb-green-700); padding: 14px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.olb-search-form { max-width: var(--olb-max); margin: 0 auto; display: flex; gap: 10px; }
.olb-search-form input {
	flex: 1; padding: 10px 14px; border-radius: 8px; border: none;
	background: var(--olb-gold-100); font-family: var(--olb-font-body);
}
.olb-search-form button {
	padding: 10px 20px; border: none; border-radius: 8px;
	background: var(--olb-gold-400); color: var(--olb-green-900); font-weight: 600;
}

/* =========================================================
   Hero
   ========================================================= */
.olb-hero {
	position: relative;
	min-height: 440px;
	display: flex;
	align-items: center;
	background: linear-gradient(135deg, var(--olb-green-900), var(--olb-green-700) 60%, var(--olb-brown-700));
	background-size: cover;
	background-position: center;
	color: var(--olb-text-on-dark);
}
.olb-hero::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(16,51,42,.88) 0%, rgba(16,51,42,.55) 55%, rgba(16,51,42,.15) 100%);
}
.olb-hero__overlay { position: relative; z-index: 1; max-width: 640px; padding: 48px 24px; }
.olb-hero__title { font-size: clamp(32px, 4.5vw, 52px); color: #fff; margin-bottom: 18px; }
.olb-hero__subtitle { font-size: 17px; color: var(--olb-text-muted); margin-bottom: 28px; max-width: 520px; }

/* =========================================================
   Section grid (homepage tiles)
   ========================================================= */
.olb-section-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: 48px 0;
}
.olb-section-tile {
	position: relative;
	background: var(--olb-green-800);
	border: 1px solid rgba(216,166,83,.25);
	border-radius: var(--olb-radius);
	padding: 22px;
	color: var(--olb-text-on-dark);
	display: flex;
	flex-direction: column;
	min-height: 140px;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.olb-section-tile:hover { transform: translateY(-3px); box-shadow: var(--olb-shadow); border-color: var(--olb-gold-400); }
.olb-section-tile__icon { width: 32px; height: 32px; margin-bottom: 12px; }
.olb-section-tile__label { font-family: var(--olb-font-display); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.olb-section-tile__desc { font-size: 13px; color: var(--olb-text-muted); flex: 1; }
.olb-section-tile__cta { font-size: 13px; color: var(--olb-gold-300); font-weight: 600; margin-top: 10px; }

.olb-section-tile--quote {
	background: var(--olb-gold-100);
	color: var(--olb-ink);
	border: 1px solid var(--olb-cream);
	justify-content: space-between;
	align-items: flex-start;
}
.olb-section-tile--quote p { font-family: var(--olb-font-display); font-style: italic; font-size: 17px; margin: 0; }
.olb-section-tile--quote .olb-quote-compass { width: 34px; height: 34px; align-self: flex-end; opacity: .85; }

/* =========================================================
   Cards / grids / carousel
   ========================================================= */
.olb-recent__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.olb-recent__header h2 { font-size: 24px; color: var(--olb-green-800); }
.olb-view-all, .olb-recent__header .olb-view-all { font-size: 14px; font-weight: 600; color: var(--olb-brown-700); }

.olb-recent { margin: 56px 0; }

.olb-carousel {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 180px;
	gap: 18px;
	overflow-x: auto;
	padding-bottom: 12px;
	scroll-snap-type: x proximity;
}
.olb-carousel__item { scroll-snap-align: start; }

.olb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 20px;
}
.olb-grid--people { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.olb-card { display: block; }
.olb-card__cover {
	aspect-ratio: 3 / 4.4;
	border-radius: var(--olb-radius-sm);
	overflow: hidden;
	background: var(--olb-green-700);
	box-shadow: 0 6px 16px rgba(16,51,42,.18);
	transition: transform .18s ease, box-shadow .18s ease;
}
.olb-card:hover .olb-card__cover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(16,51,42,.28); }
.olb-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.olb-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.olb-card__placeholder .olb-icon { width: 40%; height: 40%; opacity: .7; }
.olb-card__meta { padding: 10px 2px 0; }
.olb-card__title { font-weight: 600; font-size: 14px; margin: 0; color: var(--olb-ink); }
.olb-card__creator { font-size: 12.5px; color: #6b6356; margin: 2px 0 0; }

.olb-person-card { text-align: center; }
.olb-person-card__photo {
	width: 100%; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden;
	background: var(--olb-green-700); display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.olb-person-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.olb-person-card__photo .olb-icon { width: 46%; height: 46%; opacity: .8; }
.olb-person-card__name { font-weight: 700; margin: 0; }
.olb-person-card__role { font-size: 13px; color: #6b6356; margin: 2px 0 0; }

/* =========================================================
   Archive / library pages
   ========================================================= */
.olb-archive-hero {
	background: var(--olb-green-800);
	color: var(--olb-text-on-dark);
	padding: 44px 0 36px;
	border-bottom: 3px solid var(--olb-gold-500);
}
.olb-archive-hero--page { padding: 36px 0; }
.olb-archive-hero__title { font-size: clamp(26px, 3.4vw, 36px); color: #fff; }
.olb-archive-hero__tagline { color: var(--olb-text-muted); margin-bottom: 20px; }

.olb-archive-search {
	max-width: 460px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--olb-gold-100);
	border-radius: var(--olb-radius-sm);
	padding: 10px 14px;
	color: var(--olb-brown-700);
}
.olb-archive-search input {
	border: none; background: transparent; flex: 1; font-family: var(--olb-font-body); font-size: 14px; color: var(--olb-ink);
}
.olb-archive-search input:focus { outline: none; }

.olb-pill-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.olb-pill {
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 600;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(216,166,83,.4);
	color: var(--olb-text-on-dark);
}
.olb-pill.is-active, .olb-pill:hover { background: var(--olb-gold-400); color: var(--olb-green-900); border-color: var(--olb-gold-400); }

.olb-archive-body { padding: 36px 0 64px; }
.olb-empty { color: #6b6356; padding: 40px 0; text-align: center; }

.olb-pagination ul { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.olb-pagination li a, .olb-pagination li span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px;
	border-radius: 8px; background: #fff; border: 1px solid var(--olb-cream); font-weight: 600; font-size: 13px;
}
.olb-pagination li .current { background: var(--olb-green-800); color: #fff; }

/* =========================================================
   Single
   ========================================================= */
.olb-single { padding: 44px 0 64px; }
.olb-single__layout { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; }
.olb-single__cover {
	border-radius: var(--olb-radius);
	overflow: hidden;
	background: var(--olb-green-700);
	box-shadow: var(--olb-shadow);
	aspect-ratio: 3/4.4;
	display: flex; align-items: center; justify-content: center;
}
.olb-single__cover img { width: 100%; height: 100%; object-fit: cover; }
.olb-single__placeholder { width: 40%; height: 40%; opacity: .75; }
.olb-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--olb-brown-700); font-weight: 700; margin-bottom: 6px; }
.olb-single__meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0; font-size: 14px; color: #52473a; }
.olb-single__content { font-size: 16px; }

/* =========================================================
   Pages / prose
   ========================================================= */
.olb-prose { max-width: 820px; padding: 40px 24px 64px; font-size: 16.5px; }
.olb-prose h2 {
	color: var(--olb-green-800);
	margin-top: 1.6em;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--olb-cream);
}
.olb-prose h2:first-child { margin-top: 0; }
.olb-prose ul { list-style: disc; margin: 0 0 1.4em 1.3em; padding: 0; }
.olb-prose li { margin-bottom: .4em; }
.olb-prose .olb-lead { font-family: var(--olb-font-display); font-style: italic; color: var(--olb-brown-700); font-size: 17px; }
.olb-prose strong { color: var(--olb-green-800); }
.olb-page-thumb { margin-bottom: 28px; border-radius: var(--olb-radius); overflow: hidden; }

/* Library pages can run wider than general prose (long author lists, etc.) */
.section-books .olb-prose,
.section-comics .olb-prose,
.section-audio .olb-prose,
.section-games .olb-prose,
.section-featured .olb-prose { max-width: 980px; }

/* ---- Featured page cards ---- */
.olb-feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 0 0 2.5em;
	list-style: none;
}
.olb-feature-card {
	display: flex;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--olb-cream);
	border-radius: var(--olb-radius);
	padding: 16px;
	box-shadow: 0 4px 14px rgba(16,51,42,.08);
}
.olb-feature-card__cover { width: 90px; flex: none; border-radius: var(--olb-radius-sm); overflow: hidden; background: var(--olb-green-700); aspect-ratio: 3/4.4; }
.olb-feature-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.olb-feature-card__cover--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(145deg, var(--olb-green-700), var(--olb-green-900));
}
.olb-feature-card__cover--placeholder::before {
	content: "";
	width: 40%; height: 40%;
	background: var(--olb-gold-400);
	-webkit-mask: url('../icons/scroll.svg') center/contain no-repeat;
	mask: url('../icons/scroll.svg') center/contain no-repeat;
}
.olb-feature-card__body h3 { font-size: 17px; margin: 0 0 2px; color: var(--olb-green-800); }
.olb-feature-card__meta { font-size: 12.5px; color: var(--olb-brown-700); font-weight: 600; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.olb-feature-card__body p:not(.olb-feature-card__meta) { font-size: 14.5px; margin: 0; }

/* ---- Stat tiles (library summary counts, e.g. Games page platform breakdown) ---- */
.olb-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
	margin: 0 0 2.2em;
}
.olb-stat-tile {
	background: var(--olb-green-800);
	border: 1px solid rgba(216, 166, 83, .25);
	border-radius: var(--olb-radius-sm);
	padding: 16px 14px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 2px;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.olb-stat-tile { cursor: pointer; }
a.olb-stat-tile:hover,
a.olb-stat-tile:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(16, 51, 42, .25);
	border-color: var(--olb-gold-400);
}
.olb-stat-tile__num { font-family: var(--olb-font-display); font-weight: 700; font-size: 26px; color: var(--olb-gold-300); line-height: 1.1; }
.olb-stat-tile__label { font-size: 12.5px; color: var(--olb-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.olb-stat-tile--total { background: var(--olb-gold-400); border-color: var(--olb-gold-400); }
.olb-stat-tile--total .olb-stat-tile__num { color: var(--olb-green-900); }
.olb-stat-tile--total .olb-stat-tile__label { color: var(--olb-ink); }

/* Compact variant — an A–Z quick-jump row (e.g. Audio page author index), not a counts dashboard */
.olb-stat-grid--compact { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-bottom: 1.8em; }
.olb-stat-tile--compact { padding: 10px 6px; }
.olb-stat-tile--compact .olb-stat-tile__num { font-size: 17px; }

/* Keep the anchor target from landing under the sticky header when a stat tile is clicked */
.olb-prose h2[id] { scroll-margin-top: 90px; }

/* ---- Homepage "Featured" teaser ---- */
.olb-featured-teaser { margin: 56px 0; }
.olb-featured-teaser__inner {
	background: var(--olb-green-800);
	color: var(--olb-text-on-dark);
	border-radius: var(--olb-radius);
	padding: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}
.olb-featured-teaser__inner h2 { color: #fff; margin: 4px 0 10px; }
.olb-featured-teaser__inner p { color: var(--olb-text-muted); max-width: 520px; margin: 0; }
.olb-featured-teaser .olb-eyebrow { color: var(--olb-gold-300); }

/* =========================================================
   404
   ========================================================= */
.olb-404 { padding: 100px 0; text-align: center; }
.olb-404__icon { width: 64px; height: 64px; margin: 0 auto 20px; }
.olb-404 h1 { font-size: 32px; color: var(--olb-green-800); }
.olb-404 p { max-width: 420px; margin: 0 auto 26px; color: #6b6356; }

/* =========================================================
   Footer
   ========================================================= */
.olb-footer { background: var(--olb-green-900); color: var(--olb-text-on-dark); margin-top: auto; }
.olb-footer__trust {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: var(--olb-max);
	margin: 0 auto;
	padding: 28px 24px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.olb-trust-item { display: flex; gap: 12px; align-items: flex-start; }
.olb-trust-item .olb-icon { width: 30px; height: 30px; flex: none; }
.olb-trust-item strong { display: block; font-size: 14px; color: var(--olb-gold-300); }
.olb-trust-item span { font-size: 12.5px; color: var(--olb-text-muted); }

.olb-footer__main { max-width: var(--olb-max); margin: 0 auto; padding: 32px 24px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.olb-footer__brand { display: flex; gap: 12px; align-items: center; }
.olb-footer__brand .olb-brand__mark { width: 40px; height: 40px; }
.olb-footer__site-name { font-family: var(--olb-font-display); font-weight: 700; color: var(--olb-gold-300); margin: 0; }
.olb-footer__tagline { font-size: 13px; color: var(--olb-text-muted); margin: 2px 0 0; }
.olb-footer__list { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.olb-footer__list a:hover { color: var(--olb-gold-300); }

.olb-footer__bottom { text-align: center; padding: 18px 24px; font-size: 12.5px; color: var(--olb-text-muted); border-top: 1px solid rgba(255,255,255,.08); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
	.olb-section-grid { grid-template-columns: repeat(2, 1fr); }
	.olb-single__layout { grid-template-columns: 240px 1fr; gap: 30px; }
}

@media (max-width: 820px) {
	.olb-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--olb-green-800); border-bottom: 3px solid var(--olb-gold-500); padding: 10px 24px 18px; }
	.olb-nav.is-open { display: block; }
	.olb-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
	.olb-nav__list .sub-menu {
		display: block;
		position: static;
		margin: 0 0 4px 22px;
		padding: 0;
		background: none;
		border: none;
		box-shadow: none;
	}
	.olb-menu-toggle { display: flex; }
	.olb-header__inner { position: relative; }
	.olb-footer__trust { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.olb-section-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.olb-hero { min-height: 360px; }
	.olb-hero__overlay { padding: 32px 20px; }
	.olb-single__layout { grid-template-columns: 1fr; }
	.olb-single__cover { max-width: 220px; margin: 0 auto; }
	.olb-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
	.olb-container { padding: 0 16px; }
}
