/* Стартовый экран Lab Capital AI — однотонный чёрный фон, название, «Войти» и «Регистрация».
   #hero-layer — полноэкранный слой под будущую авторскую анимацию (сейчас пуст); содержимое страницы — поверх него. */

:root {
  --bg: #000;
  --ink: #f2f2f0;
  --ink-2: rgba(242, 242, 240, .78);
  --ink-3: rgba(242, 242, 240, .5);
  --line: rgba(242, 242, 240, .28);
  --focus: rgba(242, 242, 240, .8);
  --gutter: clamp(20px, 6vw, 112px);
  --sans: "Inter var", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }

.hero-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 48px);
  padding: 40px var(--gutter);
  text-align: center;
}
.brand {
  margin: 0;
  font-weight: 300;
  font-size: clamp(30px, 3.4vw + 14px, 64px);
  letter-spacing: -.02em;
  line-height: 1.08;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.button {
  appearance: none;
  display: inline-block;
  min-width: 160px;
  margin: 0;
  padding: 13px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.button:hover { border-color: var(--focus); }
.button.primary { background: var(--ink); border-color: var(--ink); color: #000; }
.button.primary:hover { background: #fff; border-color: #fff; }
.button:focus { outline: none; }
.button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.button[disabled] { opacity: .5; cursor: default; }

.link {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 10px 6px;
  font: inherit;
  color: var(--ink);
  opacity: .6;
  text-decoration: none;
  cursor: pointer;
}
.link:hover { opacity: .95; }
.link:focus { outline: none; }
.link:focus-visible { outline: 1px solid var(--focus); outline-offset: 3px; opacity: 1; }


/* ── Форма поверх страницы ───────────────────────────────────────────────── */
.veil {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  overflow: auto;
}
.modal { position: relative; width: min(420px, 100%); padding: 24px 0; }
.close { position: absolute; top: -8px; right: -6px; font-size: 13px; }
.modal-title { margin: 0 0 10px; font-weight: 300; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.modal-text { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; max-width: 38ch; }
.field { display: block; margin: 0 0 22px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.field input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  outline: none;
}
.field input:focus { border-bottom-color: var(--focus); }
.note { min-height: 1.5em; margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.note.bad { color: #ff9b8f; }
.hint { margin: -10px 0 18px; font-size: 13px; color: var(--ink-3); }
.switches { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; margin: 22px 0 0; font-size: 14px; }
.submit + .submit { margin-top: 12px; }
.submit { width: 100%; }

@media (max-width: 480px) {
  .actions { flex-direction: column; width: 100%; max-width: 320px; }
  .button { width: 100%; }
}

/* Демонстрационный режим (флаг --demo): метка в углу каждой страницы — не сдвигает раскладку и не ловит клики */
.demo-banner { position: fixed; right: 8px; bottom: 8px; z-index: 1000; max-width: calc(100vw - 16px); padding: 4px 10px;
  border: 1px solid #5a4a20; border-radius: 999px; background: rgba(42, 36, 20, .94); color: #f3e3b3;
  font-size: 12px; line-height: 1.35; pointer-events: none; }
@media (max-width: 720px) { .demo-banner { font-size: 11px; padding: 3px 8px; } .demo-banner-more { display: none; } }
