/*
Theme Name: mtgdad
Theme URI: https://mtg.dad/
Author: Spurlin LLC
Author URI: https://mtg.dad/
Description: Warm, playful, nostalgic classic theme for mtg.dad — the web home of Reps4Thor MTG. Box lot digs, booster cracks, and returning-player MTG talk from a dad who's back in the game. Multisite-ready, mobile-first, fast. Fan content; not affiliated with Wizards of the Coast.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mtgdad
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready, multisite
*/

/* -------------------------------------------------------------------------
 * Design tokens — retune the brand here.
 * ---------------------------------------------------------------------- */
:root {
	/* Base / surfaces */
	--color-slate:       #1f2329; /* deep charcoal base */
	--color-slate-soft:  #2b313a;
	--color-cream:       #faf4e8; /* content background */
	--color-cream-deep:  #f1e7d3;
	--color-ink:         #20242b; /* body text on cream */
	--color-ink-soft:    #4a5260;

	/* Accent — the "⚡" brand spark */
	--color-vermillion:  #e2522b; /* burnt-orange accent */
	--color-vermillion-d:#c33f1c;
	--color-ember:       #f2a154; /* warm secondary */

	/* Five-color mana pip accents (original, not WotC art) */
	--pip-white: #f6e9c4;
	--pip-blue:  #4a8fc2;
	--pip-black: #4b4453;
	--pip-red:   #d8503a;
	--pip-green: #5a9a5c;

	/* Functional */
	--color-link:        var(--color-vermillion-d);
	--color-link-hover:  var(--color-vermillion);
	--color-border:      #e0d4bd;
	--color-focus:       #1d6fb8;

	/* Typography */
	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--fw-body:      400;
	--fw-bold:      600;
	--fw-display:   600;

	/* Rhythm */
	--maxw-content: 46rem;
	--maxw-wide:    72rem;
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2rem;
	--space-5: 3rem;
	--space-6: 4.5rem;
	--radius:   10px;
	--radius-lg: 16px;
	--shadow:   0 2px 8px rgba(31, 35, 41, 0.08);
	--shadow-lg: 0 12px 32px rgba(31, 35, 41, 0.16);
}

/* -------------------------------------------------------------------------
 * Reset-ish base
 * ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-weight: var(--fw-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--color-ink);
	background: var(--color-cream);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }

a {
	color: var(--color-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}
a:hover, a:focus { color: var(--color-link-hover); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: var(--fw-display);
	line-height: 1.15;
	color: var(--color-slate);
	margin: 0 0 var(--space-2);
	font-optical-sizing: auto;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 var(--space-2); }

/* -------------------------------------------------------------------------
 * Accessibility helpers
 * ---------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px; width: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--color-slate);
	color: #fff;
	padding: var(--space-1) var(--space-2);
	border-radius: 0 0 var(--radius) 0;
	text-decoration: none;
}
.skip-link:focus {
	left: 0;
	color: #fff;
}
:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
 * Layout containers
 * ---------------------------------------------------------------------- */
.mtgdad-container { width: min(100% - 2rem, var(--maxw-wide)); margin-inline: auto; }
.mtgdad-content   { width: min(100% - 2rem, var(--maxw-content)); margin-inline: auto; }

.site-main { padding-block: var(--space-5); }

.content-sidebar-wrap {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: 1fr;
}
@media (min-width: 60rem) {
	.has-sidebar .content-sidebar-wrap {
		grid-template-columns: minmax(0, 1fr) 18rem;
	}
}

/* -------------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------------- */
.site-header {
	background: var(--color-slate);
	color: var(--color-cream);
	border-bottom: 4px solid var(--color-vermillion);
}
.site-header a { color: var(--color-cream); }
.site-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	padding-block: var(--space-2);
}
.site-branding { display: flex; align-items: center; gap: var(--space-1); }
.custom-logo-link img { max-height: 56px; width: auto; }

