/**
 * baGPT Landing — «مغز عصبی» سینمایی.
 * فقط keyframes، reveal-on-scroll، و چند تنظیم ریسپانسیو/تعاملی.
 * استایل‌های ظاهری اصلی به‌صورت inline در page-shell.php (وفادار به طرح handoff) هستند.
 */

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body.bagpt-brain-body {
	margin: 0;
	background: #040507;
	font-family: 'Vazirmatn', sans-serif;
	color: #f5f7fa;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba( 167, 139, 250, 0.35 ); color: #fff; }

@keyframes bglChev { 0%, 100% { transform: translateY( 0 ); opacity: 0.5; } 50% { transform: translateY( 7px ); opacity: 1; } }
@keyframes bglFloatTag { 0%, 100% { transform: translateY( 0 ); } 50% { transform: translateY( -7px ); } }
@keyframes bglGlowPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* reveal-on-scroll: حالت اولیه پنهان، با JS کلاس .bgl-in اضافه می‌شود. */
[data-reveal] {
	opacity: 0;
	transform: translateY( 34px );
	transition: opacity 0.7s cubic-bezier( 0.22, 1, 0.36, 1 ), transform 0.7s cubic-bezier( 0.22, 1, 0.36, 1 );
	will-change: opacity, transform;
}
[data-reveal].bgl-in { opacity: 1; transform: none; }

/* در غیاب JS همه‌چیز دیده شود (SEO/no-js). */
.bagpt-l-no-js [data-reveal] { opacity: 1 !important; transform: none !important; }

/* تب فعال چت */
.bgl-tab.is-active {
	border: 1px solid rgba( 167, 139, 250, 0.45 ) !important;
	background: linear-gradient( 135deg, rgba( 34, 211, 238, 0.12 ), rgba( 167, 139, 250, 0.16 ) ) !important;
	color: #fff !important;
	font-weight: 700 !important;
}

/* آکاردئون سؤالات */
.bgl-faq-answer { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.4s ease, opacity 0.4s ease; }
.bgl-faq.is-open .bgl-faq-answer { max-height: 320px; opacity: 1; }
.bgl-faq.is-open .bgl-faq-sign { }
.bgl-faq .bgl-faq-sign::after { content: '+'; }
.bgl-faq.is-open .bgl-faq-sign::after { content: '\2212'; }

/* نشانگر «در حال نوشتن» داخل حباب پاسخ (سه نقطهٔ تپنده) */
.bgl-typing-dots { display: inline-flex; gap: 4px; align-items: center; height: 1em; }
.bgl-typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: bglTypingDot 1s infinite; }
.bgl-typing-dots i:nth-child( 2 ) { animation-delay: 0.15s; }
.bgl-typing-dots i:nth-child( 3 ) { animation-delay: 0.3s; }
@keyframes bglTypingDot { 0%, 100% { opacity: 0.25; transform: translateY( 0 ); } 50% { opacity: 1; transform: translateY( -2px ); } }

/* پیل feature داخل پنل چت (که با JS ساخته می‌شود) */
.bgl-pill {
	padding: 6px 12px;
	border-radius: 100px;
	background: rgba( 255, 255, 255, 0.05 );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	font-size: 12.5px;
	color: rgba( 255, 255, 255, 0.68 );
}

