/* =========================================================
   Buildiyo Forms — public styles
   Mirrors the design tokens from /demo/* (cream + coral,
   Bricolage Grotesque + Manrope, soft cards).
   ========================================================= */

.bf-root {
	/* Defaults (overridden inline by render_theme_vars) */
	--bf-primary:      #f25c2d;
	--bf-primary-deep: #d54a1f;
	--bf-bg:           #f4f1e8;
	--bf-paper:        #ffffff;
	--bf-paper-2:      #faf7ef;
	--bf-ink:          #0e0e0c;
	--bf-ink-2:        #2a2723;
	--bf-text:         #3b3832;
	--bf-muted:        #807a6f;
	--bf-hint:         #b3aca0;
	--bf-line:         #e5dfd0;
	--bf-line-2:       #ebe5d5;
	--bf-field-bg:     #f3f0e8;

	--bf-on-coral:     #fff6ee;
	--bf-coral-soft:   rgba(255,139,98,0.32);

	--bf-error:        #c83d2b;
	--bf-success:      #14a05a;

	--bf-shadow-card:  0 30px 60px -28px rgba(60,45,20,.22), 0 12px 30px -18px rgba(60,45,20,.12);
	--bf-shadow-modal: 0 50px 100px -30px rgba(14,14,12,.5), 0 20px 50px -20px rgba(14,14,12,.3);

	--bf-ease:         cubic-bezier(0.22, 0.61, 0.36, 1);

	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--bf-text);
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}
.bf-root *, .bf-root *::before, .bf-root *::after { box-sizing: border-box; }

/* ---------------------------------------------------------
   Inline two-column card
   --------------------------------------------------------- */
.bf-card {
	background: var(--bf-paper);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius, 24px);
	box-shadow: var(--bf-shadow-card);
	padding: var(--bf-card-padding, 18px);
	gap: var(--bf-card-padding, 18px);
	max-width: var(--bf-max-width, 920px);
	margin: 0 auto;
	overflow: hidden;
	animation: bf-rise 0.6s var(--bf-ease) both;
}
.bf-card--two-col {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
}
.bf-card--single { display: block; }

@keyframes bf-rise {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   Contact panel (left)
   --------------------------------------------------------- */
.bf-contact-panel {
	position: relative;
	background: var(--bf-primary);
	border-radius: 18px;
	padding: 32px 28px 28px;
	color: var(--bf-on-coral);
	overflow: hidden;
	min-height: 460px;
}
.bf-contact-panel::after {
	content: "";
	position: absolute;
	bottom: -70px;
	right: -50px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: var(--bf-coral-soft);
	pointer-events: none;
}
.bf-contact-panel::before {
	content: "";
	position: absolute;
	bottom: 80px;
	right: 30px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(255,255,255,0.08);
	pointer-events: none;
}
.bf-contact-heading {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 700;
	font-size: clamp(1.4rem, 3.5vw, 1.6rem);
	line-height: 1.15;
	letter-spacing: -0.022em;
	margin: 0 0 10px;
	color: #fff;
	position: relative;
	z-index: 1;
}
.bf-contact-sub {
	font-size: 13px;
	line-height: 1.6;
	color: rgba(255,246,238,.78);
	margin: 0 0 32px;
	max-width: 30ch;
	position: relative;
	z-index: 1;
}
.bf-contact-list {
	display: flex;
	flex-direction: column;
	gap: 22px;
	position: relative;
	z-index: 1;
}
.bf-contact-item { display: flex; align-items: flex-start; gap: 14px; }
.bf-contact-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(255,255,255,0.14);
	display: grid;
	place-items: center;
	color: #fff;
	flex-shrink: 0;
	transition: background .2s var(--bf-ease);
}
.bf-contact-item:hover .bf-contact-icon { background: rgba(255,255,255,0.22); }
.bf-contact-content { display: flex; flex-direction: column; line-height: 1.4; padding-top: 4px; }
.bf-contact-content a {
	color: #fff;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: -0.005em;
	transition: opacity .2s var(--bf-ease);
}
.bf-contact-content a:hover { opacity: .85; }
.bf-contact-content span { font-size: 13.5px; font-weight: 500; color: #fff; }

/* ---------------------------------------------------------
   Form panel (right) — shared by all variants
   --------------------------------------------------------- */
.bf-form-panel {
	/* Tighter than before — the inline card already supplies outer padding, so
	   the panel adds only a little. */
	padding: calc(var(--bf-panel-padding, 26px) - 8px) calc(var(--bf-panel-padding, 26px) - 12px) calc(var(--bf-panel-padding, 26px) - 10px);
	display: flex;
	flex-direction: column;
}
.bf-form-header { margin-bottom: 8px; }
.bf-form-header--center { text-align: center; }
.bf-form-title {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 700;
	font-size: clamp(1.3rem, 3.5vw, 1.5rem);
	line-height: 1.1;
	letter-spacing: -0.022em;
	color: var(--bf-ink);
	margin: 0 0 4px;
}
.bf-form-subtitle {
	font-size: 13px;
	color: var(--bf-muted);
	margin: 0 0 22px;
	line-height: 1.5;
}

/* Grid */
.bf-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: var(--bf-field-gap, 22px);
	margin-bottom: calc(var(--bf-field-gap, 22px) + 2px);
}
.bf-field--full  { grid-column: span 6; }
.bf-field--half  { grid-column: span 3; }
.bf-field--third { grid-column: span 2; }

