/*
Theme Name: SportMapz
Theme URI: https://sportmapz.com
Author: Geocadder
Author URI: https://geocadder.bg
Description: Cartographic theme for SportMapz — sells subscription access to interactive sports maps. Built to pair with the SportMapz Core plugin.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sportmapz
*/

/* ==========================================================================
   Tokens
   Palette reads off a printed topographic sheet: paper, contour green,
   ink, and a single lane-marker amber used only where a decision is made.
   ========================================================================== */

:root {
	--smz-ink: #101a1e;
	--smz-ink-2: #3a4a50;
	--smz-paper: #edf0e9;
	--smz-surface: #ffffff;
	--smz-turf: #245c43;
	--smz-turf-dark: #17402e;
	--smz-lane: #e8b93b;
	--smz-line: rgba(16, 26, 30, 0.12);
	--smz-radius: 3px;

	--smz-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
	--smz-body: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
	--smz-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

	--smz-wrap: 74rem;
	--smz-gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--smz-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--smz-ink);
	background: var(--smz-paper);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--smz-turf);
	text-underline-offset: 0.2em;
}

h1,
h2,
h3,
h4 {
	font-family: var(--smz-display);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.08;
	margin: 0 0 0.6em;
}

:focus-visible {
	outline: 2px solid var(--smz-lane);
	outline-offset: 3px;
}

.smz-wrap {
	max-width: var(--smz-wrap);
	margin: 0 auto;
	padding-inline: var(--smz-gutter);
}

.smz-skip {
	position: absolute;
	left: -9999px;
}

.smz-skip:focus {
	left: 1rem;
	top: 1rem;
	z-index: 100;
	background: var(--smz-ink);
	color: var(--smz-paper);
	padding: 0.75rem 1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(237, 240, 233, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--smz-line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 4.5rem;
}

.site-brand {
	font-family: var(--smz-display);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.04em;
	text-decoration: none;
	color: var(--smz-ink);
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

.site-brand__mark {
	width: 1.4rem;
	height: 1.4rem;
	flex: none;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.75rem;
}

.site-nav ul {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav a {
	font-size: 0.9375rem;
	text-decoration: none;
	color: var(--smz-ink);
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
	color: var(--smz-turf);
}

.site-nav__toggle {
	display: none;
	background: none;
	border: 1px solid var(--smz-line);
	border-radius: var(--smz-radius);
	padding: 0.55rem 0.8rem;
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	color: var(--smz-ink);
}

@media (max-width: 860px) {
	.site-nav__toggle {
		display: block;
	}
	.site-nav {
		position: absolute;
		inset: 100% 0 auto;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--smz-surface);
		border-bottom: 1px solid var(--smz-line);
		padding: 1rem var(--smz-gutter) 1.5rem;
	}
	.site-nav[hidden] {
		display: none;
	}
	.site-nav ul {
		flex-direction: column;
		gap: 0;
	}
	.site-nav li {
		border-bottom: 1px solid var(--smz-line);
	}
	.site-nav a {
		display: block;
		padding: 0.9rem 0;
	}
	.site-nav .smz-btn {
		margin-top: 1rem;
	}
}

/* ==========================================================================
   Hero — the signature: live contour field behind a stacked wordmark
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	background: var(--smz-ink);
	color: var(--smz-paper);
	padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
}

.hero__contours {
	position: absolute;
	inset: -10% -5%;
	width: 110%;
	height: 120%;
	opacity: 0.4;
	pointer-events: none;
}

.hero__contours path {
	fill: none;
	stroke: var(--smz-turf);
	stroke-width: 1.1;
	stroke-dasharray: 1400;
	stroke-dashoffset: 1400;
	animation: contour-draw 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__contours path:nth-child(even) {
	stroke: rgba(232, 185, 59, 0.55);
}

@keyframes contour-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__contours path {
		animation: none;
		stroke-dashoffset: 0;
	}
}

.hero__inner {
	position: relative;
	max-width: 46rem;
}

.hero__eyebrow {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--smz-lane);
	margin: 0 0 1.25rem;
}

.hero__title {
	font-size: clamp(2.6rem, 8vw, 5.2rem);
	letter-spacing: -0.045em;
	line-height: 0.94;
	margin: 0 0 1.25rem;
}

.hero__title em {
	font-style: normal;
	color: var(--smz-lane);
}

.hero__lede {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: rgba(237, 240, 233, 0.78);
	max-width: 34rem;
	margin: 0 0 2rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
}

.hero .smz-btn {
	border-color: rgba(237, 240, 233, 0.35);
	color: var(--smz-paper);
}

.hero .smz-btn:hover {
	background: var(--smz-paper);
	color: var(--smz-ink);
}

.hero .smz-btn--primary {
	background: var(--smz-lane);
	border-color: var(--smz-lane);
	color: var(--smz-ink);
}

.hero .smz-btn--primary:hover {
	background: #f2ca5c;
	border-color: #f2ca5c;
	color: var(--smz-ink);
}

.hero__stats {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 2.5rem;
	margin-top: clamp(3rem, 7vw, 4.5rem);
	padding-top: 1.75rem;
	border-top: 1px solid rgba(237, 240, 233, 0.18);
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(237, 240, 233, 0.6);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
	padding: clamp(3.5rem, 9vw, 6rem) 0;
}

.section--surface {
	background: var(--smz-surface);
	border-block: 1px solid var(--smz-line);
}

.section__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 2rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}

.section__title {
	font-size: clamp(1.7rem, 4vw, 2.5rem);
	margin: 0;
	max-width: 22ch;
}

.section__lede {
	color: var(--smz-ink-2);
	max-width: 34rem;
	margin: 0.75rem 0 0;
}

/* Category strip — each row states what the package actually contains */

.cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--smz-line);
}

