/* ==========================================================================
   Multi-step project brief ("brief builder")
   Source: scss/brief-form.scss  →  css/brief-form.css
   Loaded only on the homepage template (templates/template-hp.php)
   ========================================================================== */

.contact--brief {
	--b-cyan: #00ffff;
	--b-pink: #ff00ff;
	--b-lime: #00ff88;
	--b-bg: #0b0b10;
	--b-line: rgba(255, 255, 255, 0.08);
	--b-line-2: rgba(255, 255, 255, 0.14);
	--b-text: #ffffff;
	--b-muted: #a0aec0;
	--b-dim: #5a6578;
	--b-red: #ff3366;
	--b-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
	--b-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* #fullpage has overflow:hidden, which turns it into a scroll container and
   breaks the sticky mobile nav. clip looks identical but doesn't. */
#fullpage { overflow: clip; }

.contact--brief__intro {
	max-width: 620px;
	margin: 0 auto 3.5rem;
	text-align: center;
	color: var(--b-muted);
}

/* Theme doesn't set border-box globally */
.brief, .brief *, .brief *:before, .brief *:after { box-sizing: border-box; }

.brief {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 28px;
	align-items: stretch;
	text-align: left;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.brief__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 800px; /* tallest step ≈ 792px, keeps the card from jumping */
	padding: 36px 44px 32px;
	background:
		radial-gradient(120% 60% at 0% 0%, rgba(0, 255, 255, 0.06), transparent 60%),
		radial-gradient(100% 60% at 100% 100%, rgba(255, 0, 255, 0.05), transparent 60%),
		var(--b-bg);
	border: 1px solid var(--b-line);
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
	overflow: hidden;
}

.brief__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
	font-family: var(--b-mono);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--b-dim);
}
.brief__crumb-prefix { color: var(--b-pink); }
.brief__crumb-label { color: var(--b-muted); }
.brief__counter-current { color: var(--b-text); }

/* Segmented progress */
.brief__progress {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 6px;
	margin-bottom: 44px;
}
.brief__progress-seg {
	position: relative;
	height: 3px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}
.brief__progress-seg:after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--b-cyan), var(--b-pink));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.6s var(--b-ease);
}
.brief__progress-seg.is-done:after { transform: scaleX(1); }
.brief__progress-seg.is-active:after { transform: scaleX(0.35); }
.brief__progress-seg.is-active { box-shadow: 0 0 12px rgba(0, 255, 255, 0.35); }

/* Form + steps */
.brief__form {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	margin: 0;
}
.brief__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.brief__step {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.brief__step[hidden], .brief__done[hidden] { display: none !important; }

.brief__step.is-enter-fwd, .brief__done.is-enter-fwd { animation: brief-in-fwd 0.5s var(--b-ease) both; }
.brief__step.is-enter-back { animation: brief-in-back 0.5s var(--b-ease) both; }

@keyframes brief-in-fwd {
	from { opacity: 0; transform: translateX(28px); }
	to   { opacity: 1; transform: none; }
}
@keyframes brief-in-back {
	from { opacity: 0; transform: translateX(-28px); }
	to   { opacity: 1; transform: none; }
}

/* Theme styles .section.contact h3 cyan + glow */
.contact--brief .brief .brief__title {
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	font-size: 54px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	color: var(--b-text);
	background: none;
	-webkit-text-fill-color: currentColor;
	text-shadow: none;
	animation: none;
}
.brief__hint {
	margin: 0 0 30px;
	font-size: 19px;
	line-height: 1.4;
	color: var(--b-muted);
}

/* --------------------------------------------------------------------------
   Options
   -------------------------------------------------------------------------- */
.brief__options { display: grid; gap: 12px; }
.brief__options--chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brief__options--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.brief__options--rows  { grid-template-columns: 1fr; gap: 10px; }

.brief-opt {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.brief-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.brief-opt__box {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 14px 18px;
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid var(--b-line-2);
	border-radius: 999px;
	color: var(--b-text);
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s, transform 0.2s var(--b-ease);
}
.brief-opt:hover .brief-opt__box {
	border-color: rgba(0, 255, 255, 0.45);
	background: rgba(0, 255, 255, 0.04);
	transform: translateY(-1px);
}
.brief-opt input:focus-visible + .brief-opt__box {
	outline: 2px solid var(--b-cyan);
	outline-offset: 3px;
}
.brief-opt input:checked + .brief-opt__box {
	border-color: var(--b-cyan);
	background: linear-gradient(135deg, rgba(0, 255, 255, 0.12), rgba(255, 0, 255, 0.06));
	box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.35), 0 8px 30px rgba(0, 255, 255, 0.12);
}

.brief-icon {
	flex: 0 0 auto;
	color: var(--b-muted);
	transition: color 0.2s;
}
.brief-opt input:checked + .brief-opt__box .brief-icon { color: var(--b-cyan); }

.brief-opt__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}
.brief-opt__label {
	font-size: 21px;
	line-height: 1.1;
	letter-spacing: 0.02em;
}
.brief-opt__desc {
	font-size: 17px;
	line-height: 1.3;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--b-muted);
}

