/*
Theme Name: GamePulse
Theme URI: https://example.com/gamepulse
Author: GamePulse
Description: A bright, energetic WordPress theme for online game news, reviews and patch notes. Classic PHP theme with no build step. Colors, layout and the homepage hero are editable from Appearance > Customize.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamepulse
Tags: blog, news, one-column, two-columns, right-sidebar, custom-colors, custom-menu, custom-logo, featured-images, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   1. Design tokens

   Values marked (customizer) are overwritten inline in <head> by
   gamepulse_customizer_css() in functions.php. Never hardcode a color
   anywhere else in this file -- always reference a token.
   ========================================================================== */

:root {
	--gp-bg: #0f1020;          /* customizer */
	--gp-surface: #191a33;     /* customizer */
	--gp-text: #eef0ff;        /* customizer */
	--gp-primary: #7c3cff;     /* customizer */
	--gp-accent: #00e0b8;      /* customizer */
	--gp-hot: #ff3d81;         /* customizer */
	--gp-radius: 16px;         /* customizer */

	/* Derived -- computed from the six base colors, never set directly. */
	--gp-surface-2: color-mix(in srgb, var(--gp-surface) 84%, var(--gp-text));
	--gp-muted: color-mix(in srgb, var(--gp-text) 64%, var(--gp-bg));
	--gp-faint: color-mix(in srgb, var(--gp-text) 40%, var(--gp-bg));
	--gp-border: color-mix(in srgb, var(--gp-text) 14%, transparent);
	--gp-border-strong: color-mix(in srgb, var(--gp-text) 28%, transparent);
	--gp-on-primary: #ffffff;
	--gp-on-accent: #06131a;

	--gp-radius-sm: max(4px, calc(var(--gp-radius) * 0.45));
	--gp-radius-pill: 999px;

	--gp-shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 12px 32px -12px rgba(0, 0, 0, .55);
	--gp-shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -16px rgba(0, 0, 0, .65);

	--gp-font-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
	--gp-font-body: "Rubik", "Segoe UI", system-ui, -apple-system, sans-serif;

	--gp-wrap: 1200px;
	--gp-wrap-narrow: 760px;
	--gp-gap: clamp(1rem, 2.4vw, 1.75rem);
	--gp-section-y: clamp(2.5rem, 6vw, 4.5rem);

	--gp-ease: cubic-bezier(.2, .7, .3, 1);
	--gp-dur: .28s;

	color-scheme: dark;
}

/* Light palette. Applied when the visitor flips the header toggle, or when
   the Customizer default scheme is set to light. Only the base tokens are
   redefined -- every derived token recalculates from them. */
[data-theme="light"] {
	--gp-bg: #f6f5ff;
	--gp-surface: #ffffff;
	--gp-text: #16142b;
	--gp-shadow: 0 1px 2px rgba(24, 20, 60, .06), 0 12px 30px -14px rgba(24, 20, 60, .28);
	--gp-shadow-lift: 0 2px 6px rgba(24, 20, 60, .1), 0 26px 50px -18px rgba(24, 20, 60, .34);
	color-scheme: light;
}

/* ==========================================================================
   2. Reset + base elements
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

body {
	margin: 0;
	background: var(--gp-bg);
	color: var(--gp-text);
	font-family: var(--gp-font-body);
	font-size: 1rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* One soft aurora behind everything. Static -- the only moving gradient is
   in the hero, so the whole page does not shimmer. */
body::before {
	content: "";
	position: fixed;
	inset: -20vh -10vw auto;
	height: 70vh;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(48% 60% at 18% 0%, color-mix(in srgb, var(--gp-primary) 28%, transparent), transparent 70%),
		radial-gradient(42% 55% at 82% 6%, color-mix(in srgb, var(--gp-accent) 20%, transparent), transparent 70%);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--gp-font-head);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gp-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .22em; }

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

figure { margin: 0 0 1.5em; }

ul, ol { padding-left: 1.35em; }

code, pre, kbd {
	font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
	font-size: .92em;
}

code {
	background: var(--gp-surface-2);
	border-radius: var(--gp-radius-sm);
	padding: .15em .45em;
}

