/* Another Nine — Franchise: parity touches with anothernine.com.
   theme.json carries the brand tokens; this file covers what theme.json can't:
   sticky header, button style variations, eyebrow headings, card shadows. */

/* Section vertical rhythm: the spacing|50 preset (used for section top/bottom
   padding) resolves to WP's default 1.5rem; bump it to 60px for breathing room. */
:root { --wp--preset--spacing--50: 3.75rem !important; }

/* --- Full-width landing sections sit flush (no white slivers / hero gaps) --- */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }
.wp-block-post-content > * { margin-block-start: 0; }

/* --- Scroll reveals (JS adds .a9-reveal so content stays visible if JS is off) --- */
@media (prefers-reduced-motion: no-preference) {
	.a9-reveal {
		opacity: 0;
		transform: translateY(22px);
		transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.a9-reveal.a9-in {
		opacity: 1;
		transform: none;
	}
}

/* --- Mobile overflow safety: long uppercase headings must wrap, never clip --- */
html, body { overflow-x: hidden; max-width: 100%; }
/* Headings wrap only at spaces — never break a word mid-letter (e.g. CONSTRUCTION). */
.wp-block-heading, h1, h2, h3, h4 { overflow-wrap: normal; word-wrap: normal; word-break: normal; hyphens: none; }

/* --- Sticky header --- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: #ffffff;
}

/* --- Footer: darker green + the in-footer CTA band darkened & compacted to match --- */
.a9-footer { background-color: #142923; }
.a9-footer .has-forest-background-color {
	background-color: #142923 !important;
	padding-top: 2.5rem !important;
	padding-bottom: 2.5rem !important;
}

/* --- Lead-form section on green: inset placeholders, light text, sage button --- */
/* Hide the field labels visually (kept in the DOM for screen readers); the field
   placeholders read inside the inputs instead of stacked above them. */
.a9-form-dark .fluentform .ff-el-input--label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
/* Keep the consent checkbox option text visible + light. */
.a9-form-dark .fluentform .ff-el-form-check-label,
.a9-form-dark .fluentform .ff-el-form-check label { color: var(--wp--preset--color--cream); }

/* Work Sans inside every form field + placeholder. */
.fluentform input,
.fluentform select,
.fluentform textarea,
.fluentform .ff-el-form-control,
.fluentform input::placeholder,
.fluentform textarea::placeholder {
	font-family: var(--wp--preset--font-family--work-sans) !important;
}
.a9-form-dark .fluentform .ff-btn-submit {
	background-color: var(--wp--preset--color--sage-light) !important;
	color: var(--wp--preset--color--forest) !important;
}
.a9-form-dark .fluentform .ff-btn-submit:hover {
	background-color: var(--wp--preset--color--sage) !important;
	color: var(--wp--preset--color--cream) !important;
}

/* --- Header "Franchise" tag: divider beside the logo lockup --- */
.a9-franchise-tag {
	padding-left: 0.75rem;
	border-left: 1px solid var(--wp--preset--color--warm-tan);
	margin: 0;
	align-self: center;
}

/* Shrink the logo on small screens so it sits comfortably with the menu toggle. */
@media (max-width: 781px) {
	.wp-block-site-logo img { width: 120px !important; }
}

/* --- Button: outline (forest) variation --- */
.wp-block-button.is-style-a9-outline > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--forest);
	border: 1.5px solid var(--wp--preset--color--forest);
}
.wp-block-button.is-style-a9-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--cream);
}

/* --- Button: sage variation --- */
.wp-block-button.is-style-a9-sage > .wp-block-button__link {
	background-color: var(--wp--preset--color--sage-light);
	color: var(--wp--preset--color--forest);
}
.wp-block-button.is-style-a9-sage > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--cream);
}

/* --- Eyebrow heading: small, uppercase, wide-tracked label --- */
.wp-block-heading.is-style-a9-eyebrow {
	font-family: var(--wp--preset--font-family--work-sans) !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage) !important;
	line-height: 1.2 !important;
}

/* --- Cards: flat #FAFAFA panel, hairline border, lift on hover (matches anothernine.com) --- */
.is-a9-card {
	background-color: #FAFAFA;
	border: none;
	border-radius: 12px;
	box-shadow: none;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.is-a9-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 40px -26px rgba(29, 60, 52, 0.22);
}

/* --- Full-bleed heroes: atmospheric forest depth (stand-in until photos) --- */
.wp-block-cover.is-a9-hero {
	min-height: 62vh;
}
.wp-block-cover.is-a9-hero .wp-block-cover__inner-container {
	max-width: 760px;
	position: relative;
	z-index: 2;
}

/* Interior page banners: align the heading/subtext with the nav/content width (1200px). */
.wp-block-cover:not(.is-a9-hero) .wp-block-cover__inner-container {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 1.5rem;
}

/* Layered forest/sage gradient mesh ONLY on forest covers with NO photo set
   (subpage heroes). Reads as a designed dark surface, not a flat block.
   Covers WITH a photo keep their semi-transparent dim overlay so the image shows. */
.wp-block-cover:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background.has-forest-background-color {
	background-color: #1D3C34;
	background-image:
		radial-gradient(1100px 620px at 18% 8%, rgba(107, 124, 74, 0.30), transparent 60%),
		radial-gradient(960px 560px at 88% 92%, rgba(42, 96, 84, 0.55), transparent 58%),
		radial-gradient(760px 760px at 72% 18%, rgba(162, 165, 104, 0.12), transparent 62%);
	opacity: 1 !important;
}

