/**
 * Public lead form — matches stockleadmainn.vercel.app design.
 */

:root {
	--bms-bg: #f8f9fb;
	--bms-card: rgba(255, 255, 255, 0.9);
	--bms-ink: #111827;
	--bms-muted: #6b7280;
	--bms-label: #6b7280;
	--bms-field: #f8f9fc;
	--bms-field-hover: #f1f3f9;
	--bms-indigo: #4f46e5;
	--bms-indigo-soft: rgba(79, 70, 229, 0.1);
	--bms-purple: #9333ea;
	--bms-req: #f87171;
	--bms-radius: 2.5rem;
	--bms-radius-sm: 1rem;
	--bms-font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--bms-font);
	color: var(--bms-ink);
	background: var(--bms-bg);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--bms-indigo);
}

/* ---- Blobs ---- */
.bms-blob {
	position: absolute;
	border-radius: 9999px;
	filter: blur(64px);
	opacity: 0.7;
	pointer-events: none;
	z-index: 0;
	animation: bms-float 12s ease-in-out infinite;
}

.bms-blob--purple {
	top: -10rem;
	left: -10rem;
	width: 24rem;
	height: 24rem;
	background: rgba(216, 180, 254, 0.4);
}

.bms-blob--blue {
	top: 10rem;
	right: 5rem;
	width: 20rem;
	height: 20rem;
	background: rgba(191, 219, 254, 0.4);
	animation-delay: -4s;
}

.bms-blob--teal {
	bottom: -10rem;
	left: 33%;
	width: 24rem;
	height: 24rem;
	background: rgba(204, 251, 241, 0.4);
	animation-delay: -7s;
}

@keyframes bms-float {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(18px) scale(1.04);
	}
}

/* ---- Form page ---- */
.bms-form-page {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	overflow: hidden;
	background: var(--bms-bg);
}

.bms-form-shell {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 64rem;
}

.bms-form-card {
	background: var(--bms-card);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: var(--bms-radius);
	border: 1px solid rgba(255, 255, 255, 0.5);
	box-shadow: 0 20px 80px -15px rgba(0, 0, 0, 0.05);
	padding: 2rem;
	animation: bms-rise 0.6s ease both;
}

@media (min-width: 640px) {
	.bms-form-card {
		padding: 3rem;
	}
}

@media (min-width: 1024px) {
	.bms-form-card {
		padding: 4rem;
	}
}

@keyframes bms-rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.bms-form-header {
	text-align: center;
	margin-bottom: 3.5rem;
}

.bms-form-logo {
	display: flex;
	justify-content: center;
	margin-bottom: 2rem;
}

.bms-form-logo img {
	height: 10rem;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
	transform: scale(1.1);
	animation: bms-logo-in 0.7s ease both;
}

@keyframes bms-logo-in {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
	to {
		opacity: 1;
		transform: scale(1.1);
	}
}

.bms-form-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #111827;
	line-height: 1.1;
}

.bms-lead-form {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.bms-field-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem 2rem;
}

@media (min-width: 768px) {
	.bms-field-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.bms-field-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.bms-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--bms-label);
	margin: 0 0 0.65rem 0.25rem;
}

.bms-req {
	color: var(--bms-req);
}

.bms-input-wrap {
	position: relative;
	transition: transform 0.2s ease;
}

.bms-input-wrap:focus-within {
	transform: translateY(-1px);
}

.bms-input-icon {
	position: absolute;
	inset: 0 auto 0 0;
	padding-left: 1rem;
	display: flex;
	align-items: center;
	pointer-events: none;
	color: #9ca3af;
}

.bms-input-wrap--textarea .bms-input-icon {
	align-items: flex-start;
	padding-top: 1rem;
}

.bms-input-wrap input,
.bms-input-wrap textarea {
	appearance: none;
	width: 100%;
	padding: 1rem 1rem 1rem 3rem;
	background: var(--bms-field);
	border: 2px solid transparent;
	border-radius: var(--bms-radius-sm);
	font: 500 0.875rem/1.4 var(--bms-font);
	color: var(--bms-ink);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.bms-input-wrap textarea {
	padding-top: 0.9rem;
	resize: vertical;
	min-height: 6.5rem;
}

.bms-input-wrap input::placeholder,
.bms-input-wrap textarea::placeholder {
	color: #9ca3af;
}

.bms-input-wrap input:hover,
.bms-input-wrap textarea:hover {
	background: var(--bms-field-hover);
}

.bms-input-wrap input:focus,
.bms-input-wrap textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--bms-indigo);
	box-shadow: 0 0 0 4px var(--bms-indigo-soft);
}

.bms-agree {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	user-select: none;
}

.bms-agree-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bms-agree-box {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	border: 2px solid #d1d5db;
	border-radius: 0.3rem;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: all 0.2s;
}

.bms-agree-box svg {
	opacity: 0;
	transform: scale(0.6);
	transition: all 0.15s;
}

.bms-agree-input:checked + .bms-agree-box {
	background: var(--bms-indigo);
	border-color: var(--bms-indigo);
}

.bms-agree-input:checked + .bms-agree-box svg {
	opacity: 1;
	transform: scale(1);
}