pre {
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
	padding: 1.15rem 1.25rem;
	overflow-x: auto;
}
pre code { background: none; padding: 0; }

blockquote {
	margin: 1.75rem 0;
	padding: .25rem 0 .25rem 1.35rem;
	border-left: 4px solid var(--gp-hot);
	color: var(--gp-muted);
	font-size: 1.075em;
}

hr {
	border: 0;
	height: 1px;
	background: var(--gp-border);
	margin: 2.5rem 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}
th, td { border: 1px solid var(--gp-border); padding: .6rem .8rem; text-align: left; }
th { background: var(--gp-surface-2); font-family: var(--gp-font-head); }

/* Focus. Always visible -- never removed. */
:focus-visible {
	outline: 3px solid var(--gp-accent);
	outline-offset: 3px;
	border-radius: var(--gp-radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 999;
	background: var(--gp-primary);
	color: var(--gp-on-primary);
	padding: .7rem 1.15rem;
	border-radius: var(--gp-radius-sm);
	font-family: var(--gp-font-head);
	font-weight: 600;
	transition: top var(--gp-dur) var(--gp-ease);
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ==========================================================================
   3. Layout helpers
   ========================================================================== */

.gp-wrap { width: min(100% - 2.5rem, var(--gp-wrap)); margin-inline: auto; }
.gp-wrap--narrow { width: min(100% - 2.5rem, var(--gp-wrap-narrow)); }

.gp-section { padding-block: var(--gp-section-y); }

.gp-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: calc(var(--gp-gap) * 1.1);
}

.gp-section-head h2 { margin: 0; }

/* The gradient tick above every section title. */
.gp-section-head h2::before {
	content: "";
	display: block;
	width: 46px;
	height: 4px;
	margin-bottom: .6rem;
	border-radius: var(--gp-radius-pill);
	background: linear-gradient(90deg, var(--gp-primary), var(--gp-hot));
}

.gp-section-head .gp-more {
	font-family: var(--gp-font-head);
	font-weight: 600;
	font-size: .95rem;
	color: var(--gp-accent);
	white-space: nowrap;
}

.gp-layout { display: grid; gap: calc(var(--gp-gap) * 1.5); align-items: start; }
.gp-layout--sidebar { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1000px) {
	.gp-layout--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ==========================================================================
   4. Buttons, chips, badges
   ========================================================================== */

.gp-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1.4rem;
	border: 0;
	border-radius: var(--gp-radius-pill);
	font-family: var(--gp-font-head);
	font-weight: 700;
	font-size: .97rem;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: transform var(--gp-dur) var(--gp-ease),
	            box-shadow var(--gp-dur) var(--gp-ease),
	            color var(--gp-dur) var(--gp-ease);
}
.gp-btn:hover { text-decoration: none; transform: translateY(-2px); }

.gp-btn--primary {
	background: linear-gradient(120deg, var(--gp-primary), var(--gp-hot));
	color: var(--gp-on-primary);
	box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--gp-primary) 90%, transparent);
}
.gp-btn--primary:hover {
	box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--gp-hot) 85%, transparent);
}

.gp-btn--ghost {
	background: transparent;
	color: var(--gp-text);
	box-shadow: inset 0 0 0 2px var(--gp-border-strong);
}
.gp-btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--gp-accent); color: var(--gp-accent); }

.gp-btn--block { width: 100%; justify-content: center; }

/* Category chip -- card meta, homepage filter row, single-post header. */
.gp-chip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .32rem .8rem;
	border-radius: var(--gp-radius-pill);
	background: color-mix(in srgb, var(--gp-hot) 16%, transparent);
	color: var(--gp-hot);
	font-family: var(--gp-font-head);
	font-weight: 600;
	font-size: .74rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--gp-dur) var(--gp-ease), color var(--gp-dur) var(--gp-ease);
}
.gp-chip:hover { background: var(--gp-hot); color: var(--gp-on-primary); text-decoration: none; }

.gp-chip--accent {
	background: color-mix(in srgb, var(--gp-accent) 16%, transparent);
	color: var(--gp-accent);
}
.gp-chip--accent:hover { background: var(--gp-accent); color: var(--gp-on-accent); }

