/* Southern Forests Design + Print — Child Theme Overrides
 * Only rules that theme.json can't express belong here.
 * All tokens reference WordPress preset CSS variables.
 */

/* Root defaults — ensure typography rhythm and warm paper background */
body {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Square corners everywhere — this is a print brand */
.wp-block-button__link,
.wp-block-image img,
.wp-block-cover,
.wp-block-post-featured-image img,
input,
textarea,
select,
.wp-block-search__input,
.wp-block-search__button {
	border-radius: 0 !important;
}

/* Hide the default Frost site-title rendering if a logo image is set */
.wp-block-site-logo + .wp-block-site-title {
	display: none;
}

/* Subtle horizontal rule styling */
hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
	margin: var(--wp--preset--spacing--40) auto;
	max-width: 120px;
	opacity: 1;
}

.wp-block-separator.is-style-wide {
	max-width: 100%;
}

/* Caption style — small, uppercase, tracked, for section labels */
.sfdp-caption,
.has-caption-font-size {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--caption);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* Register mark motif — small circled cross, used sparingly */
.sfdp-register-mark {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	border: 1px solid currentColor;
	border-radius: 50%;
	position: relative;
	vertical-align: middle;
}

.sfdp-register-mark::before,
.sfdp-register-mark::after {
	content: "";
	position: absolute;
	background: currentColor;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.sfdp-register-mark::before {
	width: 1px;
	height: 100%;
}

.sfdp-register-mark::after {
	width: 100%;
	height: 1px;
}

/* Pre-footer CTA band — Bark charcoal background, paper text */
.sfdp-cta-band {
	background: var(--wp--preset--color--bark);
	color: var(--wp--preset--color--paper);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
	text-align: left;
}

/* Load-bearing: alignwide is forced full-bleed (`.alignwide{max-width:none}` below), so the
   band's content aligns to its left padding, not a centred column. WP gives this full-width
   band a 30px global padding; force it to the 16px (spacing-40) the other sections use, or the
   CTA sits ~14px right of everything else. Two classes (0,2,0) outrank has-global-padding. */
.sfdp-cta-band.has-global-padding {
	padding-left: var(--wp--preset--spacing--40);
	padding-right: var(--wp--preset--spacing--40);
}

.sfdp-cta-band h2,
.sfdp-cta-band h3 {
	color: var(--wp--preset--color--paper);
}

.sfdp-cta-band .wp-block-button__link {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.sfdp-cta-band .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--paper);
}

/* Footer links — Paper on Bark (13.16:1 AA). The global link colour is Jarrah,
   which only meets contrast on Paper; on the dark footer it fails (~1.6:1). */
.wp-block-group.has-bark-background-color a:not(.wp-element-button) {
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

.wp-block-group.has-bark-background-color a:not(.wp-element-button):hover,
.wp-block-group.has-bark-background-color a:not(.wp-element-button):focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Gravity Forms — brand styling: square, Paper inputs, Rule borders, Jarrah submit, Inter labels.
   Custom props steer GF 2.10's "orbital" theme; explicit rules cover legacy markup too. */
.gform_wrapper {
	--gf-color-primary: #7A2E1F;
	--gf-color-primary-rgb: 122, 46, 31;
	--gf-color-primary-contrast: #F5F0E6;
	--gf-color-primary-darker: #5A1F13;
	--gf-ctrl-border-radius: 0;
	--gf-ctrl-btn-border-radius: 0;
}

.gform_wrapper .gfield_label {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--caption);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gform_wrapper .gfield_required { color: var(--wp--preset--color--primary); }

.gform_wrapper input[type=text],
.gform_wrapper input[type=email],
.gform_wrapper input[type=tel],
.gform_wrapper input[type=number],
.gform_wrapper textarea,
.gform_wrapper select {
	background: var(--wp--preset--color--paper-dark) !important; /* Paper Shadow card fill — sets fields apart from the Paper page */
	border: 1px solid var(--wp--preset--color--rule) !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	padding: 0.75rem;
}

.gform_wrapper input:focus,
.gform_wrapper textarea:focus,
.gform_wrapper select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary) !important;
}

.gform_wrapper .gform_footer input[type=submit],
.gform_wrapper .gform_footer button,
.gform_wrapper button.gform_button,
.gform_wrapper .gform-theme-button {
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--paper) !important;
	border: none !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: var(--wp--preset--font-size--small);
	padding: 1rem 1.75rem;
	cursor: pointer;
}

.gform_wrapper .gform_footer input[type=submit]:hover,
.gform_wrapper .gform_footer button:hover,
.gform_wrapper button.gform_button:hover,
.gform_wrapper .gform-theme-button:hover {
	background: var(--wp--preset--color--primary-dark) !important;
}

.gform_wrapper .gfield_error .gfield_label,
.gform_wrapper .validation_message { color: var(--wp--preset--color--primary); }

.gform_confirmation_message {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	border-left: 3px solid var(--wp--preset--color--primary);
	padding-left: var(--wp--preset--spacing--30);
}

/* Fluent Forms — brand styling. Mirrors the Gravity rules above; both are kept so the
   quote form can be swapped GF <-> Fluent without restyling. */
.fluentform .ff-el-input--label label {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--caption);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.fluentform .ff-el-is-required .ff-el-input--label label:after { color: var(--wp--preset--color--primary); }

.fluentform .ff-el-form-control {
	background: var(--wp--preset--color--paper-dark) !important;
	border: 1px solid var(--wp--preset--color--rule) !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	padding: 0.75rem;
	box-shadow: none;
}

.fluentform .ff-el-form-control:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: none;
}

.fluentform .ff-btn-submit {
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--paper) !important;
	border: none !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: var(--wp--preset--font-size--small);
	padding: 1rem 1.75rem;
	cursor: pointer;
	box-shadow: none;
}

.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--primary-dark) !important; }

.fluentform .text-danger,
.fluentform .error-text { color: var(--wp--preset--color--primary); }

.ff-message-success {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	border-left: 3px solid var(--wp--preset--color--primary);
	padding-left: var(--wp--preset--spacing--30);
	background: none;
}

/* Service cards — flat, rule-bordered, whole card clickable */
.sfdp-service-card {
	border: 1px solid var(--wp--preset--color--rule);
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--paper);
	transition: border-color 0.15s ease;
	position: relative;
}

.sfdp-service-card:hover {
	border-color: var(--wp--preset--color--primary);
	cursor: pointer;
}

/* Stretch the card's single link across the whole card for a full-size click target */
.sfdp-service-card a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sfdp-service-card .sfdp-service-number {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	display: block;
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Placeholder tile — for portfolio items with no real image yet */
.sfdp-placeholder {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--paper);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--40);
	text-align: center;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--caption);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
}

.sfdp-placeholder-light {
	background: var(--wp--preset--color--paper-dark);
	color: var(--wp--preset--color--ink);
}

/* Body copy — lock max width for readability (long single-column text, e.g. Privacy) */
.wp-block-post-content p,
.entry-content > p {
	max-width: 65ch;
}

/* ...but inside multi-column sections, let paragraphs fill their column so they line up
   with the lists beside them instead of wrapping early at 65ch. */
.wp-block-column p {
	max-width: none;
}

/* Full-bleed section backgrounds span edge to edge */
.alignfull {
	max-width: none !important;
}

/* Wide content is held to 90% (centred) so it breathes off the edges while staying wide */
.alignwide {
	max-width: 90% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Accessibility — visible focus */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
