/*
Theme Name:        Maker Space Punjab
Description:       Custom theme for Maker Space Punjab: an independent guide to makerspaces and maker events in Punjab, Pakistan. Requires the "Maker Space Punjab Core" plugin.
Version:           1.0.0
Requires at least: 6.4
Requires PHP:      7.4
Text Domain:       msp-theme
License:           GPL-2.0-or-later
*/

/* ---------- Tokens ---------- */
:root {
	--msp-ink: #0e1810;
	--msp-forest: #1f3d29;
	--msp-green: #3a9255;
	--msp-lime: #cdfb56;
	--msp-mist: #f0f9e7;
	--msp-mist-2: #e4f3d3;
	--msp-border: #dbe8cf;
	--msp-muted: #5b6b5f;
	--msp-red: #d6453d;
	--msp-orange: #e8a317;
	--msp-navy: #234a86;
	--msp-radius: 1rem;
	--msp-shadow: 0 1px 2px rgba(14, 24, 16, 0.06), 0 8px 24px -12px rgba(14, 24, 16, 0.18);
	--msp-max: 72rem;
}

/* ---------- Base ---------- */
@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

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

body {
	margin: 0;
	font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--msp-ink);
	background: #fff;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--msp-green); text-underline-offset: 3px; }
a:hover { color: var(--msp-forest); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--msp-green); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto;
	clip: auto; background: var(--msp-lime); color: var(--msp-ink); padding: 8px 14px; border-radius: 999px;
}