/* ---------------------------------------------------------
   Underline-style inputs (matches the demo's contact form)
   ---------------------------------------------------------
   For popup/slideup variants we also offer filled-style
   via .bf-variant-popup / .bf-variant-slideup overrides below.
*/
.bf-field { position: relative; min-width: 0; }
.bf-field-label {
	display: block;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--bf-muted);
	margin-bottom: 6px;
	letter-spacing: -0.005em;
	transition: color .2s var(--bf-ease);
}
.bf-field:focus-within .bf-field-label,
.bf-field.bf-has-value .bf-field-label { color: var(--bf-primary-deep); }
.bf-field.bf-is-invalid .bf-field-label { color: var(--bf-error); }

.bf-field input,
.bf-field select,
.bf-field textarea {
	width: 100%;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--bf-ink);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--bf-line);
	border-radius: 0;
	padding: 4px 0 8px;
	outline: none;
	transition: border-color .2s var(--bf-ease), border-bottom-width .2s var(--bf-ease), padding-bottom .2s var(--bf-ease);
	appearance: none;
	-webkit-appearance: none;
}
.bf-field input::placeholder,
.bf-field textarea::placeholder { color: var(--bf-hint); font-weight: 400; }
.bf-field input:focus,
.bf-field select:focus,
.bf-field textarea:focus {
	border-bottom-color: var(--bf-primary);
	border-bottom-width: 1.5px;
	padding-bottom: 7.5px;
}
.bf-field.bf-is-valid input,
.bf-field.bf-is-valid select,
.bf-field.bf-is-valid textarea { border-bottom-color: var(--bf-success); }
.bf-field.bf-is-invalid input,
.bf-field.bf-is-invalid select,
.bf-field.bf-is-invalid textarea { border-bottom-color: var(--bf-error); }

/* ---------------------------------------------------------
   Custom select component
   The native <select> is visually hidden (kept for form
   submission + screen readers). A div-based trigger + menu
   is the real UI. JS keeps them in sync.
   --------------------------------------------------------- */
