@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  color-scheme: dark;
  font-family: "PT Sans", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --background: #080c16;
  --geometry-bleed: 48px;
  --geometry-bleed-size: 96px;
  --text: #f3f5fb;
  --muted: #929db5;
  --blue: #238cff;
  --purple: #9660ff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

/* Основной контейнер */

.landing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;

  background:
    radial-gradient(
      ellipse at 50% 48%,
      rgba(22, 31, 56, 0.2),
      transparent 58%
    ),
    #080c16;

  transition:
    grid-template-columns 720ms cubic-bezier(0.65, 0, 0.15, 1);
}

/* Центральная линия с градиентным затуханием */

.landing::after {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  content: "";
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(105, 128, 183, 0.08) 9%,
    rgba(105, 128, 183, 0.34) 28%,
    rgba(119, 139, 190, 0.5) 50%,
    rgba(105, 128, 183, 0.34) 72%,
    rgba(105, 128, 183, 0.08) 91%,
    transparent 100%
  );

  transition:
    opacity 380ms ease 180ms,
    transform 720ms cubic-bezier(0.65, 0, 0.15, 1);
}

/* Общие стили секций */

.landing-panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 56px clamp(24px, 5vw, 76px);
  isolation: isolate;
  overflow: hidden;
}

/* Левая секция */

.landing-panel--checklists {
  background:
    radial-gradient(
      ellipse at 0% 0%,
      rgba(12, 63, 151, 0.11),
      transparent 52%
    ),
    linear-gradient(
      145deg,
      rgba(7, 14, 29, 0.15),
      transparent 65%
    );
}

/* Правая секция */

.landing-panel--testing {
  background:
    radial-gradient(
      ellipse at 100% 0%,
      rgba(88, 43, 172, 0.13),
      transparent 54%
    ),
    linear-gradient(
      215deg,
      rgba(21, 11, 43, 0.14),
      transparent 66%
    );

  transition:
    transform 720ms cubic-bezier(0.65, 0, 0.15, 1),
    opacity 520ms ease;
}

/* Слой геометрических элементов */

.geometry-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;

  --pointer-x: 0px;
  --pointer-y: 0px;
}

.geo-shape {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform;

  transform: translate3d(
    var(--shape-x, 0px),
    var(--shape-y, 0px),
    0
  );

  transition:
    transform 220ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

/* СИНИЕ ФИГУРЫ — ВЕРХНИЙ ЛЕВЫЙ УГОЛ */

.geo-shape--blue-top {
  top: calc(0px - var(--geometry-bleed));
  left: calc(0px - var(--geometry-bleed));
  width: calc(clamp(260px, 36vw, 560px) + var(--geometry-bleed-size));
  height: calc(clamp(250px, 38vh, 440px) + var(--geometry-bleed-size));
  background: linear-gradient(135deg, rgba(23, 91, 207, 0.82), rgba(13, 52, 129, 0.34));
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.geo-shape--blue-top-band {
  top: calc(0px - var(--geometry-bleed));
  left: calc(0px - var(--geometry-bleed));
  width: calc(clamp(310px, 46vw, 650px) + var(--geometry-bleed-size));
  height: calc(clamp(290px, 48vh, 520px) + var(--geometry-bleed-size));
  background: linear-gradient(135deg, rgba(13, 41, 99, 0.45), rgba(11, 25, 58, 0.12));
  clip-path: polygon(0 0, 76% 0, 0 76%);
}

.geo-shape--blue-top-edge {
  top: calc(0px - var(--geometry-bleed));
  left: calc(0px - var(--geometry-bleed));
  width: calc(clamp(260px, 43vw, 600px) + var(--geometry-bleed-size));
  height: calc(clamp(270px, 43vh, 480px) + var(--geometry-bleed-size));
  background: linear-gradient(135deg, rgba(73, 133, 242, 0.14), rgba(33, 95, 202, 0.02));
  clip-path: polygon(92% 0, 100% 0, 0 100%, 0 92%);
}

.geo-shape--blue-ring {
  top: 12%;
  left: -95px;
  width: clamp(140px, 17vw, 230px);
  aspect-ratio: 1;
  border: 1px solid rgba(65, 130, 231, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(36, 102, 207, 0.025),
    0 0 0 48px rgba(36, 102, 207, 0.018);
}

/* ФИОЛЕТОВЫЕ ФИГУРЫ — НИЖНИЙ ПРАВЫЙ УГОЛ */

.geo-shape--purple-bottom {
  right: calc(0px - var(--geometry-bleed));
  bottom: calc(0px - var(--geometry-bleed));
  width: calc(clamp(300px, 45vw, 600px) + var(--geometry-bleed-size));
  height: calc(clamp(170px, 29vh, 310px) + var(--geometry-bleed-size));
  background: linear-gradient(145deg, rgba(58, 43, 171, 0.22), rgba(91, 43, 177, 0.58));
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.geo-shape--purple-bottom-band {
  right: calc(0px - var(--geometry-bleed));
  bottom: calc(0px - var(--geometry-bleed));
  width: calc(clamp(250px, 36vw, 490px) + var(--geometry-bleed-size));
  height: calc(clamp(120px, 20vh, 220px) + var(--geometry-bleed-size));
  background: linear-gradient(145deg, rgba(88, 59, 204, 0.12), rgba(112, 57, 205, 0.34));
  clip-path: polygon(100% 15%, 100% 100%, 0 100%);
}

/* Сцена левой секции */

.panel-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
}

.panel-stage > * {
  grid-area: 1 / 1;
}

/* Контент */

.panel-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 420px);
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-2px);
}

