/*
Theme Name: Brampton Flooring Installation
Theme URI: https://bramptonflooringinstallation.ca/
Author: Brampton Flooring Installation
Description: A complete local flooring installation theme with one-click content import, service pages, projects, blog, featured-image heroes, and configurable WPForms areas.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brampton-flooring-installation
*/

:root {
	--bfi-forest: #17312b;
	--bfi-forest-deep: #0e211d;
	--bfi-forest-soft: #28483f;
	--bfi-oak: #c68d50;
	--bfi-oak-dark: #9a6531;
	--bfi-cream: #f5f1e9;
	--bfi-stone: #ded8cc;
	--bfi-white: #ffffff;
	--bfi-text: #1c2522;
	--bfi-muted: #5d6965;
	--bfi-border: #d9ddd9;
	--bfi-success: #26734d;
	--bfi-shadow: 0 18px 55px rgba(14, 33, 29, 0.12);
	--bfi-shadow-soft: 0 10px 34px rgba(14, 33, 29, 0.08);
	--bfi-radius: 18px;
	--bfi-radius-small: 10px;
	--bfi-container: 1200px;
	--bfi-header-offset: 122px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--bfi-header-offset);
}

body {
	margin: 0;
	background: var(--bfi-white);
	color: var(--bfi-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

body.admin-bar .bfi-site-header {
	top: 32px;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--bfi-forest);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--bfi-oak-dark);
}

button,
input,
select,
textarea {
	font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.65em;
	color: var(--bfi-forest-deep);
	font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1.12;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.65rem, 6vw, 5.15rem);
}

h2 {
	font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
	font-size: clamp(1.25rem, 2vw, 1.65rem);
}

p,
ul,
ol {
	margin: 0 0 1.15em;
}

ul,
ol {
	padding-left: 1.25em;
}

blockquote {
	margin: 2rem 0;
	padding: 1.35rem 1.5rem;
	border-left: 4px solid var(--bfi-oak);
	background: var(--bfi-cream);
	font-size: 1.1rem;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 1rem;
	border: 1px solid var(--bfi-border);
	text-align: left;
	vertical-align: top;
}

th {
	background: var(--bfi-forest);
	color: var(--bfi-white);
}

tr:nth-child(even) td {
	background: #faf9f6;
}

:focus-visible {
	outline: 3px solid var(--bfi-oak);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	clip: auto;
	background: var(--bfi-white);
	color: var(--bfi-forest);
	font-weight: 700;
}

.bfi-container {
	width: min(calc(100% - 40px), var(--bfi-container));
	margin-inline: auto;
}

.bfi-container--narrow {
	width: min(calc(100% - 40px), 860px);
	margin-inline: auto;
}

.bfi-section {
	padding-block: clamp(3.25rem, 7vw, 5.25rem);
	scroll-margin-top: var(--bfi-header-offset);
}

