/*
Theme Name: Leaf River GeneratePress Child
Theme URI: https://leafriver.net/
Description: Project-specific styling for the Leaf River Construction website.
Author: Creek Tree Creative
Template: generatepress
Version: 1.0.0
Text Domain: leafriver
*/

:root {
	color-scheme: only light;
	--lr-navy: #0d3655;
	--lr-navy-deep: #061824;
	--lr-navy-soft: #d7e7ef;
	--lr-blue: #28668f;
	--lr-green: #4f7a4c;
	--lr-green-dark: #365b39;
	--lr-sage: #eaf1e7;
	--lr-sage-strong: #dbe8d7;
	--lr-bg: #f7f8f4;
	--lr-surface: #ffffff;
	--lr-surface-alt: #f0f4f3;
	--lr-text: #18232d;
	--lr-muted: #596873;
	--lr-border: #d6dee1;
	--lr-shadow: 0 18px 50px rgba(6, 24, 36, 0.12);
	--lr-radius: 6px;
	--lr-wide: 1180px;
}

html {
	scroll-behavior: smooth;
	background: var(--lr-bg);
}

body {
	background: var(--lr-bg);
	color: var(--lr-text);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 18px;
	line-height: 1.7;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
	color: var(--lr-blue);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover,
a:focus {
	color: var(--lr-green-dark);
}

:focus-visible {
	outline: 3px solid #85b36d;
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--lr-navy-deep);
	font-weight: 750;
	letter-spacing: -0.025em;
	line-height: 1.12;
}

h1 {
	font-size: clamp(2.75rem, 6vw, 5.6rem);
}

h2 {
	font-size: clamp(2.1rem, 4vw, 3.65rem);
}

h3 {
	font-size: clamp(1.35rem, 2vw, 1.75rem);
}

p:last-child {
	margin-bottom: 0;
}

.site.grid-container,
.site-content.grid-container {
	max-width: none;
}

.site-content {
	display: block;
	padding: 0;
}

.content-area,
.site-main {
	float: none;
	margin: 0;
	width: 100%;
}

.page .inside-article,
.error404 .inside-article {
	background: var(--lr-surface);
	padding: 0;
}

/* Header and navigation */
.site-header {
	background: var(--lr-surface);
	border-bottom: 1px solid rgba(13, 54, 85, 0.12);
	box-shadow: 0 6px 24px rgba(6, 24, 36, 0.07);
	position: relative;
	z-index: 100;
}

.inside-header {
	align-items: center;
	max-width: var(--lr-wide);
	min-height: 108px;
	padding: 10px 28px;
}

/* The logo already carries the company name, so the text fallback is redundant. */
.site-branding {
	display: none;
}

.site-logo img,
.header-image {
	display: block;
	height: auto;
	max-width: 270px;
	object-fit: contain;
	width: 270px;
}

.main-navigation,
.main-navigation ul ul {
	background: var(--lr-surface);
}

.main-navigation .inside-navigation {
	justify-content: flex-end;
}

.main-navigation .main-nav ul li a {
	color: var(--lr-navy);
	font-size: 0.83rem;
	font-weight: 750;
	letter-spacing: 0.075em;
	line-height: 46px;
	padding: 0 16px;
	text-transform: uppercase;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	background: transparent;
	color: var(--lr-green-dark);
}

.main-navigation .main-nav ul li:last-child > a {
	background: var(--lr-green);
	border-radius: 4px;
	color: #ffffff;
	line-height: 44px;
	margin-left: 10px;
	padding-inline: 21px;
}

.main-navigation .main-nav ul li:last-child > a:hover,
.main-navigation .main-nav ul li:last-child > a:focus {
	background: var(--lr-green-dark);
	color: #ffffff;
}

.menu-toggle,
.mobile-menu-control-wrapper .menu-toggle {
	background: var(--lr-navy);
	border-radius: 4px;
	color: #ffffff;
	font-weight: 700;
}

/* Reusable layout */
.lr-wrap {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--lr-wide);
	padding: clamp(68px, 8vw, 112px) 28px;
}

.lr-wrap--compact {
	padding-block: clamp(48px, 6vw, 78px);
}

.lr-section {
	background: var(--lr-surface);
	color: var(--lr-text);
}

.lr-section--alt {
	background: var(--lr-bg);
}

.lr-section--sage {
	background: var(--lr-sage);
}

.lr-section--navy {
	background: var(--lr-navy-deep);
	color: #eef5f7;
}

.lr-section--navy h2,
.lr-section--navy h3,
.lr-section--navy p,
.lr-section--navy a:not(.wp-block-button__link) {
	color: inherit;
}

