/**
 * Structural layout: containers, section rhythm, site header/footer shell.
 * Section-specific visuals (hero, pricing, cards…) live in home.css.
 */

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.section {
	padding-block: var(--space-16);
}

.section--tight {
	padding-block: var(--space-10);
}

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

.section--dark {
	background: var(--color-navy-900);
	color: var(--color-text-on-dark-muted);
}

.section--dark h2,
.section--dark h3 {
	color: var(--color-text-on-dark);
}

.section-heading {
	max-width: 640px;
	margin-inline: auto;
	text-align: center;
	margin-bottom: var(--space-10);
}

.section-heading__eyebrow {
	display: inline-block;
	font-size: var(--fs-xs);
	font-weight: var(--fw-semibold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-primary);
	margin-bottom: var(--space-3);
}

.section-heading p {
	margin-top: var(--space-3);
	margin-bottom: 0;
}

/* ---------- Site header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	transition: box-shadow var(--transition-base);
}

.site-header.is-scrolled {
	box-shadow: var(--shadow-sm);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: var(--header-height);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--color-neutral-900);
	flex-shrink: 0;
}

.site-branding:hover {
	text-decoration: none;
}

.site-branding img {
	height: 36px;
	width: auto;
}

/* Fixed 2026-09-13: the star mark + underline (the 'leaf' icon used as
   the fallback logo when no custom logo image is set in Customizer,
   see appiappi_icon('leaf') in inc/template-tags.php) is a 24x24 inline
   SVG sized only by its width/height HTML attributes. base.css's global
   `svg { max-width: 100%; height: auto; }` reset makes that sizing
   depend on the SVG's flex-item box having real width to resolve
   against — on the cramped mobile header row (icon + name only, no
   explicit size floor) that box could shrink to the text's own width
   instead of the icon's, squeezing the mark down to near-nothing.
   Pinning an explicit, non-shrinking box here guarantees the star and
   its underline always render at a fixed, visible size regardless of
   how tight the surrounding flex row gets. */
.site-branding__mark {
	display: inline-flex;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

.site-branding__mark svg {
	width: 100%;
	height: 100%;
}

.site-branding__name {
	font-weight: var(--fw-bold);
	font-size: var(--fs-lg);
	line-height: 1.1;
}

.site-branding__tagline {
	display: none;
}

.primary-nav {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.header-actions .btn-link {
	display: none;
}

/* "Get Started" is hidden entirely below 1024px (revised 2026-09-07) —
   per explicit request, mobile shouldn't show it at all, not even
   inside the slide-out nav (that instance was removed from the markup
   rather than hidden here). */
.header-actions .header-cta {
	display: none;
}

.mobile-nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-white);
}