.bf-select { position: relative; }
.bf-select__native {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}
.bf-select__trigger {
	width: 100%;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--bf-ink);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--bf-line);
	border-radius: 0;
	padding: 4px 24px 8px 0;
	outline: none;
	text-align: left;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: border-color .2s var(--bf-ease), border-bottom-width .2s var(--bf-ease), padding-bottom .2s var(--bf-ease);
}
.bf-select__trigger:focus,
.bf-select.bf-is-open .bf-select__trigger {
	border-bottom-color: var(--bf-primary);
	border-bottom-width: 1.5px;
	padding-bottom: 7.5px;
}
.bf-field.bf-is-valid   .bf-select__trigger { border-bottom-color: var(--bf-success); }
.bf-field.bf-is-invalid .bf-select__trigger { border-bottom-color: var(--bf-error); }
.bf-select__value.bf-is-placeholder { color: var(--bf-hint); font-weight: 400; }
.bf-select__chevron {
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--bf-ink-2);
	border-bottom: 1.5px solid var(--bf-ink-2);
	transform: rotate(45deg);
	transition: transform .2s var(--bf-ease), border-color .2s var(--bf-ease);
	flex-shrink: 0;
	margin-left: 12px;
	margin-top: -4px;
}
.bf-select.bf-is-open .bf-select__chevron {
	transform: rotate(-135deg);
	margin-top: 4px;
	border-color: var(--bf-primary);
}
/* While open, the menu is detached to <body> via JS and positioned with
   `position: fixed`. The rules below cover both states: in-wrapper (hidden)
   and body-attached (visible). */
