/* Login modal, demo form, and overlay controls for the simplified home page. */

.hpv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.4rem;
	font-weight: 600;
	font-size: 0.98rem;
	border-radius: 999px;
	transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
	border: 1.5px solid transparent;
	font-family: inherit;
}

.hpv-btn:hover { transform: translateY(-1px); }

.hpv-btn--primary {
	background: linear-gradient(135deg, #ff5c00, #ff7a3d);
	color: #fff !important;
}

.hpv-btn--primary:hover {
	background: #e05200;
	color: #fff !important;
}

.hpv-login-modal[hidden] { display: none !important; }

.hpv-login-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.hpv-login-modal__shade {
	position: absolute;
	inset: 0;
	background: rgba(15, 31, 34, 0.55);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.hpv-login-modal__panel {
	position: relative;
	width: 100%;
	max-width: 26rem;
	background: #fff;
	color: #0f1f22;
	border-radius: 1.25rem;
	padding: 2rem 1.75rem 1.75rem;
	box-shadow: var(--hp-shadow, 0 24px 64px rgba(15,31,34,.10));
	border: 1px solid rgba(15, 31, 34, 0.08);
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
}

.hpv-login-modal__close {
	position: absolute;
	top: 0.65rem;
	right: 0.8rem;
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #0f1f22;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.65;
}

.hpv-login-modal__close:hover { opacity: 1; background: rgba(15, 31, 34, 0.06); }

.hpv-login-modal__title {
	margin: 0 0 0.4rem;
	font-size: 1.55rem;
	line-height: 1.15;
	font-weight: 800;
}

.hpv-login-modal__intro {
	margin: 0 0 1.25rem;
	color: #6b8286;
	font-size: 0.95rem;
	line-height: 1.45;
}

.hpv-login-modal__feedback {
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: 0.65rem;
	font-size: 0.9rem;
	line-height: 1.35;
}

.hpv-login-modal__feedback--error {
	background: rgba(239, 68, 68, 0.1);
	color: #b91c1c;
	border: 1px solid rgba(239, 68, 68, 0.25);
}

.hpv-login-modal__feedback--ok {
	background: rgba(34, 197, 94, 0.1);
	color: #15803d;
	border: 1px solid rgba(34, 197, 94, 0.25);
}

.hpv-login-modal__form { display: flex; flex-direction: column; gap: 0.9rem; }
.hpv-login-modal__row { display: flex; flex-direction: column; gap: 0.35rem; }

.hpv-demo-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: #6b8286;
	margin-bottom: 0.35rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hpv-demo-input {
	width: 100%;
	padding: 0.72rem 0.95rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.35;
	color: #0f1f22;
	background: #fff;
	border: 1.5px solid rgba(15, 31, 34, 0.12);
	border-radius: 0.7rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hpv-demo-input:focus {
	outline: none;
	border-color: #ff5c00;
	box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.18);
}

.hpv-login-modal__options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.88rem;
	color: #3d5256;
}

.hpv-login-modal__remember {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	cursor: pointer;
}

.hpv-login-modal__remember input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	accent-color: #ff5c00;
}

.hpv-login-modal__lost { text-decoration: underline; text-underline-offset: 3px; }

.hpv-login-modal__submit {
	margin-top: 0.35rem;
	justify-content: center;
	width: 100%;
	border: none;
}

.hpv-login-modal__submit[disabled] { opacity: 0.7; cursor: progress; }

.hpv-login-modal__foot {
	margin: 0.5rem 0 0;
	font-size: 0.82rem;
	text-align: center;
	color: #6b8286;
}

.hpv-login-modal__foot a { text-decoration: underline; text-underline-offset: 3px; }

body.hpv-login-open { overflow: hidden; }

@media (max-width: 520px) {
	.hpv-login-modal { padding: 0.75rem; align-items: flex-end; }
	.hpv-login-modal__panel {
		max-width: 100%;
		border-radius: 1.25rem 1.25rem 1rem 1rem;
		padding: 1.75rem 1.25rem 1.25rem;
	}
}

.hpv-demo-feedback {
	margin: 0 0 0.85rem;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.4;
}

.hpv-demo-feedback--ok {
	background: rgba(34, 197, 94, 0.1);
	color: #15803d;
	border: 1px solid rgba(34, 197, 94, 0.25);
}

.hpv-demo-feedback--error {
	background: rgba(239, 68, 68, 0.1);
	color: #b91c1c;
	border: 1px solid rgba(239, 68, 68, 0.25);
}

.hpv-demo-form__row { margin-bottom: 0.85rem; }

