/*
Theme Name: Groundcraft Theme
Theme URI: https://groundcraft.dev
Author: Groundcraft
Author URI: https://groundcraft.dev/wordpress
Description: The Forge-native FSE theme — the "Hello Elementor" analogue built for Groundcraft Forge. Blank and full-width canvas templates let a Forge document own the whole page, and the theme adds the forge_template assignment + render layer (header / footer / loop / single / archive) that Forge stubs but ships no UI for. Shares the 14-slug Groundcraft design-token contract (theme.json) with Groundcraft Base and the Forge builder, so brand re-tints every Forge page for free. Brand lives in styles/ variations (managed) or the child theme (bespoke).
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.0
Version: 0.4.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: groundcraft-theme
Tags: full-site-editing, block-patterns, blog, business, portfolio, one-column, wide-blocks, accessibility-ready
*/

/* ============================================================
   GROUNDCRAFT THEME — global front-end chrome
   ------------------------------------------------------------
   theme.json owns the design tokens (colours, type scale,
   spacing, element styles). Forge owns page content CSS
   (compiled per page). This stylesheet dresses the theme's own
   default header / footer / landing chrome — the production
   shell for the Groundcraft lead-gen network, and a graceful
   fallback for any site with no Forge templates assigned.
   Contact / brand / "Powered by" are opt-in (see functions.php),
   so a client site running the default chrome is unaffected.
   ============================================================ */

:root {
	--gct-shadow-sm: 0 1px 2px rgba(21, 32, 26, .06), 0 2px 8px rgba(21, 32, 26, .06);
	--gct-shadow-md: 0 8px 24px rgba(21, 32, 26, .10), 0 2px 6px rgba(21, 32, 26, .06);
	--gct-shadow-brand: 0 8px 20px rgba(79, 122, 31, .26);
	--gct-deep: #373737;
	--gct-wa: #25d366;
	--gct-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f7a1f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 10 18 20 6'/%3E%3C/svg%3E");
	--gct-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f7a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M12 6l6 6-6 6'/%3E%3C/svg%3E");
}

.gct-shell {
	max-width: var( --wp--style--global--content-size, 1200px );
	margin-inline: auto;
	padding-inline: var( --wp--custom--content-padding, clamp( 1rem, 4vw, 2.5rem ) );
}

.gct-ic { flex: none; display: inline-block; vertical-align: middle; }

/* ---- Buttons -------------------------------------------------------------- */
.gct-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .9rem 1.6rem;
	border-radius: 999px;
	font-family: var( --wp--preset--font-family--label );
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	line-height: 1;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: transform .18s cubic-bezier(.16,.84,.44,1), background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.gct-btn:hover { transform: translateY(-1px); }
.gct-btn:active { transform: translateY(0); }
.gct-btn-brand {
	background: var( --wp--preset--color--brand );
	color: var( --wp--preset--color--brand-ink );
	box-shadow: var( --gct-shadow-brand );
}
.gct-btn-brand:hover { background: var( --wp--preset--color--brand-strong ); color: var( --wp--preset--color--on-dark ); }
.gct-btn-ghost {
	background: transparent;
	color: var( --wp--preset--color--ink );
	border-color: var( --wp--preset--color--border-strong );
}
.gct-btn-ghost:hover { border-color: var( --wp--preset--color--brand-strong ); color: var( --wp--preset--color--brand-strong ); }
.gct-btn-light { background: var( --wp--preset--color--on-dark ); color: var( --wp--preset--color--ink ); box-shadow: var( --gct-shadow-md ); }
.gct-btn-light:hover { background: #fff; }
.gct-btn-wa { background: var( --gct-wa ); color: #04351a; }
.gct-btn-wa:hover { background: #1fbe5a; }

/* ---- Header --------------------------------------------------------------- */
.gct-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var( --wp--preset--color--border );
	background: color-mix( in srgb, var( --wp--preset--color--surface ) 88%, transparent );
	backdrop-filter: saturate(1.2) blur(10px);
	-webkit-backdrop-filter: saturate(1.2) blur(10px);
}
.gct-header .gct-shell {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding-block: .85rem;
}
.gct-brand {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-family: var( --wp--preset--font-family--display );
	font-weight: 800;
	font-size: var( --wp--preset--font-size--xl );
	color: var( --wp--preset--color--ink );
	text-decoration: none;
	letter-spacing: -0.03em;
	line-height: 1;
	margin-right: auto;
}
.gct-brand .gct-mark { width: 30px; height: 30px; }
.gct-brand img.custom-logo { max-height: 44px; width: auto; }

.gct-nav-wrap { display: flex; }
.gct-nav {
	display: flex;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.gct-nav a {
	color: var( --wp--preset--color--ink-2 );
	text-decoration: none;
	font-family: var( --wp--preset--font-family--label );
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	position: relative;
	padding-block: .35rem;
	white-space: nowrap;
	transition: color .16s ease;
}
.gct-nav a:hover,
.gct-nav a[aria-current="page"] { color: var( --wp--preset--color--brand-strong ); }
.gct-nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 2px;
	background: var( --wp--preset--color--brand );
	border-radius: 2px;
}

.gct-actions { display: flex; align-items: center; gap: 1rem; }
.gct-headphone {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	color: var( --wp--preset--color--ink );
	text-decoration: none;
	font-weight: 600;
	font-size: var( --wp--preset--font-size--sm );
	white-space: nowrap;
}
.gct-headphone .gct-ic { color: var( --wp--preset--color--brand-strong ); }
.gct-headphone:hover { color: var( --wp--preset--color--brand-strong ); }
.gct-headcta { padding: .65rem 1.2rem; }

/* Burger — hidden until the header collapses. */
.gct-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0 10px;
	background: transparent;
	border: 1px solid var( --wp--preset--color--border-strong );
	border-radius: 12px;
	cursor: pointer;
}
.gct-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var( --wp--preset--color--ink );
	border-radius: 2px;
}

