/*
Theme Name: Good Form
Theme URI: https://goodformworks.com
Description: Good Form brand child theme for Block Smith — cobalt and paper palette, DM Sans, Masonry Arch identity. Tokens live in theme.json; this stylesheet carries only the Good Form presentation details the Figma kit specifies.
Author: Good Form
Template: block-smith
Version: 1.0.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: goodform
*/

/* --- Type ----------------------------------------------------------------- */

.is-style-eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	margin-bottom: 0.9em;
}

.gf-h1-display {
	line-height: 0.99;
	letter-spacing: -0.02em;
}

.gf-lead {
	line-height: 1.5;
}

.gf-measure,
.gf-measure-wide {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.gf-measure {
	max-width: 850px;
}

.gf-measure-wide {
	max-width: 1000px;
}

.gf-num {
	letter-spacing: 0.08em;
}

.gf-step-title {
	font-weight: 400;
}

.gf-feature-title {
	margin-top: var( --wp--preset--spacing--40 );
	margin-bottom: 0;
}

.gf-feature-title + p {
	margin-top: 0.35rem;
}

.gf-tagline {
	margin-top: var( --wp--preset--spacing--40 );
}

/* Bold text link with an arrow (Figma "Explore the service →"). */
.gf-arrow a {
	font-weight: 700;
	text-decoration: none;
	color: var( --wp--preset--color--primary );
}

.gf-arrow a:hover,
.gf-arrow a:focus {
	text-decoration: underline;
}

/* --- Buttons -------------------------------------------------------------- */

.wp-block-button__link,
.wp-element-button {
	font-size: 0.9375rem;
	line-height: 1.25;
}

/* --- Cards: flat wash/white surfaces, radius only (no hairline, no shadow). -- */

.wp-block-columns > .wp-block-column.gf-card,
.wp-block-columns > .wp-block-column.gf-card[style*="background"] {
	border: 0;
	box-shadow: none;
	border-radius: var( --bs-radius );
}

.gf-card.gf-service-card {
	border-radius: var( --bs-radius-lg );
}

.gf-card .wp-block-list > li::before {
	content: none !important;
}

.gf-card .wp-block-list,
.gf-card .wp-block-list > li {
	padding-left: 0 !important;
	list-style: none !important;
}

.gf-card .wp-block-list li {
	margin-bottom: 0.25em;
}

.gf-card .wp-block-image img {
	border-radius: var( --bs-radius );
}

/* Hairline dividers run the full column width (FAQ rows, footer). */
hr.gf-hairline,
.wp-block-separator.gf-hairline:not( .is-style-dots ) {
	width: 100% !important;
	max-width: none !important;
	margin: 0;
	border: 0;
	border-top: 1px solid var( --wp--custom--border--subtle, #dadbd8 );
	opacity: 1;
	background: none;
	height: 0;
}

hr.gf-hairline-inverse {
	border-top-color: rgba( 255, 255, 255, 0.18 );
}

.gf-faq-q {
	margin-bottom: 0.35rem;
}

.gf-faq-a {
	margin-bottom: var( --wp--preset--spacing--40 );
}

/* --- Bands ---------------------------------------------------------------- */

/* Full-bleed photo + cobalt panel (home "Change looks good on you"). */
.gf-band-flush .wp-block-columns {
	gap: 0;
	align-items: stretch;
}

.gf-band-flush .wp-block-column {
	flex-basis: auto;
}

.gf-bleed-photo .wp-block-image,
.gf-bleed-photo figure {
	margin: 0;
	height: 100%;
}

.gf-bleed-photo img {
	border-radius: 0 !important;
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	display: block;
}

.wp-block-columns > .wp-block-column.gf-panel-cobalt {
	border-radius: 0;
	box-shadow: none;
	border: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.gf-panel-cobalt .wp-block-heading {
	color: #fff;
}

.gf-panel-cobalt .is-style-eyebrow {
	color: rgba( 255, 255, 255, 0.92 );
}

/* Brand (cobalt) and deep (navy) bands: eyebrows read on the ground. */
.is-style-section-brand .is-style-eyebrow,
.is-style-section-deep .is-style-eyebrow {
	color: inherit;
	opacity: 0.92;
}

.is-style-section-brand p,
.is-style-section-deep p {
	color: inherit;
}

/* CTA band: the design's white rectangle button, cobalt text. */
.gf-cta .wp-block-button__link {
	border-radius: 6px;
}

.wp-block-columns > .wp-block-column.gf-cta-panel {
	background-color: var( --wp--preset--color--base );
	border: 0;
	box-shadow: none;
	border-radius: var( --bs-radius-lg );
}

.gf-cta-panel .wp-block-heading {
	color: var( --wp--preset--color--contrast );
}

.gf-cta-panel .wp-block-button__link {
	border-radius: 999px;
}

/* Enquiry form card. */
.wp-block-columns > .wp-block-column.gf-form-card {
	border: 0;
	box-shadow: none;
	border-radius: var( --bs-radius-lg );
}

.gf-form .blocksmith-form-field__html {
	font-size: var( --wp--preset--font-size--small );
	color: var( --wp--preset--color--neutral );
}

/* Dark cards (navy / cobalt) inside light bands. */
.wp-block-columns > .wp-block-column.gf-card-dark {
	color: #fff;
}

.gf-card-dark .wp-block-heading,
.gf-card-dark p,
.gf-card-dark a {
	color: #fff;
}

.gf-card-dark .has-neutral-color {
	color: rgba( 255, 255, 255, 0.78 ) !important;
}

.gf-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.16 );
	font-size: var( --wp--preset--font-size--small );
}

.gf-row-value {
	font-weight: 700;
	text-align: right;
}

.gf-row-note {
	opacity: 0.8;
}

/* --- Header --------------------------------------------------------------- */

.gf-header {
	border-bottom: 1px solid var( --wp--custom--border--subtle, #dadbd8 );
}

/* Logo | menu | CTA. A grid with equal outer tracks keeps the menu on the exact
   centre line whatever the logo and button widths are. */
@media ( min-width: 782px ) {
	.gf-header-row {
		display: grid !important;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}

	.gf-header-row > .wp-block-buttons {
		justify-self: end;
	}
}

@media ( max-width: 781px ) {
	.gf-header-row {
		display: grid !important;
		grid-template-columns: 1fr auto;
		align-items: center;
	}

	/* Core pads the open overlay from the root-padding variables, which resolve to
	   nothing here; give it the Figma mobile gutter. */
	.gf-nav .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.25rem 1.5rem 2rem;
	}
}

.gf-logo {
	display: inline-flex;
	color: var( --wp--preset--color--primary );
	line-height: 0;
	text-decoration: none;
}

.gf-logo svg {
	display: block;
	max-width: 100%;
	height: auto;
}

.gf-logo-reversed {
	color: #fff;
}

.gf-nav .wp-block-navigation-item__content {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var( --wp--preset--color--contrast );
}

.gf-nav .wp-block-navigation-item__content:hover {
	text-decoration: none;
	color: var( --wp--preset--color--primary );
}

.gf-nav .wp-block-navigation__responsive-container-open:not( .always-shown ) {
	font-weight: 700;
	font-size: 0.9375rem;
}

/* --- Footer --------------------------------------------------------------- */

.gf-footer .is-style-eyebrow {
	color: #fff;
	opacity: 1;
	margin-bottom: 0.4em;
}

.gf-footer a {
	color: #fff;
	text-decoration: none;
}

.gf-footer a:hover,
.gf-footer a:focus {
	text-decoration: underline;
}

.gf-footer-blurb {
	opacity: 0.85;
}

.gf-footer-legal {
	opacity: 0.8;
}

/* --- Responsive ----------------------------------------------------------- */

/* The last menu item is "Get an estimate": a button on desktop would duplicate the
   header CTA, so it only shows inside the mobile overlay (and the pill hides there). */
@media ( min-width: 782px ) {
	.gf-nav .wp-block-navigation__container > li:last-child {
		display: none;
	}
}

@media ( max-width: 781px ) {
	.wp-block-buttons > .wp-block-button.gf-nav-cta {
		display: none !important;
	}

	.gf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > li:last-child .wp-block-navigation-item__content {
		display: inline-block;
		margin-top: 1rem;
		padding: 0.9rem 1.5rem;
		border-radius: 999px;
		background: var( --wp--preset--color--primary );
		color: #fff;
		font-weight: 700;
	}

	.gf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
	.gf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		align-items: flex-start;
		justify-content: flex-start;
	}

	.gf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		font-size: 1.25rem;
	}

	.gf-bleed-photo img {
		min-height: 260px;
	}

	.gf-hero-actions .wp-block-buttons {
		justify-content: flex-start !important;
	}

}

