/* login.css — страница входа. Верх и форма — на стилях регистрации (signup.css, префикс su-),
   блоки о проекте — из landing.css (lp-). Здесь — то, что есть только на странице входа (lg-). */

/* ================= ВЕРХ: небо и звёзды (светлая тема — в конце файла) ================= */

.lg-stars { position: absolute; inset: 0; pointer-events: none; }
.lg-stars span {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(1.2px 1.2px at 24px 38px, #fff 50%, transparent 52%),
		radial-gradient(1px 1px at 140px 92px, rgba(255, 255, 255, .8) 50%, transparent 52%),
		radial-gradient(1.4px 1.4px at 210px 22px, #fff 50%, transparent 52%),
		radial-gradient(1px 1px at 72px 160px, rgba(255, 255, 255, .6) 50%, transparent 52%),
		radial-gradient(1.1px 1.1px at 260px 140px, rgba(200, 210, 255, .9) 50%, transparent 52%);
	background-size: 300px 230px;
	-webkit-mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 90%);
	        mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 90%);
	opacity: .7;
}
.lg-stars span + span {
	background-size: 410px 290px;
	background-position: 120px 60px;
	animation: lg-twinkle 5s ease-in-out infinite alternate;
}
@keyframes lg-twinkle { from { opacity: .15; } to { opacity: .8; } }

/* Волна со следами внизу — partials/ridge (класс lg-ridge); высота, отступы, следы — css/ridge.css */

