/* ==========================================================================
   3A Project Brief — front-end form
   Inherits the 3A theme's tokens when it is active, and stands on its own
   (with the same values as fallbacks) when it is not.
   ========================================================================== */

.tt3apb {
	--tt3apb-accent: var(--color-accent, #ec3013);
	--tt3apb-text: var(--color-text, #201e1d);
	--tt3apb-muted: var(--color-neutral-700, #605d5d);
	--tt3apb-line: var(--color-divider, rgba(32, 30, 29, 0.4));
	--tt3apb-surface: var(--color-surface, #eae9e9);
	--tt3apb-bg: var(--color-bg, #f3f2f2);
	--tt3apb-head: var(--font-heading, inherit);

	color: var(--tt3apb-text);
	max-width: 900px;
}

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

/* ---------------------------------------------------------------- intro -- */

.tt3apb__intro { margin-bottom: 40px; }

.tt3apb__title {
	font-family: var(--tt3apb-head);
	font-weight: 800;
	font-size: clamp(32px, 5vw, 62px);
	line-height: 0.95;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	margin: 0 0 14px;
	color: inherit;
}

.tt3apb__lead {
	font-size: 18px;
	line-height: 1.5;
	color: var(--tt3apb-muted);
	max-width: 52ch;
	margin: 0;
}

/* -------------------------------------------------------------- sections -- */

.tt3apb__section {
	padding: 32px 0;
	border-top: 2px solid var(--tt3apb-line);
}
.tt3apb__section:last-of-type { border-bottom: 2px solid var(--tt3apb-line); }

.tt3apb__legend {
	font-family: var(--tt3apb-head);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--tt3apb-accent);
	margin: 0 0 24px;
}

.tt3apb__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

/* ---------------------------------------------------------------- fields -- */

.tt3apb__field { grid-column: 1 / -1; min-width: 0; }
.tt3apb__field.is-half { grid-column: auto; }

@media (max-width: 640px) {
	.tt3apb__field.is-half { grid-column: 1 / -1; }
}

.tt3apb__field.is-conditional[hidden] { display: none; }

.tt3apb__label {
	display: block;
	font-family: var(--tt3apb-head);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	margin-bottom: 8px;
	color: inherit;
}

.tt3apb__req { color: var(--tt3apb-accent); margin-inline-start: 3px; }

.tt3apb__help {
	font-size: 13px;
	color: var(--tt3apb-muted);
	margin: -2px 0 10px;
	line-height: 1.5;
}

/* Two classes so Elementor's `input:not([type=submit])` rules lose. */
.tt3apb .tt3apb__input {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--tt3apb-text);
	caret-color: var(--tt3apb-accent);
	background: var(--tt3apb-surface);
	border: 1px solid var(--tt3apb-line);
	border-radius: 0;
	transition: border-color 0.15s ease;
}
.tt3apb .tt3apb__input:hover { border-color: var(--tt3apb-text); }
.tt3apb .tt3apb__input:focus,
.tt3apb .tt3apb__input:focus-visible {
	border-color: var(--tt3apb-accent);
	outline: 2px solid transparent;
	outline-offset: 0;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--tt3apb-accent) 25%, transparent);
}
.tt3apb textarea.tt3apb__input { min-height: 110px; resize: vertical; }
.tt3apb select.tt3apb__input { cursor: pointer; }

/* --------------------------------------------------------------- choices -- */

.tt3apb__options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tt3apb__option {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 16px;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	background: var(--tt3apb-bg);
	border: 1px solid var(--tt3apb-line);
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tt3apb__option:hover { border-color: var(--tt3apb-accent); }

.tt3apb__option input { accent-color: var(--tt3apb-accent); margin: 0; flex: none; }

/* :has is well supported now; without it the tile simply stays unfilled. */
.tt3apb__option:has(input:checked) {
	background: var(--tt3apb-accent);
	border-color: var(--tt3apb-accent);
	color: var(--tt3apb-bg);
}
.tt3apb__option:has(input:checked) input { accent-color: var(--tt3apb-bg); }
.tt3apb__option:has(input:focus-visible) { outline: 2px solid var(--tt3apb-accent); outline-offset: 2px; }

.tt3apb__option--single {
	background: transparent;
	border-color: transparent;
	padding: 0;
}
.tt3apb__option--single:hover { border-color: transparent; }
.tt3apb__option--single:has(input:checked) {
	background: transparent;
	color: inherit;
}

/* ---------------------------------------------------------------- upload -- */

.tt3apb__file {
	width: 100%;
	padding: 18px;
	font-size: 14px;
	background: var(--tt3apb-bg);
	border: 2px dashed var(--tt3apb-line);
	cursor: pointer;
}
.tt3apb__file:hover { border-color: var(--tt3apb-accent); }

/* --------------------------------------------------------------- actions -- */

.tt3apb__actions { margin-top: 32px; }

.tt3apb .tt3apb__submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 30px;
	font-family: var(--tt3apb-head);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tt3apb-bg);
	background: var(--tt3apb-accent);
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.2s ease;
}
.tt3apb .tt3apb__submit:hover { background: var(--color-accent-600, #dd2b0f); }
.tt3apb .tt3apb__submit[disabled] { opacity: 0.6; cursor: progress; }

/* ---------------------------------------------------------------- states -- */

.tt3apb__alert {
	padding: 18px 20px;
	margin-bottom: 28px;
	background: var(--color-accent-100, #fff2ef);
	border-inline-start: 4px solid var(--tt3apb-accent);
	color: var(--color-accent-800, #7c1405);
	font-size: 15px;
}
.tt3apb__alert p { margin: 0 0 6px; }
.tt3apb__alert ul { margin: 0; padding-inline-start: 20px; }

.tt3apb__done {
	padding: 48px 40px;
	background: var(--tt3apb-accent);
	color: var(--color-neutral-100, #f8f4f4);
}
.tt3apb__done-title {
	font-family: var(--tt3apb-head);
	font-weight: 800;
	font-size: clamp(26px, 3.4vw, 42px);
	text-transform: uppercase;
	letter-spacing: -0.02em;
	margin: 0 0 10px;
	color: inherit;
}
.tt3apb__done-text { margin: 0; font-size: 17px; }

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.tt3apb__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tt3apb__field.has-error .tt3apb__input { border-color: var(--tt3apb-accent); }

@media (prefers-reduced-motion: reduce) {
	.tt3apb * { transition: none !important; }
}
