/*
Theme Name: Accountants of the Future
Theme URI: https://www.accountantsofthefuture.co.uk
Description: Child theme of Twenty Twenty-Five carrying the Accountants of the Future brand: IBM Plex fonts, Ledger green palette, 1180px content width.
Author: Accountants of the Future
Template: twentytwentyfive
Version: 1.0.11
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aotf
*/

/* Focus outlines (WCAG 2.2 AA) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--bright-green);
	outline-offset: 2px;
}

/* Small capital labels (IBM Plex Mono) */
.aotf-label {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
}
.aotf-label.is-on-dark {
	color: var(--wp--preset--color--bright-green);
}

/* Prices and scores */
.aotf-price {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-weight: 600;
}

/* Cards */
.aotf-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: none;
}
.aotf-card.is-on-dark {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.18);
	color: var(--wp--preset--color--white);
}
.aotf-card.is-highlight {
	border: 2px solid var(--wp--preset--color--ledger-green);
}

/* Dark bands */
.aotf-dark {
	background: var(--wp--preset--color--deep-green);
	color: var(--wp--preset--color--white);
}
.aotf-dark :where(h1, h2, h3, h4, p, li) {
	color: var(--wp--preset--color--white);
}
.aotf-dark a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--bright-green);
}

/* Buttons: at least 44px tall; on dark bands the primary is bright green */
.wp-block-button__link {
	min-height: 44px;
	line-height: 1.3;
}
.aotf-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--wp--preset--color--bright-green);
	color: var(--wp--preset--color--deep-green);
}
.aotf-dark .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}

/* Green CTA band: white button */
.aotf-cta .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: #0A4D44;
}

/* Score rows in the hero card */
.aotf-score-row {
	border-top: 1px solid var(--wp--preset--color--border);
	padding: 0.6rem 0;
}
.aotf-score-row.is-total {
	border-top: 1px solid var(--wp--preset--color--ink);
	font-weight: 600;
}
.aotf-score-row p {
	margin: 0;
}
.aotf-mono {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	color: var(--wp--preset--color--slate);
}
.aotf-score-row.is-total .aotf-mono {
	color: var(--wp--preset--color--ledger-green);
}

/* Foundations pyramid */
.aotf-layer {
	padding: 1.25rem 1.4rem;
	border-radius: 2px;
}
.aotf-layer p {
	margin: 0;
}
.aotf-layer-3 {
	background: #DCEDE9;
	border-radius: 6px 6px 2px 2px;
}
.aotf-layer-3 .aotf-label {
	color: #2E5A53;
}
.aotf-layer-2 {
	background: #6FA79D;
	color: #0B2622;
}
.aotf-layer-2 .aotf-label {
	color: #0B2622;
}
.aotf-layer-1 {
	background: var(--wp--preset--color--ledger-green);
	color: var(--wp--preset--color--white);
	border-radius: 2px 2px 6px 6px;
}
.aotf-layer-1 .aotf-label {
	color: #DCEDE9;
}
.aotf-layer-1 p,
.aotf-layer-1 strong {
	color: var(--wp--preset--color--white);
}
.aotf-pill {
	display: inline-block;
	background: var(--wp--preset--color--white);
	color: #0A4D44;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
}

/* Fact cards with a top rule (Why now) */
.aotf-rule-top {
	border-top: 1px solid var(--wp--preset--color--ink);
	padding-top: 0.9rem;
}
.aotf-rule-top-green {
	border-top: 3px solid var(--wp--preset--color--ledger-green);
	padding-top: 0.75rem;
}
.aotf-step {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--ledger-green);
}

/* Services: side column with price and button */
.aotf-label.is-green {
	color: var(--wp--preset--color--ledger-green);
}
.aotf-side {
	border-left: 1px solid var(--wp--preset--color--border);
	padding-left: var(--wp--preset--spacing--40);
}
.aotf-price.is-big {
	font-size: 1.625rem;
}
.aotf-price-unit {
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--wp--preset--color--slate);
}
@media (max-width: 767px) {
	.aotf-side {
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid var(--wp--preset--color--border);
		padding-top: var(--wp--preset--spacing--30);
	}
}

