/*
Theme Name: SpinMag Lite
Theme URI: https://articles.spinmagazine.com
Author: SPIN
Description: Lightweight classic WordPress theme for editorial listicle/gallery articles. No Bootstrap, no jQuery. Uses theme.json for editor tokens only — templates are classic PHP so ad placements stay fully controllable.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: spinmag-lite
*/

/* -------------------------------------------------- */
/* Tokens (mirror theme.json so front-end CSS doesn't depend on it loading) */
/* -------------------------------------------------- */
:root {
	--black: #0A0A0A;
	--white: #FFFFFF;
	--red: #E4002B;
	--gray-light: #E4E4E4;
	--gray-mid: #707070;

	--font: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--content-width: 700px;
	--wide-width: 1140px;
	--nav-width: 100%;
}

/* -------------------------------------------------- */
/* Reset */
/* -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--white);
	color: var(--black);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--black); }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }

.wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 1.25rem; }
.wrap--wide { max-width: var(--wide-width); }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--black); color: var(--white);
	padding: 0.75rem 1.25rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* -------------------------------------------------- */
/* Header */
/* -------------------------------------------------- */
.site-header {
	background: var(--black);
	color: var(--white);
}
.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5625rem 1.25rem;
}
.site-logo img { height: 50px; width: auto; }
.site-logo { display: block; }

.nav-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: none;
	padding: 0.4rem;
}
.nav-toggle__bars { display: flex; flex-direction: column; gap: 10px; width: 50px; }
.nav-toggle__bars span { display: block; height: 10px; background: var(--white); }

.primary-nav__list a {
	color: var(--black);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.primary-nav__list a:hover,
.primary-nav__list .current-menu-item > a { color: var(--red); }

/* -------------------------------------------------- */
/* Off-canvas nav: slides in from the left over an overlay */
/* -------------------------------------------------- */
.nav-overlay {
	position: fixed;
	inset: 0;
	background: var(--black);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	z-index: 200;
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }

.primary-nav {
	position: fixed;
	top: 0;
	left: 0;
	height: 100%;
	width: var(--nav-width);
	background: var(--black);
	color: var(--white);
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	z-index: 201;
	padding: 2rem;
	overflow-y: auto;
}
.primary-nav.is-open { transform: translateX(0); }

.primary-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
}
.primary-nav__head .site-logo img { filter: invert(1); }
.nav-close {
	background: none;
	border: none;
	color: var(--white);
	font-size: 1.75rem;
	line-height: 1;
	padding: 0.25rem 0.5rem;
}
.primary-nav .primary-nav__list { display: flex; flex-direction: column; }
.primary-nav .primary-nav__list a {
	color: var(--white);
	font-size: 1.35rem;
	padding: 0.75rem 0;
	display: block;
}
.primary-nav .primary-nav__list a:hover,
.primary-nav .primary-nav__list .current-menu-item > a { color: var(--red); }

.primary-nav__social { display: flex; gap: 1rem; margin-top: 2rem; }
.primary-nav__social a { color: var(--white); font-size: 0.85rem; text-transform: uppercase; }
.primary-nav__social a:hover { color: var(--red); }

/* -------------------------------------------------- */
/* Ad slots */
/* -------------------------------------------------- */
.connatix-video {
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 2.5rem;
	width: 100%;

}
@media (min-width: 768px) {
		.connatix-video {
			width: 66.666667%;
		}
}
.ad-label {
		display: block;
		margin-bottom: 1rem;
		text-align: center
}

.ad-label,.ad-label span {
		position: relative;
		z-index: 40
}

.ad-label span {
		background-color: rgb(255 255 255);
		font-size: .8rem;
		padding-left: 1rem;
		padding-right: 1rem;
		text-transform: uppercase
}

.ad-label:before {
		border-top-width: 1px;
		display: block;
		top: 50%;
		width: 100%;
		z-index: 10;
		border-color: rgb(var(--gray-mid));
		content: ""
}

.ad-label:before,.sr-only {
		height: 1px;
		position: absolute
}

.ad-slot {
	max-width: var(--wide-width);
	margin: 1.75rem auto;
	text-align: center;
}
.ad-slot__inner {
	min-height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--white);
	border: 1px dashed var(--gray-light);
	font-size: 0.75rem;
	color: var(--gray-mid);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.ad-slot--header .ad-slot__inner { min-height: 60px; }