.msp-container { width: 100%; max-width: var(--msp-max); margin: 0 auto; padding: 0 1rem; }
.msp-main { flex: 1; }
body { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Header ---------- */
.msp-header { position: sticky; top: 0; z-index: 50; background: var(--msp-ink); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.admin-bar .msp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .msp-header { top: 46px; } }
.msp-header__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.msp-brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; }
.msp-brand:hover { color: #fff; }

.msp-logo { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; width: 2rem; height: 2rem; flex: none; }
.msp-logo span:nth-child(1) { background: var(--msp-red); border-radius: 60% 60% 12% 60%; }
.msp-logo span:nth-child(2) { background: var(--msp-green); border-radius: 60% 60% 60% 12%; }
.msp-logo span:nth-child(3) { background: var(--msp-orange); border-radius: 60% 12% 60% 60%; }
.msp-logo span:nth-child(4) { background: var(--msp-navy); border-radius: 12% 60% 60% 60%; }

.msp-nav { display: none; }
.msp-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.msp-nav a { display: block; padding: 0.4rem 0.8rem; border-radius: 999px; color: rgba(255, 255, 255, 0.82); font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: background 0.15s, color 0.15s; }
.msp-nav a:hover, .msp-nav .current-menu-item > a, .msp-nav .current_page_item > a { background: rgba(255, 255, 255, 0.1); color: var(--msp-lime); }
.msp-header__actions { display: flex; align-items: center; gap: 0.5rem; }
.msp-header__cta { display: none; }

.msp-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 999px; background: transparent; color: #fff; cursor: pointer; }
.msp-menu-toggle:hover { background: rgba(255, 255, 255, 0.1); color: var(--msp-lime); }
.msp-mobile-nav { display: none; background: var(--msp-ink); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.msp-mobile-nav.is-open { display: block; }
.msp-mobile-nav ul { list-style: none; margin: 0; padding: 0.5rem 0 1rem; }
.msp-mobile-nav a { display: block; padding: 0.7rem 0.5rem; color: #fff; font-weight: 600; text-decoration: none; border-radius: 0.75rem; }
.msp-mobile-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--msp-lime); }

@media (min-width: 1024px) {
	.msp-nav { display: block; }
	.msp-menu-toggle, .msp-mobile-nav { display: none !important; }
}
@media (min-width: 640px) { .msp-header__cta { display: inline-flex; } }

/* ---------- Buttons ---------- */
.msp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border: 0; border-radius: 999px; font: inherit; font-size: 0.875rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.msp-btn:hover { transform: translateY(-2px); }
.msp-btn--primary { background: var(--msp-lime); color: var(--msp-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.msp-btn--primary:hover { background: #d9ff7a; color: var(--msp-ink); box-shadow: 0 8px 16px -8px rgba(14, 24, 16, 0.35); }
.msp-btn--light { background: #fff; color: #212529; }
.msp-btn--light:hover { background: var(--msp-mist); color: #212529; }
.msp-btn--sm { padding: 0.45rem 1rem; }
.msp-btn .msp-icon { width: 1rem; height: 1rem; }

/* ---------- Icons ---------- */
.msp-icon { width: 1.25rem; height: 1.25rem; flex: none; }

.msp-i3d {
	--tone-a: #66c583; --tone-b: #2f7d47; --tone-shadow: rgba(47, 125, 71, 0.5); --glyph: #fff;
	position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
	border-radius: 30%;
	background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
	box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.55), inset 0 -5px 8px rgba(0, 0, 0, 0.18), 0 10px 18px -6px var(--tone-shadow);
	color: var(--glyph);
}
.msp-i3d__gloss { position: absolute; left: 14%; right: 14%; top: 6%; height: 36%; border-radius: 999px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent); }
.msp-i3d .msp-icon { position: relative; stroke-width: 2.2; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28)); }
.msp-i3d--sm { width: 2.25rem; height: 2.25rem; } .msp-i3d--sm .msp-icon { width: 1rem; height: 1rem; }
.msp-i3d--md { width: 3rem; height: 3rem; } .msp-i3d--md .msp-icon { width: 1.5rem; height: 1.5rem; }
.msp-i3d--lg { width: 4rem; height: 4rem; } .msp-i3d--lg .msp-icon { width: 2rem; height: 2rem; }
.msp-i3d--lime { --tone-a: #eaffa6; --tone-b: #b9e83c; --tone-shadow: rgba(154, 194, 42, 0.55); --glyph: var(--msp-ink); }
.msp-i3d--navy { --tone-a: #5483cc; --tone-b: #1b3b6e; --tone-shadow: rgba(27, 59, 110, 0.5); }
.msp-i3d--orange { --tone-a: #ffc468; --tone-b: #e2791f; --tone-shadow: rgba(226, 121, 31, 0.5); }
.msp-i3d--red { --tone-a: #f58a7f; --tone-b: #c23a31; --tone-shadow: rgba(194, 58, 49, 0.5); }
.msp-i3d--ink { --tone-a: #40564a; --tone-b: #0e1810; --tone-shadow: rgba(14, 24, 16, 0.5); --glyph: var(--msp-lime); }

/* ---------- Hero ---------- */
.msp-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #0e1810 0%, #1f3d29 58%, #3a9255 140%); }
.msp-hero::before, .msp-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.msp-hero::before { top: -8rem; right: -6rem; width: 22rem; height: 22rem; background: rgba(205, 251, 86, 0.2); }
.msp-hero::after { bottom: -10rem; left: -6rem; width: 24rem; height: 24rem; background: rgba(58, 146, 85, 0.4); }
.msp-hero__inner { position: relative; z-index: 1; padding: 3.5rem 1rem; }
.msp-hero--home .msp-hero__inner { padding: 5rem 1rem 6rem; }
.msp-hero h1 { margin: 1.25rem 0 0; max-width: 48rem; font-size: clamp(2.25rem, 6vw, 3.25rem); font-weight: 800; }
.msp-hero--home h1 { font-size: clamp(2.75rem, 8vw, 4.5rem); line-height: 1.05; }
.msp-hero h1 em { font-style: normal; color: var(--msp-lime); }
.msp-hero p.lead { margin: 1rem 0 0; max-width: 42rem; font-size: 1.125rem; color: rgba(255, 255, 255, 0.78); }
.msp-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.msp-pill { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.25rem; padding: 0.25rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.75rem; font-weight: 600; }
.msp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--msp-lime); }
.msp-back { display: inline-flex; align-items: center; gap: 0.4rem; color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.msp-back:hover { color: #fff; }
.msp-sparkle { width: 2.5rem; height: 2.5rem; color: var(--msp-lime); }

/* ---------- Sections ---------- */
.msp-section { padding: 4rem 0; }
.msp-section--mist { background: var(--msp-mist); }
.msp-section--ink { background: var(--msp-ink); color: #fff; }
.msp-eyebrow { margin: 0 0 0.4rem; color: var(--msp-green); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.msp-section--ink .msp-eyebrow { color: var(--msp-lime); }
.msp-section h2.msp-title { margin: 0 0 2rem; max-width: 40rem; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }

.msp-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .msp-grid--2, .msp-grid--3, .msp-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .msp-grid--3 { grid-template-columns: repeat(3, 1fr); } .msp-grid--4 { grid-template-columns: repeat(4, 1fr); } .msp-grid--5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 640px) and (max-width: 1023px) { .msp-grid--5 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.msp-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; border-radius: 1.4rem; background: #fff; box-shadow: var(--msp-shadow); border: 1px solid var(--msp-border); color: inherit; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
a.msp-card:hover { transform: translateY(-4px); color: inherit; box-shadow: 0 16px 32px -16px rgba(14, 24, 16, 0.3); }
.msp-card h3 { margin: 0; font-size: 1.125rem; font-weight: 800; }
.msp-card p { margin: 0; color: var(--msp-muted); font-size: 0.9rem; }
.msp-card__meta { color: var(--msp-muted); font-size: 0.875rem; }
.msp-card__cta { margin-top: auto; align-self: flex-start; }
.msp-card--flat { box-shadow: none; }
.msp-card--ink { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
.msp-card--ink h3 { color: #fff; }

.msp-stat { padding: 1.5rem; border-radius: 1.2rem; background: var(--msp-mist); border: 1px solid rgba(58, 146, 85, 0.15); }
.msp-stat strong { display: block; font-size: 1.75rem; font-weight: 800; color: var(--msp-green); }
.msp-stat span { color: rgba(14, 24, 16, 0.7); font-size: 0.875rem; font-weight: 500; }

.msp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.msp-chip { padding: 0.35rem 0.9rem; border-radius: 999px; background: var(--msp-mist); border: 1px solid rgba(58, 146, 85, 0.2); color: var(--msp-forest); font-size: 0.875rem; font-weight: 500; }
.msp-chip--lime { background: var(--msp-lime); border-color: transparent; color: var(--msp-ink); font-weight: 700; padding: 0.5rem 1.2rem; }

.msp-badge { display: inline-flex; align-items: center; padding: 0.1rem 0.6rem; border: 1px solid var(--msp-border); border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--msp-ink); background: #fff; }
.msp-badge--green { background: rgba(58, 146, 85, 0.1); border-color: rgba(58, 146, 85, 0.25); color: var(--msp-green); }
.msp-badge--navy { background: rgba(35, 74, 134, 0.1); border-color: rgba(35, 74, 134, 0.25); color: var(--msp-navy); }
.msp-badge--red { background: rgba(214, 69, 61, 0.1); border-color: rgba(214, 69, 61, 0.25); color: var(--msp-red); }
.msp-badge--orange { background: rgba(232, 163, 23, 0.14); border-color: rgba(232, 163, 23, 0.3); color: #8a5c00; }
.msp-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

.msp-step-num { color: var(--msp-green); font-size: 0.8rem; font-weight: 800; }
.msp-lab-num { color: rgba(58, 146, 85, 0.6); font-size: 0.875rem; font-weight: 800; }
.msp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.msp-row--center { align-items: center; justify-content: flex-start; gap: 1rem; }

/* ---------- FAQ ---------- */
.msp-faq { display: grid; gap: 0.75rem; max-width: 48rem; }
.msp-faq details { padding: 1.1rem 1.25rem; border-radius: 1rem; background: #fff; border: 1px solid rgba(58, 146, 85, 0.15); }
.msp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; cursor: pointer; list-style: none; }
.msp-faq summary::-webkit-details-marker { display: none; }
.msp-faq summary .msp-icon { color: var(--msp-green); transition: transform 0.2s; }
.msp-faq details[open] summary .msp-icon { transform: rotate(180deg); }
.msp-faq p { margin: 0.75rem 0 0; color: var(--msp-muted); font-size: 0.925rem; }

/* ---------- Content / prose ---------- */
.msp-prose { max-width: 48rem; margin: 0 auto; padding: 3rem 1rem 4rem; color: #33443a; }
.msp-prose h2 { margin-top: 2rem; color: var(--msp-ink); font-size: 1.5rem; font-weight: 800; }
.msp-prose h3 { color: var(--msp-ink); }
.msp-prose img { border-radius: 1rem; }
.msp-prose blockquote { margin: 1.5rem 0; padding: 0.5rem 1.25rem; border-left: 4px solid var(--msp-lime); background: var(--msp-mist); border-radius: 0 1rem 1rem 0; }
.msp-notice { display: flex; gap: 1rem; padding: 1.25rem 1.5rem; border: 1px solid rgba(58, 146, 85, 0.3); border-radius: 1.2rem; background: var(--msp-mist); }
.msp-notice h2, .msp-notice h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.msp-notice p { margin: 0; color: var(--msp-muted); font-size: 0.9rem; }

.msp-detail-list { display: grid; gap: 0.9rem; padding: 0; margin: 0; list-style: none; }
.msp-detail-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.msp-detail-list .msp-icon { color: var(--msp-lime); margin-top: 0.15rem; }
.msp-detail-list a { color: inherit; }

/* ---------- Forms ---------- */
.msp-form { display: grid; gap: 1rem; max-width: 36rem; margin: 0 auto; }
.msp-form p { margin: 0; }
.msp-form label { display: block; margin-bottom: 0.3rem; font-size: 0.875rem; font-weight: 700; }
.msp-form input[type="text"], .msp-form input[type="email"], .msp-form textarea,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
	width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--msp-border); border-radius: 0.85rem; background: #fff; font: inherit; color: inherit;
}
.msp-hp { position: absolute !important; left: -9999px; }
.msp-alert { max-width: 36rem; margin: 0 auto 1.5rem; padding: 0.9rem 1.1rem; border-radius: 0.9rem; font-size: 0.9rem; }
.msp-alert--ok { background: var(--msp-mist); border: 1px solid rgba(58, 146, 85, 0.35); }
.msp-alert--error { background: #fdecea; border: 1px solid rgba(214, 69, 61, 0.35); }

/* ---------- Pagination / comments ---------- */
.msp-pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 2.5rem; }
.msp-pagination .page-numbers { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--msp-border); text-decoration: none; font-weight: 600; }
.msp-pagination .current { background: var(--msp-ink); border-color: var(--msp-ink); color: var(--msp-lime); }
.msp-comments { max-width: 48rem; margin: 0 auto; padding: 0 1rem 4rem; }
.msp-comments ol { list-style: none; padding: 0; }
.msp-comments .comment-body { margin-bottom: 1rem; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--msp-mist); }
.msp-comments .children { list-style: none; padding-left: 1.25rem; }
.comment-form .submit { background: var(--msp-lime); border: 0; border-radius: 999px; padding: 0.75rem 1.5rem; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Footer ---------- */
.msp-footer { background: var(--msp-mist); border-top: 1px solid var(--msp-border); }
.msp-footer__grid { display: grid; gap: 2rem; padding: 2.5rem 1rem; }
@media (min-width: 640px) { .msp-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .msp-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.msp-footer h2 { margin: 0 0 0.6rem; font-size: 0.875rem; font-weight: 800; letter-spacing: 0; }
.msp-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.msp-footer a { color: var(--msp-muted); font-size: 0.875rem; text-decoration: none; }
.msp-footer a:hover { color: var(--msp-green); }
.msp-footer__about { color: var(--msp-muted); font-size: 0.875rem; max-width: 20rem; margin-top: 0.6rem; }
.msp-footer__legal { border-top: 1px solid var(--msp-border); }
.msp-footer__legal .msp-container { padding-top: 1rem; padding-bottom: 1rem; color: var(--msp-muted); font-size: 0.75rem; }
.msp-footer__legal p { margin: 0 0 0.5rem; }
.msp-empty { padding: 3rem 1rem; text-align: center; color: var(--msp-muted); }