/* Keyboard hint → becomes a tick when selected */
.brief-opt__key, .brief-opt__tick {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	font-family: var(--b-mono);
	font-size: 11px;
	line-height: 1;
}
.brief-opt__key {
	margin-left: auto;
	padding: 0;
	color: var(--b-dim);
	border: 1px solid var(--b-line-2);
	background: transparent;
	box-shadow: none;
}
.brief-opt__tick {
	display: none;
	margin-left: auto;
	border-radius: 50%;
	color: #050508;
	background: var(--b-cyan);
	box-shadow: 0 0 14px rgba(0, 255, 255, 0.6);
}
.brief-opt input:checked + .brief-opt__box .brief-opt__key { display: none; }
.brief-opt input:checked + .brief-opt__box .brief-opt__tick { display: inline-flex; animation: brief-pop 0.35s var(--b-ease); }
@keyframes brief-pop {
	from { transform: scale(0.3); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

/* Cards layout */
.brief__options--cards .brief-opt__box {
	align-items: flex-start;
	flex-wrap: wrap;
	min-height: 132px;
	padding: 20px 20px 18px;
	border-radius: 16px;
}
.brief__options--cards .brief-icon {
	width: 26px;
	height: 26px;
	margin-bottom: 10px;
}
.brief__options--cards .brief-opt__text { flex: 1 0 100%; order: 3; }
.brief__options--cards .brief-opt__label { font-size: 23px; }
.brief__options--cards .brief-opt__key,
.brief__options--cards .brief-opt__tick { position: absolute; top: 16px; right: 16px; }

/* Rows layout (budget) */
.brief__options--rows .brief-opt__box {
	min-height: 54px;
	padding: 12px 18px;
	border-radius: 14px;
}
.brief-opt__radio {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid var(--b-dim);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.brief-opt input:checked + .brief-opt__box .brief-opt__radio {
	border-color: var(--b-cyan);
	box-shadow: inset 0 0 0 4px var(--b-bg), inset 0 0 0 9px var(--b-cyan);
}

/* --------------------------------------------------------------------------
   Text fields (override global input styles)
   -------------------------------------------------------------------------- */
.brief__fields { display: grid; gap: 26px; }
.brief__fields--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; }
.brief-field { position: relative; display: flex; flex-direction: column; min-width: 0; }
.brief-field--full { grid-column: 1 / -1; }

.brief-field__label {
	margin-bottom: 8px;
	font-size: 17px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--b-muted);
}
.brief-field__req { color: var(--b-pink); }
.brief-field__opt {
	margin-left: 6px;
	font-family: var(--b-mono);
	font-size: 11px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--b-dim);
}

.brief .brief-field__input {
	width: 100%;
	margin: 0 !important; /* theme sets margin-bottom !important on inputs */
	padding: 12px 0;
	font-family: inherit;
	font-size: 22px;
	line-height: 1.35;
	letter-spacing: 0.02em;
	color: var(--b-text);
	border: 0;
	border-bottom: 1px solid var(--b-line-2);
	border-radius: 0;
	outline: none;
	resize: vertical;
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--b-cyan), var(--b-pink));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 2px;
	box-shadow: none;
	transition: background-size 0.45s var(--b-ease), border-color 0.2s;
}
.brief .brief-field__input:hover,
.brief .brief-field__input:focus {
	background-color: transparent;
	box-shadow: none;
	outline: none;
}
.brief .brief-field__input:focus { background-size: 100% 2px; border-color: rgba(0, 255, 255, 0.35); }
.brief .brief-field__input::placeholder { color: #3d4555; opacity: 1; }

.brief textarea.brief-field__input,
.brief textarea.brief-field__input:hover {
	min-height: 150px;
	padding: 14px 16px;
	border: 1px solid var(--b-line-2);
	border-radius: 12px;
	background-color: rgba(255, 255, 255, 0.02);
}
.brief textarea.brief-field__input:focus {
	border-color: var(--b-cyan);
	background-color: rgba(255, 255, 255, 0.02);
	background-size: 0 0;
	box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.brief-field__meta {
	align-self: flex-end;
	margin-top: 6px;
	font-family: var(--b-mono);
	font-size: 11px;
	color: var(--b-dim);
}
.brief-field__error {
	display: none;
	margin-top: 6px;
	font-size: 16px;
	color: var(--b-red);
}
.brief-field.is-invalid .brief-field__input { border-bottom-color: var(--b-red); }
.brief-field.is-invalid .brief-field__error { display: block; }
.brief-field.is-invalid { animation: brief-shake 0.35s; }
@keyframes brief-shake {
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Segmented control */
.brief-seg {
	display: inline-flex;
	align-self: flex-start;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--b-line-2);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.02);
}
.brief-seg label { position: relative; margin: 0; cursor: pointer; }
.brief-seg input { position: absolute; opacity: 0; pointer-events: none; }
.brief-seg span {
	display: block;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 18px;
	letter-spacing: 0.04em;
	white-space: nowrap;
	color: var(--b-muted);
	transition: background 0.2s, color 0.2s;
}
.brief-seg label:hover span { color: var(--b-text); }
.brief-seg input:checked + span { color: #050508; background: var(--b-cyan); }
.brief-seg input:focus-visible + span { outline: 2px solid var(--b-cyan); outline-offset: 2px; }

.brief__legal {
	margin: 22px 0 0;
	font-size: 15px;
	color: var(--b-dim);
}
.brief__step-error {
	min-height: 1.4em;
	margin: 14px 0 0;
	font-size: 17px;
	color: var(--b-red);
}

/* --------------------------------------------------------------------------
   Nav + buttons (override global button styles)
   -------------------------------------------------------------------------- */
.brief__nav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--b-line);
}
.brief__enter {
	margin-left: 4px;
	font-family: var(--b-mono);
	font-size: 12px;
	color: var(--b-dim);
}
.brief__enter kbd {
	padding: 3px 6px;
	border: 1px solid var(--b-line-2);
	border-radius: 5px;
	font-family: inherit;
	font-size: 11px;
	color: var(--b-muted);
	background: transparent;
	box-shadow: none;
}
.brief.is-done .brief__nav { display: none; }

