/* Pré-Briefing — formulário */

.pb {
	--pb-accent: #d9412a;
	--pb-highlight: #f5b324;
	--pb-ink: #171c3a;
	--pb-paper: #f7f4ee;
	--pb-line: rgba(23, 28, 58, 0.16);
	--pb-muted: rgba(23, 28, 58, 0.6);
	--pb-danger: #b3261e;
	--pb-display: "Anton", "Archivo", Impact, ui-sans-serif, sans-serif;
	--pb-body: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--pb-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");

	max-width: 1000px;
	margin: 0 auto;
	background: var(--pb-paper);
	color: var(--pb-ink);
	font-family: var(--pb-body);
	font-size: 16px;
	line-height: 1.55;
	overflow: hidden;
	border-radius: 4px;
}

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

/* ------------------------------------------------------------ cabeçalho */

.pb-head {
	position: relative;
	padding: clamp(30px, 5vw, 52px) clamp(22px, 4vw, 46px) clamp(34px, 5vw, 54px);
	background: var(--pb-ink);
	isolation: isolate;
}

.pb-head::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--pb-grain);
	opacity: 0.16;
	mix-blend-mode: overlay;
	pointer-events: none;
}

.pb-eyebrow {
	position: relative;
	margin: 0;
	padding-left: 26px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--pb-highlight);
}

/* marcador chevron, eco do símbolo da marca */
.pb-eyebrow::before {
	content: "";
	position: absolute;
	left: 0;
	top: 5px;
	width: 13px;
	height: 13px;
	border-top: 3px solid var(--pb-highlight);
	border-left: 3px solid var(--pb-highlight);
	transform: rotate(45deg);
}

.pb-title {
	max-width: 16ch;
	margin: 16px 0 0;
	font-family: var(--pb-display);
	font-weight: 400;
	font-size: clamp(38px, 6.4vw, 68px);
	line-height: 0.92;
	letter-spacing: 0.002em;
	text-transform: uppercase;
	color: #fff;
}

.pb-lede {
	max-width: 46ch;
	margin: 16px 0 0;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.72);
}

/* --------------------------------------------------------------- layout */

.pb-layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: clamp(24px, 4vw, 52px);
	align-items: start;
	padding: clamp(28px, 4vw, 46px) clamp(22px, 4vw, 46px) clamp(30px, 4vw, 50px);
}

/* ----------------------------------------------------------------- rail */

.pb-rail {
	position: sticky;
	top: 28px;
	padding-left: 22px;
}

.pb-rail-line {
	position: absolute;
	left: 6px;
	top: 10px;
	bottom: 10px;
	width: 2px;
	background: var(--pb-line);
}

.pb-rail-fill {
	position: absolute;
	inset: 0 0 auto 0;
	height: 0;
	background: var(--pb-accent);
	transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.pb-rail-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 17px;
}

.pb-rail-item {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 9px;
	align-items: baseline;
	font-size: 13.5px;
	color: var(--pb-muted);
	opacity: 0.6;
	transition: opacity 0.25s ease, color 0.25s ease;
}

/* cada bloco é um ponto da subida */
.pb-rail-item::before {
	content: "";
	position: absolute;
	left: -22px;
	top: 8px;
	width: 9px;
	height: 9px;
	border-top: 2px solid var(--pb-line);
	border-left: 2px solid var(--pb-line);
	transform: rotate(45deg);
	transition: border-color 0.25s ease;
}

.pb-rail-item.is-active,
.pb-rail-item.is-done {
	opacity: 1;
	color: var(--pb-ink);
}

.pb-rail-item.is-active::before,
.pb-rail-item.is-done::before {
	border-color: var(--pb-accent);
}

.pb-rail-item.is-skipped {
	opacity: 0.3;
	text-decoration: line-through;
}

.pb-rail-code {
	font-size: 12px;
	font-weight: 700;
	font-style: italic;
	color: var(--pb-accent);
}

.pb-rail-title {
	font-weight: 500;
}

.pb-rail-item.is-done .pb-rail-code,
.pb-rail-item.is-active .pb-rail-code {
	color: var(--pb-accent);
}

/* ----------------------------------------------------------------- step */

.pb-step[hidden] {
	display: none;
}

.pb-step {
	animation: pb-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pb-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

.pb-step-head {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 13px;
	align-items: start;
	margin-bottom: 28px;
}

.pb-step-code {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	background: var(--pb-accent);
	color: #fff;
	font-family: var(--pb-display);
	font-size: 18px;
	line-height: 1;
	padding-top: 2px;
}

/* tarja amarela, como as legendas dos posts */
.pb-step-title {
	display: inline-block;
	margin: 0;
	padding: 6px 12px 5px;
	background: var(--pb-highlight);
	font-family: var(--pb-display);
	font-size: clamp(22px, 3.2vw, 30px);
	font-weight: 400;
	line-height: 1.06;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	color: var(--pb-ink);
}

.pb-step-desc {
	margin: 9px 0 0;
	font-size: 14.5px;
	color: var(--pb-muted);
}

.pb-step-empty {
	font-size: 15px;
	color: var(--pb-muted);
}

/* ---------------------------------------------------------------- campos */

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

.pb-field {
	min-width: 0;
	grid-column: span 2;
}

.pb-field--half {
	grid-column: span 1;
}

.pb-field[hidden] {
	display: none;
}

.pb-field.is-revealed {
	animation: pb-reveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pb-reveal {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

.pb-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.pb-label {
	display: block;
	margin-bottom: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--pb-ink);
}

.pb-req {
	margin-left: 8px;
	font-size: 10px;
	font-style: italic;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pb-accent);
	vertical-align: 1px;
}

.pb-help {
	margin: -3px 0 9px;
	font-size: 13.5px;
	color: var(--pb-muted);
}

.pb-input {
	width: 100%;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15.5px;
	line-height: 1.5;
	color: var(--pb-ink);
	background: #fff;
	border: 1.5px solid var(--pb-line);
	border-radius: 3px;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	appearance: none;
}

.pb-input::placeholder {
	color: rgba(23, 28, 58, 0.38);
}

.pb-input:focus {
	outline: none;
	border-color: var(--pb-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pb-accent) 20%, transparent);
}