.gp-chip[aria-current="page"] { background: var(--gp-primary); color: var(--gp-on-primary); }

/* Live badge -- the one pulsing element on the page. */
.gp-badge {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .38rem .9rem;
	border-radius: var(--gp-radius-pill);
	background: color-mix(in srgb, var(--gp-hot) 14%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gp-hot) 40%, transparent);
	color: var(--gp-hot);
	font-family: var(--gp-font-head);
	font-weight: 700;
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.gp-badge__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gp-hot);
	animation: gp-pulse 2s var(--gp-ease) infinite;
}

@keyframes gp-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gp-hot) 70%, transparent); }
	70%  { box-shadow: 0 0 0 9px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

/* ==========================================================================
   5. Header + navigation
   ========================================================================== */

.gp-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--gp-bg) 82%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--gp-dur) var(--gp-ease),
	            background-color var(--gp-dur) var(--gp-ease);
}

/* main.js adds .is-stuck once the page scrolls past 8px. */
.gp-header.is-stuck {
	border-bottom-color: var(--gp-border);
	background: color-mix(in srgb, var(--gp-bg) 92%, transparent);
}

.gp-header__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 72px;
}

/* Brand and nav sit together on the left; the auto margin lives on the
   actions instead, so the menu stays next to the logo rather than being
   pushed to the far edge. */
.gp-brand { display: flex; align-items: center; }

.gp-brand__link {
	display: flex;
	align-items: center;
	gap: .65rem;
	color: inherit;
	text-decoration: none;
	min-width: 0;
}
.gp-brand__link:hover { text-decoration: none; }

/* The icon is independent of the logo -- either, both or neither. */
.gp-brand__icon {
	width: var(--gp-brand-icon, 36px);
	height: var(--gp-brand-icon, 36px);
	object-fit: contain;
	flex-shrink: 0;
	border-radius: var(--gp-radius-sm);
}

.gp-brand__logo { max-height: 46px; width: auto; }

.gp-brand__names { display: grid; min-width: 0; }

.gp-brand__title {
	font-family: var(--gp-font-head);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: -.02em;
	line-height: 1.15;
	background: linear-gradient(100deg, var(--gp-text), var(--gp-accent));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.gp-brand__tagline {
	font-size: .78rem;
	color: var(--gp-faint);
	line-height: 1.25;
}

.gp-nav { margin-left: clamp(.75rem, 2vw, 1.75rem); }

.gp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .2rem; }

.gp-nav li { position: relative; }

.gp-nav a {
	display: block;
	padding: .55rem .85rem;
	border-radius: var(--gp-radius-sm);
	color: var(--gp-text);
	font-family: var(--gp-font-head);
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	transition: color var(--gp-dur) var(--gp-ease), background-color var(--gp-dur) var(--gp-ease);
}
.gp-nav a:hover { color: var(--gp-accent); background: var(--gp-surface); text-decoration: none; }

.gp-nav .current-menu-item > a,
.gp-nav .current_page_item > a,
.gp-nav .current-menu-ancestor > a { color: var(--gp-accent); }

/* Submenus */
.gp-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: .4rem;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius-sm);
	box-shadow: var(--gp-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--gp-dur) var(--gp-ease),
	            transform var(--gp-dur) var(--gp-ease),
	            visibility var(--gp-dur);
}
.gp-nav li:hover > .sub-menu,
.gp-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.gp-header__actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }

.gp-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius-sm);
	background: transparent;
	color: var(--gp-text);
	cursor: pointer;
	transition: border-color var(--gp-dur) var(--gp-ease),
	            color var(--gp-dur) var(--gp-ease),
	            background-color var(--gp-dur) var(--gp-ease);
}
.gp-icon-btn:hover { border-color: var(--gp-accent); color: var(--gp-accent); background: var(--gp-surface); }
.gp-icon-btn svg { width: 20px; height: 20px; }

/* The theme toggle swaps which icon is visible. */
.gp-theme-toggle .gp-icon-moon { display: none; }
[data-theme="light"] .gp-theme-toggle .gp-icon-moon { display: block; }
[data-theme="light"] .gp-theme-toggle .gp-icon-sun { display: none; }

.gp-nav-toggle { display: none; }