.bf-select__menu {
	background: #ffffff;
	border: 1px solid #e5dfd0;
	border-radius: 12px;
	box-shadow: 0 18px 40px -16px rgba(60,45,20,.22), 0 6px 16px -6px rgba(60,45,20,.10);
	padding: 6px;
	max-height: 260px;
	overflow-y: auto;
	opacity: 1;
	font-family: "Manrope", system-ui, -apple-system, sans-serif;
	font-size: 14px;
	color: #0e0e0c;
	animation: bf-select-in .12s var(--bf-ease) both;
}
.bf-select__menu[hidden] { display: none; }
@keyframes bf-select-in {
	from { opacity: 0; transform: translateY(-4px) scale(0.985); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bf-select__option {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--bf-ink, #0e0e0c);
	cursor: pointer;
	transition: background .12s cubic-bezier(0.22, 0.61, 0.36, 1);
	letter-spacing: -0.005em;
}
.bf-select__option:hover,
.bf-select__option.bf-is-focused { background: #faf7ef; }
.bf-select__option.bf-is-selected {
	background: #fff6ee;
	color: var(--bf-primary-deep, #d54a1f);
}

/* Inline error message */
.bf-msg {
	display: none;
	margin-top: 6px;
	font-size: 11px;
	color: var(--bf-error);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.4;
}
.bf-field.bf-is-invalid .bf-msg { display: block; }

/* ---------------------------------------------------------
   CTA button — two styles
   --------------------------------------------------------- */
.bf-cta {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--bf-primary);
	padding: 13px 26px;
	border-radius: 10px;
	transition: background .25s var(--bf-ease), transform .15s var(--bf-ease), box-shadow .25s var(--bf-ease);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	letter-spacing: -0.005em;
	align-self: flex-start;
	position: relative;
	text-decoration: none;
}
/* The CTA can be a <button> (form submit) or an <a> (campaign). Pin the text
   colour white across every link state. !important + .bf-root scope so a
   theme's link colour (often high-specificity like .entry-content a) can't
   tint the CTA text. */
.bf-root .bf-cta,
.bf-root .bf-cta:link,
.bf-root .bf-cta:visited,
.bf-root .bf-cta:hover,
.bf-root .bf-cta:focus,
.bf-root .bf-cta:active,
.bf-root .bf-cta .bf-cta-text,
.bf-root .bf-popup-open,
.bf-root .bf-popup-open:link,
.bf-root .bf-popup-open:visited { color: #fff !important; }
/* Hover effects only on real pointer devices — otherwise the hover colour
   sticks on touch screens after a tap (CTA appears to "change colour"). */
@media (hover: hover) {
	.bf-cta:hover {
		background: var(--bf-primary-deep);
		box-shadow: 0 12px 24px -10px rgba(242,92,45,.55);
		transform: translateY(-1px);
	}
}
.bf-cta:active { transform: translateY(0) scale(.997); }
.bf-cta:focus-visible { outline: 2px solid var(--bf-primary-deep); outline-offset: 3px; }
.bf-cta:disabled { cursor: not-allowed; opacity: .6; }

/* Dark pill style (popup demo) */
.bf-cta--dark_pill .bf-cta {
	width: 100%;
	background: var(--bf-ink);
	padding: 15px 56px 15px 22px;
	border-radius: 999px;
	justify-content: center;
}
@media (hover: hover) {
	.bf-cta--dark_pill .bf-cta:hover { background: #1f1d1a; box-shadow: 0 14px 28px -12px rgba(14,14,12,.4); }
}
.bf-cta--dark_pill .bf-cta .bf-cta-arrow {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--bf-primary);
	display: grid;
	place-items: center;
	color: #fff;
	transition: background .25s var(--bf-ease), transform .25s var(--bf-ease);
}
@media (hover: hover) {
	.bf-cta--dark_pill .bf-cta:not(:disabled):hover .bf-cta-arrow {
		background: var(--bf-primary-deep);
		transform: translateY(-50%) rotate(45deg);
	}
}
.bf-cta--coral_solid .bf-cta-arrow svg { transition: transform .25s var(--bf-ease); }
.bf-cta--coral_solid .bf-cta:not(:disabled):hover .bf-cta-arrow svg { transform: translateX(3px); }

/* ---------------------------------------------------------
   Multi-step + conditional logic
   --------------------------------------------------------- */

/* Step container — only the current step is visible. */
.bf-step[hidden] { display: none !important; }
.bf-step__title {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 600;
	font-size: 1.05rem;
	letter-spacing: -0.015em;
	color: var(--bf-ink);
	margin: 0 0 14px;
}

/* Field hidden by a failing condition */
.bf-field.bf-hidden-by-condition { display: none !important; }

/* Step navigation row */
.bf-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}
.bf-nav-back {
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--bf-muted);
	padding: 10px 16px;
	border-radius: 999px;
	transition: color .2s var(--bf-ease), background .2s var(--bf-ease);
}
.bf-nav-back:hover { color: var(--bf-ink); background: var(--bf-field-bg); }
.bf-nav-next { margin-left: auto; }

/* Progress — common */
.bf-progress { margin-bottom: 22px; }

/* Progress: dots / numbers */
.bf-progress--dots .bf-progress__steps,
.bf-progress--numbers .bf-progress__steps {
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}
.bf-progress__step {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--bf-muted);
	font-size: 13px;
	font-weight: 500;
	position: relative;
	padding-right: 16px;
}
.bf-progress__step + .bf-progress__step::before {
	content: "";
	position: absolute;
	left: -12px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 1px;
	background: var(--bf-line);
}
.bf-progress__bullet {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--bf-field-bg);
	color: var(--bf-muted);
	font-size: 12px;
	font-weight: 700;
	transition: background .25s var(--bf-ease), color .25s var(--bf-ease), transform .25s var(--bf-ease);
}
.bf-progress__step.bf-is-current .bf-progress__bullet {
	background: var(--bf-primary);
	color: #fff;
	transform: scale(1.06);
}
.bf-progress__step.bf-is-complete .bf-progress__bullet {
	background: var(--bf-ink);
	color: #fff;
}
.bf-progress__step.bf-is-current .bf-progress__title { color: var(--bf-ink); }
.bf-progress--dots .bf-progress__title,
.bf-progress--dots .bf-progress__bullet {
	/* dots variant: hide title text, smaller bullet */
}
.bf-progress--dots .bf-progress__title { display: none; }
.bf-progress--dots .bf-progress__bullet {
	width: 10px;
	height: 10px;
	font-size: 0;
}

/* Progress: bar */
.bf-progress--bar { }
.bf-progress--bar .bf-progress__bar {
	width: 100%;
	height: 4px;
	background: var(--bf-line);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 8px;
}
.bf-progress--bar .bf-progress__fill {
	height: 100%;
	background: var(--bf-primary);
	border-radius: 999px;
	transition: width .35s var(--bf-ease);
}
.bf-progress--bar .bf-progress__label {
	font-size: 11.5px;
	color: var(--bf-muted);
	text-align: right;
}

/* ---------------------------------------------------------
   Success state
   --------------------------------------------------------- */
