/*
Theme Name: PWD Slim Theme
Theme URI: https://prowebdesign.co.za/
Author: Pro Web Design
Author URI: https://prowebdesign.co.za/
Description: A deliberately minimal base theme. No page builder, no bundled webfonts, no bloat — built for WordPress installs whose real front end is a plugin (e.g. PWD Operations Dashboard) that renders its own standalone template. Block-editor native, with a Boxed and a Full Width page template (same principle as Elementor's "Full Width" template — content runs edge to edge, header and footer stay — without requiring Elementor). Optional header and footer, responsive throughout.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.3
Tested up to: 7.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pwd-slim-theme
*/

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--pst-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--pst-ink);
	background: var(--pst-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--pst-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }

/* ============================================================
   Design tokens — kept in sync with theme.json's palette, so a
   block using a theme color and this stylesheet always agree.
   ============================================================ */
:root {
	--pst-ink:    #1c1c1e;
	--pst-muted:  #6b7280;
	--pst-bg:     #ffffff;
	--pst-surface: #f5f5f7;
	--pst-border: #e5e5ea;
	--pst-accent: #2c3e91;
	--pst-accent-ink: #ffffff;

	--pst-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--pst-font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;

	--pst-boxed-width: 1200px;
	--pst-wide-width: 1400px;
	--pst-gutter: 24px;

	--pst-radius: 8px;
}

/* ============================================================
   Skip link (accessibility — no theme should ship without one)
   ============================================================ */
.pst-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--pst-ink);
	color: #fff;
	padding: 10px 16px;
	z-index: 1000;
	border-radius: 0 0 var(--pst-radius) 0;
}
.pst-skip-link:focus {
	left: 0;
}

/* ============================================================
   Header
   ============================================================ */
.pst-header {
	border-bottom: 1px solid var(--pst-border);
	background: var(--pst-bg);
}
.pst-header-inner {
	max-width: var(--pst-boxed-width);
	margin: 0 auto;
	padding: 16px var(--pst-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.pst-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 18px;
	color: var(--pst-ink);
}
.pst-logo:hover { text-decoration: none; }
.pst-logo img { max-height: 36px; width: auto; }

.pst-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--pst-border);
	border-radius: var(--pst-radius);
	padding: 8px 10px;
	cursor: pointer;
}
.pst-nav-toggle span,
.pst-nav-toggle span::before,
.pst-nav-toggle span::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--pst-ink);
	position: relative;
	transition: transform .15s ease, opacity .15s ease;
}
.pst-nav-toggle span::before { content: ''; position: absolute; top: -6px; }
.pst-nav-toggle span::after { content: ''; position: absolute; top: 6px; }
.pst-nav-toggle[aria-expanded="true"] span { background: transparent; }
.pst-nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.pst-nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.pst-primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.pst-primary-nav a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: var(--pst-radius);
	color: var(--pst-ink);
	font-weight: 500;
	font-size: 14.5px;
}
.pst-primary-nav a:hover {
	background: var(--pst-surface);
	text-decoration: none;
}
.pst-primary-nav .current-menu-item > a {
	color: var(--pst-accent);
}

/* ============================================================
   Content containers — the Boxed / Full Width principle
   ============================================================ */
.pst-content {
	padding: 48px 0;
}
.pst-container {
	max-width: var(--pst-boxed-width);
	margin: 0 auto;
	padding: 0 var(--pst-gutter);
}

/* Full Width template: the container has no max-width, so content
   runs edge to edge — the same principle as Elementor's "Full Width"
   template (header and footer stay, only the content area stretches). */
.pst-container--full {
	max-width: none;
	padding: 0 var(--pst-gutter);
}

/* Native block wide/full alignment (see theme.json for the matching
   contentSize/wideSize) works inside either container. */
.pst-content .alignwide {
	max-width: var(--pst-wide-width);
	margin-left: auto;
	margin-right: auto;
}
.pst-content .alignfull {
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
}

/* ============================================================
   Footer
   ============================================================ */
.pst-footer {
	border-top: 1px solid var(--pst-border);
	background: var(--pst-surface);
	color: var(--pst-muted);
	font-size: 13.5px;
}
.pst-footer-inner {
	max-width: var(--pst-boxed-width);
	margin: 0 auto;
	padding: 24px var(--pst-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.pst-footer a { color: var(--pst-muted); }
.pst-footer a:hover { color: var(--pst-accent); }
.pst-footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   Basic content typography (post/page body)
   ============================================================ */
.pst-entry-title {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.2;
	margin: 0 0 24px;
	color: var(--pst-ink);
}
.pst-entry-content h2 { font-size: 26px; margin: 1.6em 0 .6em; }
.pst-entry-content h3 { font-size: 20px; margin: 1.4em 0 .5em; }
.pst-entry-content p { margin: 0 0 1.1em; }
.pst-entry-content img { border-radius: var(--pst-radius); }
.pst-entry-meta { color: var(--pst-muted); font-size: 13.5px; margin: 0 0 24px; }
.pst-entry-thumb { margin: 0 0 24px; }
.pst-entry-summary { padding: 24px 0; border-bottom: 1px solid var(--pst-border); }
.pst-entry-summary:first-of-type { padding-top: 0; }
.pst-entry-summary h2 { margin: 0 0 8px; font-size: 22px; }
.pst-entry-summary h2 a { color: var(--pst-ink); }
.pst-entry-summary h2 a:hover { color: var(--pst-accent); text-decoration: none; }

/* Screen-reader-only text (labels for icon-only controls). */
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* ============================================================
   404
   ============================================================ */
.pst-404 { text-align: center; padding: 80px var(--pst-gutter); }
.pst-404 h1 { font-size: 64px; margin: 0; color: var(--pst-border); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 780px) {
	.pst-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.pst-primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.pst-primary-nav.is-open { display: block; }
	.pst-primary-nav ul { flex-direction: column; gap: 2px; padding: 8px 0; }
	.pst-header-inner { flex-wrap: wrap; }
	.pst-footer-inner { flex-direction: column; text-align: center; }
}

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