/* The two configurable header buttons. End of the header row on wide screens;
   their own full-width line on narrow ones. */
.gp-header__cta { display: flex; align-items: center; gap: .5rem; margin-left: .35rem; }

.gp-btn--sm { padding: .6rem 1.05rem; font-size: .88rem; }

/* The menu panel's copy of the light/dark control, and its text label, are
   both desktop-hidden — up there the icon button in the action bar is the one
   that shows. */
.gp-nav__tools { display: none; }
.gp-theme-toggle__label { display: none; }

/* Mobile navigation */
@media (max-width: 899px) {
	.gp-nav-toggle { display: inline-grid; }

	/* The header row wraps here so the partner buttons get their own line.
	   Height comes from the padding and the rows themselves rather than the
	   desktop min-height, so the two rows sit evenly inside the bar. */
	.gp-header__inner {
		flex-wrap: wrap;
		min-height: 0;
		padding-block: .8rem;
		row-gap: .8rem;
	}

	.gp-brand { flex: 1; min-width: 0; }
	.gp-brand__title { font-size: 1.2rem; }

	/* Positioned against the header rather than the viewport, so the panel
	   still starts flush below it once the header grows to two rows. */
	.gp-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin-left: 0;
		max-height: 72dvh;
		overflow-y: auto;
		padding: 1rem 1.25rem 2rem;
		background: var(--gp-bg);
		border-bottom: 1px solid var(--gp-border);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity var(--gp-dur) var(--gp-ease),
		            transform var(--gp-dur) var(--gp-ease),
		            visibility var(--gp-dur);
	}
	.gp-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

	.gp-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.gp-nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--gp-border); border-radius: 0; }

	.gp-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding: 0 0 0 1rem;
		background: transparent;
	}

	/* The swap: partner buttons take the header bar, the light/dark control
	   moves into the menu panel. */
	.gp-header__cta {
		order: 5;
		flex-basis: 100%;
		margin: 0;
		gap: .6rem;
	}
	/* Equal halves, and tall enough to be a comfortable tap target. */
	.gp-header__cta .gp-btn {
		flex: 1;
		min-width: 0;
		justify-content: center;
		padding: .78rem 1rem;
	}

	.gp-header__actions .gp-theme-toggle { display: none; }

	.gp-nav__tools { display: block; margin-top: 1.1rem; }
	.gp-theme-toggle--nav {
		width: 100%;
		gap: .6rem;
		grid-auto-flow: column;
		justify-content: center;
		height: 46px;
	}
	.gp-theme-toggle__label {
		display: inline;
		font-family: var(--gp-font-head);
		font-weight: 600;
		font-size: .92rem;
	}
}

/* Just above the nav breakpoint the header gets tight. Tighten the menu
   rather than dropping a button — a hidden button is an unreachable one,
   since the mobile panel that would carry it is not active at this width. */
@media (min-width: 900px) and (max-width: 1120px) {
	.gp-nav { margin-left: .5rem; min-width: 0; }
	.gp-nav > ul { overflow-x: auto; scrollbar-width: none; }
	.gp-nav > ul::-webkit-scrollbar { display: none; }
	.gp-nav a { padding-inline: .55rem; font-size: .9rem; }
	.gp-btn--sm { padding: .55rem .85rem; font-size: .84rem; }
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.gp-hero {
	position: relative;
	overflow: hidden;
	border-radius: calc(var(--gp-radius) * 1.5);
	margin-top: clamp(1.25rem, 3vw, 2.25rem);
	padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
	background: var(--gp-surface);
	box-shadow: var(--gp-shadow);
	isolation: isolate;
}

/* The slow-drifting gradient. The single ambient animation on the site. */
.gp-hero::before {
	content: "";
	position: absolute;
	inset: -40%;
	z-index: -1;
	background:
		radial-gradient(38% 46% at 24% 32%, color-mix(in srgb, var(--gp-primary) 72%, transparent), transparent 68%),
		radial-gradient(34% 42% at 74% 26%, color-mix(in srgb, var(--gp-hot) 58%, transparent), transparent 66%),
		radial-gradient(40% 48% at 58% 82%, color-mix(in srgb, var(--gp-accent) 46%, transparent), transparent 70%);
	animation: gp-drift 22s var(--gp-ease) infinite alternate;
	opacity: .55;
}

@keyframes gp-drift {
	from { transform: translate3d(-3%, -2%, 0) scale(1); }
	to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

/* Faint scanline grid, gaming-flavored but quiet. */
.gp-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(color-mix(in srgb, var(--gp-text) 5%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--gp-text) 5%, transparent) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}

.gp-hero__inner { max-width: 46rem; }

.gp-hero h1 {
	margin: 1rem 0 .65rem;
	font-size: clamp(2.2rem, 6vw, 4rem);
}

.gp-hero__sub {
	font-size: clamp(1.02rem, 1.7vw, 1.2rem);
	color: var(--gp-muted);
	max-width: 38rem;
}

.gp-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ==========================================================================
   7. Cards
   ========================================================================== */

.gp-grid {
	display: grid;
	gap: var(--gp-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.gp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
	overflow: hidden;
	box-shadow: var(--gp-shadow);
	transition: transform var(--gp-dur) var(--gp-ease),
	            box-shadow var(--gp-dur) var(--gp-ease),
	            border-color var(--gp-dur) var(--gp-ease);
}

.gp-card:hover,
.gp-card:focus-within {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--gp-primary) 55%, transparent);
	box-shadow: var(--gp-shadow-lift);
}