.bf-success-state {
	display: none;
	padding: 40px 0 10px;
	flex: 1;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}
.bf-success-state.bf-show {
	display: flex;
	animation: bf-fade .5s var(--bf-ease) both;
}
@keyframes bf-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.bf-success-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--bf-primary);
	color: #fff;
	display: grid;
	place-items: center;
}
.bf-success-state h3 {
	font-family: "Bricolage Grotesque", sans-serif;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.022em;
	margin: 0 0 6px;
	color: var(--bf-ink);
}
.bf-success-state p { font-size: 14px; color: var(--bf-muted); margin: 0; line-height: 1.55; }

/* ---------------------------------------------------------
   Popup modal
   --------------------------------------------------------- */
.bf-popup-open {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--bf-ink);
	padding: 16px 28px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	transition: background .25s var(--bf-ease), box-shadow .25s var(--bf-ease), transform .15s var(--bf-ease);
}
.bf-popup-open:hover { background: #1f1d1a; box-shadow: 0 16px 30px -12px rgba(14,14,12,.35); transform: translateY(-1px); }
.bf-popup-open .bf-arrow-badge {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--bf-primary);
	display: grid;
	place-items: center;
	margin-right: -16px;
	transition: background .25s var(--bf-ease), transform .25s var(--bf-ease);
}
.bf-popup-open:hover .bf-arrow-badge { background: var(--bf-primary-deep); transform: rotate(45deg); }

.bf-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(14,14,12,.55);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s var(--bf-ease), visibility 0s .3s;
}
.bf-modal-backdrop.bf-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .3s var(--bf-ease), visibility 0s;
}
.bf-modal-card {
	background: var(--bf-paper);
	border-radius: var(--bf-radius, 24px);
	width: 100%;
	max-width: 560px;
	max-height: 92vh;
	overflow: hidden;
	box-shadow: var(--bf-shadow-modal);
	transform: scale(.96) translateY(8px);
	opacity: 0;
	transition: transform .4s var(--bf-ease), opacity .3s var(--bf-ease);
	position: relative;
	display: flex;
	flex-direction: column;
}
.bf-modal-backdrop.bf-open .bf-modal-card { transform: scale(1) translateY(0); opacity: 1; }

/* Entry animations (apply to popup modal card + slideup card). */
.bf-anim-fade .bf-modal-card        { transform: scale(1) translateY(0); }
.bf-anim-fade .bf-modal-backdrop:not(.bf-open) .bf-modal-card { opacity: 0; transform: scale(1) translateY(0); }

.bf-anim-slide-up .bf-modal-card    { transform: translateY(20px); }
.bf-anim-slide-up .bf-modal-backdrop:not(.bf-open) .bf-modal-card { opacity: 0; transform: translateY(40px); }
.bf-anim-slide-up .bf-modal-backdrop.bf-open .bf-modal-card       { opacity: 1; transform: translateY(0); }

.bf-anim-slide-down .bf-modal-card  { transform: translateY(-20px); }
.bf-anim-slide-down .bf-modal-backdrop:not(.bf-open) .bf-modal-card { opacity: 0; transform: translateY(-40px); }
.bf-anim-slide-down .bf-modal-backdrop.bf-open .bf-modal-card       { opacity: 1; transform: translateY(0); }

.bf-anim-zoom .bf-modal-card        { transform: scale(0.85); }
.bf-anim-zoom .bf-modal-backdrop:not(.bf-open) .bf-modal-card { opacity: 0; transform: scale(0.85); }
.bf-anim-zoom .bf-modal-backdrop.bf-open .bf-modal-card       { opacity: 1; transform: scale(1); }

/* Slide-up variant also picks up these animations via its own transform. */
.bf-anim-slide-down.bf-variant-slideup .bf-slideup { transform: translateY(-120%); }
.bf-anim-zoom.bf-variant-slideup .bf-slideup       { transform: scale(0.85); transform-origin: bottom right; }
.bf-anim-zoom.bf-variant-slideup.bf-show .bf-slideup { transform: scale(1); }
.bf-anim-fade.bf-variant-slideup .bf-slideup       { transform: none; }

