/* RC_L1MBO — корпоративный портал
   Стиль: graphite / cold off-white / oxidized violet, как на l1mbo.ru */

:root {
  --bg: #080b14;
  --text: #eef0ff;
  --muted: #9299b2;
  --accent: #a593ff;
  --accent-strong: #d4cbfb;
  --line: #ffffff16;
  --green: #a3dfbf;
  --danger: #e5a4ad;
  --radius: 8px;
  --radius-card: 14px;
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font: "IBM Plex Sans", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(165, 147, 255, 0.10), transparent 55%),
    radial-gradient(900px 500px at 108% -5%, rgba(90, 158, 139, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Тонкая сетка поверх фона */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(238, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 500px at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(900px 500px at 50% 0%, #000 0%, transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

:focus-visible {
  outline: 2px solid #bcadff;
  outline-offset: 4px;
}

/* —— Шапка —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0c0e12;
  filter: drop-shadow(0 0 12px rgba(163, 135, 255, 0.35));
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-mail {
  font-size: 13px;
  color: var(--muted);
}

.topbar-mail:hover {
  color: var(--text);
}

/* —— Кнопки —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.btn-primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #171322;
}

.btn-primary:hover {
  background: #e4ddff;
  border-color: #e4ddff;
  color: #171322;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.text-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  text-align: left;
}

.text-btn:hover {
  color: var(--accent-strong);
}

/* —— Контент —— */
.corp-shell {
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  margin: 26px auto 0;
  padding: 0 24px;
}

.corp-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
  gap: 75px;
}

.corp-hero {
  position: sticky;
  top: 110px;
}

.eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— Портал —— */
.portal {
  position: relative;
  width: 270px;
  height: 235px;
  display: grid;
  place-items: center;
  max-width: 100%;
  margin: 8px 0 24px;
  perspective: 700px;
}

.portal-core {
  position: relative;
  width: 235px;
  height: 235px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, #e4ddff 0%, #c3b5ff 14%, #a593ff 42%, #4a3f7a 72%, #1b1830 100%);
  filter: drop-shadow(0 0 32px rgba(163, 135, 255, 0.35));
  transform: rotateY(-16deg) rotateX(8deg);
  animation: portal-breathe 2.4s ease-in-out infinite;
}

.portal-core::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.35), transparent 45%);
  opacity: 0.6;
}

.portal-orbit {
  position: absolute;
  border: 1px solid rgba(165, 147, 255, 0.25);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
}

.portal-orbit--outer {
  width: 270px;
  height: 130px;
}

.portal-orbit--inner {
  width: 210px;
  height: 100px;
  border-color: rgba(165, 147, 255, 0.4);
}

@keyframes portal-breathe {
  50% {
    opacity: 0.82;
    transform: rotateY(-16deg) rotateX(8deg) scale(0.97);
  }
}

/* —— Тексты —— */
.corp-hero h1 {
  margin: 20px 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 3.7vw, 49px);
  line-height: 1.2;
  letter-spacing: -1.3px;
}

.hero-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 460px;
}

.hero-steps {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  gap: 22px;
}

.hero-steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.hero-steps li > span {
  color: #b7a4ed;
  width: 22px;
  font-size: 18px;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.hero-steps p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* —— Карточка формы —— */
.auth-card {
  width: 100%;
  max-width: 540px;
  justify-self: end;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(140deg, rgba(30, 29, 45, 0.53), rgba(14, 17, 27, 0.8));
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-card-header h1,
.success-title {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.6px;
}

.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* —— Форма —— */
.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 6px;
}

.form-stack label > span {
  font-size: 13px;
  color: var(--muted);
}

.form-stack label > span small {
  color: rgba(146, 153, 178, 0.75);
}

.form-stack input,
.form-stack textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-stack textarea {
  resize: vertical;
  min-height: 104px;
}

.form-stack input::placeholder,
.form-stack textarea::placeholder {
  color: rgba(146, 153, 178, 0.65);
}

.form-stack input:focus,
.form-stack textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(165, 147, 255, 0.3);
}

.form-stack .field-error {
  margin: -6px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(229, 164, 173, 0.4);
  border-radius: var(--radius);
  background: rgba(229, 164, 173, 0.08);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.form-stack .field-error[hidden] {
  display: none;
}

.form-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* —— Успех —— */
#success-view .btn-block {
  margin-top: 24px;
}

/* —— Футер —— */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 28px 24px 36px;
}

.footer-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 28px 48px;
}

.footer-brand {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.footer-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.footer-brand .brand-tagline {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-docs {
  flex-basis: 100%;
  max-width: 720px;
}

.footer-docs summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  list-style-position: outside;
}

.footer-docs summary:hover {
  color: var(--text);
}

.footer-docs-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.footer-docs-body h4 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}

.footer-docs-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* —— Адаптив —— */
@media (max-width: 900px) {
  .corp-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .corp-hero {
    position: static;
  }

  .auth-card {
    justify-self: stretch;
    max-width: none;
  }

  .portal {
    margin-left: -8px;
  }
}

@media (max-width: 600px) {
  .topbar-mail {
    display: none;
  }

  .corp-shell {
    padding: 0 20px;
  }

  .corp-layout {
    gap: 28px;
  }

  .portal {
    transform: scale(0.82);
    transform-origin: left center;
    margin-bottom: -12px;
  }

  .corp-hero h1 {
    font-size: 32px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .site-footer {
    padding: 24px 20px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-core {
    animation: none;
  }

  .auth-card {
    animation: none;
  }
}