.brief .brief-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 56px;
	padding: 0 26px;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--b-text);
	border-radius: 999px;
	border: 1px solid transparent;
	background-color: transparent;
	box-shadow: none;
	cursor: pointer;
	transition: transform 0.2s var(--b-ease), box-shadow 0.25s, border-color 0.2s, opacity 0.2s, background-color 0.2s;
	-webkit-tap-highlight-color: transparent;
}
.brief .brief-btn:hover,
.brief .brief-btn:focus { background-color: transparent; box-shadow: none; }
.brief .brief-btn:focus-visible { outline: 2px solid var(--b-cyan); outline-offset: 3px; }
.brief .brief-btn:disabled { opacity: 0.3; cursor: default; }

.brief .brief-btn--ghost { border-color: var(--b-line-2); color: var(--b-muted); }
.brief .brief-btn--ghost:hover:not(:disabled) { color: var(--b-text); border-color: rgba(255, 255, 255, 0.35); }

.brief .brief-btn--link { padding: 0 8px; color: var(--b-muted); letter-spacing: 0.08em; }
.brief .brief-btn--link:hover { color: var(--b-text); }

.brief .brief-btn--primary,
.brief .brief-btn--primary:focus {
	flex: 0 1 280px;
	order: 3;
	margin-left: auto;
	background: linear-gradient(110deg, var(--b-pink) 0%, #9d5cff 45%, var(--b-cyan) 100%);
	background-size: 200% 100%;
	background-position: 0 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	box-shadow: 0 8px 30px rgba(255, 0, 255, 0.25);
}
.brief .brief-btn--primary:hover {
	transform: translateY(-2px);
	background-position: 100% 0;
	box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}
.brief-btn--primary svg { transition: transform 0.25s var(--b-ease); }
.brief-btn--primary:hover svg { transform: translateX(4px); }
.brief-btn--primary.is-loading { pointer-events: none; opacity: 0.85; }
.brief-btn--primary.is-loading svg { display: none; }
.brief-btn--primary.is-loading .brief__next-label:after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 12px;
	vertical-align: -1px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: brief-spin 0.7s linear infinite;
}
@keyframes brief-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Done
   -------------------------------------------------------------------------- */