.bf-modal-card .bf-form-panel { padding: 22px 26px 24px; overflow-y: auto; max-height: 92vh; }
.bf-modal-card .bf-form-panel::-webkit-scrollbar { width: 6px; }
.bf-modal-card .bf-form-panel::-webkit-scrollbar-thumb { background: #d6cfc0; border-radius: 3px; }

/* Two-column modal (form left, image right). */
.bf-modal-card--two-col {
	max-width: var(--bf-modal-width, 1000px);
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.bf-image-side {
	position: relative;
	background-color: var(--bf-ink);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 560px;
	max-height: 92vh;
	overflow: hidden;
}
.bf-image-side::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14,14,12,.15) 0%, rgba(14,14,12,.55) 100%);
}
.bf-image-overlay-card {
	position: absolute;
	left: 28px;
	right: 28px;
	bottom: 28px;
	background: rgba(247,244,236,.18);
	-webkit-backdrop-filter: blur(20px) saturate(170%);
	backdrop-filter: blur(20px) saturate(170%);
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 16px;
	padding: 22px 22px 20px;
	color: #fff;
}
.bf-overlay-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1.5px solid rgba(255,255,255,.5);
	display: grid;
	place-items: center;
	margin-bottom: 14px;
	position: relative;
}
.bf-overlay-icon::before {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	border: 1.5px solid transparent;
	border-top-color: var(--bf-primary);
	animation: bf-spin 2.5s linear infinite;
}
@keyframes bf-spin { to { transform: rotate(360deg); } }
.bf-image-overlay-card h3 {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 600;
	font-size: 19px;
	line-height: 1.2;
	letter-spacing: -0.018em;
	margin: 0 0 8px;
	color: #fff;
}
.bf-image-overlay-card p {
	font-size: 12.5px;
	line-height: 1.55;
	color: rgba(255,255,255,.82);
	margin: 0;
}
.bf-image-stats {
	position: absolute;
	top: 28px;
	left: 28px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: rgba(247,244,236,.15);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255,255,255,.2);
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	z-index: 1;
}
.bf-image-stats .bf-pulse {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bf-primary);
	box-shadow: 0 0 0 0 rgba(242,92,45,.7);
	animation: bf-pulse 2s var(--bf-ease) infinite;
}
@keyframes bf-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(242,92,45,.7); }
	70%  { box-shadow: 0 0 0 10px rgba(242,92,45,0); }
	100% { box-shadow: 0 0 0 0 rgba(242,92,45,0); }
}