.bfi-section--tight {
	padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.bfi-section--cream {
	background: var(--bfi-cream);
}

.bfi-section--forest {
	background: var(--bfi-forest);
	color: rgba(255, 255, 255, 0.84);
}

.bfi-section--forest h2,
.bfi-section--forest h3,
.bfi-section--forest a {
	color: var(--bfi-white);
}

.bfi-section--forest a:hover {
	color: #f4c58f;
}

.bfi-section-heading {
	max-width: 790px;
	margin-bottom: 2.2rem;
}

.bfi-section-heading p {
	max-width: 690px;
	color: var(--bfi-muted);
	font-size: 1.08rem;
}

.bfi-section--forest .bfi-section-heading p {
	color: rgba(255, 255, 255, 0.75);
}

.bfi-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.9rem;
	color: var(--bfi-oak-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	line-height: 1.3;
	text-transform: uppercase;
}

.bfi-eyebrow::before {
	width: 28px;
	height: 2px;
	background: currentColor;
	content: "";
}

.bfi-section--forest .bfi-eyebrow,
.bfi-hero .bfi-eyebrow {
	color: #f1b97b;
}

.bfi-grid {
	display: grid;
	gap: 1.35rem;
}

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

.bfi-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bfi-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bfi-split {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
}

.bfi-card {
	position: relative;
	overflow: hidden;
	padding: 1.6rem;
	border: 1px solid var(--bfi-border);
	border-radius: var(--bfi-radius);
	background: var(--bfi-white);
	box-shadow: var(--bfi-shadow-soft);
}

.bfi-card h3 {
	margin-bottom: 0.5rem;
}

.bfi-card p:last-child {
	margin-bottom: 0;
}

.bfi-card--link {
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bfi-card--link:hover {
	transform: translateY(-4px);
	border-color: rgba(198, 141, 80, 0.65);
	box-shadow: var(--bfi-shadow);
}

.bfi-card__link {
	text-decoration: none;
}

.bfi-card__link::after {
	position: absolute;
	inset: 0;
	content: "";
}

.bfi-card__meta {
	display: inline-block;
	margin-bottom: 0.65rem;
	color: var(--bfi-oak-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bfi-number-card {
	padding-top: 4.7rem;
}

.bfi-number-card__number {
	position: absolute;
	top: 1.25rem;
	left: 1.4rem;
	display: grid;
	width: 2.5rem;
	height: 2.5rem;
	place-items: center;
	border-radius: 50%;
	background: var(--bfi-forest);
	color: var(--bfi-white);
	font-weight: 800;
}

.bfi-button,
.wp-block-button__link {
	display: inline-flex;
	min-height: 50px;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 0.78rem 1.25rem;
	border: 2px solid var(--bfi-oak);
	border-radius: 999px;
	background: var(--bfi-oak);
	color: var(--bfi-forest-deep);
	font-size: 0.96rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.bfi-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	border-color: #d6a66e;
	background: #d6a66e;
	color: var(--bfi-forest-deep);
}

.bfi-button--light {
	border-color: var(--bfi-white);
	background: var(--bfi-white);
	color: var(--bfi-forest);
}

.bfi-button--outline {
	border-color: rgba(255, 255, 255, 0.55);
	background: transparent;
	color: var(--bfi-white);
}

.bfi-button--outline:hover {
	border-color: var(--bfi-white);
	background: rgba(255, 255, 255, 0.1);
	color: var(--bfi-white);
}

.bfi-text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 750;
	text-decoration: none;
}

.bfi-text-link::after {
	content: "→";
	transition: transform 150ms ease;
}

.bfi-text-link:hover::after {
	transform: translateX(4px);
}

.bfi-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	align-items: center;
	margin-top: 1.6rem;
}

/* Header */
.bfi-topbar {
	background: var(--bfi-forest-deep);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.bfi-topbar__inner {
	display: flex;
	min-height: 34px;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.bfi-topbar a {
	color: var(--bfi-white);
	text-decoration: none;
}

.bfi-site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	border-bottom: 1px solid rgba(23, 49, 43, 0.1);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 4px 20px rgba(14, 33, 29, 0.06);
	backdrop-filter: blur(16px);
}

.bfi-header__inner {
	display: flex;
	min-height: 84px;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.bfi-brand {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.75rem;
	color: var(--bfi-forest);
	text-decoration: none;
}

.bfi-brand:hover {
	color: var(--bfi-forest);
}

.bfi-brand__mark {
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
}

.bfi-brand__name {
	display: flex;
	flex-direction: column;
	font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
	font-size: 1rem;
	font-weight: 850;
	letter-spacing: -0.02em;
	line-height: 1.05;
}

.bfi-brand__name span:last-child {
	color: var(--bfi-oak-dark);
	font-size: 0.76em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bfi-navigation {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.bfi-menu,
.bfi-menu ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.bfi-menu {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.bfi-menu > li {
	position: relative;
}

.bfi-menu a {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding: 0.65rem 0.72rem;
	border-radius: 8px;
	color: var(--bfi-text);
	font-size: 0.88rem;
	font-weight: 720;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.bfi-menu a:hover,
.bfi-menu .current-menu-item > a,
.bfi-menu .current-menu-ancestor > a {
	background: var(--bfi-cream);
	color: var(--bfi-forest);
}

.bfi-menu .menu-item-has-children > a::after {
	margin-left: 0.35rem;
	content: "⌄";
	font-size: 0.8em;
}

.bfi-menu .sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	display: grid;
	width: min(880px, calc(100vw - 40px));
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.2rem;
	padding: 1rem;
	border: 1px solid var(--bfi-border);
	border-radius: 16px;
	opacity: 0;
	background: var(--bfi-white);
	box-shadow: var(--bfi-shadow);
	pointer-events: none;
	transform: translate(-50%, 8px);
	transition: opacity 150ms ease, transform 150ms ease;
}

.bfi-menu .sub-menu a {
	min-height: 40px;
	padding: 0.55rem 0.7rem;
	white-space: normal;
}

.bfi-menu li:hover > .sub-menu,
.bfi-menu li:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

.bfi-header-cta {
	flex: 0 0 auto;
}

.bfi-menu-toggle {
	display: none;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--bfi-border);
	border-radius: 10px;
	background: var(--bfi-white);
	color: var(--bfi-forest);
	cursor: pointer;
}

.bfi-menu-toggle span,
.bfi-menu-toggle::before,
.bfi-menu-toggle::after {
	display: block;
	width: 21px;
	height: 2px;
	background: currentColor;
	content: "";
}

.bfi-menu-toggle span {
	margin-block: 5px;
}

/* Heroes */
.bfi-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--bfi-forest-deep);
	color: var(--bfi-white);
}

.bfi-hero::before {
	position: absolute;
	z-index: -2;
	inset: 0;
	background-image: var(--bfi-hero-image);
	background-position: center;
	background-size: cover;
	content: "";
}

.bfi-hero::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(8, 25, 21, 0.94) 0%, rgba(8, 25, 21, 0.82) 46%, rgba(8, 25, 21, 0.42) 72%, rgba(8, 25, 21, 0.28) 100%),
		linear-gradient(0deg, rgba(8, 25, 21, 0.35), transparent 55%);
	content: "";
}

.bfi-hero__inner {
	display: grid;
	min-height: 465px;
	grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.65fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
	padding-block: clamp(4.5rem, 10vw, 8rem);
}

.bfi-hero--home .bfi-hero__inner {
	min-height: 690px;
}

.bfi-hero__content {
	max-width: 760px;
}

.bfi-hero h1 {
	max-width: 850px;
	margin-bottom: 0.32em;
	color: var(--bfi-white);
}

.bfi-hero--inner h1 {
	font-size: clamp(2.65rem, 5vw, 4.6rem);
}

.bfi-hero__lead {
	max-width: 680px;
	margin-bottom: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.bfi-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.7rem;
}

.bfi-hero__badge {
	padding: 0.45rem 0.72rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.8rem;
	font-weight: 750;
	backdrop-filter: blur(8px);
}

.bfi-breadcrumbs {
	padding-block: 0.72rem;
	border-bottom: 1px solid var(--bfi-border);
	background: var(--bfi-cream);
	color: var(--bfi-muted);
	font-size: 0.82rem;
}

.bfi-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.bfi-breadcrumbs li:not(:last-child)::after {
	margin-left: 0.4rem;
	color: #89928f;
	content: "/";
}

.bfi-breadcrumbs a {
	color: var(--bfi-muted);
	text-decoration: none;
}

/* Forms */
.bfi-form-card {
	padding: clamp(1.35rem, 3vw, 2rem);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--bfi-radius);
	background: rgba(255, 255, 255, 0.97);
	color: var(--bfi-text);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.bfi-form-card h2,
.bfi-form-card h3 {
	color: var(--bfi-forest);
}

.bfi-form-card__intro {
	margin-bottom: 1rem;
	color: var(--bfi-muted);
	font-size: 0.92rem;
}

.bfi-form-placeholder {
	padding-top: 0.3rem;
}

.bfi-form-placeholder p {
	font-size: 0.94rem;
}

.bfi-final-form {
	background:
		linear-gradient(135deg, rgba(23, 49, 43, 0.98), rgba(14, 33, 29, 0.96)),
		var(--bfi-forest);
	color: rgba(255, 255, 255, 0.82);
}

.bfi-final-form h2,
.bfi-final-form h3 {
	color: var(--bfi-white);
}

.bfi-final-form__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.1fr);
	gap: clamp(2rem, 7vw, 6rem);
	align-items: start;
}

