/*
Theme Name: Nicholls & Vine
Author: Nicholls & Vine
Description: Lightweight child theme foundation for the Nicholls & Vine Estates website.
Version: 0.1.0
Template: twentytwentyfive
Text Domain: nicholls-and-vine
*/

:root {
	--nv-radius-small: 0.25rem;
	--nv-radius-medium: 0.5rem;
	--nv-focus-ring: 0 0 0 3px rgba(36, 61, 50, 0.28);
}

html { scroll-behavior: smooth; }
body { text-wrap: pretty; }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary-dark-green);
	outline-offset: 3px;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
	box-sizing: border-box;
	width: 100%;
	min-height: 2.875rem;
	padding: 0.7rem 0.85rem;
	color: var(--wp--preset--color--primary-text);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--muted-text);
	border-radius: var(--nv-radius-small);
	font: inherit;
}

textarea { min-height: 8rem; resize: vertical; }

:where(input, select, textarea):focus {
	border-color: var(--wp--preset--color--primary-dark-green);
	box-shadow: var(--nv-focus-ring);
	outline: 0;
}

.nv-site-header {
	position: relative;
	z-index: 10;
	border-bottom: 1px solid var(--wp--preset--color--soft-stone);
}

.nv-brand-lockup { line-height: 1; }

.nv-brand-lockup__secondary {
	display: block;
	margin-top: 0.2rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.nv-section { padding-block: clamp(2.6rem, 5.75vw, 5rem); }
.nv-section--compact { padding-block: clamp(2rem, 4vw, 3.25rem); }

.nv-homepage,
.nv-homepage > .wp-block-group,
.nv-homepage + .wp-block-template-part {
	margin-block-start: 0;
}

.nv-homepage > .wp-block-group {
	margin-block-end: 0;
}

.nv-homepage > .wp-block-post-content > .nv-section {
	margin-block: 0;
}

.nv-hero {
	padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.nv-hero h1 {
	max-width: 15ch;
	font-size: clamp(2.125rem, 5vw, 4rem);
}

.nv-people-section,
.nv-situations-section,
.nv-honest-offer,
.nv-faq {
	padding-block: clamp(2.75rem, 5.5vw, 4.75rem);
}

.nv-local-knowledge {
	padding-block: clamp(2.25rem, 4vw, 3.5rem);
}

.nv-eyebrow {
	margin-bottom: 0.75rem;
	color: var(--wp--preset--color--primary-dark-green);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nv-reading-width { max-width: 42rem; }

.nv-card {
	height: 100%;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--soft-stone);
	border-radius: var(--nv-radius-medium);
}

.nv-profile-image img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--nv-radius-medium);
}

.nv-property-image {
	margin-block: clamp(1.5rem, 3vw, 2.5rem);
}

.nv-property-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
	border-radius: var(--nv-radius-medium);
}

.nv-property-image-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.5rem, 1.5vw, 1rem);
	margin-block: clamp(1.5rem, 3vw, 2.5rem);
}

.nv-property-image-grid__item {
	min-width: 0;
	margin: 0;
}

.nv-property-image-grid__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center;
	border-radius: var(--nv-radius-medium);
}

.nv-placeholder {
	padding: var(--wp--preset--spacing--50);
	color: var(--wp--preset--color--muted-text);
	background: var(--wp--preset--color--warm-cream);
	border: 1px dashed var(--wp--preset--color--muted-text);
	border-radius: var(--nv-radius-medium);
}

.nv-step-number {
	display: inline-grid;
	width: 2.5rem;
	height: 2.5rem;
	place-items: center;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary-dark-green);
	border-radius: 50%;
	font-weight: 700;
}

.nv-mobile-conversion-hook { display: none; }

.nv-site-footer a:any-link {
	color: #D8B66A;
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.nv-site-footer a:hover,
.nv-site-footer a:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration-color: var(--wp--preset--color--white);
}

.nv-site-footer a:focus-visible {
	outline-color: var(--wp--preset--color--white);
}

