/*
Theme Name: Toolhouse
Theme URI: https://codeinvoker.com/
Author: CodeInvoker
Author URI: https://codeinvoker.com/
Description: A clean WordPress theme for mini-tool integrations, tutorials, and traffic growth.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: toolhouse
*/

:root {
	--bg: #f4f7f1;
	--bg-soft: #edf3eb;
	--panel: #ffffff;
	--panel-strong: #173f36;
	--panel-tint: #d6ebe2;
	--line: #d5e3db;
	--text: #1e312d;
	--muted: #667b74;
	--accent: #1f6f5f;
	--accent-soft: #dff2ea;
	--warm: #f39b63;
	--warm-soft: #fde7d8;
	--shadow: 0 24px 60px rgba(18, 42, 35, 0.08);
	--radius: 28px;
	--radius-sm: 18px;
	--container: min(1120px, calc(100vw - 32px));
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		radial-gradient(circle at top left, rgba(243, 155, 99, 0.14), transparent 26%),
		radial-gradient(circle at top right, rgba(31, 111, 95, 0.12), transparent 24%),
		var(--bg);
	color: var(--text);
	font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	line-height: 1.7;
}

a {
	color: inherit;
	text-decoration: none;
}

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

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

.container {
	width: var(--container);
	margin: 0 auto;
}

.site-shell {
	min-height: 100vh;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: blur(16px);
	background: rgba(244, 247, 241, 0.86);
	border-bottom: 1px solid rgba(213, 227, 219, 0.9);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 0;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.site-brand__mark {
	display: block;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	overflow: hidden;
	background: url("assets/images/site-icon.svg") center / cover no-repeat;
	box-shadow: 0 10px 24px rgba(28, 65, 57, 0.14);
}

.site-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.site-brand__text strong {
	font-size: 1rem;
}

.site-brand__text span {
	color: var(--muted);
	font-size: 0.88rem;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 18px;
}

.menu {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.menu a {
	color: var(--muted);
	font-size: 0.96rem;
}

.menu a:hover,
.menu .current-menu-item > a {
	color: var(--text);
}

.site-header__cta,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 999px;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-header__cta,
.button--primary {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 12px 28px rgba(31, 111, 95, 0.22);
}

.site-header__cta:hover,
.button--primary:hover,
.button--secondary:hover,
.text-link:hover {
	transform: translateY(-1px);
}

.button--secondary {
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid var(--line);
	color: var(--text);
}

.nav-toggle {
	display: none;
	padding: 0;
	border: 0;
	background: transparent;
}

.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	margin: 5px 0;
	background: var(--text);
}

.site-main {
	padding-bottom: 96px;
}

.hero,
.archive-hero {
	padding: 72px 0 28px;
}

.hero__grid {
	display: grid;
	grid-template-columns: 1.2fr 0.9fr;
	gap: 28px;
	align-items: stretch;
}

.hero__content,
.archive-hero__inner {
	padding: 18px 0;
}

.eyebrow,
.site-footer__eyebrow {
	margin: 0 0 14px;
	font-size: 0.84rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.hero h1,
.archive-hero h1,
.site-footer h2,
.section-heading h2,
.single-entry__hero h1 {
	margin: 0;
	font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
	font-size: clamp(2.6rem, 6vw, 4.8rem);
	line-height: 1;
	letter-spacing: -0.04em;
}

.hero__lead,
.archive-hero p,
.section-heading p,
.cta-panel p,
.site-footer p,
.single-entry__summary {
	max-width: 62ch;
	font-size: 1.04rem;
	color: var(--muted);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 28px 0 24px;
}

.hero__actions--compact {
	margin: 20px 0 0;
}

.hero__metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	max-width: 640px;
}

.hero__metrics div,
.hero-card,
.info-card,
.tool-card,
.article-card,
.step-card,
.cta-panel,
.single-entry__content,
.archive-grid .article-card,
.site-footer__inner,
.site-footer__bar {
	border: 1px solid rgba(213, 227, 219, 0.95);
	background: rgba(255, 255, 255, 0.88);
	box-shadow: var(--shadow);
}

.hero__metrics div {
	padding: 16px 18px;
	border-radius: var(--radius-sm);
}

.hero__metrics strong {
	display: block;
	font-size: 1.4rem;
}

.hero__metrics span {
	color: var(--muted);
	font-size: 0.92rem;
}

.hero__panel {
	display: grid;
	gap: 16px;
}

.hero-card,
.info-card,
.tool-card,
.article-card,
.step-card {
	padding: 24px;
	border-radius: var(--radius);
}

.hero-card--accent {
	background: linear-gradient(135deg, rgba(31, 111, 95, 0.16), rgba(243, 155, 99, 0.15)), #fff;
}

.hero-card--light {
	background: rgba(239, 246, 242, 0.95);
}

.hero-card span,
.tool-card__tags span,
.single-entry__chips span {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 600;
}

.hero-card h2 {
	margin: 14px 0 0;
	font-size: 1.5rem;
	line-height: 1.2;
}

.section {
	padding: 34px 0;
}

.section--tight {
	padding-top: 18px;
}

.section--soft {
	padding: 54px 0;
}

.section--soft .step-card {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 243, 235, 0.95));
}