.bf-form-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 22px;
}
.bf-modal-logo {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.022em;
	color: var(--bf-ink);
}
.bf-modal-logo .bf-dot { color: var(--bf-primary); }
.bf-modal-close {
	background: var(--bf-field-bg);
	border: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	cursor: pointer;
	display: grid;
	place-items: center;
	color: var(--bf-ink-2);
	transition: background .2s var(--bf-ease), transform .2s var(--bf-ease);
}
.bf-modal-close:hover { background: #fdecdf; color: var(--bf-primary-deep); transform: rotate(90deg); }

/* Filled-style inputs inside popup / slideup */
.bf-variant-popup .bf-field input,
.bf-variant-popup .bf-field textarea,
.bf-variant-popup .bf-select__trigger,
.bf-variant-slideup .bf-field input,
.bf-variant-slideup .bf-field textarea,
.bf-variant-slideup .bf-select__trigger,
.bf-variant-fab .bf-field input,
.bf-variant-fab .bf-field textarea,
.bf-variant-fab .bf-select__trigger {
	background: var(--bf-field-bg);
	border: 1.5px solid transparent;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 14px;
}
.bf-variant-popup .bf-field input:focus,
.bf-variant-popup .bf-field textarea:focus,
.bf-variant-popup .bf-select__trigger:focus,
.bf-variant-popup .bf-select.bf-is-open .bf-select__trigger,
.bf-variant-slideup .bf-field input:focus,
.bf-variant-slideup .bf-field textarea:focus,
.bf-variant-slideup .bf-select__trigger:focus,
.bf-variant-slideup .bf-select.bf-is-open .bf-select__trigger,
.bf-variant-fab .bf-field input:focus,
.bf-variant-fab .bf-field textarea:focus,
.bf-variant-fab .bf-select__trigger:focus,
.bf-variant-fab .bf-select.bf-is-open .bf-select__trigger {
	background: #fff;
	border-color: var(--bf-ink);
	box-shadow: 0 0 0 4px rgba(14,14,12,.06);
	padding-bottom: 12px;
}
.bf-variant-popup .bf-field-label,
.bf-variant-slideup .bf-field-label,
.bf-variant-fab .bf-field-label {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .14em;
}
.bf-variant-popup .bf-select__chevron,
.bf-variant-slideup .bf-select__chevron,
.bf-variant-fab .bf-select__chevron { margin-right: 4px; }
.bf-variant-popup .bf-grid,
.bf-variant-slideup .bf-grid,
.bf-variant-fab .bf-grid { gap: 12px; }
.bf-variant-popup .bf-field.bf-is-invalid input,
.bf-variant-popup .bf-field.bf-is-invalid select,
.bf-variant-slideup .bf-field.bf-is-invalid input,
.bf-variant-fab .bf-field.bf-is-invalid input { background: #fef9f8; border-color: var(--bf-error); }

/* ---------------------------------------------------------
   Slide-up (bottom-right card)
   --------------------------------------------------------- */
.bf-variant-slideup .bf-slideup {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: min(380px, calc(100vw - 40px));
	max-height: min(640px, calc(100vh - 40px));
	background: var(--bf-paper);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius, 18px);
	box-shadow: var(--bf-shadow-modal);
	z-index: 99998;
	overflow: hidden;
	transform: translateY(calc(100% + 30px));
	opacity: 0;
	transition: transform .45s var(--bf-ease), opacity .3s var(--bf-ease);
	display: flex;
	flex-direction: column;
}
.bf-variant-slideup.bf-show .bf-slideup {
	transform: translateY(0);
	opacity: 1;
}
/* The body scrolls inside the card; the card itself never exceeds the viewport. */
.bf-variant-slideup .bf-form-panel { padding: 22px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
/* Leave room at the top-right for the absolute close button. */
.bf-variant-slideup .bf-form-header { padding-right: 30px; }
.bf-variant-slideup .bf-form-title { font-size: 1.2rem; }
.bf-variant-slideup .bf-form-subtitle { font-size: 12.5px; margin-bottom: 16px; }
.bf-variant-slideup .bf-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.bf-slideup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--bf-field-bg);
	border: 0;
	cursor: pointer;
	display: grid;
	place-items: center;
	color: var(--bf-ink-2);
	z-index: 2;
	transition: background .2s var(--bf-ease), transform .2s var(--bf-ease);
}
.bf-slideup-close:hover { background: #fdecdf; color: var(--bf-primary-deep); transform: rotate(90deg); }

/* ---------------------------------------------------------
   FAB (floating button)
   --------------------------------------------------------- */
.bf-fab {
	position: fixed;
	bottom: 24px;
	z-index: 99997;
	border: 0;
	cursor: pointer;
	background: var(--bf-primary);
	color: #fff;
	padding: 14px 22px 14px 16px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 18px 36px -14px rgba(242,92,45,.5), 0 8px 20px -6px rgba(14,14,12,.18);
	transition: background .2s var(--bf-ease), transform .2s var(--bf-ease), box-shadow .2s var(--bf-ease);
}
.bf-fab:hover { background: var(--bf-primary-deep); transform: translateY(-2px); }
.bf-fab svg { width: 20px; height: 20px; }
.bf-fab__label { letter-spacing: -0.005em; }

.bf-fab--bottom-right .bf-fab { right: 24px; }
.bf-fab--bottom-left  .bf-fab { left: 24px; }

/* =========================================================
   Responsive — tiered breakpoints
   - Tablet  (≤1024px): pair fields two-up instead of the 6-col desktop grid
   - Phone   (≤640px):  stack everything to a single column
   - Popup   (≤768px):  full-screen modal, image as top banner, sticky close
   ========================================================= */

/* ---- Tablet: collapse the 6-column field grid to two-up ---- */
@media (max-width: 1024px) {
	.bf-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 18px; }
	.bf-field--full  { grid-column: span 2; }
	.bf-field--half  { grid-column: span 1; }
	.bf-field--third { grid-column: span 1; }
}