.bfi-final-form__copy {
	position: sticky;
	top: calc(var(--bfi-header-offset) + 25px);
}

.bfi-final-form .bfi-form-card {
	border-color: transparent;
	box-shadow: var(--bfi-shadow);
}

div.wpforms-container-full {
	margin: 0 !important;
}

div.wpforms-container-full .wpforms-field {
	padding-block: 7px !important;
}

div.wpforms-container-full label.wpforms-field-label {
	margin-bottom: 5px !important;
	color: var(--bfi-text) !important;
	font-size: 0.88rem !important;
	font-weight: 750 !important;
}

div.wpforms-container-full input[type="text"],
div.wpforms-container-full input[type="email"],
div.wpforms-container-full input[type="tel"],
div.wpforms-container-full input[type="number"],
div.wpforms-container-full select,
div.wpforms-container-full textarea {
	min-height: 48px !important;
	border: 1px solid #cad1ce !important;
	border-radius: 8px !important;
	background: var(--bfi-white) !important;
	color: var(--bfi-text) !important;
	box-shadow: none !important;
}

div.wpforms-container-full textarea {
	min-height: 112px !important;
}

div.wpforms-container-full input:focus,
div.wpforms-container-full select:focus,
div.wpforms-container-full textarea:focus {
	border-color: var(--bfi-oak) !important;
	box-shadow: 0 0 0 3px rgba(198, 141, 80, 0.2) !important;
}