/* Phones: every column row stacks to one column, as the Figma mobile frames do.
   The parent theme wraps 4-up rows to two-up below 1100px with !important and no
   lower bound, which overrides core's own stacking and squeezed the footer (and any
   other four-column row) into two 170px columns at 390px. */
@media ( max-width: 599px ) {
	/* Specificity has to beat the parent's `:has( > .wp-block-column:nth-child( 4 ) )`
	   rule (both are !important), hence the doubled class. */
	.wp-block-columns:not( .is-not-stacked-on-mobile ):has( > .wp-block-column:nth-child( 4 ) ) > .wp-block-column.wp-block-column,
	.wp-block-columns:not( .is-not-stacked-on-mobile ) > .wp-block-column {
		flex-basis: 100% !important;
	}

	/* Footer — Mobile/Expanded (Figma 35:356): padding 24, blocks 32 apart, logo
	   symbol ~46px. */
	.gf-footer {
		padding-top: var( --wp--preset--spacing--60 ) !important;
		padding-bottom: var( --wp--preset--spacing--55 ) !important;
	}

	.gf-footer-cols {
		row-gap: var( --wp--preset--spacing--55 ) !important;
	}

	.gf-footer .gf-logo svg {
		height: 46px;
		width: auto;
	}

	.gf-footer .gf-footer-links {
		line-height: 2 !important;
	}
}