/* ---- Mobile drawer -------------------------------------------------------- */
.gct-drawer {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(21, 32, 26, .46);
	opacity: 0;
	transition: opacity .28s ease;
	display: flex;
	justify-content: flex-end;
}
/* The class selector's `display:flex` outranks the UA `[hidden]{display:none}`
   (equal specificity, author wins), so without this the invisible overlay covers
   the page and eats every click. Restore hidden = truly gone. */
.gct-drawer[hidden] { display: none; }
.gct-drawer.is-open { opacity: 1; }
.gct-drawer-panel {
	width: min(86vw, 360px);
	height: 100%;
	background: var( --wp--preset--color--surface );
	box-shadow: -12px 0 40px rgba(21, 32, 26, .22);
	padding: 5rem 1.75rem 2rem;
	transform: translateX(100%);
	transition: transform .3s cubic-bezier(.16,.84,.44,1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.gct-drawer.is-open .gct-drawer-panel { transform: translateX(0); }
.gct-drawer-close {
	position: absolute;
	top: 1rem; right: 1.1rem;
	width: 44px; height: 44px;
	font-size: 1.9rem;
	line-height: 1;
	background: transparent;
	border: 0;
	color: var( --wp--preset--color--ink-2 );
	cursor: pointer;
}
.gct-drawer .gct-nav { flex-direction: column; gap: .25rem; }
.gct-drawer .gct-nav a { font-size: var( --wp--preset--font-size--lg ); padding-block: .7rem; border-bottom: 1px solid var( --wp--preset--color--border ); }
.gct-drawer-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: auto; }
.gct-drawer-actions .gct-headphone { justify-content: center; padding: .85rem; border: 1px solid var( --wp--preset--color--border-strong ); border-radius: 999px; }
.gct-drawer-actions .gct-headcta { justify-content: center; }

/* ---- Hero (home) ---------------------------------------------------------- */
.gct-hero {
	position: relative;
	overflow: clip;
	background: var( --wp--preset--color--canvas );
	border-bottom: 1px solid var( --wp--preset--color--border );
}
.gct-hero::after {
	content: "";
	position: absolute;
	top: 50%; right: -8%;
	width: min(46rem, 60vw);
	aspect-ratio: 1;
	transform: translateY(-50%) rotate(8deg);
	background: url("assets/brand/gc-icon-green.svg") center / contain no-repeat;
	opacity: .07;
	pointer-events: none;
}
.gct-hero-inner {
	position: relative;
	z-index: 1;
	padding-block: clamp( 3.5rem, 7vw, 6.5rem );
	max-width: 58rem;
}
.gct-hero-title {
	font-family: var( --wp--preset--font-family--display );
	font-weight: 700;
	font-size: clamp( 2.6rem, 1rem + 5.5vw, 5.25rem );
	line-height: .95;
	letter-spacing: -0.03em;
	color: var( --wp--preset--color--ink );
	margin: 0 0 1.5rem;
	text-wrap: balance;
}
.gct-hero-title .gct-accent { color: var( --wp--preset--color--brand-strong ); }
.gct-hero-sub {
	font-size: var( --wp--preset--font-size--xl );
	line-height: 1.55;
	color: var( --wp--preset--color--ink-2 );
	max-width: 40ch;
	margin: 0 0 2rem;
}
.gct-hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2rem; }
.gct-trust {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem 1.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var( --wp--preset--font-family--label );
	font-size: .74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var( --wp--preset--color--ink-2 );
}
.gct-trust li { display: inline-flex; align-items: center; gap: .5rem; }
.gct-trust li::before {
	content: "";
	width: 1.15rem; height: 1.15rem;
	flex: none;
	background: var( --gct-check ) center / contain no-repeat;
}