/* hover دکمه‌ها */
.bgl-btn-primary { transition: filter 0.2s ease, transform 0.2s ease; }
.bgl-btn-primary:hover { filter: brightness( 1.08 ); transform: translateY( -2px ); }
.bgl-btn-ghost { transition: border-color 0.2s ease; }
.bgl-btn-ghost:hover { border-color: rgba( 255, 255, 255, 0.4 ); }
.bgl-foot-link { transition: color 0.2s ease; }
.bgl-foot-link:hover { color: #fff !important; }

/* موبایل: کاهش ارتفاع spacer و فاصله‌ها برای تجربهٔ سبک‌تر */
@media ( max-width: 768px ) {
	#bgl-spacer { height: 540vh !important; }
	.bgl-section { padding-left: 5% !important; padding-right: 5% !important; }
}

/* ───────── ورود/ثبت‌نام OTP روی ویترین (landing-auth.js) ───────── */

/* فرم شماره داخل Hero */
.bgl-hero-auth {
	display: flex;
	gap: 10px;
	justify-content: center;
	align-items: stretch;
	flex-wrap: wrap;
	max-width: 480px;
	margin: 34px auto 0;
}
.bgl-hero-auth-input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 15px 20px;
	border-radius: 13px;
	border: 1px solid rgba( 255, 255, 255, 0.16 );
	background: rgba( 255, 255, 255, 0.05 );
	backdrop-filter: blur( 8px );
	color: #f5f7fa;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	letter-spacing: 0.06em;
	direction: ltr;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.bgl-hero-auth-input:focus {
	border-color: rgba( 167, 139, 250, 0.65 );
	background: rgba( 255, 255, 255, 0.08 );
}
.bgl-hero-auth-input::placeholder { color: rgba( 255, 255, 255, 0.38 ); }
.bgl-hero-auth-btn {
	flex: 0 0 auto;
	padding: 15px 26px;
	border: none;
	border-radius: 13px;
	background: linear-gradient( 135deg, #22d3ee, #a78bfa 52%, #ec4899 );
	color: #06070a;
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 18px 60px -16px rgba( 167, 139, 250, 0.7 );
	transition: filter 0.2s ease, transform 0.2s ease;
}
.bgl-hero-auth-btn:hover { filter: brightness( 1.08 ); transform: translateY( -1px ); }
.bgl-hero-auth-hint {
	margin-top: 14px;
	font-size: 12.5px;
	color: rgba( 255, 255, 255, 0.45 );
	font-weight: 500;
}

/* مودال */
.bgl-auth {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.bgl-auth.is-open { display: flex; }
html.bgl-auth-lock, html.bgl-auth-lock body { overflow: hidden; }
.bgl-auth-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 2, 3, 5, 0.72 );
	backdrop-filter: blur( 10px );
	animation: bglAuthFade 0.22s ease;
}
.bgl-auth-card {
	position: relative;
	width: 100%;
	max-width: 410px;
	background: linear-gradient( 180deg, #0d1019 0%, #090b12 100% );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: 22px;
	padding: 34px 30px 28px;
	box-shadow: 0 40px 120px -30px rgba( 0, 0, 0, 0.9 ), inset 0 1px 0 rgba( 255, 255, 255, 0.06 );
	animation: bglAuthIn 0.24s ease;
	text-align: center;
}
.bgl-auth-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 24px;
	right: 24px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient( 90deg, #22d3ee, #a78bfa 52%, #ec4899 );
	opacity: 0.85;
}
@keyframes bglAuthFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bglAuthIn { from { opacity: 0; transform: translateY( 10px ); } to { opacity: 1; transform: none; } }
.bgl-auth-close {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	background: rgba( 255, 255, 255, 0.04 );
	color: rgba( 255, 255, 255, 0.65 );
	font-size: 14px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.bgl-auth-close:hover { color: #fff; border-color: rgba( 255, 255, 255, 0.3 ); }
.bgl-auth-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 20px;
}
.bgl-auth-brand-mark {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: linear-gradient( 135deg, #22d3ee, #a78bfa 52%, #ec4899 );
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 16px;
	color: #06070a;
}
.bgl-auth-brand-name { font-weight: 800; font-size: 15px; color: #f5f7fa; }
.bgl-auth-title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #f5f7fa;
}
.bgl-auth-sub {
	margin: 0 0 22px;
	font-size: 14px;
	color: rgba( 226, 232, 240, 0.68 );
	line-height: 1.8;
}
.bgl-auth-input {
	width: 100%;
	padding: 15px 18px;
	border-radius: 13px;
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	background: rgba( 255, 255, 255, 0.045 );
	color: #f5f7fa;
	font-family: inherit;
	font-weight: 700;
	text-align: center;
	direction: ltr;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
	box-sizing: border-box;
}
.bgl-auth-input:focus {
	border-color: rgba( 167, 139, 250, 0.7 );
	background: rgba( 255, 255, 255, 0.07 );
}
.bgl-auth-input::placeholder { color: rgba( 255, 255, 255, 0.32 ); }
.bgl-auth-input-phone { font-size: 18px; letter-spacing: 0.08em; }
.bgl-auth-input-code { font-size: 26px; letter-spacing: 0.55em; padding-left: 0; padding-right: 0; text-indent: 0.55em; }
.bgl-auth-error {
	display: none;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #fda4af;
	line-height: 1.7;
}
.bgl-auth-primary {
	width: 100%;
	margin-top: 16px;
	padding: 15px;
	border: none;
	border-radius: 13px;
	background: linear-gradient( 135deg, #22d3ee, #a78bfa 52%, #ec4899 );
	color: #06070a;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	transition: filter 0.2s ease, opacity 0.2s ease;
}
.bgl-auth-primary:hover { filter: brightness( 1.08 ); }
.bgl-auth-primary:disabled, .bgl-auth-primary.is-busy { opacity: 0.62; cursor: default; filter: none; }
.bgl-auth-terms {
	margin-top: 16px;
	font-size: 12px;
	color: rgba( 255, 255, 255, 0.42 );
	line-height: 1.8;
}
.bgl-auth-phone-label { color: #a5f3fc; font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.bgl-auth-link {
	background: none;
	border: none;
	padding: 0;
	margin-inline-start: 6px;
	color: #a78bfa;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.bgl-auth-resend {
	margin-top: 16px;
	background: none;
	border: none;
	color: rgba( 255, 255, 255, 0.55 );
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.bgl-auth-resend:disabled { cursor: default; color: rgba( 255, 255, 255, 0.35 ); }
.bgl-auth-resend:not( :disabled ):hover { color: #a5f3fc; }

@media ( max-width: 480px ) {
	.bgl-hero-auth { flex-direction: column; }
	.bgl-hero-auth-btn { width: 100%; }
	.bgl-auth-card { padding: 30px 22px 24px; }
}