.gp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--gp-surface-2);
}

.gp-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--gp-ease);
}
.gp-card:hover .gp-card__media img { transform: scale(1.05); }

/* Placeholder when a post has no featured image. */
.gp-card__media--empty {
	background:
		linear-gradient(135deg,
			color-mix(in srgb, var(--gp-primary) 35%, var(--gp-surface)),
			color-mix(in srgb, var(--gp-hot) 28%, var(--gp-surface)));
}

.gp-card__chips {
	position: absolute;
	top: .75rem;
	left: .75rem;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	z-index: 2;
}
.gp-card__chips .gp-chip {
	background: color-mix(in srgb, #000 55%, transparent);
	backdrop-filter: blur(6px);
	color: #fff;
}
.gp-card__chips .gp-chip:hover { background: var(--gp-hot); }

.gp-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.35rem; }

.gp-card__title { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .55rem; }
.gp-card__title a { color: var(--gp-text); text-decoration: none; }
.gp-card__title a:hover { color: var(--gp-accent); text-decoration: none; }

/* Stretch the title link over the whole card so the entire card is clickable,
   while keeping chips and author links independently reachable. */
.gp-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.gp-card__excerpt { font-size: .93rem; color: var(--gp-muted); margin: 0 0 1rem; }

.gp-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-top: auto;
	font-size: .82rem;
	color: var(--gp-faint);
}
.gp-card__meta a { color: var(--gp-faint); position: relative; z-index: 2; }
.gp-card__meta a:hover { color: var(--gp-accent); }
.gp-card__meta .gp-sep { opacity: .5; }

.gp-avatar { border-radius: 50%; width: 24px; height: 24px; }

.gp-meta-author { display: inline-flex; align-items: center; gap: .4rem; }

/* Featured card -- larger type, taller media. */
.gp-card--feature .gp-card__media { aspect-ratio: 16 / 10; }
.gp-card--feature .gp-card__title { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.gp-card--feature .gp-card__excerpt { font-size: 1rem; }
.gp-card--feature .gp-card__body { padding: 1.5rem 1.6rem 1.7rem; }

/* Compact card -- sidebar and related lists, no media block. */
.gp-card--compact { flex-direction: row; align-items: stretch; box-shadow: none; }
.gp-card--compact .gp-card__media { flex: 0 0 96px; aspect-ratio: 1; }
.gp-card--compact .gp-card__body { padding: .8rem .95rem; }
.gp-card--compact .gp-card__title { font-size: .96rem; margin-bottom: .35rem; }

/* Featured block: one large card beside two stacked cards. */
.gp-featured { display: grid; gap: var(--gp-gap); }

@media (min-width: 860px) {
	.gp-featured { grid-template-columns: 1.55fr 1fr; }
	.gp-featured__side { display: grid; gap: var(--gp-gap); align-content: start; }
}

/* ==========================================================================
   8. Homepage text block

   Prose on the front page. Set on a surface so it reads as an editorial band
   rather than another card, and held to a comfortable measure -- the homepage
   grid is 1200px wide, but a paragraph is not readable at that width.
   ========================================================================== */

.gp-home-text__inner {
	margin-inline: auto;
	padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2.5rem);
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
}