.section--cta {
	padding-top: 64px;
}

.section-heading {
	margin-bottom: 22px;
}

.section-heading--split {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.card-grid,
.step-grid,
.archive-grid {
	display: grid;
	gap: 18px;
}

.card-grid--three,
.step-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card h3,
.tool-card h2,
.tool-card h3,
.article-card h2,
.article-card h3,
.step-card h3,
.site-footer h3 {
	margin: 0 0 10px;
	font-size: 1.3rem;
	line-height: 1.25;
}

.tool-card,
.article-card {
	display: flex;
	flex-direction: column;
}

.tool-card__tags,
.single-entry__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.tool-card__meta,
.article-card__meta,
.single-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--muted);
	font-size: 0.92rem;
}

.tool-card__meta {
	margin-top: auto;
	padding-top: 18px;
}

.text-link {
	color: var(--accent);
	font-weight: 700;
}

.step-card span:first-child {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--warm-soft);
	color: #b95d22;
	font-weight: 700;
	margin-bottom: 16px;
}

.cta-panel {
	display: grid;
	grid-template-columns: 1fr 0.8fr;
	gap: 24px;
	padding: 28px;
	border-radius: calc(var(--radius) + 4px);
	background: linear-gradient(135deg, rgba(31, 111, 95, 0.12), rgba(243, 155, 99, 0.12)), #fff;
}

.archive-hero--toolbox {
	padding-bottom: 18px;
}

.article-card--wide {
	min-height: 220px;
}

.article-card--empty {
	background: rgba(255, 255, 255, 0.7);
	border-style: dashed;
}

.advertise-hero__grid,
.media-kit-grid,
.offer-grid,
.metrics-grid {
	display: grid;
	gap: 18px;
}

.advertise-hero__grid {
	grid-template-columns: 1.15fr 0.85fr;
	align-items: stretch;
}

.sponsor-panel,
.metric-card,
.offer-card,
.media-kit-panel {
	padding: 24px;
	border-radius: var(--radius);
	border: 1px solid rgba(213, 227, 219, 0.95);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: var(--shadow);
}

.sponsor-panel {
	background: linear-gradient(135deg, rgba(31, 111, 95, 0.14), rgba(243, 155, 99, 0.16)), #fff;
}

.sponsor-panel span,
.offer-card__tag,
.metric-card span {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.84rem;
	font-weight: 700;
}

.sponsor-panel h2,
.media-kit-panel h2 {
	margin: 16px 0 12px;
	font-size: 1.8rem;
	line-height: 1.15;
}

.metrics-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card strong {
	display: block;
	margin: 14px 0 8px;
	font-size: 2rem;
	line-height: 1;
}

