/*
Theme Name: TechProMaster
Theme URI: https://example.com/techpromaster
Author: TechProMaster Team
Author URI: https://example.com
Description: A production-grade WordPress theme for technology education platforms and digital template marketplaces, featuring full WooCommerce integration, dark mode, dynamic platform statistics, and a complete content publishing system.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 8.1
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techpromaster
Tags: e-commerce, education, blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, dark-mode, accessibility-ready
*/

/* =========================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   Consumed by: assets/css/components.css, woocommerce.css,
   admin.css, and assets/js/main.js (customizer preview reads
   these via getComputedStyle where needed).
   ========================================================= */
:root {
	/* Brand */
	--tpm-color-primary: #2563eb;
	--tpm-color-primary-dark: #1d4ed8;
	--tpm-color-primary-light: #60a5fa;

	/* Neutrals (light mode) */
	--tpm-color-bg: #ffffff;
	--tpm-color-bg-alt: #f8fafc;
	--tpm-color-surface: #ffffff;
	--tpm-color-border: #e2e8f0;
	--tpm-color-text: #0f172a;
	--tpm-color-text-muted: #64748b;

	/* Status */
	--tpm-color-success: #16a34a;
	--tpm-color-danger: #dc2626;

	/* Hero gradient (per SCREENSHOT_BUILD.md) */
	--tpm-hero-gradient: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);

	/* Type */
	--tpm-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--tpm-font-heading: var(--tpm-font-body);

	/* Spacing scale */
	--tpm-space-1: 4px;
	--tpm-space-2: 8px;
	--tpm-space-3: 16px;
	--tpm-space-4: 24px;
	--tpm-space-5: 32px;
	--tpm-space-6: 48px;
	--tpm-space-7: 72px;

	/* Radius / shadow */
	--tpm-radius: 8px;
	--tpm-radius-lg: 16px;
	--tpm-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);

	/* Layout */
	--tpm-container-width: 1200px;
	--tpm-header-height: 72px;
}

[data-theme="dark"] {
	--tpm-color-bg: #0f172a;
	--tpm-color-bg-alt: #111827;
	--tpm-color-surface: #1e293b;
	--tpm-color-border: #334155;
	--tpm-color-text: #f1f5f9;
	--tpm-color-text-muted: #94a3b8;
	--tpm-hero-gradient: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--tpm-font-body);
	color: var(--tpm-color-text);
	background: var(--tpm-color-bg);
	line-height: 1.6;
	transition: background-color .2s ease, color .2s ease;
}

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

a { color: var(--tpm-color-primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tpm-font-heading);
	line-height: 1.2;
	margin: 0 0 var(--tpm-space-3);
	color: var(--tpm-color-text);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.screen-reader-text:focus {
	position: static !important;
	width: auto; height: auto;
	clip: auto;
}

.tpm-container {
	max-width: var(--tpm-container-width);
	margin: 0 auto;
	padding: 0 var(--tpm-space-4);
}

/* =========================================================
   3. BUTTONS
   ========================================================= */
.tpm-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--tpm-space-2);
	padding: var(--tpm-space-2) var(--tpm-space-4);
	border-radius: var(--tpm-radius);
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
}
.tpm-btn-primary {
	background: var(--tpm-color-primary);
	color: #fff;
}
.tpm-btn-primary:hover, .tpm-btn-primary:focus {
	background: var(--tpm-color-primary-dark);
	text-decoration: none;
	color: #fff;
}
.tpm-btn-secondary {
	background: transparent;
	border-color: var(--tpm-color-border);
	color: var(--tpm-color-text);
}
.tpm-btn-secondary:hover, .tpm-btn-secondary:focus {
	border-color: var(--tpm-color-primary);
	text-decoration: none;
}

/* =========================================================
   4. HEADER
   ========================================================= */
.tpm-header {
	height: var(--tpm-header-height);
	display: flex;
	align-items: center;
	background: var(--tpm-color-bg);
	border-bottom: 1px solid var(--tpm-color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.tpm-header .tpm-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}
.tpm-logo {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--tpm-color-text);
}
.tpm-logo .tpm-logo-accent { color: var(--tpm-color-primary); }

.tpm-primary-nav ul {
	list-style: none;
	display: flex;
	gap: var(--tpm-space-4);
	margin: 0;
	padding: 0;
}
.tpm-primary-nav a {
	color: var(--tpm-color-text);
	font-weight: 500;
}
.tpm-primary-nav a[aria-current="page"] {
	color: var(--tpm-color-primary);
}

.tpm-header-actions {
	display: flex;
	align-items: center;
	gap: var(--tpm-space-3);
}
.tpm-icon-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--tpm-color-text);
	padding: var(--tpm-space-1);
	display: inline-flex;
}

/* =========================================================
   5. HERO
   ========================================================= */
.tpm-hero {
	background: var(--tpm-hero-gradient);
	padding: var(--tpm-space-7) 0;
	text-align: center;
}
.tpm-hero-eyebrow {
	color: var(--tpm-color-primary);
	font-weight: 700;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.tpm-hero h1 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	max-width: 720px;
	margin: var(--tpm-space-3) auto;
}
.tpm-hero p {
	color: var(--tpm-color-text-muted);
	max-width: 560px;
	margin: 0 auto var(--tpm-space-4);
}
.tpm-hero-ctas {
	display: flex;
	gap: var(--tpm-space-3);
	justify-content: center;
	margin-bottom: var(--tpm-space-5);
}
.tpm-hero-stats {
	display: flex;
	gap: var(--tpm-space-5);
	justify-content: center;
	color: var(--tpm-color-text-muted);
	font-weight: 600;
}
.tpm-hero-stats strong { color: var(--tpm-color-text); }

/* =========================================================
   6. FOOTER
   ========================================================= */
.tpm-footer {
	background: var(--tpm-color-bg-alt);
	border-top: 1px solid var(--tpm-color-border);
	padding: var(--tpm-space-6) 0 var(--tpm-space-4);
	margin-top: var(--tpm-space-7);
}
.tpm-footer-grid {
	display: grid;
	grid-template-columns: 2fr repeat(3, 1fr);
	gap: var(--tpm-space-5);
}
.tpm-footer-col h3 {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tpm-color-text-muted);
}
.tpm-footer-col ul { list-style: none; margin: 0; padding: 0; }
.tpm-footer-col li { margin-bottom: var(--tpm-space-2); }

.tpm-footer-widgets {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--tpm-space-5);
	margin-top: var(--tpm-space-6);
	padding-top: var(--tpm-space-5);
	border-top: 1px solid var(--tpm-color-border);
}

.tpm-footer-bottom {
	margin-top: var(--tpm-space-5);
	padding-top: var(--tpm-space-4);
	border-top: 1px solid var(--tpm-color-border);
	display: flex;
	justify-content: space-between;
	color: var(--tpm-color-text-muted);
	font-size: 0.875rem;
}

@media (max-width: 782px) {
	.tpm-footer-grid { grid-template-columns: 1fr 1fr; }
	.tpm-footer-widgets { grid-template-columns: 1fr; }
	.tpm-primary-nav { display: none; }
}