.lr-eyebrow {
	color: var(--lr-green-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	margin-bottom: 18px;
	text-transform: uppercase;
}

.lr-section--navy .lr-eyebrow,
.lr-hero .lr-eyebrow,
.lr-page-hero .lr-eyebrow {
	color: #a9cd99;
}

.lr-lead {
	color: var(--lr-muted);
	font-size: clamp(1.08rem, 1.7vw, 1.28rem);
	line-height: 1.65;
}

.lr-section--navy .lr-lead {
	color: #c8d6dc;
}

.lr-narrow {
	max-width: 790px;
}

.lr-center {
	margin-inline: auto;
	text-align: center;
}

.lr-rule {
	background: var(--lr-green);
	border: 0;
	height: 4px;
	margin: 28px 0;
	width: 76px;
}

/* Hero */
.wp-block-cover.lr-hero,
.wp-block-cover.lr-page-hero {
	align-items: center;
	background-color: var(--lr-navy-deep);
	color: #ffffff;
	isolation: isolate;
	padding: 0;
}

.wp-block-cover.lr-hero {
	min-height: clamp(620px, 78vh, 820px);
}

.wp-block-cover.lr-page-hero {
	min-height: clamp(400px, 52vh, 560px);
}

.wp-block-cover.lr-hero .wp-block-cover__background,
.wp-block-cover.lr-page-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(6, 24, 36, 0.94) 0%, rgba(6, 24, 36, 0.8) 43%, rgba(6, 24, 36, 0.24) 78%, rgba(6, 24, 36, 0.08) 100%) !important;
	opacity: 1 !important;
}

.wp-block-cover.lr-hero .wp-block-cover__inner-container,
.wp-block-cover.lr-page-hero .wp-block-cover__inner-container {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--lr-wide);
	padding: 84px 28px;
	width: 100%;
}

.lr-hero__content,
.lr-page-hero__content {
	max-width: 760px;
}

.lr-hero h1,
.lr-page-hero h1 {
	color: #ffffff;
	margin-bottom: 24px;
	text-wrap: balance;
}

.lr-page-hero h1 {
	font-size: clamp(2.75rem, 5vw, 4.75rem);
}

.lr-hero__copy {
	color: #e2ebee;
	font-size: clamp(1.12rem, 2vw, 1.35rem);
	line-height: 1.65;
	max-width: 680px;
}

.lr-hero .wp-block-buttons,
.lr-page-hero .wp-block-buttons {
	margin-top: 36px;
}

/* Buttons */
.wp-block-button__link,
.wp-element-button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	background: var(--lr-green);
	border: 2px solid var(--lr-green);
	border-radius: 4px;
	box-shadow: none;
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
	padding: 15px 24px;
	text-transform: uppercase;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

/* Keep theme.json/global block styles from muting the brand-green CTA treatment. */
.entry-content .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background-color: var(--lr-green) !important;
	border-color: var(--lr-green) !important;
	color: #ffffff !important;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-element-button:hover,
.wp-element-button:focus,
button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
	background: var(--lr-green-dark);
	border-color: var(--lr-green-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

.entry-content .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.entry-content .wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus {
	background-color: var(--lr-green-dark) !important;
	border-color: var(--lr-green-dark) !important;
}

.is-style-outline > .wp-block-button__link,
.lr-button--outline .wp-block-button__link {
	background: transparent !important;
	border-color: rgba(255, 255, 255, 0.8);
	color: #ffffff;
}

.is-style-outline > .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:focus,
.lr-button--outline .wp-block-button__link:hover,
.lr-button--outline .wp-block-button__link:focus {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--lr-navy);
}

