/* StudRips visual system -- dark warm charcoal (not flat black) with LEGO's
   three primaries (red/yellow/blue) used only as accents, plus a barely-there
   dot-grid texture standing in for brick studs. See project memory for the
   design reasoning; this replaces the earlier light-background v1 pass. */

:root {
	--bg: #131019;
	--bg-panel: #1c1822;
	--bg-panel-2: #221d2a;
	--border: #322b3b;
	--text: #f3ede4;
	--text-muted: #a99cc4;
	--text-dim: #766b8c;
	--red: #ff3b4e;
	--yellow: #ffd23f;
	--blue: #3f8cff;
	--font-display: 'Anton', Impact, sans-serif;
	--font-body: 'Archivo', -apple-system, sans-serif;

	/* legacy aliases so anything still referencing the old names keeps working */
	--sr-red: var(--red);
	--sr-yellow: var(--yellow);
	--sr-blue: var(--blue);
	--sr-ink: var(--bg);
	--sr-bg-card: var(--bg-panel);
	--sr-border: var(--border);
}

body {
	background: var(--bg) !important;
	color: var(--text) !important;
	font-family: var(--font-body) !important;
	position: relative;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1.6px, transparent 1.6px);
	background-size: 28px 28px;
	pointer-events: none;
	z-index: 0;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	background: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(63,140,255,0.09), transparent 60%),
	            radial-gradient(ellipse 700px 400px at 100% 10%, rgba(255,59,78,0.06), transparent 60%);
	pointer-events: none;
	z-index: 0;
}

.wrapper, #content, .studrips-header, .studrips-footer {
	position: relative;
	z-index: 1;
}

a { color: var(--blue); }

h1, h2, h3 { color: var(--text); }

/* ---- Header ---- */

.studrips-header {
	background: transparent;
	padding: 12px 0 0;
}

.studrips-header__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 40px 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.studrips-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	text-decoration: none;
}

.studrips-brand__logo {
	height: 74px;
	width: auto;
	display: block;
}

.studrips-brand__tagline {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 0.78rem;
	color: var(--text-muted);
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.studrips-nav__list {
	display: flex;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.studrips-nav__list a {
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	transition: color 0.2s ease;
}

.studrips-nav__list a:hover {
	color: var(--text);
}

.studrips-nav__list li:last-child a {
	color: var(--yellow);
}

.studrips-brick-rule {
	height: 4px;
	background: linear-gradient(90deg, var(--red) 0%, var(--red) 32%, var(--yellow) 32%, var(--yellow) 64%, var(--blue) 64%, var(--blue) 100%);
	opacity: 0.85;
}

@media (max-width: 700px) {
	.studrips-header__inner { padding: 0 20px 10px; }
	.studrips-brand__logo { height: 56px; }
	.studrips-brand__tagline { display: none; }
	.studrips-nav__list { gap: 18px; flex-wrap: wrap; }
}

/* ---- Footer ---- */

.studrips-footer {
	background: var(--bg-panel);
	border-top: 1px solid var(--border);
	margin-top: 70px;
}

.studrips-footer__grid {
	max-width: 1180px;
	margin: 0 auto;
	padding: 44px 40px 32px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
}

.studrips-footer__logo {
	height: 56px;
	width: auto;
	display: block;
	margin-bottom: 12px;
}

.studrips-footer__tagline {
	color: var(--text-muted);
	font-size: 0.9rem;
	font-weight: 700;
	max-width: 260px;
	line-height: 1.4;
}

.studrips-footer__heading {
	font-family: var(--font-display);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.8rem;
	color: var(--yellow);
	margin-bottom: 14px;
}

.studrips-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.studrips-footer__links a {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	transition: color 0.2s ease;
}

.studrips-footer__links a:hover {
	color: var(--text);
}

.studrips-footer__bottom {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 40px 28px;
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--text-dim);
	font-size: 0.78rem;
}

.studrips-footer__disclaimer {
	color: var(--text-dim);
}

.studrips-footer__disclaimer a {
	color: var(--text-dim);
	text-decoration: underline;
}

.studrips-footer__disclaimer a:hover {
	color: var(--text-muted);
}

@media (max-width: 700px) {
	.studrips-footer__grid { grid-template-columns: 1fr; padding: 36px 20px 24px; gap: 28px; }
	.studrips-footer__bottom { padding: 18px 20px 24px; flex-direction: column; align-items: flex-start; }
}

/* ---- Spotlight (latest rip, on the Home template) ---- */

.studrips-home {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 40px;
}

.rip-spotlight {
	padding: 0;
	margin-bottom: 56px;
	background: transparent;
	color: var(--text);
}

.rip-spotlight--empty {
	text-align: center;
	background: var(--bg-panel);
	border: 1px dashed var(--border);
	border-radius: 16px;
	padding: 48px 24px;
}

.rip-spotlight__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--yellow);
	margin-bottom: 14px;
}