.site-title {
	font-family: var(--font-display);
	font-size: 1.75rem;
	font-weight: 600;
	margin: 0;
	letter-spacing: -0.01em;
}
.site-title a { text-decoration: none; }
.wordmark-dot {
	display: inline-block;
	width: 0.5em; height: 0.5em;
	border-radius: 50%;
	background: var(--color-vermillion);
	margin-left: 1px;
	vertical-align: baseline;
}
.site-description {
	margin: 0;
	font-size: 0.85rem;
	color: var(--color-cream-deep);
	opacity: 0.85;
}

/* Primary nav */
.main-navigation { margin-left: auto; }
.main-navigation ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}
.main-navigation a {
	text-decoration: none;
	font-weight: var(--fw-bold);
	font-size: 0.95rem;
	padding-block: var(--space-1);
	border-bottom: 2px solid transparent;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	border-bottom-color: var(--color-vermillion);
}

.menu-toggle {
	display: none;
	background: transparent;
	border: 2px solid var(--color-cream-deep);
	color: var(--color-cream);
	border-radius: var(--radius);
	padding: 0.4rem 0.7rem;
	font: inherit;
	font-weight: var(--fw-bold);
	cursor: pointer;
}
@media (max-width: 48rem) {
	.menu-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
	.main-navigation .primary-menu {
		display: none;
		flex-direction: column;
		width: 100%;
		gap: 0;
		margin-top: var(--space-2);
	}
	.main-navigation.toggled .primary-menu { display: flex; }
	.main-navigation { width: 100%; }
	.main-navigation .primary-menu li { border-top: 1px solid var(--color-slate-soft); }
	.main-navigation .primary-menu a { display: block; padding: var(--space-2) 0; }
}

/* -------------------------------------------------------------------------
 * Mana pip row (decorative, original)
 * ---------------------------------------------------------------------- */
.mana-pips { display: inline-flex; gap: 6px; align-items: center; }
.mana-pips .pip {
	width: 14px; height: 14px;
	border-radius: 50%;
	display: inline-block;
	box-shadow: inset 0 0 0 2px rgba(0,0,0,0.12);
}
.pip.white { background: var(--pip-white); }
.pip.blue  { background: var(--pip-blue); }
.pip.black { background: var(--pip-black); }
.pip.red   { background: var(--pip-red); }
.pip.green { background: var(--pip-green); }

/* -------------------------------------------------------------------------
 * Hero (front page)
 * ---------------------------------------------------------------------- */
.hero {
	background:
		radial-gradient(120% 140% at 100% 0%, var(--color-slate-soft) 0%, var(--color-slate) 55%);
	color: var(--color-cream);
	padding-block: var(--space-6);
	border-bottom: 4px solid var(--color-vermillion);
}
.hero h1 { color: var(--color-cream); margin-bottom: var(--space-2); }
.hero .hero-spark { color: var(--color-ember); }
.hero-tagline { font-size: 1.25rem; max-width: 38rem; color: var(--color-cream-deep); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

.button, .btn {
	display: inline-block;
	background: var(--color-vermillion);
	color: #fff;
	text-decoration: none;
	font-weight: var(--fw-bold);
	padding: 0.7rem 1.3rem;
	border-radius: var(--radius);
	border: 0;
	cursor: pointer;
	transition: background 120ms ease, transform 120ms ease;
}
.button:hover, .btn:hover { background: var(--color-vermillion-d); color: #fff; transform: translateY(-1px); }
.button.is-ghost {
	background: transparent;
	border: 2px solid var(--color-cream-deep);
	color: var(--color-cream);
}
.button.is-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* -------------------------------------------------------------------------
 * Section headings
 * ---------------------------------------------------------------------- */
.home-section { padding-block: var(--space-5); }
.home-section:nth-of-type(even) { background: var(--color-cream-deep); }
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-2);
	flex-wrap: wrap;
	margin-bottom: var(--space-3);
}
.section-head h2 { margin: 0; }
.section-head .section-more { font-weight: var(--fw-bold); white-space: nowrap; }