/* Cards, facts and columns */
.lr-card-grid {
	display: grid !important;
	gap: 22px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Gutenberg's flow layout adds top margins to later children; the grid gap
 * already provides spacing, so keep every card aligned to the same row. */
.lr-card-grid > * {
	margin-block-start: 0 !important;
}

.lr-service-grid {
	grid-auto-rows: 1fr;
}

.lr-card {
	background: var(--lr-surface);
	border: 1px solid var(--lr-border);
	border-top: 5px solid var(--lr-green);
	border-radius: var(--lr-radius);
	box-shadow: 0 10px 32px rgba(6, 24, 36, 0.08);
	box-sizing: border-box;
	height: 100%;
	padding: 34px;
}

.lr-card h3 {
	margin-bottom: 14px;
}

.lr-card p {
	color: var(--lr-muted);
	font-size: 0.98rem;
}

.lr-card-grid .lr-card__number {
	color: var(--lr-green);
	display: block;
	font-size: 0.75rem;
	font-weight: 850;
	letter-spacing: 0.16em;
	margin-block: 0 22px !important;
	text-transform: uppercase;
}

.lr-card__number + h3,
.lr-card h3 + p {
	margin-block-start: 0 !important;
}

.lr-fact-strip {
	background: var(--lr-navy);
	color: #ffffff;
}

.lr-fact-strip .lr-wrap {
	padding-block: 30px;
}

.lr-facts {
	display: grid !important;
	gap: 0;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lr-fact {
	border-right: 1px solid rgba(255, 255, 255, 0.24);
	box-sizing: border-box;
	color: #ffffff;
	font-size: 0.83rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	margin: 0;
	padding: 10px 28px;
	text-align: center;
	text-transform: uppercase;
}

.lr-fact:last-child {
	border-right: 0;
}

.lr-split {
	align-items: center !important;
	gap: clamp(36px, 7vw, 90px) !important;
}

.lr-split > .wp-block-column {
	margin: 0;
}

.lr-photo-frame {
	border-radius: var(--lr-radius);
	box-shadow: var(--lr-shadow);
	overflow: hidden;
}

.lr-photo-frame img {
	display: block;
	height: 100%;
	min-height: 460px;
	object-fit: cover;
	width: 100%;
}

.lr-check-list {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
}

.lr-check-list li {
	border-bottom: 1px solid var(--lr-border);
	font-weight: 680;
	padding: 13px 0 13px 30px;
	position: relative;
}

.lr-check-list li::before {
	color: var(--lr-green);
	content: "✓";
	font-weight: 900;
	left: 0;
	position: absolute;
}

/* Image features and project gallery */
.lr-image-band {
	display: grid !important;
	gap: 0;
	grid-template-columns: 1.35fr 0.65fr;
}

.lr-image-band .wp-block-image {
	height: clamp(320px, 42vw, 560px);
	margin: 0;
	overflow: hidden;
}

.lr-image-band .wp-block-image > a {
	display: block;
	height: 100%;
}

.lr-image-band img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.lr-image-band .wp-block-image:nth-child(2) img {
	object-position: center 72%;
}

.lr-project-grid {
	display: grid !important;
	gap: 14px;
	grid-auto-flow: dense;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lr-project-grid .wp-block-image {
	background: var(--lr-navy-deep);
	height: 320px;
	margin: 0;
	overflow: hidden;
	position: relative;
}

.lr-project-grid .wp-block-image:nth-child(1),
.lr-project-grid .wp-block-image:nth-child(6) {
	grid-column: span 2;
}

.lr-project-grid .wp-block-image > a {
	display: block;
	height: 100%;
}

.lr-project-grid img {
	display: block;
	height: 100%;
	object-fit: cover;
	transition: opacity 180ms ease, transform 300ms ease;
	width: 100%;
}

.lr-project-grid a:hover img,
.lr-project-grid a:focus img {
	opacity: 0.86;
	transform: scale(1.025);
}

.lr-project-grid figcaption {
	background: linear-gradient(transparent, rgba(6, 24, 36, 0.9));
	bottom: 0;
	color: #ffffff;
	font-size: clamp(1rem, 1.35vw, 1.2rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.25;
	left: 0;
	margin: 0;
	padding: 48px 18px 16px;
	position: absolute;
	right: 0;
	text-align: left;
	text-wrap: balance;
}

/* CTA */
.lr-cta {
	background: var(--lr-navy);
	color: #ffffff;
	position: relative;
}

.lr-cta::before {
	background: var(--lr-green);
	content: "";
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 8px;
}

.lr-cta h2,
.lr-cta p {
	color: #ffffff;
}

.lr-cta .lr-wrap {
	align-items: center;
	display: flex;
	gap: 48px;
	justify-content: space-between;
}

.lr-cta__copy {
	max-width: 760px;
}

/* Contact */
.lr-contact-grid {
	align-items: start !important;
	gap: clamp(42px, 7vw, 86px) !important;
}

.lr-contact-card {
	background: var(--lr-navy);
	border-radius: var(--lr-radius);
	box-shadow: var(--lr-shadow);
	color: #ffffff;
	padding: 42px;
}

.lr-contact-card h2,
.lr-contact-card h3,
.lr-contact-card p,
.lr-contact-card a {
	color: #ffffff;
}

.lr-contact-card a:hover,
.lr-contact-card a:focus {
	color: #cbe4bd;
}

.lr-contact-detail {
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	margin-top: 22px;
	padding-top: 22px;
}

.lr-contact-detail strong {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.15em;
	margin-bottom: 4px;
	text-transform: uppercase;
}

.wpcf7 {
	background: var(--lr-surface);
	color: var(--lr-text);
}

.lr-form-row {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wpcf7 p {
	margin-bottom: 19px;
}

.wpcf7 label {
	color: var(--lr-navy-deep);
	display: block;
	font-size: 0.83rem;
	font-weight: 780;
	letter-spacing: 0.03em;
}

.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 select,
.wpcf7 textarea {
	-webkit-appearance: none;
	appearance: none;
	background: #ffffff !important;
	border: 1px solid #aebcc3;
	border-radius: 3px;
	box-sizing: border-box;
	color: #18232d !important;
	color-scheme: light;
	font-size: 1rem;
	line-height: 1.4;
	margin-top: 7px;
	padding: 13px 14px;
	width: 100%;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	border-color: var(--lr-green);
	box-shadow: 0 0 0 3px rgba(79, 122, 76, 0.18);
	outline: 0;
}

.wpcf7 textarea {
	min-height: 170px;
	resize: vertical;
}

.wpcf7-not-valid-tip {
	color: #9b2d30;
	font-size: 0.85rem;
	font-weight: 700;
}

.wpcf7 form .wpcf7-response-output {
	background: #ffffff;
	border-color: var(--lr-green);
	color: var(--lr-text);
	margin-inline: 0;
	padding: 12px 16px;
}

/* Footer */
.site-footer,
.site-info {
	background: var(--lr-navy-deep);
	color: #d9e4e8;
}

.inside-site-info {
	box-sizing: border-box;
	max-width: var(--lr-wide);
	padding: 26px 28px;
}

.site-info a {
	color: #ffffff;
}

.site-info a:hover,
.site-info a:focus {
	color: #b5d6a6;
}

/* Keep a deliberately light, legible rendering when browsers induce color changes. */
input,
select,
textarea,
button,
.site-header,
.lr-card,
.lr-contact-card,
.lr-section,
.lr-section--alt,
.lr-section--sage {
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	html,
	body {
		background: var(--lr-bg);
		color: var(--lr-text);
	}
}

@media (forced-colors: active) {
	.wp-block-cover.lr-hero .wp-block-cover__background,
	.wp-block-cover.lr-page-hero .wp-block-cover__background {
		background: CanvasText !important;
	}

	.lr-card,
	.lr-contact-card,
	.wp-block-button__link,
	.wpcf7 input,
	.wpcf7 select,
	.wpcf7 textarea {
		border: 2px solid ButtonText;
	}
}

@media (max-width: 1024px) {
	.inside-header {
		min-height: 96px;
	}

	.site-logo img,
	.header-image {
		height: auto;
		max-width: 240px;
		width: 240px;
	}

	.main-navigation .main-nav ul li a {
		padding-inline: 11px;
	}

	.lr-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lr-project-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	body {
		font-size: 17px;
	}

	.inside-header {
		padding: 9px 20px;
	}

	.site-logo img,
	.header-image {
		height: auto;
		max-width: 205px;
		width: 205px;
	}

	.main-navigation.toggled .main-nav {
		background: var(--lr-surface);
		box-shadow: 0 14px 30px rgba(6, 24, 36, 0.13);
		left: 0;
		position: absolute;
		right: 0;
		top: 100%;
	}

	.main-navigation .main-nav ul li a {
		line-height: 50px;
		padding-inline: 24px;
	}

	.main-navigation .main-nav ul li:last-child > a {
		border-radius: 0;
		line-height: 50px;
		margin-left: 0;
	}

	.wp-block-cover.lr-hero,
	.wp-block-cover.lr-page-hero {
		min-height: 590px;
	}

	.wp-block-cover.lr-page-hero {
		min-height: 410px;
	}

	.wp-block-cover.lr-hero .wp-block-cover__background,
	.wp-block-cover.lr-page-hero .wp-block-cover__background {
		background: rgba(6, 24, 36, 0.78) !important;
	}

	.lr-wrap {
		padding-inline: 21px;
	}

	.lr-card-grid,
	.lr-facts,
	.lr-project-grid,
	.lr-image-band,
	.lr-form-row {
		grid-template-columns: 1fr;
	}

	.lr-service-grid {
		grid-auto-rows: auto;
	}

	.lr-fact {
		border-bottom: 1px solid rgba(255, 255, 255, 0.2);
		border-right: 0;
	}

	.lr-fact:last-child {
		border-bottom: 0;
	}

	.lr-photo-frame img {
		min-height: 340px;
	}

	.lr-image-band .wp-block-image,
	.lr-project-grid .wp-block-image {
		height: 290px;
	}

	.lr-project-grid .wp-block-image:nth-child(1),
	.lr-project-grid .wp-block-image:nth-child(6) {
		grid-column: span 1;
	}

	.lr-cta .lr-wrap {
		align-items: flex-start;
		flex-direction: column;
		gap: 28px;
	}

	.lr-contact-card {
		padding: 30px 24px;
	}
}

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

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