/* Fine grain overlay for texture/depth (very subtle). */
.wp-block-cover.is-a9-hero::after,
.wp-block-cover:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background.has-forest-background-color::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
	opacity: 0.05;
	mix-blend-mode: overlay;
}


/* --- Fluent Forms: align fields with the brand --- */
.fluentform .ff-el-input--content input[type="text"],
.fluentform .ff-el-input--content input[type="email"],
.fluentform .ff-el-input--content input[type="tel"],
.fluentform .ff-el-input--content select,
.fluentform .ff-el-input--content textarea {
	border: 1px solid rgba(29, 60, 52, 0.25);
	border-radius: 8px;
	padding: 0.7rem 0.85rem;
	font-family: var(--wp--preset--font-family--work-sans);
	font-size: 1rem;
	background-color: #fff;
}
.fluentform .ff-el-input--content input:focus,
.fluentform .ff-el-input--content select:focus,
.fluentform .ff-el-input--content textarea:focus {
	border-color: var(--wp--preset--color--forest);
	box-shadow: 0 0 0 3px rgba(29, 60, 52, 0.12);
	outline: none;
}
.fluentform .ff-el-input--label label {
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--wp--preset--color--charcoal);
}
.fluentform .ff-btn-submit {
	background-color: var(--wp--preset--color--forest) !important;
	border-radius: 999px !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	padding: 0.8rem 1.4rem !important;
}
.fluentform .ff-btn-submit:hover {
	background-color: var(--wp--preset--color--forest-alt) !important;
}

/* --- Process grid: warm backdrop to set the section apart --- */
.is-a9-process { background-color: #F4F2EE; }

/* --- Process grid: step titles sized like the reference (number + bold sans) --- */
.is-a9-process h4 {
	font-size: 1.0625rem;
	line-height: 1.3;
	margin-top: 20px;
	margin-bottom: 0.5rem;
}

/* --- Plain line-icon for the process grid (no badge, matches anothernine.com) --- */
.is-a9-step-icon {
	display: flex;
	width: max-content;
	margin-bottom: 0;
	color: var(--wp--preset--color--forest);
}
.is-a9-step-icon svg {
	width: 30px;
	height: 30px;
	stroke: var(--wp--preset--color--forest);
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* --- Numbered step counters (process / path to ownership) --- */
.is-a9-step-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	font-weight: 700;
	color: var(--wp--preset--color--sage);
	line-height: 1;
	margin: 0 0 0.25rem;
}

/* --- Proof band: zero the first-child top margin so padding is even top/bottom --- */
.a9-proof .wp-block-column > *:first-child { margin-top: 0; }

/* --- Trackman-orange wave accent (full-bleed) --- */
.a9-wave-wrap {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-top: 2.75rem;
	line-height: 0;
}
.a9-wave {
	display: block;
	width: 100%;
	height: 150px;
}

/* --- Brand gradient hairline band --- */
.is-a9-band {
	height: 6px;
	border-radius: 3px;
	background: var(--wp--preset--gradient--brand-band);
}

/* --- Interactive states: every clickable gets hover / focus-visible / active --- */
.wp-element-button {
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease,
		background-color 0.2s ease, color 0.2s ease;
}
.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 22px -10px rgba(29, 60, 52, 0.45);
}
.wp-element-button:active {
	transform: translateY(0);
}
.wp-element-button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--wp--preset--color--cream), 0 0 0 5px var(--wp--preset--color--sage);
}
a:focus-visible {
	outline: 2px solid var(--wp--preset--color--sage);
	outline-offset: 3px;
	border-radius: 3px;
}
.wp-block-navigation a { transition: color 0.2s ease; }
.wp-block-navigation a:hover { color: var(--wp--preset--color--sage); }

/* --- FAQ accordion polish --- */
.wp-block-details { transition: box-shadow 0.3s ease, transform 0.3s ease; }
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	font-size: 0.95rem;
	color: var(--wp--preset--color--forest);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details[open] { box-shadow: 0 10px 28px -14px rgba(29, 60, 52, 0.28); }

/* Card titles: editorial serif, title case, muted grey (matches anothernine.com). */
.is-a9-card h4 {
	font-family: var(--wp--preset--font-family--serif);
	text-transform: none;
	font-weight: 500;
	font-size: 1.3rem;
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--wp--preset--color--cool-gray);
	margin-bottom: 0.6rem;
	overflow-wrap: normal;
	word-wrap: normal;
	hyphens: none;
}
.is-a9-card p {
	color: var(--wp--preset--color--cool-gray);
	font-size: 0.95rem;
}

/* --- Icon badge: solid forest circle with a light icon (matches anothernine.com) --- */
.is-a9-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--cream);
	margin-bottom: 1.1rem;
}
.is-a9-icon svg { width: 22px; height: 22px; stroke: var(--wp--preset--color--cream); fill: none; stroke-width: 1.6; }

/* --- Load motion: staggered hero reveal (transform/opacity only) --- */
@keyframes a9-rise {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: none; }
}
.is-a9-hero h1,
.is-a9-hero p,
.is-a9-hero .wp-block-buttons {
	animation: a9-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.is-a9-hero h1 { animation-delay: 0.05s; }
.is-a9-hero p { animation-delay: 0.18s; }
.is-a9-hero .wp-block-buttons { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
	*, ::before, ::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