.lg-grid { grid-template-areas: "intro" "side" "ticker"; }
.lg-intro { grid-area: intro; animation: lg-in .8s cubic-bezier(.2, .7, .2, 1) both; }
.lg-intro .su-lead { margin-bottom: 0; }
.lg-side { grid-area: side; }
.lg-tickwrap { grid-area: ticker; animation: lg-in .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
@media (min-width: 960px) {
	.lg-grid { grid-template-areas: "intro side" "ticker side"; grid-template-rows: auto 1fr; row-gap: 30px; }
}
.lg-side { display: flex; flex-direction: column; gap: 16px; align-self: start; animation: lg-in .8s .12s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes lg-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Свежее в ленте ---------- */
.lg-ticker {
	--row: 64px;
	padding: 14px 14px 10px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	-webkit-backdrop-filter: blur(10px);
	        backdrop-filter: blur(10px);
}
.lg-ticker__head { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: #c9cfe8; margin: 0 0 8px 2px; }
.lg-live {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3ddc84;
}
.lg-live::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid #3ddc84;
	opacity: 0;
	animation: lg-ping 2s ease-out infinite;
}
@keyframes lg-ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.lg-ticker__viewport { height: calc(var(--row) * 3); overflow: hidden; -webkit-mask: linear-gradient(180deg, #000 70%, transparent); mask: linear-gradient(180deg, #000 70%, transparent); }
.lg-ticker__list { list-style: none; margin: 0; padding: 0; }
.lg-ticker__list.is-moving { transition: transform .7s cubic-bezier(.5, 0, .2, 1); }
.lg-ticker__item { height: var(--row); box-sizing: border-box; padding: 4px 0; }
.lg-ticker__item a, .lg-ticker__item a:visited {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	height: 100%;
	padding: 4px;
	border-radius: 14px;
	color: #fff;
}
.lg-ticker__item a:hover { background: rgba(255, 255, 255, .07); }
.lg-ticker__item img { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; background: #1a1f3b; }
.lg-ticker__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lg-ticker__t { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-ticker__m { font-size: 13px; color: #aab2d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Форма ---------- */
.lg-page .loginsignup { display: none; }   /* кнопка «Войти» в шапке на самой странице входа не нужна */
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 8px; }
.lg-card #az_rememberme { display: flex; align-items: center; width: auto; margin: 0; }
.lg-card #az_rememberme label {
	position: relative;
	left: auto;
	top: auto;
	height: 22px;
	margin-left: -22px;
	padding-left: 32px;
	font-size: 14px;
	color: var(--tl-ink-2);
}
.lg-forgot, .lg-forgot:visited { font-size: 14px; font-weight: 600; color: var(--tl-blue); white-space: nowrap; }
.lg-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--tl-ink-3); font-size: 13px; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--tl-line); }
.lg-alt { display: flex; gap: 10px; }
.lg-alt a { flex: 1; min-width: 0; height: 48px !important; font-size: 15px; white-space: nowrap; padding: 0 10px; }
@media (max-width: 400px) {
	.lg-alt { flex-direction: column; }
	.lg-alt a { flex: 0 0 48px; }
}
.lg-legal { font-size: 12.5px; }
.lg-legal a, .lg-legal a:visited { color: var(--tl-ink-3); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }

.lg-restore { max-width: none; width: 100%; box-shadow: 0 20px 50px rgba(229, 0, 127, .35); }
.lg-restore .erase-consent-link a { color: #fff; font-size: 12.5px; opacity: .85; }
.lg-restore .info-title { color: #fff; }
.lg-restore .info-text { color: rgba(255, 255, 255, .9); }
.lg-restore .button_menu .submit_button { background: #fff; color: #d6006f; }
.lg-restore .button_menu .back_button { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.lg-restore .button_menu .back_button:hover { background: rgba(255, 255, 255, .22); }

/* ================= НИЖЕ: блоки о проекте ================= */
.lg-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 16px 90px;
	display: flex;
	flex-direction: column;
}
.lg-wrap .lp-block { margin-top: 30px; margin-bottom: 30px; }

/* Импульсы на схеме «для кого» */
.lp-eco__pulse { fill: var(--tl-magenta); }

/* ---------- Ещё нет аккаунта? (partials/login_final) ---------- */
.lg-final {
	--fin-c1: rgba(160, 78, 255, .30);   /* цветные блики фона (тёмная тема; светлая — ниже) */
	--fin-c2: rgba(0, 141, 254, .24);
	--fin-c3: rgba(255, 0, 180, .14);
	--fin-hills: rgba(91, 133, 255, .16);
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 30px;
	align-items: center;
	padding: clamp(24px, 3.6vw, 48px);
	border-radius: 30px;
	border: 1px solid transparent;
	background:
		radial-gradient(520px 300px at 100% 0%, var(--fin-c1), transparent 62%) padding-box,
		radial-gradient(560px 320px at 0% 100%, var(--fin-c2), transparent 62%) padding-box,
		radial-gradient(360px 240px at 62% 64%, var(--fin-c3), transparent 70%) padding-box,
		linear-gradient(var(--tl-surface), var(--tl-surface)) padding-box,
		linear-gradient(135deg, rgba(0, 141, 254, .55), rgba(160, 78, 255, .45) 50%, rgba(255, 0, 180, .55)) border-box;
	box-shadow: var(--tl-shadow-2);
}
@media (min-width: 880px) {
	.lg-final { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 44px; }
}
.lg-final__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--tl-blue-soft);
	color: var(--tl-blue);
	font-size: 13px;
	font-weight: 600;
}
.lg-final p { color: var(--tl-ink-2); font-size: 15.5px; line-height: 1.6; max-width: 52ch; margin: 12px 0 20px; }
.lg-final__perks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px 22px; }
@media (min-width: 560px) { .lg-final__perks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lg-final__perks li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; align-items: center; font-size: 14px; line-height: 1.45; color: var(--tl-ink-2); }
.lg-final__perks b { color: var(--tl-ink); }
.lg-final__perks i {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--tl-surface-2);
	box-shadow: var(--tl-shadow-1);
	font-size: 15px;
}
.lg-final__perks li:nth-child(1) i { color: var(--tl-pink); }
.lg-final__perks li:nth-child(2) i { color: var(--tl-blue); }
.lg-final__perks li:nth-child(3) i { color: var(--tl-violet); }
.lg-final__perks li:nth-child(4) i { color: var(--tl-green); }
.lg-final__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lg-final .lg-final__note { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 13.5px; color: var(--tl-ink-3); }
.lg-final__note i { color: var(--tl-amber); }

/* Карта пути: следы по кругу идут от «Ник и пароль» к «Первый пост» */
.lg-final__map {
	--step-w: clamp(10px, 4cqw, 17px);
	--step-side: clamp(3px, 1.15cqw, 5px);
	--step-o: 1;
	--step-glow: drop-shadow(0 0 3px rgba(160, 78, 255, .6));
	--step-shape: var(--tl-step-plain);
	position: relative;
	justify-self: center;
	width: 100%;
	max-width: 470px;
	aspect-ratio: 400 / 240;
	margin-bottom: 26px;
	container-type: size;
}
.lg-final__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* холмы под маршрутом растворяются к краям */
.lg-final__hills {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	-webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent), linear-gradient(180deg, #000 45%, transparent);
	-webkit-mask-composite: source-in;
	        mask: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent), linear-gradient(180deg, #000 45%, transparent);
	        mask-composite: intersect;
}
.lg-final__hills path { fill: var(--fin-hills); }
.lg-final__route { fill: none; stroke: var(--tl-ink-3); stroke-opacity: .5; stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lg-final__trail .tl-step { opacity: 0; animation: none; }
.lg-final__map.is-shown .tl-step { animation: lg-walk 7.5s linear infinite; animation-delay: calc(var(--i) * 150ms); }
@keyframes lg-walk {
	0%       { opacity: 0; scale: 1.8; }
	3%       { opacity: 1; scale: 1; }
	62%      { opacity: 1; }
	78%, 100% { opacity: 0; }
}
.lg-final__node {
	position: absolute;
	left: var(--x);
	top: var(--y);
	z-index: 1;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tl-surface);
	border: 2px solid var(--tl-line);
	color: var(--tl-violet);
	font-size: 17px;
	box-shadow: var(--tl-shadow-2);
}
.lg-final__node small {
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tl-ink-2);
}
.lg-final__node--goal { background: var(--tl-grad); border-color: transparent; color: #fff; }
/* этап вспыхивает, когда до него доходят следы */
.lg-final__map.is-shown .lg-final__node { animation: lg-node 7.5s ease-out infinite; animation-delay: calc(var(--t) * var(--walk, 2.7s)); }
@keyframes lg-node {
	0%        { scale: 1; border-color: var(--tl-line); }
	4%        { scale: 1.16; border-color: var(--tl-violet); }
	12%, 62%  { scale: 1; border-color: var(--tl-violet); }
	78%, 100% { scale: 1; border-color: var(--tl-line); }
}
.lg-final__map.is-shown .lg-final__node--goal { animation-name: lg-node-goal; }
@keyframes lg-node-goal {
	0%, 12%, 100% { scale: 1; box-shadow: var(--tl-shadow-2); }
	4%            { scale: 1.18; box-shadow: var(--tl-shadow-2), 0 0 0 10px rgba(255, 0, 180, .18); }
}


@media (prefers-reduced-motion: reduce) {
	.lg-intro, .lg-side, .lg-tickwrap { animation: none; }
	.lg-stars span + span, .lg-live::after { animation: none; }
	.lg-final__map .tl-step, .lg-final__map.is-shown .tl-step { animation: none; opacity: 1; }
	.lg-final__map.is-shown .lg-final__node { animation: none; }
}

/* ================= СВЕТЛАЯ ТЕМА ================= */
/* Выше — ночной вариант (тёмная тема). Здесь дневной: пастельное небо, светлые карточки и панели. */
html:not([data-theme="dark"]) .lg-stars span {
	opacity: .45;
	background-image:
		radial-gradient(1.6px 1.6px at 24px 38px, rgba(120, 90, 255, .55) 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 140px 92px, rgba(0, 141, 254, .45) 50%, transparent 52%),
		radial-gradient(1.8px 1.8px at 210px 22px, rgba(255, 0, 180, .35) 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 260px 140px, rgba(120, 90, 255, .4) 50%, transparent 52%);
}
@keyframes lg-twinkle-day { from { opacity: .1; } to { opacity: .5; } }
html:not([data-theme="dark"]) .lg-stars span + span { animation-name: lg-twinkle-day; }


/* Свежее в ленте */
html:not([data-theme="dark"]) .lg-ticker {
	background: rgba(255, 255, 255, .7);
	border-color: rgba(14, 20, 51, .07);
	box-shadow: 0 18px 44px rgba(40, 50, 140, .12);
}
html:not([data-theme="dark"]) .lg-ticker__head { color: var(--tl-ink-2); }
html:not([data-theme="dark"]) .lg-ticker__item a,
html:not([data-theme="dark"]) .lg-ticker__item a:visited { color: var(--tl-ink); }
html:not([data-theme="dark"]) .lg-ticker__item a:hover { background: var(--tl-blue-soft); }
html:not([data-theme="dark"]) .lg-ticker__item img { background: var(--tl-surface-3); }
html:not([data-theme="dark"]) .lg-ticker__m { color: var(--tl-ink-3); }

/* Ещё нет аккаунта? */
html:not([data-theme="dark"]) .lg-final {
	--fin-c1: rgba(160, 78, 255, .13);
	--fin-c2: rgba(0, 141, 254, .12);
	--fin-c3: rgba(255, 0, 180, .06);
	--fin-hills: rgba(120, 100, 255, .11);
}
html:not([data-theme="dark"]) .lg-final__map { --step-glow: drop-shadow(0 1px 1.5px rgba(40, 50, 140, .2)); }

/* Восстановление: запасной способ — звонок, если письмо не пришло */
.gp-fallback { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--tl-surface-2); text-align: center; }
.gp-fallback p { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--tl-ink-2); }
.gp-fallback__btn { display: inline-flex; align-items: center; gap: 8px; }