/* Full width fills the row like the card blocks do. Narrow holds the card to
   a reading measure instead -- better for a long article, worse as a band. */
.gp-home-text--narrow .gp-home-text__inner { max-width: var(--gp-wrap-narrow); }

/* Full width runs as one column across the whole band. A slightly larger
   size and a looser line height keep a long line comfortable to track. */
.gp-home-text--full .gp-home-text__body { font-size: 1.08rem; line-height: 1.85; }

.gp-home-text__body > *:first-child { margin-top: 0; }

/* The first heading carries the section, so it gets the same gradient tick
   the other homepage sections use. */
.gp-home-text__body > h2:first-child::before,
.gp-home-text__body > h1:first-child::before {
	content: "";
	display: block;
	width: 46px;
	height: 4px;
	margin-bottom: .7rem;
	border-radius: var(--gp-radius-pill);
	background: linear-gradient(90deg, var(--gp-primary), var(--gp-hot));
}

/* ==========================================================================
   9. Category filter row
   ========================================================================== */

.gp-filter {
	display: flex;
	gap: .5rem;
	overflow-x: auto;
	padding-bottom: .35rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.gp-filter::-webkit-scrollbar { height: 6px; }
.gp-filter::-webkit-scrollbar-thumb { background: var(--gp-border-strong); border-radius: var(--gp-radius-pill); }

.gp-filter .gp-chip {
	font-size: .82rem;
	padding: .5rem 1rem;
	background: var(--gp-surface);
	color: var(--gp-text);
	border: 1px solid var(--gp-border);
}
.gp-filter .gp-chip:hover { background: var(--gp-primary); color: var(--gp-on-primary); border-color: transparent; }
.gp-filter .gp-chip .gp-chip__count { color: var(--gp-faint); font-weight: 500; }
.gp-filter .gp-chip:hover .gp-chip__count { color: inherit; }

/* ==========================================================================
   10. Archive header
   ========================================================================== */

.gp-page-head {
	padding-block: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 3vw, 2rem);
	border-bottom: 1px solid var(--gp-border);
	margin-bottom: var(--gp-section-y);
}
.gp-page-head h1 { margin-bottom: .3rem; }
.gp-page-head__desc { color: var(--gp-muted); max-width: 44rem; margin: 0; }
.gp-page-head__count {
	display: inline-block;
	margin-top: .75rem;
	font-family: var(--gp-font-head);
	font-size: .82rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gp-faint);
}

.gp-breadcrumbs {
	font-size: .84rem;
	color: var(--gp-faint);
	margin-bottom: .75rem;
}
.gp-breadcrumbs a { color: var(--gp-faint); }
.gp-breadcrumbs a:hover { color: var(--gp-accent); }
.gp-breadcrumbs__sep { padding: 0 .4rem; opacity: .55; }

/* ==========================================================================
   11. Single post
   ========================================================================== */

/* Reading progress bar, pinned under the sticky header. */
.gp-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 200;
	background: transparent;
	pointer-events: none;
}
.gp-progress__bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--gp-primary), var(--gp-hot), var(--gp-accent));
	transform-origin: left center;
	transition: width .1s linear;
}

.gp-single__head { padding-block: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 3vw, 2rem); }
.gp-single__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.gp-single__title { margin-bottom: .85rem; }

.gp-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem;
	font-size: .9rem;
	color: var(--gp-faint);
}
.gp-single__meta a { color: var(--gp-muted); }

.gp-single__hero {
	margin-block: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: var(--gp-radius);
	overflow: hidden;
	box-shadow: var(--gp-shadow);
}
.gp-single__hero img { width: 100%; }
.gp-single__hero figcaption {
	padding: .7rem 1rem;
	background: var(--gp-surface);
	font-size: .84rem;
	color: var(--gp-faint);
}