/* -------------------------------------------------------------------------
 * Card grids
 * ---------------------------------------------------------------------- */
.card-grid {
	display: grid;
	gap: var(--space-3);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	transition: transform 140ms ease, box-shadow 140ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .card-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-cream-deep); }
.card .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: var(--space-2) var(--space-3) var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.card .card-title { font-size: 1.15rem; margin: 0; }
.card .card-title a { text-decoration: none; color: var(--color-slate); }
.card .card-title a:hover { color: var(--color-link-hover); }
.card .card-meta { font-size: 0.8rem; color: var(--color-ink-soft); margin: 0; }
.card .card-excerpt { font-size: 0.92rem; color: var(--color-ink-soft); margin: 0; }

/* Card-frame-inspired border accent (original) */
.card.is-framed { border: 2px solid var(--color-slate); box-shadow: var(--shadow); }

/* Verdict rating stars */
.verdict-rating { display: inline-flex; gap: 2px; color: var(--color-vermillion); font-size: 0.95rem; letter-spacing: 1px; }
.verdict-rating .star-empty { color: var(--color-border); }

/* Pill badges (set / format / product type) */
.badge {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--color-cream-deep);
	color: var(--color-ink-soft);
	text-decoration: none;
}
.badge.is-accent { background: var(--color-vermillion); color: #fff; }

/* -------------------------------------------------------------------------
 * Single / article body
 * ---------------------------------------------------------------------- */
.entry-header { margin-bottom: var(--space-3); }
.entry-meta { font-size: 0.85rem; color: var(--color-ink-soft); display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.entry-meta a { color: inherit; }
.entry-thumbnail { margin: var(--space-3) 0; border-radius: var(--radius-lg); overflow: hidden; }

.entry-content { font-size: 1.075rem; }
.entry-content > * { margin-bottom: var(--space-3); }
.entry-content h2, .entry-content h3 { margin-top: var(--space-4); }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
	margin: var(--space-3) 0;
	padding: var(--space-2) var(--space-3);
	border-left: 4px solid var(--color-vermillion);
	background: var(--color-cream-deep);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: italic;
}
.entry-content pre {
	background: var(--color-slate);
	color: var(--color-cream);
	padding: var(--space-2);
	border-radius: var(--radius);
	overflow-x: auto;
}
.entry-content code { font-size: 0.9em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

/* Stat strip for box_lot / pack_crack */
.entry-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
	gap: var(--space-2);
	margin: var(--space-3) 0;
	padding: var(--space-3);
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}
.entry-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.entry-stats .stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-ink-soft); }
.entry-stats .stat-value { font-family: var(--font-display); font-size: 1.25rem; color: var(--color-slate); }

