/*
Theme Name: WP Wala
Theme URI: https://wpwala.in/
Author: WP Wala
Author URI: https://wpwala.in/
Description: A fast, self-contained theme for wpwala.in. It ships with a full set of free WordPress tools built in, a tools homepage, and a clean blog layout. No page builder and no extra plugin are required.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wpwala
Tags: blog, two-columns, custom-menu, featured-images, translation-ready, full-width-template
*/

/* ---------------------------------------------------------------------------
 * Design tokens
 * ------------------------------------------------------------------------ */
:root {
	--brand: #4338ca;
	--brand-dark: #372fa8;
	--brand-ink: #ffffff;
	--ink: #14161c;
	--ink-soft: #3b414d;
	--muted: #626b7a;
	--line: #e4e7ec;
	--surface: #ffffff;
	--bg: #f5f6f8;
	--bg-soft: #f9fafb;
	--amber: #e08a1e;
	--radius: 12px;
	--radius-sm: 8px;
	--wrap: 1120px;
	--shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 6px 20px rgba(20, 22, 28, 0.05);
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
	margin: 0;
	font-family: var(--sans);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--brand);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1, h2, h3, h4 {
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--ink);
	margin: 0 0 0.5em;
	font-weight: 750;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 20px;
}

.eyebrow {
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand);
	margin: 0 0 0.75rem;
	display: inline-block;
}

.eyebrow::before {
	content: "// ";
	color: var(--muted);
}

.btn {
	display: inline-block;
	background: var(--brand);
	color: var(--brand-ink);
	padding: 0.7rem 1.3rem;
	border-radius: var(--radius-sm);
	font-weight: 650;
	font-size: 0.95rem;
	border: 1px solid var(--brand);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
	background: var(--brand-dark);
	text-decoration: none;
	transform: translateY(-1px);
}

.btn--ghost {
	background: transparent;
	color: var(--brand);
}

.btn--ghost:hover {
	background: rgba(67, 56, 202, 0.06);
}

/* ---------------------------------------------------------------------------
 * Site header
 * ------------------------------------------------------------------------ */
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
}

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

.brand {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 800;
	font-size: 1.2rem;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand__mark {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--brand);
	color: #fff;
	font-family: var(--mono);
	font-size: 0.95rem;
	font-weight: 700;
}

.brand__mark span { transform: translateY(-1px); }

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

.nav li { margin: 0; }

.nav a {
	color: var(--ink-soft);
	font-weight: 550;
	font-size: 0.95rem;
}

.nav a:hover { color: var(--brand); text-decoration: none; }

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 0.4rem 0.6rem;
	cursor: pointer;
	font-size: 1rem;
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */
.hero {
	background:
		radial-gradient(1200px 400px at 80% -10%, rgba(67, 56, 202, 0.08), transparent),
		var(--surface);
	border-bottom: 1px solid var(--line);
	padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.hero__grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 2.5rem;
	align-items: center;
}

.hero h1 {
	margin-bottom: 0.6rem;
}

.hero__lead {
	font-size: 1.15rem;
	color: var(--ink-soft);
	max-width: 34ch;
	margin-bottom: 1.6rem;
}

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

/* Faux detector bar as the hero signature. */
.hero__panel {
	background: var(--ink);
	border-radius: var(--radius);
	padding: 1.1rem;
	box-shadow: var(--shadow);
}

.hero__bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: #1e2129;
	border: 1px solid #2b2f3a;
	border-radius: var(--radius-sm);
	padding: 0.6rem 0.8rem;
}

.hero__dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: #3a3f4c;
}

.hero__url {
	font-family: var(--mono);
	font-size: 0.82rem;
	color: #c9cedb;
	overflow: hidden;
	white-space: nowrap;
}

.hero__rows { margin-top: 0.9rem; display: grid; gap: 0.55rem; }

.hero__row {
	display: flex;
	justify-content: space-between;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: #9aa2b4;
	padding: 0.5rem 0.7rem;
	background: #1a1d24;
	border-radius: 6px;
}