.nv-site-credit {
	margin-top: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.nv-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	color: var(--wp--preset--color--muted-text);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.nv-profile-grid,
.nv-situations-grid,
.nv-process-grid {
	display: grid;
	gap: clamp(1.25rem, 3vw, 2.5rem);
}

.nv-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nv-situations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nv-process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.nv-situation {
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--soft-stone);
}

.nv-process-step {
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.nv-process-step .nv-step-number {
	color: var(--wp--preset--color--deep-green);
	background: var(--wp--preset--color--warm-cream);
}

.nv-trust-callout {
	padding-left: var(--wp--preset--spacing--40);
	border-left: 4px solid var(--wp--preset--color--primary-dark-green);
}

.nv-form-shell {
	display: grid;
	gap: 1rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--soft-stone);
	border-radius: var(--nv-radius-medium);
}

.nv-form-shell__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.nv-form-shell label {
	display: grid;
	gap: 0.35rem;
	font-weight: 700;
}

.nv-form-shell :disabled {
	opacity: 1;
	cursor: not-allowed;
}

.nv-form-shell__button {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.25rem;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary-dark-green);
	border: 0;
	border-radius: 0.35rem;
	font: inherit;
	font-weight: 700;
}

.nv-form-section .frm-fluent-form {
	max-width: 100%;
	color: var(--wp--preset--color--white);
}

.nv-form-section .frm-fluent-form .ff-el-input--label label {
	color: var(--wp--preset--color--white);
	font-weight: 700;
}

.nv-form-section .frm-fluent-form .ff-el-is-required label::before,
.nv-form-section .frm-fluent-form .ff-el-is-required label::after {
	color: #D8B66A;
}

.nv-form-section .frm-fluent-form .ff-el-form-control {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	color: var(--wp--preset--color--primary-text);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--soft-stone);
	border-radius: var(--nv-radius-small);
	font: inherit;
}

.nv-form-section .frm-fluent-form .ff-el-form-control:focus {
	border-color: #D8B66A;
	box-shadow: 0 0 0 3px rgba(216, 182, 106, 0.4);
	outline: 2px solid transparent;
}

.nv-form-section .frm-fluent-form .ff-el-is-error .ff-el-form-control {
	border-color: #D8B66A;
	box-shadow: 0 0 0 2px rgba(216, 182, 106, 0.35);
}

.nv-form-section .frm-fluent-form .error,
.nv-form-section .ff-errors-in-stack {
	color: #FFF3D4;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.nv-form-section form.frm-fluent-form .ff-btn-submit.ff_btn_style {
	display: inline-flex;
	max-width: 100%;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.25rem;
	color: var(--wp--preset--color--deep-green);
	background: var(--wp--preset--color--warm-cream);
	border: 2px solid var(--wp--preset--color--warm-cream);
	border-radius: 0.35rem;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
}

.nv-form-section form.frm-fluent-form .ff-btn-submit.ff_btn_style:hover {
	color: var(--wp--preset--color--white);
	background: transparent;
	border-color: var(--wp--preset--color--white);
}

.nv-form-section form.frm-fluent-form .ff-btn-submit.ff_btn_style:focus-visible {
	color: var(--wp--preset--color--deep-green);
	background: var(--wp--preset--color--warm-cream);
	border-color: var(--wp--preset--color--warm-cream);
	box-shadow: none;
	outline: 3px solid var(--wp--preset--color--white);
	outline-offset: 3px;
}

.nv-form-section form.frm-fluent-form .ff-btn-submit.ff_btn_style:disabled {
	opacity: 0.72;
	cursor: wait;
}

.nv-form-section .ff-message-success {
	box-sizing: border-box;
	max-width: 100%;
	margin-block: var(--wp--preset--spacing--40) 0;
	padding: var(--wp--preset--spacing--50);
	overflow-wrap: anywhere;
	color: var(--wp--preset--color--deep-green);
	background: var(--wp--preset--color--warm-cream);
	border: 2px solid var(--wp--preset--color--soft-stone);
	border-radius: var(--nv-radius-medium);
}

.nv-form-section .ff-message-success :where(p, strong, a) {
	color: inherit;
}