.rip-spotlight__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--red);
	box-shadow: 0 0 0 3px rgba(255,59,78,0.25);
}

.rip-spotlight__title {
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 3.6vw, 2.8rem);
	line-height: 1.05;
	letter-spacing: 0.01em;
	margin: 0 0 18px;
	color: var(--text);
}

.rip-excerpt {
	color: var(--text-muted);
	font-size: 0.98rem;
	line-height: 1.6;
	margin: 0 0 18px;
	max-width: 62ch;
}

.rip-card__body .rip-excerpt {
	font-size: 0.86rem;
	margin: 0 0 12px;
	max-width: none;
}

.rip-spotlight__media {
	margin-top: 22px;
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: 0 30px 60px -24px rgba(0,0,0,0.55);
}

.rip-spotlight__media iframe {
	display: block;
	border-radius: 20px;
}

/* ---- Byline (StudDad / StudSon avatars) ---- */

.rip-byline {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.rip-byline__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--bg);
	outline: 2px solid var(--yellow);
	margin-right: -12px;
}

.rip-byline__avatar:last-of-type {
	margin-right: 0;
}

.rip-byline__label {
	margin-left: 14px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text-muted);
}

/* ---- Taxonomy badges ---- */

.rip-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.rip-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 7px;
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}

.rip-badge--rip_company {
	background: rgba(255,59,78,0.15);
	color: #ff8592;
	border: 1px solid rgba(255,59,78,0.35);
}

.rip-badge--rip_product_line {
	background: rgba(63,140,255,0.15);
	color: #8ab8ff;
	border: 1px solid rgba(63,140,255,0.35);
}

.rip-badge--rip_box_format {
	background: rgba(255,255,255,0.06);
	color: var(--text-muted);
	border: 1px solid var(--border);
}

.rip-badge--rip_year {
	background: rgba(63,140,255,0.15);
	color: #8ab8ff;
	border: 1px solid rgba(63,140,255,0.35);
}

.rip-badge--rip_type {
	background: rgba(255,210,63,0.15);
	color: var(--yellow);
	border: 1px solid rgba(255,210,63,0.35);
}

/* ---- Recent rips grid ---- */

.rip-recent {
	margin-bottom: 40px;
}

.rip-recent__heading {
	font-family: var(--font-display);
	font-size: 1.4rem;
	letter-spacing: 0.01em;
	margin-bottom: 20px;
	color: var(--text);
}

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

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

@media (max-width: 600px) {
	.rip-recent__grid {
		grid-template-columns: 1fr;
	}
}

.rip-card {
	display: block;
	border-radius: 16px;
	border: 1px solid var(--border);
	background: var(--bg-panel);
	overflow: hidden;
	text-decoration: none;
	color: var(--text);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rip-card:hover {
	transform: translateY(-5px);
}

.rip-recent__grid .rip-card:nth-child(3n+1):hover { box-shadow: 0 20px 40px -16px rgba(255,59,78,0.35); border-color: rgba(255,59,78,0.4); }
.rip-recent__grid .rip-card:nth-child(3n+2):hover { box-shadow: 0 20px 40px -16px rgba(255,210,63,0.3); border-color: rgba(255,210,63,0.4); }
.rip-recent__grid .rip-card:nth-child(3n+3):hover { box-shadow: 0 20px 40px -16px rgba(63,140,255,0.35); border-color: rgba(63,140,255,0.4); }

.rip-card__thumb {
	aspect-ratio: 16 / 9;
	background: #100e15;
	overflow: hidden;
}

.rip-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rip-card:hover .rip-card__thumb img {
	transform: scale(1.06);
}

.rip-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
}