.hero__row b { color: #eef1f7; font-weight: 600; }

/* ---------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------ */
.section {
	padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section--soft { background: var(--bg); }

.section__head {
	max-width: 60ch;
	margin-bottom: 2rem;
}

.section__head p {
	color: var(--muted);
	margin: 0;
}

/* Tools grid */
.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.tool-card {
	position: relative;
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.3rem;
	color: var(--ink);
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
	text-decoration: none;
	border-color: var(--brand);
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}

.tool-card__tag {
	font-family: var(--mono);
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.tool-card__name {
	font-weight: 700;
	font-size: 1.08rem;
	margin: 0.5rem 0 0.4rem;
	letter-spacing: -0.01em;
}

.tool-card__desc {
	color: var(--muted);
	font-size: 0.9rem;
	margin: 0;
}

.tool-card__arrow {
	position: absolute;
	top: 1.3rem; right: 1.3rem;
	color: var(--brand);
	font-weight: 700;
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.tool-card:hover .tool-card__arrow { opacity: 1; transform: translateX(0); }

/* Feature strip */
.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}

.feature__k {
	font-family: var(--mono);
	color: var(--brand);
	font-size: 0.8rem;
	margin-bottom: 0.4rem;
}

.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }

/* ---------------------------------------------------------------------------
 * Content layout (pages and posts)
 * ------------------------------------------------------------------------ */
.page-shell {
	padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.content {
	max-width: 760px;
	margin-inline: auto;
}

.content--wide { max-width: var(--wrap); }

.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }

.prose blockquote {
	margin: 1.5em 0;
	padding: 0.6em 1.1em;
	border-left: 3px solid var(--brand);
	background: var(--bg);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--ink-soft);
}

.prose code {
	font-family: var(--mono);
	font-size: 0.88em;
	background: var(--bg);
	padding: 0.15em 0.4em;
	border-radius: 5px;
}

.prose pre {
	background: var(--ink);
	color: #eef1f7;
	padding: 1rem 1.1rem;
	border-radius: var(--radius-sm);
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 0.85rem;
}

.prose pre code { background: none; padding: 0; }

.page-hero {
	margin-bottom: 1.6rem;
}

.page-hero .eyebrow { margin-bottom: 0.5rem; }

.crumbs {
	font-size: 0.82rem;
	color: var(--muted);
	margin-bottom: 1rem;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* FAQ */
.faq { margin-top: 2rem; }

.faq details {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.2rem 1rem;
	margin-bottom: 0.6rem;
	background: var(--surface);
}

.faq summary {
	cursor: pointer;
	font-weight: 650;
	padding: 0.8rem 0;
	list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
	content: "+";
	float: right;
	color: var(--brand);
	font-weight: 700;
}

.faq details[open] summary::after { content: "\2013"; }

.faq details > p { color: var(--ink-soft); margin: 0 0 0.9rem; }

/* ---------------------------------------------------------------------------
 * Blog list and single
 * ------------------------------------------------------------------------ */
.post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
}

.post-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
	border-color: var(--brand);
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}

.post-card__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.2rem; }
.post-card__meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.post-card__title { font-size: 1.15rem; margin: 0.4rem 0; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--brand); text-decoration: none; }
.post-card__excerpt { color: var(--muted); font-size: 0.92rem; margin: 0; }

.single-hero { max-width: 760px; margin: 0 auto 1.5rem; }
.single-hero .post-card__meta { color: var(--brand); }
.single-thumb { max-width: 900px; margin: 0 auto 2rem; }
.single-thumb img { width: 100%; border-radius: var(--radius); }

.pagination {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2.5rem;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-soft);
}

.pagination .page-numbers.current {
	background: var(--brand);
	color: #fff;
	border-color: var(--brand);
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */
.site-footer {
	background: var(--ink);
	color: #c3c9d6;
	padding: 3rem 0 2rem;
	margin-top: 3rem;
}

.site-footer a { color: #d7dce7; }
.site-footer a:hover { color: #fff; }

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-brand .brand { color: #fff; margin-bottom: 0.7rem; }
.footer-brand p { color: #98a1b3; font-size: 0.92rem; max-width: 34ch; }

.footer-col h4 {
	color: #fff;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-family: var(--mono);
	margin-bottom: 0.9rem;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.92rem; text-decoration: none; }

.footer-bottom {
	border-top: 1px solid #262a34;
	padding-top: 1.4rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: 0.85rem;
	color: #7c8598;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */
@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__panel { order: -1; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.nav {
		display: none;
		position: absolute;
		top: 68px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		padding: 0.5rem 20px 1rem;
	}
	.nav.is-open { display: flex; }
	.nav li { width: 100%; }
	.nav a { padding: 0.7rem 0; width: 100%; display: block; border-bottom: 1px solid var(--line); }
	.nav li:last-child a { border-bottom: 0; }
	.nav-toggle { display: inline-block; }
	.footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	.tool-card:hover, .post-card:hover, .btn:hover { transform: none; }
}