/* Responsive video wrapper */
.mtgdad-video-embed { position: relative; aspect-ratio: 16 / 9; margin: var(--space-3) 0; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.mtgdad-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Taxonomy term links */
.entry-terms { margin: var(--space-3) 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }

/* Post navigation */
.post-navigation { margin: var(--space-5) 0; display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.post-navigation a { text-decoration: none; font-weight: var(--fw-bold); }

/* -------------------------------------------------------------------------
 * Archive / search list
 * ---------------------------------------------------------------------- */
.page-header { margin-bottom: var(--space-4); }
.archive-description { color: var(--color-ink-soft); }

.pagination { margin-top: var(--space-5); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-1); justify-content: center; }
.pagination .page-numbers {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: var(--radius);
	background: #fff;
	border: 1px solid var(--color-border);
	text-decoration: none;
}
.pagination .page-numbers.current { background: var(--color-vermillion); color: #fff; border-color: var(--color-vermillion); }

/* -------------------------------------------------------------------------
 * Sidebar / widgets
 * ---------------------------------------------------------------------- */
.widget { margin-bottom: var(--space-4); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-3); }
.widget-title { font-size: 1.15rem; margin-top: 0; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: var(--space-1) 0; border-bottom: 1px dashed var(--color-border); }
.widget ul li:last-child { border-bottom: 0; }

/* -------------------------------------------------------------------------
 * Comments
 * ---------------------------------------------------------------------- */
.comments-area { margin-top: var(--space-5); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { margin-bottom: var(--space-3); }
.comment-body { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-3); }
.comment-list .children { list-style: none; margin-left: var(--space-3); padding-left: var(--space-2); border-left: 2px solid var(--color-border); }
.comment-author .avatar { border-radius: 50%; margin-right: var(--space-1); vertical-align: middle; }
.comment-respond { margin-top: var(--space-4); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font: inherit;
	background: #fff;
}

/* -------------------------------------------------------------------------
 * Forms (shared) — newsletter, search
 * ---------------------------------------------------------------------- */
.search-form { display: flex; gap: var(--space-1); }
.search-form .search-field {
	flex: 1;
	padding: 0.6rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font: inherit;
}

.mtgdad-signup { background: var(--color-slate); color: var(--color-cream); padding: var(--space-3); border-radius: var(--radius-lg); }
.mtgdad-signup h3 { color: var(--color-cream); margin-top: 0; }
.mtgdad-signup p { color: var(--color-cream-deep); }
.mtgdad-signup form { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.mtgdad-signup input[type="email"] {
	flex: 1 1 12rem;
	padding: 0.6rem;
	border: 0;
	border-radius: var(--radius);
	font: inherit;
}
.mtgdad-signup .mtgdad-hp { position: absolute; left: -9999px; }
.mtgdad-notice { padding: var(--space-1) var(--space-2); border-radius: var(--radius); margin-top: var(--space-2); }
.mtgdad-notice.is-success { background: var(--pip-green); color: #fff; }
.mtgdad-notice.is-error { background: var(--color-vermillion-d); color: #fff; }

/* -------------------------------------------------------------------------
 * CTA + disclosure
 * ---------------------------------------------------------------------- */
.returning-player-cta {
	background: linear-gradient(110% 140% at 0 0, var(--color-vermillion) 0%, var(--color-ember) 100%);
	color: #fff;
	padding: var(--space-4);
	border-radius: var(--radius-lg);
	text-align: center;
	margin: var(--space-4) 0;
}
.returning-player-cta h3 { color: #fff; }
.returning-player-cta .btn { background: var(--color-slate); }
.returning-player-cta .btn:hover { background: #000; }

.affiliate-disclosure {
	font-size: 0.85rem;
	color: var(--color-ink-soft);
	background: var(--color-cream-deep);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius);
	padding: var(--space-2);
	margin: var(--space-3) 0;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */
.site-footer {
	background: var(--color-slate);
	color: var(--color-cream-deep);
	margin-top: var(--space-6);
	padding-block: var(--space-5) var(--space-3);
	border-top: 4px solid var(--color-vermillion);
}
.site-footer a { color: var(--color-cream); }
.footer-cols {
	display: grid;
	gap: var(--space-4);
	grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .footer-cols { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-brand .site-title { color: var(--color-cream); }
.footer-menu ul { list-style: none; margin: 0; padding: 0; }
.footer-menu li { padding: 0.2rem 0; }
.social-links { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.social-links a { font-weight: var(--fw-bold); text-decoration: none; }
.site-info {
	margin-top: var(--space-4);
	padding-top: var(--space-3);
	border-top: 1px solid var(--color-slate-soft);
	font-size: 0.82rem;
	color: var(--color-cream-deep);
	opacity: 0.85;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Utilities
 * ---------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sticky { background: var(--color-cream-deep); }
.alignwide { width: min(100% - 2rem, var(--maxw-wide)); margin-inline: auto; }
.alignfull { width: 100%; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