/* Placeholders for embeds and forms until they are wired in */
.aotf-embed-placeholder,
.aotf-form-placeholder {
	border: 1px dashed #9AABA8;
	border-radius: 4px;
	padding: 1.5rem;
	color: var(--wp--preset--color--slate);
	text-align: center;
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8125rem;
}
.aotf-embed-placeholder {
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Founder photos */
.aotf-photo img {
	border-radius: 4px;
	background: #DCEDE9;
	width: 100%;
}

/* Forms (Gravity Forms, PMPro, search) */
:where(.gform_wrapper, .pmpro, .wp-block-search) input[type="text"],
:where(.gform_wrapper, .pmpro, .wp-block-search) input[type="email"],
:where(.gform_wrapper, .pmpro, .wp-block-search) input[type="password"],
:where(.gform_wrapper, .pmpro, .wp-block-search) input[type="search"],
:where(.gform_wrapper, .pmpro, .wp-block-search) input[type="number"],
:where(.gform_wrapper, .pmpro) select,
:where(.gform_wrapper, .pmpro) textarea {
	min-height: 44px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	padding: 0.6rem 0.8rem;
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
}
:where(.gform_wrapper, .pmpro) input[type="submit"],
:where(.gform_wrapper, .pmpro) button {
	min-height: 44px;
	border: 0;
	border-radius: 4px;
	padding: 0.7rem 1.4rem;
	background: var(--wp--preset--color--ledger-green);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--ibm-plex-sans);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
}
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select {
	border-color: #b42318;
}
.gform_wrapper .validation_message,
.gform_wrapper .gform_validation_errors {
	color: #b42318;
}

/* Header */
.aotf-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--white);
}
.aotf-header .wp-block-navigation a {
	font-weight: 500;
	text-decoration: none;
}
.aotf-header .wp-block-navigation a:hover {
	text-decoration: underline;
}

/* Footer */
.aotf-footer a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.aotf-footer a:hover {
	text-decoration: underline;
}
.aotf-footer :where(h1, h2, h3, h4) {
	color: var(--wp--preset--color--white);
}
.aotf-footer ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
.aotf-footer ul li {
	margin-bottom: 0.4rem;
}
.aotf-footer .aotf-footer-small {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.72);
}

/* Mobile */
@media (max-width: 767px) {
	.aotf-header .aotf-header-buttons {
		display: none;
	}
	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* Photo placeholder until real photos arrive */
.aotf-photo-placeholder {
	aspect-ratio: 4 / 3;
	border-radius: 4px;
	background: #DCEDE9;
	color: #0A4D44;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8125rem;
}
.aotf-embed-placeholder.is-short {
	min-height: 120px;
}

/* Item lists on the membership page */
.aotf-item-list {
	list-style: none;
	padding-left: 0;
}
.aotf-item-list li {
	border-top: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem 0;
	color: var(--wp--preset--color--slate);
}
.aotf-item-list li strong {
	color: var(--wp--preset--color--ink);
}
.aotf-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ledger-green);
	background: #DCEDE9;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	margin-right: 0.5rem;
	vertical-align: middle;
}

/* FAQ (details blocks) */
.aotf-faq .wp-block-details {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin-bottom: 0.5rem;
}
.aotf-faq .wp-block-details summary {
	font-weight: 600;
	cursor: pointer;
	min-height: 44px;
	display: flex;
	align-items: center;
}
.aotf-faq .wp-block-details p {
	color: var(--wp--preset--color--slate);
	margin-top: 0.5rem;
}

/* Insights */
.aotf-cat-nav a {
	display: inline-block;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	margin: 0 0.4rem 0.4rem 0;
	text-decoration: none;
	font-weight: 500;
	min-height: 44px;
	line-height: 1.9;
	background: var(--wp--preset--color--white);
}
.aotf-post-card {
	overflow: hidden;
	height: 100%;
}
.aotf-post-card .wp-block-post-featured-image img {
	width: 100%;
	display: block;
}
.aotf-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.aotf-post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}
.aotf-post-card .wp-block-post-terms a {
	text-decoration: none;
	color: var(--wp--preset--color--slate);
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 0.75rem;
	text-decoration: none;
}

/* No stray gaps between full-width bands (root and post-content block gap) */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

/* Insights cards: breathing room above the category label */
.aotf-post-card > .wp-block-group {
	padding-top: var(--wp--preset--spacing--30);
}

/* Gravity Forms: scorecard */
.aotf-scorecard .gsection_title {
	font-family: var(--wp--preset--font-family--ibm-plex-serif);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}
.aotf-scorecard .gsection {
	border-bottom: 0;
	padding-bottom: 0;
}
.aotf-scorecard .gfield_label {
	font-weight: 500;
	font-size: 1rem;
}
.gform_wrapper .aotf-scale .gfield_radio {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 0.5rem !important;
}
.gform_wrapper .aotf-scale .gchoice {
	margin: 0 !important;
	width: auto !important;
	display: block;
}
.gform_wrapper .aotf-scale .gchoice label {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	cursor: pointer;
	font-size: 0.9375rem;
	max-width: none;
}
.aotf-scale .gchoice input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.aotf-scale .gchoice:has(input:checked) label {
	background: #DCEDE9;
	border-color: var(--wp--preset--color--ledger-green);
	color: #0A4D44;
	font-weight: 600;
}
.aotf-scale .gchoice:has(input:focus-visible) label {
	outline: 3px solid var(--wp--preset--color--bright-green);
	outline-offset: 2px;
}
.aotf-scorecard .gf_progressbar_wrapper {
	margin-bottom: 1.5rem;
}
.aotf-scorecard .gf_progressbar_title {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
}
.aotf-scorecard .gf_progressbar {
	background: var(--wp--preset--color--border);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}