/* Article body. Generous measure, comfortable rhythm. */
.gp-content { font-size: 1.06rem; }
.gp-content > * + * { margin-top: 1.15em; }
.gp-content h2 { margin-top: 2em; }
.gp-content h3 { margin-top: 1.6em; }
.gp-content img { border-radius: var(--gp-radius); }
.gp-content ul, .gp-content ol { padding-left: 1.5em; }
.gp-content li + li { margin-top: .4em; }
.gp-content a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

.gp-content .alignwide { width: min(100vw - 2.5rem, calc(var(--gp-wrap-narrow) + 180px)); margin-inline: auto; }
.gp-content .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.gp-content .alignleft { float: left; margin: .35rem 1.5rem 1rem 0; max-width: 50%; }
.gp-content .alignright { float: right; margin: .35rem 0 1rem 1.5rem; max-width: 50%; }
.gp-content .aligncenter { margin-inline: auto; }
.gp-content .wp-caption-text,
.gp-content figcaption { font-size: .86rem; color: var(--gp-faint); margin-top: .5rem; text-align: center; }

.gp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.5rem; }

.gp-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.75rem; }
.gp-share__label {
	font-family: var(--gp-font-head);
	font-size: .8rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gp-faint);
	margin-right: .25rem;
}

.gp-author-box {
	display: flex;
	gap: 1.15rem;
	align-items: flex-start;
	margin-top: 2.5rem;
	padding: 1.4rem 1.5rem;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
}
.gp-author-box img { border-radius: 50%; flex-shrink: 0; }
.gp-author-box h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.gp-author-box p { margin: 0; font-size: .92rem; color: var(--gp-muted); }

/* Prev / next post navigation */
.gp-post-nav { display: grid; gap: var(--gp-gap); margin-top: 2.5rem; }

@media (min-width: 700px) { .gp-post-nav { grid-template-columns: 1fr 1fr; } }

.gp-post-nav a {
	display: block;
	padding: 1.15rem 1.3rem;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
	color: var(--gp-text);
	text-decoration: none;
	transition: border-color var(--gp-dur) var(--gp-ease), transform var(--gp-dur) var(--gp-ease);
}
.gp-post-nav a:hover { border-color: var(--gp-accent); transform: translateY(-2px); text-decoration: none; }
.gp-post-nav__label {
	display: block;
	font-family: var(--gp-font-head);
	font-size: .74rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--gp-accent);
	margin-bottom: .35rem;
}
.gp-post-nav__title { font-family: var(--gp-font-head); font-weight: 600; line-height: 1.35; }
.gp-post-nav--next { text-align: right; }

/* ==========================================================================
   12. Forms
   ========================================================================== */

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
	width: 100%;
	padding: .75rem 1rem;
	background: var(--gp-surface);
	color: var(--gp-text);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius-sm);
	font-family: inherit;
	font-size: .97rem;
	transition: border-color var(--gp-dur) var(--gp-ease), box-shadow var(--gp-dur) var(--gp-ease);
}

input:focus, textarea:focus, select:focus {
	border-color: var(--gp-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gp-accent) 22%, transparent);
	outline: none;
}

::placeholder { color: var(--gp-faint); opacity: 1; }

textarea { min-height: 160px; resize: vertical; }

input[type="submit"], button[type="submit"], .wp-block-search__button {
	width: auto;
	padding: .8rem 1.5rem;
	background: linear-gradient(120deg, var(--gp-primary), var(--gp-hot));
	color: var(--gp-on-primary);
	border: 0;
	border-radius: var(--gp-radius-pill);
	font-family: var(--gp-font-head);
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--gp-dur) var(--gp-ease);
}
input[type="submit"]:hover, button[type="submit"]:hover { transform: translateY(-2px); }

.gp-search-form { display: flex; gap: .5rem; }
.gp-search-form input[type="search"] { flex: 1; }

/* ==========================================================================
   13. Sidebar + widgets
   ========================================================================== */

.gp-sidebar { display: grid; gap: var(--gp-gap); position: sticky; top: 92px; }

.gp-widget {
	padding: 1.3rem 1.4rem;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius);
}

.gp-widget__title {
	font-size: 1rem;
	margin-bottom: 1rem;
	padding-bottom: .7rem;
	border-bottom: 1px solid var(--gp-border);
}