/* -------------------------------------------------- */
/* Article hero / single */
/* -------------------------------------------------- */
.article-header { background: var(--black); color: var(--white); margin-bottom: .5rem; padding: 3rem 0; }
.entry-header { max-width: var(--content-width); }
.article-header__title {
	font-size: 2.5rem;
}
@media (max-width: 600px) {
	.article-header__title { font-size: 1.9rem; }
}
.article-header__byline {
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.article-header__byline .author-name { font-weight: 700; }
.article-intro { font-size: 1.15rem; color: #222; }

.entry-content { max-width: var(--content-width); padding-top: 1rem; padding-bottom: 1rem; }
.entry-content h2 {
	font-size: 1.75rem;
	margin-top: 3rem;
	padding-top: 0.25rem;
	border-top: 3px solid var(--black);
	padding-top: 0.75rem;
}
.entry-content h2 .section-index {
	display: block;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: var(--red);
	margin-bottom: 0.35rem;
}
.entry-content p { margin: 0 0 1.25rem; }
.entry-content figure { margin: 1.5rem 0 0.35rem; }
.entry-content figcaption {
	font-size: 0.8rem;
	color: var(--gray-mid);
	margin-top: 0.5rem;
}

.entry-footer { max-width: var(--content-width); }
.share-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--gray-mid);
	margin: 2rem 0;
}
.share-bar__label { font-weight: 700; flex-basis: 100%; flex-shrink: 0; font-size: calc(1.375rem + 1.5vw); }
@media (min-width: 1200px) {
	.share-bar__label { font-size: 2.5rem; }
}
.share-bar__btn {
	border: 1px solid var(--black);
	padding: 0.4rem 0.9rem;
	font-size: 0.85rem;
	background: var(--white);
	font-weight: 600;
}
.share-bar__btn:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.author-bio {
	display: flex;
	gap: 1rem;
	padding: 1.75rem;
	background: var(--white);
	border: 1px solid var(--gray-light);
	margin: 2rem 0 3rem;
}
.author-bio img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.author-bio__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-mid); }
.author-bio__name { font-size: 1.1rem; font-weight: 800; margin: 0.15rem 0 0.5rem; }
.author-bio__bio { font-size: 0.92rem; color: #222; margin: 0; }

/* -------------------------------------------------- */
/* Infinite scroll: sentinel + divider between chained articles */
/* -------------------------------------------------- */
.infinite-scroll-sentinel { height: 1px; }
.article-divider {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 2rem 1.25rem 0;
}
.article-divider__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--white);
	background: var(--red);
	padding: 0.5rem 0.9rem;
	width: fit-content;
}
.infinite-scroll-loading {
	text-align: center;
	padding: 2rem 0;
	font-size: 0.85rem;
	color: var(--gray-mid);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* -------------------------------------------------- */
/* Archive grid */
/* -------------------------------------------------- */
.archive-header { max-width: var(--wide-width); margin: 0 auto; padding: 2.5rem 1.25rem 0.5rem; }
.archive-header__title { font-size: 2.25rem; }

.card-grid {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 1.5rem 1.25rem 2.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1.75rem;
}
.card-article__thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--gray-light); }
.card-article__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-article__title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0.75rem 0 0.35rem;
}
.card-article__title a { color: var(--black); }
.card-article__title a:hover { color: var(--red); }
.card-article__author { font-size: 0.8rem; color: var(--gray-mid); text-transform: uppercase; letter-spacing: 0.02em; }

.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem 0 3rem;
}
.pagination a, .pagination span {
	border: 1px solid var(--black);
	padding: 0.4rem 0.8rem;
	font-size: 0.9rem;
}
.pagination .current { background: var(--black); color: var(--white); }

/* -------------------------------------------------- */
/* Footer */
/* -------------------------------------------------- */
.site-footer { background: var(--black); color: var(--white); margin-top: 2rem; padding: 4rem 2rem 2.5rem 2rem; }
.site-footer__logo img { height: 65px; margin-bottom: 1.25rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; font-size: 0.85rem; margin-bottom: 1.5rem; }
.site-footer__links a { color: #ffffff; }
.site-footer__social { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.site-footer__copy { font-size: 0.8rem; margin-bottom: 2rem; }

.newsletter { background: var(--black); color: var(--white); padding: 2rem 1.25rem; text-align: center; }
.newsletter__title { font-size: 1.5rem; margin-bottom: 1rem; }
.newsletter__form { display: flex; max-width: 420px; margin: 0 auto; gap: 0.5rem; }
.newsletter__form input[type="email"] {
	flex: 1; padding: 0.7rem 0.9rem; border: 1px solid var(--gray-mid); font-size: 0.95rem;
}
.newsletter__form button {
	background: var(--red); color: var(--white); border: none; font-weight: 800; padding: 0.7rem 1.1rem; text-transform: uppercase;
}
.newsletter__form button:hover { background: var(--white); color: var(--black); }
.newsletter__note { display: none; font-size: 0.85rem; margin-top: 0.75rem; color: #d7d2c6; }
.newsletter.is-submitted .newsletter__form { display: none; }
.newsletter.is-submitted .newsletter__note { display: block; }

@media (max-width: 480px) {
	.newsletter__form { flex-direction: column; }
}
