/* Natlus Contact Form — matches the Natlus Capital theme (uses its colour and font tokens when present). */

.ncf {
	--ink: var(--nc-ink, #181818);
	--paper: var(--nc-paper, #fff);
	--primary: var(--nc-primary, #fd521d);
	--secondary: var(--nc-secondary, #ff7732);
	--peach: var(--nc-peach, #fff3ed);
	--peach-deep: var(--nc-peach-deep, #ffe2d4);
	--line: var(--nc-line, #ebdfd8);
	--muted: var(--nc-muted, #5c5450);
	--smoke: var(--nc-smoke, #b9b0ab);
	--orange-ink: var(--nc-orange-ink, #bf3a0c);
	--radius: var(--nc-radius, 22px);
	--display: var(--nc-display, "Saira Expanded", "Montserrat", system-ui, sans-serif);
	--body: var(--wp--preset--font-family--body, "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif);
	--shadow: 0 1px 2px rgb(24 24 24 / .04), 0 30px 60px -36px rgb(24 24 24 / .38);
	--field-bg: #fdfbfa;
	--err: #b42318;
	--err-bg: #fef3f2;
	--ctl-h: 3.25rem;
	container: ncf / inline-size;
	font-family: var(--body);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}

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

.ncf :where(h2, p, fieldset, legend) { margin: 0; }
.ncf :where(fieldset) { min-width: 0; padding: 0; border: 0; }
.ncf [hidden] { display: none !important; }
.ncf-svg { display: block; flex: none; }

/* ---------- Card ---------- */

.ncf-card {
	--pad: clamp(1.25rem, 5.5cqi, 2.5rem);
	position: relative;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	box-shadow: var(--shadow);
}

.ncf-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.ncf-head {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 1rem 1.1rem;
	padding: calc(var(--pad) + .25rem) var(--pad) 0;
}

.ncf-badge {
	display: grid;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	border: 1px solid var(--peach-deep);
	border-radius: 16px;
	background: var(--peach);
	color: var(--primary);
}

.ncf .ncf-eyebrow {
	font-family: var(--body);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--orange-ink);
}

.ncf .ncf-title {
	margin-top: .35rem;
	font-family: var(--display);
	font-size: clamp(1.55rem, 1.05rem + 2.4cqi, 2.15rem);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -.01em;
	color: var(--ink);
}

.ncf .ncf-intro {
	grid-column: 1 / -1;
	max-width: 36rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--muted);
}

/* ---------- Banner (server errors) ---------- */

.ncf .ncf-banner {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	margin: 1.25rem var(--pad) 0;
	padding: .85rem 1rem;
	border: 1px solid #fecdca;
	border-radius: 12px;
	background: var(--err-bg);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--err);
}

.ncf-banner .ncf-svg { margin-top: .05rem; }

/* ---------- Fields ---------- */

.ncf .ncf-form { margin: 0; }

.ncf-body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.35rem 1rem;
	padding: 1.85rem var(--pad) 0;
}

.ncf-field {
	display: grid;
	align-content: start;
	gap: .5rem;
	min-width: 0;
}

.ncf-field--full { grid-column: 1 / -1; }

.ncf .ncf-label {
	display: block;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	font-family: var(--body);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ink);
}

.ncf-control { position: relative; }

.ncf-icon {
	position: absolute;
	top: 50%;
	left: 1rem;
	display: grid;
	color: var(--smoke);
	pointer-events: none;
	transform: translateY(-50%);
	transition: color .15s ease;
}

.ncf-control--area .ncf-icon { top: 1rem; transform: none; }
.ncf-control:focus-within .ncf-icon { color: var(--primary); }

.ncf .ncf-control .ncf-input {
	display: block;
	width: 100%;
	max-width: none;
	height: var(--ctl-h);
	margin: 0;
	padding: 0 1rem 0 2.85rem;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	outline: none;
	background: var(--field-bg);
	box-shadow: none;
	font: 500 1rem/1.2 var(--body);
	color: var(--ink);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.ncf .ncf-control .ncf-input::placeholder { color: var(--smoke); opacity: 1; }
.ncf .ncf-control .ncf-input:hover { border-color: var(--smoke); }

.ncf .ncf-control .ncf-input:focus,
.ncf .ncf-control .ncf-input:focus-visible {
	outline: none;
	border-color: var(--ink);
	background: var(--paper);
	box-shadow: 0 0 0 4px rgb(253 82 29 / .18);
}

.ncf .ncf-control textarea.ncf-input {
	height: auto;
	min-height: 9.75rem;
	padding: .95rem 1rem 2.1rem 2.85rem;
	line-height: 1.55;
	resize: vertical;
}

.ncf .is-invalid .ncf-control .ncf-input { border-color: var(--err); background: #fffbfa; }
.ncf .is-invalid .ncf-control .ncf-input:focus { box-shadow: 0 0 0 4px rgb(180 35 24 / .14); }
.ncf .is-invalid .ncf-icon { color: var(--err); }

.ncf-count {
	position: absolute;
	right: .9rem;
	bottom: .7rem;
	font-size: .75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--smoke);
	pointer-events: none;
}

.ncf-count.is-near { color: var(--orange-ink); }

.ncf .ncf-error {
	display: flex;
	align-items: flex-start;
	gap: .375rem;
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--err);
	animation: ncf-in .18s ease both;
}

.ncf-error .ncf-svg { margin-top: .05rem; }

/* ---------- Inquiry type chips ---------- */

.ncf .ncf-field--full > legend.ncf-label { margin-bottom: .5rem; }

.ncf-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.ncf .ncf-chip {
	position: relative;
	display: inline-flex;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

.ncf .ncf-chip input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.ncf-chip span {
	display: inline-flex;
	align-items: center;
	min-height: 2.65rem;
	padding: .6rem 1.05rem;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	background: var(--field-bg);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ink);
	user-select: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ncf-chip .ncf-svg {
	width: 0;
	margin-right: 0;
	opacity: 0;
	transition: width .18s ease, margin .18s ease, opacity .18s ease;
}

.ncf-chip:hover span { border-color: var(--smoke); background: var(--paper); }

.ncf-chip input:checked + span {
	border-color: var(--ink);
	background: var(--ink);
	color: #fff;
	box-shadow: 0 6px 16px -10px rgb(24 24 24 / .7);
}

.ncf-chip input:checked + span .ncf-svg { width: 14px; margin-right: .4rem; opacity: 1; color: var(--primary); }
.ncf-chip input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.ncf .is-invalid .ncf-chip span { border-color: rgb(180 35 24 / .45); }

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

.ncf-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	margin-top: 2rem;
	padding: 1.15rem var(--pad);
	border-top: 1px solid var(--line);
	background: #fdfaf8;
}

.ncf .ncf-note {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .8125rem;
	line-height: 1.45;
	color: var(--muted);
}

.ncf-note .ncf-svg { color: var(--orange-ink); }

.ncf .ncf-foot .ncf-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	min-width: 12.5rem;
	min-height: 3.25rem;
	margin: 0;
	padding: .85rem 1.65rem;
	border: 1.6px solid var(--ink);
	border-radius: 999px;
	background: var(--ink);
	box-shadow: none;
	font: 700 .9375rem/1.2 var(--body);
	letter-spacing: 0;
	text-transform: none;
	color: #fff;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.ncf .ncf-foot .ncf-submit .ncf-svg--arrow { transition: transform .18s ease; }
.ncf .ncf-foot .ncf-submit:hover:not(:disabled) { border-color: var(--primary); background: var(--primary); color: var(--ink); }
.ncf .ncf-foot .ncf-submit:hover:not(:disabled) .ncf-svg--arrow { transform: translateX(3px); }
.ncf .ncf-foot .ncf-submit:active:not(:disabled) { transform: translateY(1px); }
.ncf .ncf-foot .ncf-submit:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ncf .ncf-foot .ncf-submit:disabled { cursor: progress; }

.ncf-spinner {
	display: none;
	width: 1.05rem;
	height: 1.05rem;
	border: 2px solid rgb(255 255 255 / .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ncf-spin .7s linear infinite;
}

.ncf.is-loading .ncf-spinner { display: inline-block; }
.ncf.is-loading .ncf-submit .ncf-svg--arrow { display: none; }

/* Honeypot */
.ncf .ncf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Sent ---------- */

.ncf-done {
	display: grid;
	justify-items: center;
	gap: .75rem;
	padding: clamp(2.75rem, 9cqi, 4.5rem) var(--pad);
	text-align: center;
	outline: none;
}

.ncf-done__icon {
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: var(--primary);
	color: #fff;
	box-shadow: 0 0 0 10px var(--peach), 0 0 0 11px var(--peach-deep);
	animation: ncf-pop .5s cubic-bezier(.2, .9, .3, 1.35) both;
}

.ncf-done__icon .ncf-svg path {
	stroke-width: 2.4;
	stroke-dasharray: 24;
	stroke-dashoffset: 24;
	animation: ncf-draw .4s .3s ease forwards;
}

.ncf .ncf-done__title {
	font-family: var(--display);
	font-size: clamp(1.6rem, 1.15rem + 2.2cqi, 2.15rem);
	font-weight: 600;
	line-height: 1.1;
	color: var(--ink);
}

.ncf .ncf-done__text { max-width: 30rem; font-size: 1rem; line-height: 1.6; color: var(--muted); }
.ncf .ncf-done__text a { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ncf .ncf-done__text a:hover { color: var(--orange-ink); }

.ncf .ncf-again {
	margin-top: .75rem;
	padding: .75rem 1.35rem;
	border: 1.6px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font: 700 .875rem/1.2 var(--body);
	color: var(--ink);
	cursor: pointer;
	transition: border-color .15s ease;
}

.ncf .ncf-again:hover { border-color: var(--ink); }
.ncf .ncf-again:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Keep the phone / email list beside the form in view while scrolling (desktop only). */
@media (min-width: 782px) {
	.wp-block-columns:has(.ncf) > .wp-block-column:first-child > .nc-contact-list {
		position: sticky;
		top: calc(var(--nc-header-offset, 132px) + 1.5rem);
	}
}

/* ---------- Narrow column / phone ---------- */

@container ncf (max-width: 36rem) {
	.ncf-body { grid-template-columns: minmax(0, 1fr); }
	.ncf-foot { flex-direction: column-reverse; align-items: stretch; }
	.ncf .ncf-note { justify-content: center; text-align: center; }
	.ncf .ncf-foot .ncf-submit { width: 100%; }
}

@container ncf (max-width: 24rem) {
	.ncf-head { grid-template-columns: minmax(0, 1fr); }
	.ncf-badge { width: 2.75rem; height: 2.75rem; border-radius: 13px; }
	.ncf-chip span { min-height: 2.5rem; padding: .5rem .9rem; }
}

/* ---------- Motion ---------- */

@keyframes ncf-spin { to { transform: rotate(360deg); } }
@keyframes ncf-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
@keyframes ncf-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes ncf-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
	.ncf *,
	.ncf *::before,
	.ncf *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; }
}