.gp-widget ul { list-style: none; margin: 0; padding: 0; }
.gp-widget li + li { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--gp-border); }
.gp-widget a { color: var(--gp-text); }
.gp-widget a:hover { color: var(--gp-accent); }

/* ==========================================================================
   14. Pagination
   ========================================================================== */

.gp-pagination { margin-top: calc(var(--gp-gap) * 2); }

.gp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }

.gp-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 .75rem;
	background: var(--gp-surface);
	border: 1px solid var(--gp-border);
	border-radius: var(--gp-radius-sm);
	color: var(--gp-text);
	font-family: var(--gp-font-head);
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--gp-dur) var(--gp-ease), color var(--gp-dur) var(--gp-ease);
}
.gp-pagination .page-numbers:hover { border-color: var(--gp-accent); color: var(--gp-accent); text-decoration: none; }
.gp-pagination .page-numbers.current {
	background: linear-gradient(120deg, var(--gp-primary), var(--gp-hot));
	border-color: transparent;
	color: var(--gp-on-primary);
}
.gp-pagination .page-numbers.dots { background: none; border-color: transparent; }

/* ==========================================================================
   15. Empty states + 404
   ========================================================================== */

.gp-empty {
	padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
	text-align: center;
	background: var(--gp-surface);
	border: 1px dashed var(--gp-border-strong);
	border-radius: var(--gp-radius);
}
.gp-empty__icon { font-size: 3rem; line-height: 1; margin-bottom: .75rem; }
.gp-empty p { color: var(--gp-muted); max-width: 34rem; margin-inline: auto; }
.gp-empty .gp-search-form { max-width: 26rem; margin: 1.5rem auto 0; }

.gp-404__code {
	font-family: var(--gp-font-head);
	font-size: clamp(5rem, 20vw, 11rem);
	font-weight: 700;
	line-height: .9;
	background: linear-gradient(120deg, var(--gp-primary), var(--gp-hot), var(--gp-accent));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin: 0;
}

/* ==========================================================================
   16. Footer
   ========================================================================== */

.gp-footer {
	margin-top: var(--gp-section-y);
	padding-top: clamp(2.5rem, 6vw, 4rem);
	border-top: 1px solid var(--gp-border);
	background: color-mix(in srgb, var(--gp-surface) 45%, var(--gp-bg));
}

.gp-footer__widgets {
	display: grid;
	gap: calc(var(--gp-gap) * 1.4);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	padding-bottom: clamp(2rem, 5vw, 3rem);
}

.gp-footer .gp-widget { background: transparent; border: 0; padding: 0; }

.gp-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.35rem;
	border-top: 1px solid var(--gp-border);
	font-size: .88rem;
	color: var(--gp-faint);
}

.gp-footer__bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; padding: 0; }
.gp-footer__bottom a { color: var(--gp-faint); }
.gp-footer__bottom a:hover { color: var(--gp-accent); }

/* ==========================================================================
   17. Motion preferences

   Everything animated above is switched off here. The site must be fully
   usable and legible with zero motion.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}

	.gp-card:hover { transform: none; }
	.gp-card:hover .gp-card__media img { transform: none; }
	.gp-btn:hover { transform: none; }
	.gp-hero::before { animation: none; }
	.gp-badge__dot { animation: none; }
}

/* ==========================================================================
   18. WordPress core classes
   ========================================================================== */

.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
/* post_class() puts .sticky on the card element itself. */
.gp-card.sticky { border-color: color-mix(in srgb, var(--gp-accent) 45%, transparent); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .86rem; color: var(--gp-faint); }
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--gp-radius-sm); width: 100%; }

.admin-bar .gp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .gp-header { top: 46px; } }
@media (max-width: 899px) { .admin-bar .gp-nav { top: 118px; } }

/* Print: strip chrome, keep the article. */
@media print {
	.gp-header, .gp-footer, .gp-sidebar, .gp-progress,
	.gp-share, .gp-post-nav, .gp-hero { display: none !important; }
	body { background: #fff; color: #000; }
	body::before { display: none; }
	.gp-content { font-size: 11pt; }
}