/* ---- Home sections -------------------------------------------------------- */
.gct-band { padding-block: clamp( 3rem, 6vw, 5rem ); }
.gct-band-tint { background: var( --wp--preset--color--surface-2 ); }
.gct-section-title {
	font-family: var( --wp--preset--font-family--display );
	font-weight: 700;
	font-size: clamp( 1.9rem, 1rem + 2.4vw, 3rem );
	letter-spacing: -0.03em;
	line-height: 1;
	color: var( --wp--preset--color--ink );
	margin: 0 0 .6rem;
	text-wrap: balance;
}
.gct-section-lead {
	font-size: var( --wp--preset--font-size--lg );
	color: var( --wp--preset--color--ink-2 );
	max-width: 60ch;
	margin: 0 0 2.25rem;
}

/* What you get — a checked list, not icon-cards. */
.gct-checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 15rem, 1fr ) );
	gap: 1rem 2rem;
}
.gct-checks li {
	display: grid;
	grid-template-columns: 1.5rem 1fr;
	gap: .75rem;
	align-items: start;
	font-size: var( --wp--preset--font-size--lg );
	color: var( --wp--preset--color--ink );
	padding-block: .3rem;
}
.gct-checks li::before {
	content: "";
	width: 1.5rem; height: 1.5rem;
	margin-top: .1rem;
	background: var( --gct-check ) center / 1.15rem no-repeat, var( --wp--preset--color--brand-soft );
	border-radius: 999px;
}
.gct-checks li strong { display: block; font-weight: 700; font-size: var( --wp--preset--font-size--lg ); line-height: 1.3; }
.gct-checks li span { display: block; margin-top: .15rem; color: var( --wp--preset--color--ink-2 ); font-size: var( --wp--preset--font-size--base ); line-height: 1.5; }

/* Services — distinct editorial rows, not a same-card grid. */
.gct-services { display: grid; gap: 1px; background: var( --wp--preset--color--border ); border-block: 1px solid var( --wp--preset--color--border ); }
.gct-service {
	background: var( --wp--preset--color--surface );
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.5rem;
	padding: 1.75rem clamp(.5rem, 2vw, 1.5rem);
	transition: background-color .18s ease;
}
.gct-service:hover { background: var( --wp--preset--color--brand-soft ); }
.gct-service-body h3 {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 1.35rem, 1rem + 1vw, 1.7rem );
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 .35rem;
	color: var( --wp--preset--color--ink );
}
.gct-service-body h3 a { color: inherit; text-decoration: none; }
.gct-service:hover .gct-service-body h3 a { color: var( --wp--preset--color--brand-strong ); }
.gct-service-body p { margin: 0; color: var( --wp--preset--color--ink-2 ); max-width: 60ch; }
.gct-service-link {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	white-space: nowrap;
	font-family: var( --wp--preset--font-family--label );
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var( --wp--preset--color--brand-strong );
	text-decoration: none;
}
.gct-service-link::after {
	content: "";
	width: 1.1em; height: 1.1em;
	background: var( --gct-arrow ) center / contain no-repeat;
	transition: transform .18s ease;
}
.gct-service:hover .gct-service-link::after { transform: translateX(3px); }

