/* Boberstore — страницы входа. Без сборки и зависимостей. */
:root {
  --bg-0: #0b0b1a;
  --bg-1: #151233;
  --ink: #f5f3ff;
  --muted: #b4b0d6;
  --accent: #f59e0b;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --danger: #fb7185;
  --ok: #34d399;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.16);
  --radius: 22px;
  color-scheme: dark;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 10% -10%, #2a1f6b 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 110%, #3b1d4f 0%, transparent 55%),
              linear-gradient(160deg, var(--bg-1), var(--bg-0));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ---------- Фон: живые пятна, сетка, частицы ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
  -webkit-animation: drift 22s ease-in-out infinite alternate;
          animation: drift 22s ease-in-out infinite alternate;
}
.blob--a { background: radial-gradient(circle at 30% 30%, var(--accent-2), transparent 65%); top: -14vmax; left: -10vmax; }
.blob--b { background: radial-gradient(circle at 60% 40%, var(--accent), transparent 62%); bottom: -18vmax; right: -12vmax; -webkit-animation-duration: 27s; animation-duration: 27s; -webkit-animation-delay: -6s; animation-delay: -6s; }
.blob--c { background: radial-gradient(circle at 50% 50%, var(--accent-3), transparent 60%); top: 35%; left: 55%; width: 30vmax; height: 30vmax; opacity: .35; -webkit-animation-duration: 33s; animation-duration: 33s; -webkit-animation-delay: -12s; animation-delay: -12s; }

@-webkit-keyframes drift { 0% { -webkit-transform: translate3d(0,0,0) scale(1); } 50% { -webkit-transform: translate3d(6vmax,4vmax,0) scale(1.12); } 100% { -webkit-transform: translate3d(-4vmax,7vmax,0) scale(.94); } }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6vmax,4vmax,0) scale(1.12); } 100% { transform: translate3d(-4vmax,7vmax,0) scale(.94); } }

.grid {
  position: absolute; inset: -50%;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-transform: perspective(700px) rotateX(58deg) translateY(-8%);
          transform: perspective(700px) rotateX(58deg) translateY(-8%);
  -webkit-animation: grid-move 18s linear infinite;
          animation: grid-move 18s linear infinite;
}
@-webkit-keyframes grid-move { to { background-position: 0 56px, 56px 0; } }
@keyframes grid-move { to { background-position: 0 56px, 56px 0; } }

#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Раскладка ---------- */
.shell {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: clamp(24px, 6vw, 96px);
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.hero { max-width: 520px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .02em; font-size: 1.15rem; }
.brand__mark {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  box-shadow: 0 10px 30px -8px rgba(139, 92, 246, .7);
  -webkit-animation: spin-hue 9s linear infinite; animation: spin-hue 9s linear infinite;
}
.brand__mark svg { width: 24px; height: 24px; }
@-webkit-keyframes spin-hue { to { -webkit-filter: hue-rotate(360deg); } }
@keyframes spin-hue { to { filter: hue-rotate(360deg); } }

.hero h1 {
  margin: 28px 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05; letter-spacing: -.02em; font-weight: 800;
}
.shine {
  background: linear-gradient(90deg, #fff 0%, #fcd34d 20%, #c4b5fd 40%, #67e8f9 60%, #fff 80%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  -webkit-animation: shine 7s linear infinite; animation: shine 7s linear infinite;
}
@-webkit-keyframes shine { to { background-position: 250% center; } }
@keyframes shine { to { background-position: 250% center; } }

.hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li {
  padding: 7px 12px; border-radius: 999px; font-size: .85rem; color: #e9e7ff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  -webkit-animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.chips li:nth-child(2) { -webkit-animation-delay: .08s; animation-delay: .08s; }
.chips li:nth-child(3) { -webkit-animation-delay: .16s; animation-delay: .16s; }
.chips li:nth-child(4) { -webkit-animation-delay: .24s; animation-delay: .24s; }
.chips li:nth-child(5) { -webkit-animation-delay: .32s; animation-delay: .32s; }
.chips li:nth-child(6) { -webkit-animation-delay: .40s; animation-delay: .40s; }

/* ---------- Карточка ---------- */
.card-wrap { position: relative; width: 100%; max-width: 440px; -webkit-perspective: 1200px; perspective: 1200px; }
.card-wrap--wide { max-width: 560px; }

.card {
  position: relative;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
          backdrop-filter: blur(22px) saturate(140%);
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  -webkit-transition: -webkit-transform .25s ease-out; transition: transform .25s ease-out;
  -webkit-animation: rise .8s cubic-bezier(.2,.8,.2,1) both; animation: rise .8s cubic-bezier(.2,.8,.2,1) both;
}
/* Fallback без backdrop-filter (старый Firefox): плотнее фон. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card { background: rgba(24, 20, 56, .92); }
}

/* Бегущая подсветка рамки */
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, var(--accent) 80%, var(--accent-2) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none; opacity: .9;
  -webkit-animation: border-spin 6s linear infinite; animation: border-spin 6s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@-webkit-keyframes border-spin { to { --angle: 360deg; } }
@keyframes border-spin { to { --angle: 360deg; } }

/* Блик за курсором */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.10), transparent 45%);
  opacity: 0; -webkit-transition: opacity .3s; transition: opacity .3s;
}
.card:hover::after { opacity: 1; }