textarea.pb-input {
	resize: vertical;
	min-height: 108px;
}

.pb-select-wrap {
	position: relative;
}

.pb-select-wrap::after {
	content: "";
	position: absolute;
	right: 17px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--pb-ink);
	border-bottom: 2px solid var(--pb-ink);
	transform: rotate(45deg);
	pointer-events: none;
}

.pb-select {
	padding-right: 42px;
	cursor: pointer;
}

/* ------------------------------------------------------- radio/checkbox */

.pb-options {
	display: grid;
	gap: 8px;
}

.pb-option {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 11px;
	align-items: start;
	padding: 12px 14px;
	background: #fff;
	border: 1.5px solid var(--pb-line);
	border-radius: 3px;
	font-size: 15px;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.pb-option:hover {
	border-color: color-mix(in srgb, var(--pb-accent) 50%, var(--pb-line));
}

.pb-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.pb-option-mark {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	border: 2px solid var(--pb-line);
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pb-field--checkbox .pb-option-mark {
	border-radius: 2px;
}

.pb-option input:checked ~ .pb-option-mark {
	border-color: var(--pb-accent);
	box-shadow: inset 0 0 0 4px var(--pb-accent);
}

.pb-option:has(input:checked) {
	border-color: var(--pb-accent);
	background: color-mix(in srgb, var(--pb-highlight) 18%, #fff);
}

.pb-option input:focus-visible ~ .pb-option-mark {
	outline: 2px solid var(--pb-accent);
	outline-offset: 3px;
}

.pb-option-text {
	line-height: 1.45;
}

/* ----------------------------------------------------------------- erros */

.pb-error {
	margin: 7px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--pb-danger);
}

.pb-field.has-error .pb-input,
.pb-field.has-error .pb-option {
	border-color: var(--pb-danger);
}

.pb-alert {
	margin-top: 22px;
	padding: 13px 16px;
	border-radius: 3px;
	border-left: 4px solid var(--pb-danger);
	background: color-mix(in srgb, var(--pb-danger) 8%, #fff);
	font-size: 14.5px;
	color: var(--pb-danger);
}

/* ------------------------------------------------------------- navegação */

.pb-nav {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1.5px solid var(--pb-line);
}

.pb-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 14px 26px;
	border: 2px solid var(--pb-accent);
	border-radius: 3px;
	background: var(--pb-accent);
	color: #fff;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.pb-btn:hover {
	transform: translateY(-1px);
	background: color-mix(in srgb, var(--pb-accent) 88%, #000);
}

.pb-btn:focus-visible {
	outline: 3px solid var(--pb-highlight);
	outline-offset: 2px;
}

.pb-btn[disabled] {
	opacity: 0.55;
	cursor: progress;
	transform: none;
}

.pb-btn--ghost {
	background: transparent;
	color: var(--pb-ink);
	border-color: var(--pb-line);
}

.pb-btn--ghost:hover {
	background: transparent;
	border-color: var(--pb-ink);
}

.pb-btn[hidden] {
	display: none;
}

/* --------------------------------------------------------------- sucesso */

.pb-done {
	padding: clamp(34px, 5vw, 60px) clamp(22px, 4vw, 46px);
	background: var(--pb-ink);
	animation: pb-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pb-done[hidden] {
	display: none;
}

.pb-done .pb-title {
	color: #fff;
}

.pb-done .pb-lede {
	color: rgba(255, 255, 255, 0.75);
}

.pb-done-mark {
	display: block;
	width: 42px;
	height: 42px;
	margin-bottom: 20px;
	background: var(--pb-highlight);
	position: relative;
}

.pb-done-mark::after {
	content: "";
	position: absolute;
	left: 14px;
	top: 11px;
	width: 10px;
	height: 17px;
	border-right: 3px solid var(--pb-ink);
	border-bottom: 3px solid var(--pb-ink);
	transform: rotate(42deg);
}

/* ------------------------------------------------------------- honeypot */

.pb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------ responsivo */

@media (max-width: 860px) {
	.pb-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.pb-rail {
		position: static;
		padding: 0 0 18px;
		border-bottom: 1.5px solid var(--pb-line);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.pb-rail::-webkit-scrollbar {
		display: none;
	}

	.pb-rail-line {
		display: none;
	}

	.pb-rail-list {
		display: flex;
		gap: 7px;
	}

	.pb-rail-item {
		flex: 0 0 auto;
		gap: 6px;
		padding: 7px 12px;
		border: 1.5px solid var(--pb-line);
		border-radius: 3px;
		font-size: 12.5px;
		white-space: nowrap;
	}

	.pb-rail-item::before {
		display: none;
	}

	.pb-rail-item.is-active {
		border-color: var(--pb-accent);
		background: var(--pb-highlight);
	}
}

@media (max-width: 640px) {
	.pb-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.pb-field,
	.pb-field--half {
		grid-column: span 1;
	}

	.pb-nav .pb-btn {
		flex: 1;
		padding: 15px 14px;
		text-align: center;
	}
}

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