/* Coverage — a dense town index (real local signal + internal links). */
.gct-coverage-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .5rem;
}
.gct-coverage-list a {
	display: inline-block;
	padding: .4rem .85rem;
	border: 1px solid var( --wp--preset--color--border-strong );
	border-radius: 999px;
	background: var( --wp--preset--color--surface );
	color: var( --wp--preset--color--ink-2 );
	text-decoration: none;
	font-size: var( --wp--preset--font-size--sm );
	transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.gct-coverage-list a:hover {
	border-color: var( --wp--preset--color--brand );
	color: var( --wp--preset--color--brand-ink );
	background: var( --wp--preset--color--brand-soft );
}

/* ---- Conversion CTA band (home closer + inner pages) ---------------------- */
.gct-cta-band {
	background: var( --gct-deep );
	color: var( --wp--preset--color--on-dark );
	border-radius: 22px;
	padding: clamp( 2.25rem, 5vw, 3.5rem );
	margin-block: clamp( 2.5rem, 5vw, 4rem );
	position: relative;
	overflow: clip;
}
.gct-cta-band::after {
	content: "";
	position: absolute;
	right: -6%; bottom: -30%;
	width: 22rem; aspect-ratio: 1;
	background: url("assets/brand/gc-icon-green.svg") center / contain no-repeat;
	opacity: .12;
	pointer-events: none;
}
.gct-cta-inner { position: relative; z-index: 1; max-width: 46rem; }
.gct-cta-title {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 1.9rem, 1rem + 2.4vw, 3rem );
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.02;
	margin: 0 0 .75rem;
	color: var( --wp--preset--color--on-dark );
}
.gct-cta-title strong { color: var( --wp--preset--color--brand ); }
.gct-cta-sub { color: #cfe0c4; font-size: var( --wp--preset--font-size--lg ); margin: 0 0 1.75rem; max-width: 48ch; }
.gct-cta-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Inner-page CTA is constrained with the prose; the home band spans full width. */
.wp-block-post-content .gct-cta-band { max-width: none; }

/* ---- Footer --------------------------------------------------------------- */
.gct-footer {
	background-color: #373737;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #bcbcbc;
	margin-top: clamp( 3rem, 6vw, 5rem );
	border-top: 2px solid var( --wp--preset--color--brand );
}
.gct-footer--img { text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.gct-footer--img .gct-foot-grid { padding-bottom: 3rem; }
.gct-foot-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 2.5rem;
	padding-block: clamp( 2.5rem, 5vw, 4rem ) 2rem;
}
.gct-foot-name {
	font-family: var( --wp--preset--font-family--display );
	font-weight: 700;
	font-size: var( --wp--preset--font-size--xl );
	letter-spacing: -0.02em;
	color: var( --wp--preset--color--on-dark );
}
.gct-foot-tag { margin: .6rem 0 1.25rem; max-width: 34ch; line-height: 1.6; color: #a6a6a6; }
.gct-foot-contacts { display: flex; flex-wrap: wrap; gap: .75rem; }
.gct-foot-contact {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .55rem .95rem;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 999px;
	color: var( --wp--preset--color--on-dark );
	text-decoration: none;
	font-weight: 600;
	font-size: var( --wp--preset--font-size--sm );
	background: rgba(0, 0, 0, .2);
	backdrop-filter: blur(2px);
}
.gct-foot-contact .gct-ic { color: var( --wp--preset--color--brand ); }
.gct-foot-contact:hover { border-color: var( --wp--preset--color--brand ); background: rgba(155, 212, 95, .16); }
.gct-foot-h {
	font-family: var( --wp--preset--font-family--label );
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #969696;
	margin: 0 0 1rem;
}
.gct-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.gct-foot-col a { color: #cccccc; text-decoration: none; font-size: var( --wp--preset--font-size--base ); }
.gct-foot-col a:hover { color: var( --wp--preset--color--brand ); }
.gct-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: var( --wp--preset--font-size--sm );
	color: #9a9a9a;
}
.gct-poweredby {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	color: #bcbcbc;
	text-decoration: none;
}
.gct-poweredby img { display: block; }
.gct-poweredby strong { color: var( --wp--preset--color--on-dark ); font-weight: 700; }
.gct-poweredby:hover strong { color: var( --wp--preset--color--brand ); }

/* ---- Inner-page prose (hubs + city landing pages) ------------------------- */
body.page:not(.home) main.wp-block-group { padding-inline: var( --wp--custom--content-padding, clamp( 1rem, 4vw, 2.5rem ) ); }
body.page:not(.home) .wp-block-post-content { max-width: 44rem; margin-inline: auto; }
body.page:not(.home) .wp-block-post-title { max-width: 44rem; margin-inline: auto; }
body.page:not(.home) .wp-block-post-content > h2 { margin-top: 2.25rem; }
body.page:not(.home) .wp-block-post-content > h3 { margin-top: 1.75rem; }
body.page:not(.home) .wp-block-post-content > p,
body.page:not(.home) .wp-block-post-content > ul { line-height: 1.75; }

/* ---- Accessibility + motion ---------------------------------------------- */
a:focus-visible, button:focus-visible, .gct-btn:focus-visible {
	outline: 3px solid var( --wp--preset--color--accent );
	outline-offset: 2px;
	border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
	.gct-btn, .gct-service-link::after, .gct-drawer, .gct-drawer-panel { transition: none !important; }
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
	.gct-nav-wrap { display: none; }
	.gct-headphone, .gct-headcta { display: none; }
	.gct-burger { display: flex; }
	.gct-service { grid-template-columns: 1fr; gap: .75rem; align-items: start; }
	.gct-foot-grid { grid-template-columns: 1fr 1fr; }
	.gct-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.gct-foot-grid { grid-template-columns: 1fr; gap: 2rem; }
	.gct-legal { flex-direction: column; align-items: flex-start; }
	.gct-hero-cta .gct-btn { flex: 1 1 auto; }
}