@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translateY(18px) scale(.98); } to { opacity: 1; -webkit-transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.card h2 { margin: 0 0 6px; font-size: 1.55rem; letter-spacing: -.01em; }
.card .sub { margin: 0 0 22px; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* Переключение вход / восстановление */
.panes { position: relative; }
.pane { -webkit-transition: opacity .35s ease, -webkit-transform .45s cubic-bezier(.2,.8,.2,1); transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.pane[hidden] { display: none; }
.pane.is-entering { opacity: 0; -webkit-transform: translateX(24px); transform: translateX(24px); }
.pane.is-leaving { opacity: 0; -webkit-transform: translateX(-24px); transform: translateX(-24px); }

/* ---------- Поля ---------- */
.field { position: relative; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.field input, .field select {
  width: 100%; height: 56px;
  padding: 22px 16px 8px;
  font: inherit; font-size: 16px; /* iOS не зумит поле */
  color: var(--ink);
  background: rgba(10, 8, 30, .45);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  outline: none;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  -webkit-transition: border-color .2s, box-shadow .2s, background .2s; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 26px, calc(100% - 16px) 26px; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { color: #111; }
.field input[type="date"] { min-height: 56px; }
.field input[type="date"]::-webkit-calendar-picker-indicator { -webkit-filter: invert(1); filter: invert(1); opacity: .7; }
.field input:focus, .field select:focus {
  border-color: rgba(245, 158, 11, .8);
  background: rgba(10, 8, 30, .6);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}
.field input[readonly] { color: var(--muted); }
.field label {
  position: absolute; left: 16px; top: 18px;
  font-size: 15px; color: var(--muted);
  pointer-events: none;
  -webkit-transform-origin: left top; transform-origin: left top;
  -webkit-transition: -webkit-transform .2s ease, color .2s; transition: transform .2s ease, color .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select + label,
.field input[type="date"] + label,
.field input[readonly] + label {
  -webkit-transform: translateY(-11px) scale(.78); transform: translateY(-11px) scale(.78);
  color: #fcd34d;
}
.field.has-error input, .field.has-error select { border-color: rgba(251, 113, 133, .85); }
.field .error { margin-top: 6px; color: var(--danger); font-size: .85rem; }

.toggle-pass {
  position: absolute; right: 8px; top: 8px;
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.toggle-pass:hover, .toggle-pass:focus-visible { color: var(--ink); background: rgba(255,255,255,.06); outline: none; }
.toggle-pass svg { width: 20px; height: 20px; }

.meter { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--danger), var(--accent), var(--ok)); background-size: 300% 100%; -webkit-transition: width .3s, background-position .3s; transition: width .3s, background-position .3s; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; cursor: pointer; -webkit-user-select: none; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.link { color: #fcd34d; text-decoration: none; font-size: .92rem; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.link:hover, .link:focus-visible { text-decoration: underline; outline: none; }

/* ---------- Кнопка ---------- */
.btn {
  position: relative; overflow: hidden;
  width: 100%; height: 54px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: 1rem; letter-spacing: .01em;
  color: #1b1030; cursor: pointer;
  background: linear-gradient(110deg, #fbbf24, #f59e0b 35%, #f472b6 70%, #a78bfa);
  background-size: 200% 100%;
  box-shadow: 0 14px 30px -10px rgba(245, 158, 11, .65);
  -webkit-transition: background-position .5s, -webkit-transform .15s, box-shadow .3s; transition: background-position .5s, transform .15s, box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background-position: 100% 0; box-shadow: 0 18px 40px -10px rgba(244, 114, 182, .6); }
.btn:active { -webkit-transform: scale(.985); transform: scale(.985); }
.btn:focus-visible { outline: 3px solid rgba(252, 211, 77, .6); outline-offset: 3px; }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); -webkit-transform: scale(0); transform: scale(0); -webkit-animation: ripple .6s ease-out; animation: ripple .6s ease-out; pointer-events: none; }
@-webkit-keyframes ripple { to { -webkit-transform: scale(4); opacity: 0; } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn .spinner { display: none; width: 20px; height: 20px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(27,16,48,.25); border-top-color: #1b1030; -webkit-animation: spin .8s linear infinite; animation: spin .8s linear infinite; }
.btn.is-loading .label { display: none; }
.btn.is-loading .spinner { display: block; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.btn--ghost { background: rgba(255,255,255,.08); color: var(--ink); box-shadow: none; border: 1px solid rgba(255,255,255,.16); }
.btn--ghost:hover { background: rgba(255,255,255,.14); box-shadow: none; }

/* ---------- Сообщения ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin: 0 0 18px; border-radius: 12px; font-size: .92rem; line-height: 1.45;
  -webkit-animation: rise .5s both; animation: rise .5s both;
}
.alert--ok { background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .35); color: #bbf7d0; }
.alert--error { background: rgba(251, 113, 133, .12); border: 1px solid rgba(251, 113, 133, .35); color: #fecdd3; }
.alert--info { background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); color: #e9d5ff; }

.note { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 18px 0 0; text-align: center; }

/* Honeypot (этап 305): поле есть в разметке, но невидимо и недостижимо — человек его не встретит,
   автозаполнение бота заполнит. За пределами экрана, а не display:none: часть ботов пропускает
   скрытые поля. */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* Состояние «Проверяем браузер…» (proof-of-work). Без JS не показывается вовсе: полоса растёт
   по мере перебора nonce, слово «капча» не используется. */
.pow-state { color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.pow-state .pow-bar { display: block; height: 3px; margin-top: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pow-state .pow-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #8b5cf6); -webkit-animation: pow-slide 1.2s ease-in-out infinite; animation: pow-slide 1.2s ease-in-out infinite; }
@-webkit-keyframes pow-slide { 0% { -webkit-transform: translateX(-100%); } 100% { -webkit-transform: translateX(250%); } }
@keyframes pow-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .pow-state .pow-bar i { -webkit-animation: none; animation: none; width: 100%; } }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(245, 158, 11, .16); color: #fcd34d; font-size: .8rem; font-weight: 600; }
.big-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: rgba(251, 113, 133, .14); color: var(--danger); -webkit-animation: wobble 2.4s ease-in-out infinite; animation: wobble 2.4s ease-in-out infinite; }
.big-icon svg { width: 36px; height: 36px; }
@-webkit-keyframes wobble { 0%, 100% { -webkit-transform: rotate(0); } 25% { -webkit-transform: rotate(-6deg); } 75% { -webkit-transform: rotate(6deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.center { text-align: center; }
.footer { margin-top: 22px; text-align: center; color: rgba(180, 176, 214, .6); font-size: .8rem; }

/* ---------- Мобильные ---------- */
@media (max-width: 960px) {
  .shell { flex-direction: column; justify-content: flex-start; padding-top: max(28px, env(safe-area-inset-top)); }
  .hero { text-align: center; max-width: 560px; }
  .hero h1 { margin-top: 18px; }
  .chips { justify-content: center; }
  .hero p { margin-bottom: 14px; }
}
@media (max-width: 520px) {
  .hero p, .chips { display: none; }
  .hero h1 { font-size: 1.9rem; margin-bottom: 4px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { border-radius: 18px; }
  .blob { filter: blur(50px); }
}
@media (hover: none) { .card::after { display: none; } }

/* ---------- Правовые документы (этап 302) ---------- */
.doc-list { list-style: none; margin: 0 0 18px; padding: 0; }
.doc-list__row { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.doc-list__row:last-child { border-bottom: 0; }
.doc-list__row a { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc-list__row a:hover { text-decoration: underline; }
.doc-list__meta { color: var(--muted); font-size: .85rem; }

.doc { color: var(--ink); font-size: .95rem; line-height: 1.65; }
.doc h1 { display: none; }
.doc h2 { font-size: 1.1rem; margin: 22px 0 8px; }
.doc h3 { font-size: 1rem; margin: 18px 0 6px; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin-bottom: 4px; }
.doc strong { color: var(--ink); }
.doc code { font-size: .85em; word-break: break-all; }

.doc-meta { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: .8rem; line-height: 1.6; }

.doc-versions__title { font-size: .95rem; margin: 22px 0 8px; }
.doc-versions { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .85rem; }
.doc-versions__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.doc-versions__row.is-current { color: var(--ink); font-weight: 600; }

.footer-link { margin-top: 22px; text-align: center; font-size: .85rem; }
.footer-link a { color: var(--muted); }

/* ---------- Доступность: без движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { -webkit-animation: none !important; animation: none !important; -webkit-transition: none !important; transition: none !important; }
  #particles { display: none; }
}