/* ---- Stack the inline two-column card (coral panel + form) once it gets
   tight — portrait tablets and below show the panel on top, form beneath. ---- */
@media (max-width: 900px) {
	.bf-card--two-col { grid-template-columns: 1fr; }
	.bf-contact-panel { min-height: auto; }
}

/* ---- Phone: single column everything ---- */
@media (max-width: 640px) {
	.bf-card--two-col { grid-template-columns: 1fr; padding: 12px; gap: 12px; border-radius: 20px; }
	.bf-contact-panel { padding: 26px 22px 22px; min-height: auto; }
	.bf-contact-panel::after { bottom: -70px; right: -60px; width: 170px; height: 170px; }
	.bf-contact-panel::before { display: none; }
	.bf-contact-list { gap: 16px; }
	.bf-form-panel { padding: 18px 12px 14px; }
	.bf-grid { gap: 18px; margin-bottom: 22px; grid-template-columns: 1fr; }
	.bf-field--full, .bf-field--half, .bf-field--third { grid-column: span 1; }
	.bf-field input, .bf-field select, .bf-field textarea,
	.bf-select__trigger { font-size: 16px; } /* avoid iOS zoom */

	/* Slide-up becomes a full-width bottom sheet on phones only. */
	.bf-variant-slideup .bf-slideup {
		left: 10px;
		right: 10px;
		bottom: 10px;
		width: auto;
		max-height: 82dvh;
	}
}

/* ---- Popup / modal on small screens ---- */
@media (max-width: 768px) {
	.bf-modal-backdrop { padding: 0; }
	.bf-modal-card { max-width: 100%; max-height: 100vh; height: 100dvh; border-radius: 0; }
	/* Two-column popup: stack image as a short banner above the form so it
	   still shows on phones, and let the form scroll under it. */
	.bf-modal-card--two-col { grid-template-columns: 1fr; grid-template-rows: 140px 1fr; }
	.bf-image-side { min-height: 140px; max-height: 140px; order: -1; }
	/* The overlay card + stats pill are designed for a tall side panel; on the
	   short mobile banner they overflow, so show just the photo. */
	.bf-image-side .bf-image-overlay-card,
	.bf-image-side .bf-image-stats { display: none; }
	/* Per-form opt-out: hide the image entirely on small screens. */
	.bf-img-hide-mobile.bf-modal-card--two-col { grid-template-rows: 1fr; }
	.bf-img-hide-mobile .bf-image-side { display: none; }
	.bf-modal-card .bf-form-panel {
		max-height: 100%;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 18px 20px 28px;
	}
	/* Sticky full-width header bar so the logo + close stay put and the form
	   content scrolls cleanly UNDER it (no text bleeding behind the logo). */
	.bf-modal-card .bf-form-panel { padding-top: 0; }
	.bf-form-top {
		position: sticky;
		top: 0;
		background: var(--bf-paper);
		margin: 0 -20px 14px;
		padding: 14px 20px;
		border-bottom: 1px solid var(--bf-line);
		z-index: 5;
		gap: 12px;
	}
	.bf-modal-logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.bf-modal-close { flex: 0 0 auto; }
	/* Inside the (now narrow) modal, fields go single column. */
	.bf-modal-card .bf-grid { grid-template-columns: 1fr; }
	.bf-modal-card .bf-field--full,
	.bf-modal-card .bf-field--half,
	.bf-modal-card .bf-field--third { grid-column: span 1; }
}

/* Hide FAB on mobile when show_on_mobile is off. */
@media (max-width: 768px) {
	.bf-fab--no-mobile .bf-fab,
	.bf-fab--no-mobile .bf-modal-backdrop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.bf-root *, .bf-root *::before, .bf-root *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
