/*
Theme Name: Lennox Advisory
Theme URI: https://www.lennoxadv.com
Author: Travis Lennox
Description: Child theme of Twenty Twenty-Five for Lennox Advisory: brand palette, self-hosted Montserrat and PT Serif, header, footer and page patterns.
Template: twentytwentyfive
Requires at least: 6.7
Requires PHP: 7.4
Version: 1.4.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lennox-advisory
*/

/* The few rules theme.json can't express. */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Jumping to #services or #about leaves a little room above the heading. */
[id] {
	scroll-margin-top: 1.5rem;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:where(a, button, input, textarea, select, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
}

.is-style-section-navy :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* Header, page and footer sit flush; each section brings its own padding. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* On short pages the footer stays at the bottom of the window. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

.la-site-header {
	border-bottom: 1px solid var(--wp--preset--color--taupe);
}

/* A short burnt-orange rule above each page's main heading, after the logo's swash. */
.la-hero h1::before {
	content: "";
	display: block;
	width: 3rem;
	height: 4px;
	margin-bottom: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--orange);
}

.la-card {
	border-radius: 4px;
}

/*
 * Contact form: Fluent Forms set to "Inherit Theme Style", so the theme styles it.
 * Field borders use a navy tint (3.6:1 on white) so the field edges meet WCAG's 3:1.
 */
.fluentform {
	--fluentform-primary: var(--wp--preset--color--navy);
	--fluentform-danger: var(--wp--custom--color--error);
	--fluentform-border-color: var(--wp--custom--color--field-border);
	--fluentform-border-radius: 4px;
}

.fluentform .ff-el-group {
	margin-bottom: var(--wp--preset--spacing--40);
}

.fluentform .ff-el-input--label label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

.fluentform .ff-el-form-control {
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--color--field-border);
	border-radius: 4px;
}

.fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--navy);
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 1px;
}

.fluentform .ff-el-is-error .ff-el-form-control {
	border-color: var(--wp--custom--color--error);
}

.fluentform .text-danger,
.fluentform .ff-el-is-error .text-danger {
	margin-top: 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--custom--color--error);
}

.fluentform .ff-btn-submit.wp-element-button {
	padding: 0.85rem 1.6rem;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1rem;
	font-weight: 600;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--navy);
	border: 0;
	border-radius: 4px;
}

.fluentform .ff-btn-submit.wp-element-button:hover {
	background: var(--wp--preset--color--orange);
}

.ff-message-success {
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--gray);
	border: 0;
	border-left: 4px solid var(--wp--preset--color--orange);
	box-shadow: none;
}

.la-header-cta .wp-block-button__link {
	padding: 0.6rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 600px) {
	.la-header-logo img {
		width: 150px;
		height: auto;
	}
}

/* Narrowest phones: tighter gaps keep Services, About and Contact on one row. */
@media (max-width: 400px) {
	.la-site-header .wp-block-group,
	.la-site-header .wp-block-navigation__container {
		gap: 1rem;
	}
}