.hpv-demo-form__row--half {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

@media (min-width: 520px) {
	.hpv-demo-form__row--half { grid-template-columns: 1fr 1fr; }
}

.hpv-demo-textarea { min-height: 5rem; resize: vertical; }

.hpv-demo-submit {
	width: 100%;
	margin-top: 0.35rem;
	cursor: pointer;
	border: none;
}

.hpv-demo-foot {
	margin: 0.75rem 0 0;
	font-size: 0.82rem;
	color: #6b8286;
	line-height: 1.45;
	text-align: center;
}

.hpv-demo-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.hpv-demo-form__row--captcha .cf-turnstile {
	display: inline-block;
}

.hp-signup-step[hidden] {
	display: none !important;
}

/* Signup step transition */
.hp-signup-progress {
	margin-bottom: 14px;
}

.hp-signup-progress__track {
	display: flex;
	align-items: center;
	gap: 0;
	margin-bottom: 6px;
}

.hp-signup-progress__dot {
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--hp-line, rgba(15, 31, 34, 0.12));
	border: 2px solid transparent;
	transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.hp-signup-progress__dot.is-active {
	background: var(--hp-brand, #ff5c00);
	border-color: rgba(255, 92, 0, 0.25);
	transform: scale(1.08);
}

.hp-signup-progress__dot.is-complete {
	background: var(--hp-teal, #00a8b5);
	border-color: rgba(0, 168, 181, 0.25);
}

.hp-signup-progress__line {
	flex: 1;
	height: 2px;
	margin: 0 6px;
	border-radius: 999px;
	background: var(--hp-line, rgba(15, 31, 34, 0.1));
	position: relative;
	overflow: hidden;
}

.hp-signup-progress__line::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--hp-brand, #ff5c00), var(--hp-teal, #00a8b5));
	transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-signup-card.is-step-password .hp-signup-progress__line::after {
	width: 100%;
}

.hp-signup-progress__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hp-muted, #6b8286);
	transition: opacity 0.25s ease;
}

.hp-signup-card.is-step-password .hp-signup-progress__label {
	color: var(--hp-teal-dark, #007a84);
}

.hp-signup-card[data-signup-animating="1"] .hp-signup-progress__label {
	opacity: 0.55;
}

.hp-signup-steps {
	position: relative;
	overflow: hidden;
	transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-signup-step {
	transition: opacity 0.38s ease, transform 0.38s ease;
}

.hp-signup-step.is-active {
	opacity: 1;
	transform: translateY(0);
}

.hp-signup-step.is-leaving {
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
}

.hp-signup-step.is-entering {
	opacity: 0;
	transform: translateY(14px);
}

.hp-signup-step.is-entering.is-active {
	opacity: 1;
	transform: translateY(0);
}

.hp-signup-card.is-step-password [data-signup-pricing] {
	opacity: 0;
	max-height: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;
	transition: opacity 0.3s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

.hp-signup-card__title {
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.hp-signup-card.is-title-fading .hp-signup-card__title {
	opacity: 0;
	transform: translateY(-6px);
}

.hp-signup-card__intro[data-signup-intro] {
	transition: opacity 0.28s ease, max-height 0.35s ease, margin 0.35s ease;
}

.hp-signup-card.is-step-password [data-signup-intro] {
	opacity: 0;
	max-height: 0;
	margin-bottom: 0;
	overflow: hidden;
	pointer-events: none;
}

.hp-signup-card__intro--step {
	margin-bottom: 12px;
}

.hp-signup-field {
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.hp-signup-step.is-entering .hp-signup-field {
	opacity: 0;
	transform: translateY(10px);
}

.hp-signup-step.is-entering.is-active .hp-signup-field {
	opacity: 1;
	transform: translateY(0);
}

.hp-signup-step.is-entering.is-active .hp-signup-field:nth-of-type(1) { transition-delay: 0.05s; }
.hp-signup-step.is-entering.is-active .hp-signup-field:nth-of-type(2) { transition-delay: 0.11s; }
.hp-signup-step.is-entering.is-active .hp-signup-field:nth-of-type(3) { transition-delay: 0.17s; }

.hp-signup-step.is-entering [data-signup-step-message] {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s ease 0.04s, transform 0.4s ease 0.04s;
}

.hp-signup-step.is-entering.is-active [data-signup-step-message] {
	opacity: 1;
	transform: translateY(0);
}

.hp-signup-hint {
	margin: 6px 0 0;
	font-size: 0.78rem;
	color: var(--hp-muted, #6b8286);
}

.hpv-demo-feedback--transition {
	background: rgba(0, 168, 181, 0.08);
	border: 1px solid rgba(0, 168, 181, 0.18);
	color: var(--hp-teal-dark, #007a84);
}

@media (prefers-reduced-motion: reduce) {
	.hp-signup-steps,
	.hp-signup-step,
	.hp-signup-card__title,
	.hp-signup-progress__dot,
	.hp-signup-progress__line::after,
	.hp-signup-field,
	.hp-signup-card.is-step-password [data-signup-pricing],
	.hp-signup-card.is-step-password [data-signup-intro] {
		transition: none;
	}

	.hp-signup-step.is-leaving,
	.hp-signup-step.is-entering {
		opacity: 1;
		transform: none;
	}
}

.hp-signup-back {
	display: inline-flex;
	align-items: center;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--hp-muted, #6b8286);
	font: inherit;
	font-size: .84rem;
	font-weight: 600;
	cursor: pointer;
}

.hp-signup-back:hover {
	color: var(--hp-ink, #0f1f22);
}

.hpv-signup-password-submit {
	margin-top: 4px;
}

.hp-turnstile {
	min-height: 65px;
}

.hp-turnstile-missing {
	margin: 0;
	font-size: 0.82rem;
	color: #b91c1c;
	text-align: center;
}

.hpv-nav__signin,
.nav-signin {
	font-size: 0.88rem;
	color: #3d5256;
	text-decoration: none;
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	padding: 0;
}

.hpv-nav__signin:hover,
.nav-signin:hover { color: #0f1f22; }