.nv-phone-alternative,
.nv-phone-alternative .wp-block-group,
.nv-phone-alternative .wp-block-heading,
.nv-phone-alternative p {
	text-align: center;
}

.nv-phone-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	font-weight: 600;
	line-height: 1.2;
}

.nv-phone-number a {
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.nv-contact-email a {
	overflow-wrap: anywhere;
}

.wp-block-button__link {
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
}

.nv-location-line {
	display: inline-block;
	padding-block: 0.5rem;
	border-block: 1px solid var(--wp--preset--color--soft-stone);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.nv-faq .wp-block-details {
	margin-block: 0;
	border-bottom: 1px solid var(--wp--preset--color--soft-stone);
}

.nv-faq .wp-block-details:first-of-type {
	border-top: 1px solid var(--wp--preset--color--soft-stone);
}

.nv-faq .wp-block-details summary {
	padding-block: 1rem;
	cursor: pointer;
	font-weight: 700;
}

.nv-faq .wp-block-details summary:hover {
	color: var(--wp--preset--color--primary-dark-green);
}

.nv-faq .wp-block-details summary:focus-visible {
	color: var(--wp--preset--color--deep-green);
	outline: 3px solid var(--wp--preset--color--primary-dark-green);
	outline-offset: 3px;
}

.nv-faq .wp-block-details[open] {
	padding-bottom: 0.75rem;
}

.nv-faq .wp-block-details > :not(summary) {
	margin-top: 0;
	padding-right: clamp(0rem, 5vw, 4rem);
}

.nv-final-cta .nv-reading-width a[href^="tel:"] {
	color: #D8B66A;
	text-decoration-color: currentColor;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.nv-final-cta .nv-reading-width a[href^="tel:"]:hover,
.nv-final-cta .nv-reading-width a[href^="tel:"]:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration-color: var(--wp--preset--color--white);
}

.nv-final-cta .nv-reading-width a[href^="tel:"]:focus-visible {
	outline-color: var(--wp--preset--color--white);
}

@media (max-width: 939px) {
	.nv-primary-navigation .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.nv-primary-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.nv-desktop-cta {
		display: none;
	}
}

@media (max-width: 781px) {
	body { padding-bottom: 4rem; }
	.nv-section { padding-block: var(--wp--preset--spacing--60); }
	.nv-property-image img { aspect-ratio: 4 / 3; }
	.nv-property-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nv-property-image-grid__item:first-child { grid-column: 1 / -1; }
	.nv-property-image-grid__item:first-child img { aspect-ratio: 16 / 9; }
	.nv-situations-grid,
	.nv-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.nv-mobile-conversion-hook {
		position: fixed;
		z-index: 100;
		right: 0;
		bottom: 0;
		left: 0;
		display: grid;
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		margin: 0;
		padding: 0;
		background: var(--wp--preset--color--deep-green);
		border-top: 1px solid rgba(255, 255, 255, 0.25);
	}

	.nv-mobile-conversion-hook p { margin: 0; }

	.nv-mobile-conversion-hook a {
		display: flex;
		min-height: 4rem;
		align-items: center;
		justify-content: center;
		padding-inline: 0.75rem;
		color: var(--wp--preset--color--white);
		font-size: var(--wp--preset--font-size--small);
		font-weight: 700;
		line-height: 1.2;
		text-align: center;
		text-decoration: none;
	}

	.nv-mobile-conversion-hook p + p {
		border-left: 1px solid rgba(255, 255, 255, 0.25);
	}

	.nv-mobile-conversion-hook a:hover,
	.nv-mobile-conversion-hook a:focus-visible {
		color: var(--wp--preset--color--deep-green);
		background: var(--wp--preset--color--warm-cream);
	}
}

@media (max-width: 560px) {
	.nv-profile-grid,
	.nv-situations-grid,
	.nv-process-grid,
	.nv-form-shell__row { grid-template-columns: 1fr; }

	.nv-form-shell { padding: var(--wp--preset--spacing--40); }
	.wp-block-buttons { align-items: stretch; }
	.wp-block-button,
	.wp-block-button__link { width: 100%; justify-content: center; }
}

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