.metric-card p,
.offer-card p,
.media-kit-panel p,
.page-list span,
.offer-list {
	color: var(--muted);
}

.offer-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.offer-card h3 {
	margin: 16px 0 10px;
	font-size: 1.4rem;
}

.offer-list,
.audience-list,
.page-list {
	margin: 16px 0 0;
	padding-left: 1.1rem;
}

.offer-list li + li,
.audience-list li + li {
	margin-top: 10px;
}

.media-kit-grid {
	grid-template-columns: 1.2fr 0.8fr;
}

.media-kit-panel--notes {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 243, 235, 0.95));
}

.page-list li + li {
	margin-top: 12px;
}

.page-list a {
	display: block;
	font-weight: 700;
}

.page-list span {
	display: block;
	font-size: 0.92rem;
}

.single-entry__content--wide {
	width: min(920px, var(--container));
}

.single-entry__hero {
	padding: 64px 0 24px;
}

.single-entry__hero .container {
	padding: 0;
}

.single-entry__content {
	width: min(760px, var(--container));
	margin: 0 auto;
	padding: 34px clamp(18px, 4vw, 44px);
	border-radius: calc(var(--radius) + 4px);
}

.single-entry__content > *:first-child {
	margin-top: 0;
}

.single-entry__content h2,
.single-entry__content h3 {
	font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
	letter-spacing: -0.02em;
}

.single-entry__content ul,
.single-entry__content ol {
	padding-left: 1.25rem;
}

.wp-block-image,
.single-entry__content figure {
	margin: 2rem 0;
}

.site-footer {
	padding: 0 0 42px;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 0.8fr;
	gap: 24px;
	padding: 28px;
	border-radius: calc(var(--radius) + 6px);
}

.site-footer__bar {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 14px 22px;
	margin-top: 14px;
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.92rem;
}

.footer-links,
.footer-notes {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 10px;
}

.footer-links a {
	color: var(--muted);
}

.wp-block-button__link,
button,
input,
textarea,
select {
	font: inherit;
}

.post-navigation,
.nav-links {
	width: var(--container);
	margin: 24px auto 0;
	display: flex;
	justify-content: center;
	gap: 12px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.9);
}

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

@media (max-width: 980px) {
	.hero__grid,
	.advertise-hero__grid,
	.media-kit-grid,
	.offer-grid,
	.metrics-grid,
	.cta-panel,
	.site-footer__inner,
	.card-grid--three,
	.step-grid,
	.archive-grid {
		grid-template-columns: 1fr;
	}

	.hero h1,
	.archive-hero h1,
	.section-heading h2,
	.site-footer h2,
	.single-entry__hero h1 {
		font-size: clamp(2.2rem, 12vw, 3.8rem);
	}

	.site-nav {
		position: absolute;
		top: calc(100% + 10px);
		right: 16px;
		left: 16px;
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
		border-radius: 22px;
		border: 1px solid var(--line);
		background: rgba(255, 255, 255, 0.96);
		box-shadow: var(--shadow);
	}

	.site-nav.is-open {
		display: flex;
	}

	.menu {
		flex-direction: column;
		align-items: stretch;
	}

	.menu a,
	.site-header__cta {
		display: block;
		width: 100%;
	}

	.nav-toggle {
		display: block;
	}
}

@media (max-width: 640px) {
	.site-header__inner {
		padding: 16px 0;
	}

	.hero,
	.archive-hero,
	.single-entry__hero {
		padding-top: 44px;
	}

	.hero__metrics {
		grid-template-columns: 1fr;
	}

	.hero-card,
	.info-card,
	.tool-card,
	.article-card,
	.step-card,
	.cta-panel,
	.single-entry__content,
	.site-footer__inner {
		padding: 20px;
		border-radius: 22px;
	}

	.site-footer__bar {
		flex-direction: column;
		align-items: flex-start;
		border-radius: 24px;
	}
}