div.wpforms-container-full button[type="submit"] {
	min-height: 50px !important;
	padding: 0.8rem 1.35rem !important;
	border: 2px solid var(--bfi-oak) !important;
	border-radius: 999px !important;
	background: var(--bfi-oak) !important;
	color: var(--bfi-forest-deep) !important;
	font-weight: 800 !important;
}

div.wpforms-container-full button[type="submit"]:hover {
	border-color: #d6a66e !important;
	background: #d6a66e !important;
}

/* Content components */
.bfi-answer-block {
	padding: clamp(1.4rem, 3vw, 2rem);
	border-left: 5px solid var(--bfi-oak);
	border-radius: 0 var(--bfi-radius-small) var(--bfi-radius-small) 0;
	background: var(--bfi-cream);
	font-size: 1.08rem;
}

.bfi-answer-block p:last-child {
	margin-bottom: 0;
}

.bfi-check-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1.2rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.bfi-check-list li {
	position: relative;
	padding-left: 1.8rem;
}

.bfi-check-list li::before {
	position: absolute;
	top: 0.14em;
	left: 0;
	display: grid;
	width: 1.25rem;
	height: 1.25rem;
	place-items: center;
	border-radius: 50%;
	background: rgba(198, 141, 80, 0.17);
	color: var(--bfi-oak-dark);
	content: "✓";
	font-size: 0.78rem;
	font-weight: 900;
}

.bfi-section--forest .bfi-check-list li::before {
	background: rgba(255, 255, 255, 0.13);
	color: #f4c58f;
}

.bfi-step-grid {
	counter-reset: bfi-steps;
}

.bfi-step {
	position: relative;
	padding: 4.7rem 1.5rem 1.5rem;
	counter-increment: bfi-steps;
}