.panel-content--intro {
  opacity: 1;
  visibility: visible;
  transform: translateY(-2px) scale(1);
  transition:
    opacity 360ms ease 220ms,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1) 220ms,
    visibility 0ms linear 0ms;
}

/* Иконки */

.feature-icon {
  display: block;
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  overflow: visible;
  transform: scale(var(--icon-scale, 1));
  transform-origin: center;
  will-change: transform;
}

.feature-icon--blue {
  color: var(--blue);
  filter: drop-shadow(0 0 12px rgba(35, 140, 255, 0.12));
}

.feature-icon--purple {
  width: 88px;
  color: var(--purple);
  filter: drop-shadow(0 0 12px rgba(150, 96, 255, 0.12));
}

/* Заголовки и текст */

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 2.55vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.panel-description {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 400;
  line-height: 1.55;
}

/* КНОПКИ */

.action-button {
  position: relative;
  display: inline-flex;
  width: 264px;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-top: 44px;
  padding: 0 42px;
  border: 0px solid transparent;
  border-radius: 0;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    filter 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.action-button svg {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button span {
  display: block;
  width: 100%;
  text-align: center;
}

.action-button--blue {
  background: linear-gradient(105deg, #1477ee 0%, #0750bd 100%);
  box-shadow: 0 8px 26px rgba(0, 79, 195, 0.13);
}

.action-button--purple {
  background: linear-gradient(105deg, #7135d7 0%, #402080 100%);
  box-shadow: 0 8px 26px rgba(87, 41, 176, 0.14);
}

.action-button:hover {
  filter: brightness(1.13);
  transform: translateY(-1px);
}

.action-button:active {
  filter: brightness(0.98);
  transform: translateY(0);
}

.action-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* ВСТРОЕННАЯ ФОРМА АВТОРИЗАЦИИ */

.login-card-wrap {
  width: min(100%, 400px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 320ms ease 0ms,
    transform 420ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    visibility 0ms linear 320ms;
}

.login-card {
  background: rgba(11, 19, 36, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(65, 130, 231, 0.24);
  border-top: 2px solid var(--blue);
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: left;
}

.login-card__header {
  text-align: center;
  margin-bottom: 26px;
}

.login-card__icon {
  width: 54px;
  height: 54px;
  color: var(--blue);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 12px rgba(35, 140, 255, 0.18));
}

.login-card__title {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.login-card__subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.login-alert {
  margin-bottom: 18px;
  padding: 11px 14px;
  background: rgba(218, 54, 51, 0.2);
  border: 1px solid rgba(248, 81, 73, 0.45);
  color: #ffa198;
  font-size: 14px;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.login-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #101c35;
  border: 1px solid rgba(65, 130, 231, 0.26);
  border-radius: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(35, 140, 255, 0.22);
}

.login-submit-btn {
  width: 100%;
  margin-top: 10px;
}

.login-card__footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(65, 130, 231, 0.15);
  text-align: center;
}

.back-to-split-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.back-to-split-btn:hover {
  color: var(--blue);
  transform: translateX(-2px);
}

/* СОСТОЯНИЕ РАСКРЫТИЯ ЛЕВОЙ СЕКЦИИ И ФОРМЫ ЛОГИНА */

.landing.landing--login-active {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
}

.landing.landing--login-active::after {
  opacity: 0;
  transform: translateX(50vw);
  transition-delay: 0ms;
}

.landing.landing--login-active .landing-panel--testing {
  transform: translate3d(100%, 0, 0);
  opacity: 0;
  pointer-events: none;
}

.landing.landing--login-active .panel-content--intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-22px) scale(0.95);
  transition:
    opacity 280ms ease 0ms,
    transform 380ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    visibility 0ms linear 280ms;
}

.landing.landing--login-active .login-card-wrap {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 460ms ease 260ms,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1) 240ms,
    visibility 0ms linear 0ms;
}

.landing.landing--no-intro,
.landing.landing--no-intro::after,
.landing.landing--no-intro .landing-panel--testing,
.landing.landing--no-intro .panel-content--intro,
.landing.landing--no-intro .login-card-wrap {
  transition-duration: 0ms !important;
  transition-delay: 0ms !important;
}

/* АДАПТИВНОСТЬ */

@media (max-width: 760px) {
  .landing {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(50svh, 1fr) minmax(50svh, 1fr);
    transition: grid-template-rows 680ms cubic-bezier(0.65, 0, 0.15, 1);
  }

  .landing.landing--login-active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(100svh, 1fr) minmax(0, 0fr);
  }

  .landing::after {
    top: 50%;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(105, 128, 183, 0.12) 9%,
      rgba(105, 128, 183, 0.42) 50%,
      rgba(105, 128, 183, 0.12) 91%,
      transparent 100%
    );
  }

  .landing.landing--login-active::after {
    transform: translateY(50vh);
  }

  .landing-panel {
    min-height: 50vh;
    min-height: 50svh;
    padding: 42px 24px;
  }

  .landing.landing--login-active .landing-panel--checklists {
    min-height: 100svh;
  }

  .landing.landing--login-active .landing-panel--testing {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translate3d(100%, 0, 0);
  }

  .feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .feature-icon--purple {
    width: 74px;
  }

  h1,
  h2 {
    font-size: clamp(25px, 6vw, 31px);
  }

  .panel-description {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.5;
  }

  .action-button {
    width: 264px;
    max-width: 100%;
    height: 46px;
    min-height: 46px;
    flex: 0 0 auto;
    margin-top: 28px;
    padding: 0 42px;
    font-size: 15px;
  }

  .login-submit-btn {
    width: 100%;
    margin-top: 10px;
  }

  .login-card {
    padding: 28px 22px 22px;
  }
}

@media (max-width: 380px) {
  .landing-panel {
    min-height: 54svh;
    padding: 34px 20px;
  }
  .desktop-break {
    display: none;
  }
  .action-button {
    padding-inline: 42px;
  }
}

@media (pointer: coarse) {
  .geo-shape {
    transition: none;
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}