.aotf-scorecard .gf_progressbar_percentage {
	background: var(--wp--preset--color--ledger-green) !important;
	height: 8px;
	font-size: 0;
}
.aotf-scorecard .gform_page_footer {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
}
.gform_wrapper {
	--gf-ctrl-btn-bg-color-primary: var(--wp--preset--color--ledger-green);
	--gf-ctrl-btn-bg-color-hover-primary: #0A4D44;
	--gf-ctrl-btn-border-color-primary: var(--wp--preset--color--ledger-green);
	--gf-ctrl-btn-border-color-hover-primary: #0A4D44;
	--gf-ctrl-btn-color-primary: var(--wp--preset--color--white);
	--gf-ctrl-btn-radius: 4px;
	--gf-color-primary: var(--wp--preset--color--ledger-green);
}
.gform_wrapper .gform_next_button,
.gform_wrapper .gform_button,
.gform_wrapper button[type="submit"] {
	background: var(--wp--preset--color--ledger-green) !important;
	border-color: var(--wp--preset--color--ledger-green) !important;
	color: var(--wp--preset--color--white) !important;
	border-radius: 4px;
	min-height: 44px;
}
.gform_wrapper .gform_next_button:hover,
.gform_wrapper .gform_button:hover,
.gform_wrapper button[type="submit"]:hover {
	background: #0A4D44 !important;
	border-color: #0A4D44 !important;
}
.gform_wrapper .gform_previous_button {
	background: transparent !important;
	color: var(--wp--preset--color--ledger-green) !important;
	border: 2px solid var(--wp--preset--color--ledger-green) !important;
	border-radius: 4px;
	min-height: 44px;
}
.aotf-scorecard .gfield_required {
	display: none;
}
.aotf-scorecard .gform_validation_errors {
	border: 1px solid #b42318;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	background: #fff5f4;
}

/* Scorecard result */
.aotf-result {
	/* !important: the constrained layout zeroes the first child's margin */
	margin-block: var(--wp--preset--spacing--50) !important;
}
.aotf-result-score {
	margin: 0.25rem 0 0.75rem;
}
.aotf-result .aotf-score-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}
.aotf-result .aotf-score-row p {
	margin: 0;
}

/* Paid Memberships Pro: brand colours and spacing (its variables sit on :root) */
.pmpro {
	--pmpro--color--accent: var(--wp--preset--color--ledger-green);
	--pmpro--color--contrast: var(--wp--preset--color--ink);
	--pmpro--color--border: var(--wp--preset--color--border);
	--pmpro--color--border--variation: var(--wp--preset--color--border);
	--pmpro--color--base-2: var(--wp--preset--color--mist);
	--pmpro--base--border-radius: 6px;
	--pmpro--btn--border-radius: 4px;
	--pmpro--box-shadow: none;
	/* padding, not margin: the constrained layout zeroes the first child's margin */
	padding-block: var(--wp--preset--spacing--50);
}
.pmpro .pmpro_card_title,
.pmpro h2,
.pmpro h3 {
	font-family: var(--wp--preset--font-family--ibm-plex-serif);
	font-weight: 600;
}
.pmpro .pmpro_btn {
	box-shadow: none;
	min-height: 44px;
}
.pmpro .pmpro_btn:hover,
.pmpro .pmpro_btn:focus {
	background-color: #0A4D44;
	border-color: #0A4D44;
}
.pmpro .pmpro_btn-outline {
	background: transparent;
	color: var(--wp--preset--color--ledger-green);
}
.pmpro a {
	color: var(--wp--preset--color--ledger-green);
}

/* Short pages: keep the footer at the bottom of the viewport */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100svh;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* "Page No Title" pages that start with a plain heading (checkout, login):
   space above it (padding: the constrained layout zeroes the first child's margin)
   and a tighter gap to the plugin card below. */
.wp-block-post-content > h1:first-child {
	padding-block-start: var(--wp--preset--spacing--60);
}
.wp-block-post-content > h1:first-child + .pmpro {
	padding-block-start: var(--wp--preset--spacing--30);
}