.bfi-step::before {
	position: absolute;
	top: 1.25rem;
	left: 1.4rem;
	display: grid;
	width: 2.55rem;
	height: 2.55rem;
	place-items: center;
	border-radius: 50%;
	background: var(--bfi-oak);
	color: var(--bfi-forest-deep);
	content: counter(bfi-steps, decimal-leading-zero);
	font-size: 0.82rem;
	font-weight: 900;
}

.bfi-service-card {
	display: flex;
	min-height: 100%;
	flex-direction: column;
}

.bfi-service-card .bfi-text-link {
	margin-top: auto;
}

.bfi-media-card {
	padding: 0;
}

.bfi-media-card__image {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.bfi-media-card__body {
	padding: 1.45rem;
}

.bfi-pathway {
	border-top: 5px solid var(--bfi-oak);
}

.bfi-faq-list {
	display: grid;
	gap: 0.8rem;
}

.bfi-faq {
	overflow: hidden;
	border: 1px solid var(--bfi-border);
	border-radius: var(--bfi-radius-small);
	background: var(--bfi-white);
}

.bfi-faq summary {
	position: relative;
	padding: 1.15rem 3.2rem 1.15rem 1.2rem;
	color: var(--bfi-forest);
	font-weight: 800;
	cursor: pointer;
	list-style: none;
}

.bfi-faq summary::-webkit-details-marker {
	display: none;
}

.bfi-faq summary::after {
	position: absolute;
	top: 50%;
	right: 1.2rem;
	content: "+";
	font-size: 1.5rem;
	font-weight: 500;
	transform: translateY(-50%);
}

.bfi-faq[open] summary::after {
	content: "–";
}

.bfi-faq__answer {
	padding: 0 1.2rem 1.1rem;
	color: var(--bfi-muted);
}

.bfi-faq__answer p:last-child {
	margin-bottom: 0;
}

.bfi-related-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.bfi-related-links a {
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--bfi-border);
	border-radius: 999px;
	background: var(--bfi-white);
	font-size: 0.84rem;
	font-weight: 750;
	text-decoration: none;
}

.bfi-related-links a:hover {
	border-color: var(--bfi-oak);
}

.bfi-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--bfi-border);
	border-radius: var(--bfi-radius);
	box-shadow: var(--bfi-shadow-soft);
}

.bfi-table-wrap table {
	min-width: 720px;
	border: 0;
}

.bfi-table-wrap th:first-child,
.bfi-table-wrap td:first-child {
	border-left: 0;
}

.bfi-table-wrap th:last-child,
.bfi-table-wrap td:last-child {
	border-right: 0;
}

/* Projects */
.bfi-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 2rem;
}

.bfi-filter-button {
	padding: 0.58rem 0.9rem;
	border: 1px solid var(--bfi-border);
	border-radius: 999px;
	background: var(--bfi-white);
	color: var(--bfi-text);
	font-size: 0.86rem;
	font-weight: 750;
	cursor: pointer;
}

.bfi-filter-button:hover,
.bfi-filter-button.is-active {
	border-color: var(--bfi-forest);
	background: var(--bfi-forest);
	color: var(--bfi-white);
}

.bfi-project-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

.bfi-project-card {
	position: relative;
	overflow: hidden;
	border: 0;
	border-radius: var(--bfi-radius);
	background: var(--bfi-forest);
	box-shadow: var(--bfi-shadow-soft);
	cursor: pointer;
}

.bfi-project-card[hidden] {
	display: none;
}

.bfi-project-card img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 350ms ease;
}

.bfi-project-card:hover img {
	transform: scale(1.035);
}

.bfi-project-card__overlay {
	position: absolute;
	inset: auto 0 0;
	padding: 2.3rem 1.2rem 1.1rem;
	background: linear-gradient(transparent, rgba(8, 25, 21, 0.93));
	color: rgba(255, 255, 255, 0.78);
	text-align: left;
}

.bfi-project-card__overlay strong {
	display: block;
	color: var(--bfi-white);
	font-size: 1.05rem;
}