.rip-card__body {
	padding: 16px 18px 20px;
}

.rip-card__title {
	font-weight: 800;
	margin-bottom: 10px;
	color: var(--text);
}

.rip-card__body .rip-badges {
	margin-bottom: 0;
}

.rip-card__body .rip-badge {
	font-size: 10px;
	padding: 3px 9px;
}

/* ---- Library / archive page ---- */

.studrips-library {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 40px;
}

.library-heading {
	font-family: var(--font-display);
	font-size: 2rem;
	letter-spacing: 0.01em;
	margin-bottom: 20px;
	color: var(--text);
}

.library-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 32px;
}

.library-filters select {
	padding: 9px 14px;
	border-radius: 9px;
	border: 1px solid var(--border);
	background: var(--bg-panel);
	color: var(--text);
	font-size: 14px;
	font-family: var(--font-body);
}

.library-filters select:focus {
	outline: none;
	border-color: var(--blue);
}

.library-filters__clear {
	font-size: 13px;
	color: var(--red);
	text-decoration: underline;
}

.library-grid {
	margin-bottom: 36px;
}

.library-empty {
	padding: 48px 0;
	text-align: center;
	color: var(--text-dim);
}

.library-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
}

.library-pagination .page-numbers {
	display: inline-block;
	padding: 7px 13px;
	border-radius: 9px;
	border: 1px solid var(--border);
	text-decoration: none;
	color: var(--text-muted);
	font-size: 14px;
}

.library-pagination .page-numbers.current {
	background: var(--red);
	color: #fff;
	border-color: var(--red);
}

/* ---- About page ---- */

.studrips-about {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px 40px;
}

.about-heading {
	font-family: var(--font-display);
	font-size: 2.2rem;
	letter-spacing: 0.01em;
	margin-bottom: 14px;
	color: var(--text);
}

.about-intro {
	font-size: 1.1rem;
	color: var(--text-muted);
	margin-bottom: 44px;
}

.about-bio {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-bottom: 36px;
	padding: 24px;
	border-radius: 16px;
	background: var(--bg-panel);
	border: 1px solid var(--border);
}

.about-bio--reverse {
	flex-direction: row-reverse;
}

.about-bio__avatar {
	width: 130px;
	height: 130px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--bg);
	outline: 3px solid var(--yellow);
	flex-shrink: 0;
}

.about-bio__text h2 {
	font-family: var(--font-display);
	letter-spacing: 0.01em;
	margin: 0 0 8px;
	color: var(--red);
}

.about-bio__text p {
	color: var(--text-muted);
}

.about-crosslink {
	margin-top: 32px;
	padding: 28px 32px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(255,210,63,0.15), rgba(255,59,78,0.1));
	border: 1px solid rgba(255,210,63,0.3);
	text-align: center;
	font-weight: 700;
	color: var(--text);
}

.about-crosslink p {
	max-width: 60ch;
	margin: 0 auto;
	line-height: 1.6;
}

.about-crosslink a {
	color: var(--yellow);
}

@media (max-width: 600px) {
	.about-bio,
	.about-bio--reverse {
		flex-direction: column;
		text-align: center;
	}
}

/* ---- Single rip post ---- */

.studrips-single {
	max-width: 900px;
	margin: 0 auto 40px;
	padding: 20px 40px;
}

.single-title {
	font-family: var(--font-display);
	font-size: 2rem;
	letter-spacing: 0.01em;
	margin-bottom: 14px;
	color: var(--text);
}

.single-media {
	margin: 22px 0;
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: 0 30px 60px -24px rgba(0,0,0,0.55);
}

.single-media iframe {
	display: block;
	border-radius: 20px;
}

.single-ebay-cta {
	margin-top: 36px;
	padding: 28px;
	border-radius: 16px;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	text-align: center;
}

.single-ebay-cta p {
	margin: 0 0 14px;
	color: var(--text-muted);
}

.single-ebay-cta__button {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--red), #ff6b4a);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 8px 24px -8px rgba(255,59,78,0.55);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.single-ebay-cta__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px -8px rgba(255,59,78,0.7);
}

.studrips-single ~ .rip-recent {
	max-width: 900px;
	margin: 0 auto 40px;
	padding: 0 40px;
}