.cat-list li {
	border-bottom: 1px solid var(--smz-line);
}

.cat-list a {
	display: grid;
	grid-template-columns: 4rem 1fr auto;
	align-items: baseline;
	gap: 1.5rem;
	padding: 1.5rem 0.25rem;
	text-decoration: none;
	color: inherit;
}

.cat-list a:hover .cat-list__name {
	color: var(--smz-turf);
}

.cat-list__index {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	color: var(--smz-ink-2);
}

.cat-list__name {
	font-family: var(--smz-display);
	font-size: clamp(1.2rem, 3vw, 1.75rem);
	letter-spacing: -0.02em;
}

.cat-list__tagline {
	display: block;
	font-family: var(--smz-body);
	font-size: 0.9375rem;
	letter-spacing: 0;
	color: var(--smz-ink-2);
	margin-top: 0.3rem;
}

.cat-list__meta {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	color: var(--smz-ink-2);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.cat-list a {
		grid-template-columns: 2.5rem 1fr;
	}
	.cat-list__meta {
		grid-column: 2;
	}
}

/* How it works */

.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 2rem;
}

.step__number {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	color: var(--smz-turf);
	display: block;
	margin-bottom: 0.75rem;
}

.step h3 {
	font-size: 1.15rem;
	margin-bottom: 0.4rem;
}

.step p {
	color: var(--smz-ink-2);
	margin: 0;
	font-size: 0.9375rem;
}

/* ==========================================================================
   Single map
   ========================================================================== */

.map-header {
	padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
}

.map-header__meta {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--smz-ink-2);
	margin: 0 0 0.9rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.map-header__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	margin: 0 0 0.75rem;
	max-width: 20ch;
}

.map-header__lede {
	font-size: 1.1rem;
	color: var(--smz-ink-2);
	max-width: 42rem;
	margin: 0;
}

.map-body {
	padding-bottom: clamp(3rem, 8vw, 5rem);
}

.map-body__content {
	max-width: 42rem;
	margin-top: 2.5rem;
}

.map-body__content h2,
.map-body__content h3 {
	margin-top: 2rem;
}

/* Archive filters */

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
}

.filters a {
	font-family: var(--smz-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--smz-ink-2);
	border: 1px solid var(--smz-line);
	border-radius: 2px;
	padding: 0.5rem 0.8rem;
}

.filters a:hover,
.filters a[aria-current='page'] {
	background: var(--smz-ink);
	border-color: var(--smz-ink);
	color: var(--smz-paper);
}

/* ==========================================================================
   Page + footer
   ========================================================================== */

.page-content {
	padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem);
}

.page-content__narrow {
	max-width: 44rem;
}

.site-footer {
	background: var(--smz-ink);
	color: rgba(237, 240, 233, 0.72);
	padding: clamp(3rem, 7vw, 4.5rem) 0 2rem;
	font-size: 0.9375rem;
}

.site-footer a {
	color: rgba(237, 240, 233, 0.72);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--smz-lane);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(auto-fit, minmax(9rem, 1fr));
	gap: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(237, 240, 233, 0.15);
}

.site-footer h4 {
	font-family: var(--smz-mono);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(237, 240, 233, 0.5);
	margin: 0 0 1rem;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer li {
	margin-bottom: 0.6rem;
}

.site-footer__brand {
	font-family: var(--smz-display);
	font-size: 1.4rem;
	color: var(--smz-paper);
	letter-spacing: -0.03em;
	margin: 0 0 0.75rem;
}

.site-footer__legal {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-top: 1.5rem;
	font-family: var(--smz-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(237, 240, 233, 0.45);
}

.pagination {
	margin-top: 3rem;
	font-family: var(--smz-mono);
	font-size: 0.8125rem;
}

.pagination .page-numbers {
	padding: 0.5rem 0.75rem;
	text-decoration: none;
	border: 1px solid var(--smz-line);
	color: var(--smz-ink);
}

.pagination .current {
	background: var(--smz-ink);
	color: var(--smz-paper);
	border-color: var(--smz-ink);
}