.bfi-modal {
	position: fixed;
	z-index: 10000;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 30px;
	background: rgba(5, 17, 14, 0.93);
}

.bfi-modal.is-open {
	display: flex;
}

.bfi-modal__dialog {
	position: relative;
	width: min(1120px, 100%);
	max-height: calc(100vh - 60px);
	overflow: auto;
	border-radius: var(--bfi-radius);
	background: var(--bfi-white);
	box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.bfi-modal__image {
	width: 100%;
	max-height: 72vh;
	object-fit: contain;
	background: #07130f;
}

.bfi-modal__caption {
	padding: 1.2rem 1.4rem;
}

.bfi-modal__caption h2 {
	margin-bottom: 0.25rem;
	font-size: 1.4rem;
}

.bfi-modal__caption p {
	margin-bottom: 0;
	color: var(--bfi-muted);
}

.bfi-modal__close {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(8, 25, 21, 0.9);
	color: var(--bfi-white);
	font-size: 1.6rem;
	cursor: pointer;
}

body.bfi-modal-open {
	overflow: hidden;
}

/* Blog */
.bfi-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.4rem;
}

.bfi-post-card {
	display: flex;
	overflow: hidden;
	min-height: 100%;
	flex-direction: column;
	border: 1px solid var(--bfi-border);
	border-radius: var(--bfi-radius);
	background: var(--bfi-white);
	box-shadow: var(--bfi-shadow-soft);
}

.bfi-post-card__image {
	display: block;
}

.bfi-post-card__image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.bfi-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.45rem;
}

.bfi-post-card__body h2 {
	font-size: 1.45rem;
}

.bfi-post-card__body h2 a {
	color: inherit;
	text-decoration: none;
}

.bfi-post-card__body .bfi-text-link {
	margin-top: auto;
}

.bfi-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.8rem;
	margin-bottom: 0.65rem;
	color: var(--bfi-muted);
	font-size: 0.78rem;
	font-weight: 700;
}

.bfi-article {
	padding-block: clamp(3.25rem, 7vw, 5.25rem);
}

.bfi-article__content {
	width: min(calc(100% - 40px), 850px);
	margin-inline: auto;
}

.bfi-article__content h2 {
	margin-top: 1.1em;
	font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.bfi-article__content h3 {
	margin-top: 1.15em;
}

.bfi-article__content > p:first-child {
	font-size: 1.16rem;
}

.bfi-pagination {
	margin-top: 2.5rem;
}

.bfi-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.bfi-pagination a,
.bfi-pagination span {
	display: grid;
	min-width: 42px;
	height: 42px;
	place-items: center;
	padding-inline: 0.7rem;
	border: 1px solid var(--bfi-border);
	border-radius: 8px;
	text-decoration: none;
}

.bfi-pagination .current {
	border-color: var(--bfi-forest);
	background: var(--bfi-forest);
	color: var(--bfi-white);
}

/* Footer */
.bfi-site-footer {
	background: var(--bfi-forest-deep);
	color: rgba(255, 255, 255, 0.68);
}

.bfi-footer__main {
	display: grid;
	grid-template-columns: 1.45fr 1fr 1fr 1fr;
	gap: 2.5rem;
	padding-block: 4.5rem 3.5rem;
}

.bfi-site-footer .bfi-brand {
	margin-bottom: 1.2rem;
	color: var(--bfi-white);
}

.bfi-site-footer h2,
.bfi-site-footer h3 {
	color: var(--bfi-white);
	font-size: 1rem;
	letter-spacing: -0.01em;
}

.bfi-site-footer ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.bfi-site-footer li + li {
	margin-top: 0.45rem;
}

.bfi-site-footer a {
	color: rgba(255, 255, 255, 0.76);
	text-decoration: none;
}

.bfi-site-footer a:hover {
	color: var(--bfi-white);
}

.bfi-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.78rem;
}

.bfi-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
}