.mobile-nav {
	position: fixed;
	inset: var(--header-height) 0 0 0;
	background: var(--color-white);
	transform: translateY(-8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
	overflow-y: auto;
	z-index: 90;
}

.mobile-nav.is-open {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
}

.mobile-nav__list {
	padding: var(--space-6) var(--container-pad);
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.mobile-nav__list a {
	display: block;
	padding: var(--space-3) 0;
	font-size: var(--fs-lg);
	font-weight: var(--fw-medium);
	color: var(--color-neutral-900);
	border-bottom: 1px solid var(--color-border);
}

.mobile-nav__list a:hover {
	text-decoration: none;
	color: var(--color-primary);
}

/* Current-page highlight, mobile nav (added 2026-09-13) — WordPress adds
   current-menu-item/current_page_item to the <li> itself (and
   current-menu-parent/current-menu-ancestor up the tree) automatically;
   this theme never styled any of them before, so the active page was
   never visually distinguished in the menu. A left accent bar + tinted
   background reads clearly in a stacked list. */
.mobile-nav__list li.current-menu-item > a,
.mobile-nav__list li.current_page_item > a,
.mobile-nav__list li.current-menu-parent > a,
.mobile-nav__list li.current-menu-ancestor > a {
	color: var(--color-primary-dark);
	background: var(--color-primary-50);
	border-radius: var(--radius-md);
	padding-inline: var(--space-3);
	margin-inline: calc(var(--space-3) * -1);
	border-bottom-color: transparent;
	box-shadow: inset 3px 0 0 var(--color-primary);
}

.mobile-nav__actions {
	padding: var(--space-6) var(--container-pad);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

body.mobile-nav-is-open {
	overflow: hidden;
}

@media (min-width: 1024px) {
	.primary-nav {
		display: block;
	}

	.primary-nav ul {
		display: flex;
		align-items: center;
		gap: var(--space-6);
	}

	.primary-nav li {
		position: relative;
	}

	.primary-nav a {
		display: inline-flex;
		align-items: center;
		color: var(--color-neutral-800);
		font-size: var(--fs-sm);
		font-weight: var(--fw-medium);
		padding-block: var(--space-2);
		position: relative;
	}

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

	/* Current-page highlight, desktop nav (added 2026-09-13) — see the
	   mobile-nav note above for why this never existed before. A
	   colour change alone reads as too subtle at this size, so the
	   active item also gets a short animated underline (::after),
	   growing in from the centre — the same "quiet but unmistakable"
	   treatment used for hover states on plenty of production nav bars,
	   just made persistent instead of hover-only for whichever item
	   matches the current page. current-menu-parent/-ancestor (a menu
	   item whose child page is the one currently open) get the same
	   treatment, one shade lighter, so a sub-page still shows *where in
	   the site* the visitor is even though the exact label isn't lit up. */
	.primary-nav a::after {
		content: '';
		position: absolute;
		left: 50%;
		right: 50%;
		bottom: -2px;
		height: 2px;
		border-radius: var(--radius-full, 999px);
		background: var(--color-primary);
		transition: left var(--transition-base), right var(--transition-base);
	}

	.primary-nav li.current-menu-item > a,
	.primary-nav li.current_page_item > a {
		color: var(--color-primary-dark);
		font-weight: var(--fw-semibold);
	}

	.primary-nav li.current-menu-item > a::after,
	.primary-nav li.current_page_item > a::after {
		left: 0;
		right: 0;
	}

	.primary-nav li.current-menu-parent > a,
	.primary-nav li.current-menu-ancestor > a {
		color: var(--color-primary);
	}

	.primary-nav li.current-menu-parent > a::after,
	.primary-nav li.current-menu-ancestor > a::after {
		left: 0;
		right: 0;
		opacity: 0.5;
	}

	.header-actions .btn-link {
		display: inline-flex;
	}

	.header-actions .header-cta {
		display: inline-flex;
	}

	.mobile-nav-toggle,
	.mobile-nav {
		display: none;
	}

	.site-branding__tagline {
		display: block;
		font-size: var(--fs-xs);
		color: var(--color-text-muted);
	}
}

/* ---------- Site footer ---------- */

.site-footer {
	background: var(--color-navy-900);
	color: var(--color-text-on-dark-muted);
	padding-block: var(--space-16) var(--space-8);
}

.site-footer a {
	color: var(--color-text-on-dark-muted);
}

.site-footer a:hover {
	color: var(--color-white);
}

.footer-grid {
	display: grid;
	gap: var(--space-10);
	grid-template-columns: 1fr;
	margin-bottom: var(--space-12);
}

.footer-col__title {
	color: var(--color-white);
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: var(--space-4);
}

.footer-col__list li {
	margin-bottom: var(--space-2);
}

.footer-col--brand .site-branding {
	color: var(--color-white);
	margin-bottom: var(--space-4);
}

.footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2);
	margin-bottom: var(--space-3);
}

.footer-social {
	display: flex;
	gap: var(--space-3);
	margin-top: var(--space-4);
}

.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding-top: var(--space-6);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: var(--fs-xs);
}

.footer-bottom__legal {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
}

/* Mobile only (<640px): Quick Links and Services are dropped to keep
   the footer short on a phone screen (Contact and the brand column
   already cover the essentials), and the copyright/legal row centres
   instead of left-aligning. Both columns come back from 640px up. */
@media (max-width: 639.98px) {
	.footer-col--links,
	.footer-col--services {
		display: none;
	}

	.footer-bottom {
		align-items: center;
		text-align: center;
	}

	.footer-bottom__legal {
		justify-content: center;
	}
}

@media (min-width: 640px) {
	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.footer-grid {
		grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
	}

	.footer-bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* Footer's own desktop side-padding (configurable via Customizer ->
   Layout Spacing), separate from the sitewide --container-pad — the
   footer's 4-column grid, copyright and legal links all share this
   one .container, so one override covers all of them. */
@media (min-width: 768px) {
	.site-footer .container {
		padding-inline: var(--footer-pad-desktop);
	}
}