.bms-agree-input:focus-visible + .bms-agree-box {
	box-shadow: 0 0 0 3px var(--bms-indigo-soft);
}

.bms-agree-text {
	font-size: 0.875rem;
	font-weight: 500;
	color: #4b5563;
	line-height: 1.55;
}

.bms-agree-text a {
	color: var(--bms-indigo);
	font-weight: 600;
	text-decoration: none;
}

.bms-agree-text a:hover {
	text-decoration: underline;
}

.bms-form-actions {
	display: flex;
	justify-content: center;
	padding-top: 0.5rem;
}

.bms-submit {
	appearance: none;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 240px;
	width: 100%;
	padding: 1rem 2.5rem;
	border-radius: var(--bms-radius-sm);
	font: 700 1rem/1 var(--bms-font);
	color: #fff;
	background: linear-gradient(90deg, #4f46e5, #9333ea);
	box-shadow: 0 12px 28px -8px rgba(79, 70, 229, 0.35);
	text-decoration: none;
	transition: transform 0.25s, box-shadow 0.25s, filter 0.25s, opacity 0.2s;
}

@media (min-width: 768px) {
	.bms-submit {
		width: auto;
	}
}

.bms-submit:hover {
	transform: translateY(-3px);
	filter: brightness(1.05);
	box-shadow: 0 16px 32px -8px rgba(79, 70, 229, 0.45);
	color: #fff;
}

.bms-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.bms-form-message {
	text-align: center;
	padding: 1rem 1.25rem;
	border-radius: var(--bms-radius-sm);
	font-weight: 600;
	font-size: 0.95rem;
}

.bms-form-message.is-success {
	background: #ecfdf5;
	color: #047857;
}

.bms-form-message.is-error {
	background: #fef2f2;
	color: #b91c1c;
}

.bms-form-connect {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #f3f4f6;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.bms-form-connect > p {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #6b7280;
}

.bms-connect-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.bms-connect {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.85rem 1.5rem;
	background: var(--bms-field);
	color: #374151;
	border-radius: var(--bms-radius-sm);
	font-weight: 700;
	font-size: 0.875rem;
	text-decoration: none;
	border: 1px solid transparent;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: all 0.2s;
}

.bms-connect--tg:hover {
	color: #0088cc;
	background: rgba(0, 136, 204, 0.1);
	border-color: rgba(0, 136, 204, 0.2);
}

.bms-connect--wa:hover {
	color: #25d366;
	background: rgba(37, 211, 102, 0.1);
	border-color: rgba(37, 211, 102, 0.2);
}

/* Home */
.bms-home {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	overflow: hidden;
}

.bms-home-card {
	position: relative;
	z-index: 1;
	text-align: center;
	background: var(--bms-card);
	backdrop-filter: blur(16px);
	border-radius: var(--bms-radius);
	padding: 3rem 2rem;
	box-shadow: 0 20px 80px -15px rgba(0, 0, 0, 0.06);
	max-width: 28rem;
	width: 100%;
	animation: bms-rise 0.55s ease both;
}

.bms-home-logo {
	height: 7rem;
	width: auto;
	margin: 0 auto 1.5rem;
}

.bms-home-card h1 {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	font-weight: 800;
}

.bms-home-card p {
	color: var(--bms-muted);
	margin: 0 0 1.75rem;
}

.bms-home-actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: center;
}

/* Login */
.bms-login-page {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	overflow: hidden;
	background: var(--bms-bg);
}

.bms-login-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 26rem;
	background: var(--bms-card);
	backdrop-filter: blur(16px);
	border-radius: 1.75rem;
	padding: 2.5rem 2rem;
	box-shadow: 0 20px 80px -15px rgba(0, 0, 0, 0.06);
	animation: bms-rise 0.5s ease both;
}

.bms-login-logo {
	height: 5.5rem;
	margin: 0 auto 1rem;
}

.bms-login-card h1 {
	margin: 0;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 800;
}

.bms-login-sub {
	text-align: center;
	color: var(--bms-muted);
	margin: 0.35rem 0 1.5rem;
	font-size: 0.9rem;
}

.bms-login-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bms-login-form label span {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--bms-muted);
	margin-bottom: 0.4rem;
}

.bms-login-form input[type="text"],
.bms-login-form input[type="password"] {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 2px solid transparent;
	border-radius: 0.85rem;
	background: var(--bms-field);
	font: 500 0.95rem var(--bms-font);
}

.bms-login-form input:focus {
	outline: none;
	border-color: var(--bms-indigo);
	background: #fff;
	box-shadow: 0 0 0 4px var(--bms-indigo-soft);
}

.bms-remember {
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #4b5563;
}

.bms-remember span {
	display: inline !important;
	text-transform: none !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	margin: 0 !important;
	font-size: 0.875rem !important;
}

.bms-alert {
	padding: 0.85rem 1rem;
	border-radius: 0.85rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	font-weight: 500;
}

.bms-alert--error {
	background: #fef2f2;
	color: #b91c1c;
}

.bms-alert--ok {
	background: #ecfdf5;
	color: #047857;
}

.bms-alert--info {
	background: #eef2ff;
	color: #3730a3;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