.bfi-empty-state {
	padding: 2rem;
	border: 1px dashed var(--bfi-border);
	border-radius: var(--bfi-radius);
	background: var(--bfi-cream);
	text-align: center;
}

.bfi-notice {
	padding: 1rem 1.15rem;
	border-left: 4px solid var(--bfi-oak);
	background: var(--bfi-cream);
	color: var(--bfi-text);
}

@media (max-width: 1100px) {
	.bfi-header-cta {
		display: none;
	}

	.bfi-menu a {
		padding-inline: 0.52rem;
		font-size: 0.84rem;
	}

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

@media (max-width: 900px) {
	:root {
		--bfi-header-offset: 88px;
	}

	body.admin-bar .bfi-site-header {
		top: 46px;
	}

	.bfi-topbar {
		display: none;
	}

	.bfi-header__inner {
		min-height: 76px;
	}

	.bfi-menu-toggle {
		display: block;
	}

	.bfi-navigation {
		position: fixed;
		z-index: 1000;
		top: 76px;
		right: 0;
		display: block;
		width: min(340px, calc(100vw - 34px));
		height: calc(100vh - 76px);
		padding: 1rem;
		overflow-y: auto;
		border-left: 1px solid var(--bfi-border);
		opacity: 0;
		background: var(--bfi-white);
		box-shadow: -20px 20px 45px rgba(14, 33, 29, 0.15);
		pointer-events: none;
		transform: translateX(30px);
		transition: opacity 160ms ease, transform 160ms ease;
	}

	body.admin-bar .bfi-navigation {
		top: 122px;
		height: calc(100vh - 122px);
	}

	.bfi-navigation.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: translateX(0);
	}

	.bfi-menu {
		display: block;
	}

	.bfi-menu a {
		justify-content: space-between;
		padding: 0.75rem;
		font-size: 0.94rem;
		white-space: normal;
	}

	.bfi-menu .sub-menu {
		position: static;
		display: block;
		width: auto;
		padding: 0 0 0.55rem 0.7rem;
		border: 0;
		opacity: 1;
		background: transparent;
		box-shadow: none;
		pointer-events: auto;
		transform: none;
	}

	.bfi-menu .sub-menu a {
		min-height: 38px;
		font-size: 0.86rem;
	}

	.bfi-hero__inner,
	.bfi-hero--home .bfi-hero__inner {
		min-height: auto;
		grid-template-columns: 1fr;
	}

	.bfi-hero::after {
		background: rgba(8, 25, 21, 0.8);
	}

	.bfi-split,
	.bfi-final-form__inner {
		grid-template-columns: 1fr;
	}

	.bfi-final-form__copy {
		position: static;
	}

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

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

@media (max-width: 620px) {
	body {
		font-size: 16px;
	}

	body.admin-bar .bfi-site-header {
		top: 0;
	}

	body.admin-bar .bfi-navigation {
		top: 76px;
		height: calc(100vh - 76px);
	}

	.bfi-container,
	.bfi-container--narrow,
	.bfi-article__content {
		width: min(calc(100% - 28px), var(--bfi-container));
	}

	.bfi-brand__mark {
		width: 36px;
		height: 36px;
	}

	.bfi-brand__name {
		font-size: 0.88rem;
	}

	.bfi-grid--2,
	.bfi-grid--3,
	.bfi-grid--4,
	.bfi-project-grid,
	.bfi-blog-grid,
	.bfi-footer__main,
	.bfi-check-list {
		grid-template-columns: 1fr;
	}

	.bfi-hero__inner {
		padding-block: 4rem;
	}

	.bfi-hero--home .bfi-hero__inner {
		padding-block: 4rem 3.5rem;
	}

	.bfi-form-card {
		padding: 1.15rem;
	}

	.bfi-project-card img {
		aspect-ratio: 16 / 11;
	}

	.bfi-modal {
		padding: 10px;
	}

	.bfi-modal__dialog {
		max-height: calc(100vh - 20px);
	}

	.bfi-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	th,
	td {
		padding: 0.8rem;
	}
}

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