.brief__done {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	outline: none;
}
.brief__done-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin-bottom: 30px;
	border-radius: 50%;
	color: #050508;
	background: linear-gradient(135deg, var(--b-cyan), var(--b-lime));
	box-shadow: 0 0 0 10px rgba(0, 255, 136, 0.08), 0 0 50px rgba(0, 255, 136, 0.4);
	animation: brief-pop 0.6s var(--b-ease) both 0.1s;
}
.brief__done-badge polyline { stroke-dasharray: 30; stroke-dashoffset: 30; animation: brief-draw 0.5s ease-out forwards 0.45s; }
@keyframes brief-draw { to { stroke-dashoffset: 0; } }
.contact--brief .brief .brief__done .brief__title { font-size: 64px; }
.contact--brief .brief .brief__done-name {
	background: linear-gradient(90deg, var(--b-cyan), var(--b-pink));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.brief__done-ref { font-family: var(--b-mono); font-size: 0.8em; color: var(--b-cyan); }
.brief__done .brief__hint { max-width: 460px; }
.brief__done-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brief .brief__copy.is-copied { border-color: var(--b-lime); color: var(--b-lime); }

/* --------------------------------------------------------------------------
   Live preview terminal
   -------------------------------------------------------------------------- */
.brief__preview.terminal-window {
	display: flex;
	flex-direction: column;
	margin: 0;
	border-radius: 18px;
	border-color: rgba(0, 255, 255, 0.16);
	background: #08080c;
}
.brief__code {
	flex: 1 1 auto;
	padding: 26px 24px;
	font-family: var(--b-mono);
	font-size: 13px;
	line-height: 1.9;
	color: #6b7689;
	overflow: hidden;
}
.brief__code-comment { margin-bottom: 6px; color: #3d4555; }
.brief__code-line {
	position: relative;
	margin: 0 -24px;
	padding: 2px 24px 2px 42px;
	text-indent: -18px;
	border-left: 2px solid transparent;
	transition: background-color 0.3s, border-color 0.3s;
	word-break: break-word;
}
.brief__code-line.is-current {
	background: rgba(0, 255, 255, 0.05);
	border-left-color: var(--b-cyan);
}
.brief__code-key { color: var(--b-pink); }
.brief__code-val { color: var(--b-lime); }
.brief__code-val.is-null { color: #3d4555; font-style: italic; }
.brief__code-val.is-flash { animation: brief-flash 0.8s ease-out; }
@keyframes brief-flash {
	from { background: rgba(0, 255, 136, 0.25); }
	to   { background: transparent; }
}
.brief__code-status { margin-top: 18px; color: var(--b-muted); }
.brief__code-status.is-ok .brief__code-status-text { color: var(--b-lime); }

.brief__direct {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	padding: 18px 24px;
	border-top: 1px solid rgba(0, 255, 255, 0.1);
	font-size: 17px;
	color: var(--b-dim);
}
.brief__direct span { flex: 1 0 100%; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
.brief__direct a { color: var(--b-text); text-decoration: none; letter-spacing: 0.03em; }
.brief__direct a:hover { color: var(--b-cyan); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.brief { grid-template-columns: 1fr; }
	.brief__card { min-height: 0; }
	.brief__preview .brief__code,
	.brief__preview .terminal-header { display: none; }
	.brief__preview.terminal-window { box-shadow: none; }
	.brief__direct span { flex: 0 0 auto; }
}

@media (max-width: 767px) {
	.contact--brief__intro { margin-bottom: 2rem; }
	.brief__card {
		padding: 22px 18px 18px;
		border-radius: 16px;
		overflow: clip; /* hidden would break the sticky nav */
	}
	.brief__progress { margin-bottom: 28px; }
	.contact--brief .brief .brief__title { font-size: 40px; }
	.contact--brief .brief .brief__done .brief__title { font-size: 46px; }
	.brief__hint { margin-bottom: 22px; font-size: 17px; }

	.brief__options--chips,
	.brief__options--cards { grid-template-columns: 1fr; gap: 10px; }
	.brief-opt__box { min-height: 58px; }
	.brief-opt__key { display: none; }
	.brief__options--cards .brief-opt__box { min-height: 0; padding: 16px 18px; flex-wrap: nowrap; align-items: center; }
	.brief__options--cards .brief-icon { width: 22px; height: 22px; margin-bottom: 0; }
	.brief__options--cards .brief-opt__text { flex: 1 1 auto; order: 0; padding-right: 30px; }
	.brief__options--cards .brief-opt__label { font-size: 21px; }
	.brief__options--cards .brief-opt__desc { font-size: 16px; }
	.brief__options--cards .brief-opt__key,
	.brief__options--cards .brief-opt__tick { top: 50%; margin-top: -12px; }

	.brief__fields--grid { grid-template-columns: 1fr; gap: 20px; }
	.brief-seg { display: flex; align-self: stretch; }
	.brief-seg label { flex: 1 1 0; }
	.brief-seg span { padding: 8px 6px; text-align: center; font-size: 16px; }

	.brief__enter { display: none; }
	.brief__nav {
		position: sticky;
		bottom: 0;
		margin: 20px -18px -18px;
		padding: 14px 18px 18px;
		background: linear-gradient(180deg, rgba(11, 11, 16, 0.85), var(--b-bg) 40%);
		backdrop-filter: blur(6px);
	}
	.brief .brief-btn { height: 52px; padding: 0 20px; font-size: 18px; }
	.brief .brief-btn--primary { flex: 1 1 auto; }
	.brief .brief-btn--ghost.brief__back { width: 52px; padding: 0; flex: 0 0 52px; }
	.brief-btn--ghost.brief__back span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.brief *, .brief *:before, .brief *:after { animation: none !important; transition: none !important; }
}
