@property --cut-gap {
  syntax: '<length>';
  inherits: true;
  initial-value: 2px;
}

@property --line-pos {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 12%;
}

:root {
  --primary: #005bff;
  --primary-dark: #669dff;
  --primary-soft: #b5cff4;
  --primary-light: #d7e7ff;
  --primary-100: #f3f8ff;
  --cyan: #06f3ff;
  --text: #333333;
  --muted: #5b6472;
  --white: #ffffff;
  --shadow: 0 4px 20px 0 #dbe6f466;
  --radius: 16px;
  --cut-gap: 2px;
  --font: 'Montserrat', system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--primary-100);
  color: var(--text);
  font-family: var(--font);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.mono {
  font-family: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Menlo, monospace;
  font-size: 0.92em;
  white-space: nowrap;
}

.stage {
  display: grid;
  grid-template-columns: 1fr var(--cut-gap) 1fr;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(1200px 500px at 12% -10%, rgba(6, 243, 255, 0.22), transparent 55%),
    radial-gradient(900px 520px at 80% 110%, rgba(0, 91, 255, 0.16), transparent 50%),
    var(--primary-100);
  animation: split-open 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes split-open {
  to {
    --cut-gap: 28px;
  }
}

.pane {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 72px 56px;
}

.pane--left {
  justify-content: flex-end;
  animation: pane-in-left 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.pane--right {
  justify-content: flex-start;
  animation: pane-in-right 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

@keyframes pane-in-left {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pane-in-right {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand {
  max-width: 460px;
}

.brand__logo {
  display: block;
  width: 148px;
  height: 148px;
  margin-bottom: 28px;
  filter: drop-shadow(0 12px 28px rgba(0, 91, 255, 0.22));
  animation: logo-float 5.5s ease-in-out infinite;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.brand__kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.brand__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.brand__lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 500;
}

.brand__version {
  margin: 22px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.brand__version[hidden] {
  display: none;
}

.cut {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.cut__line {
  width: 2px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--cyan) calc(var(--line-pos) - 16%),
    var(--primary) var(--line-pos),
    var(--cyan) calc(var(--line-pos) + 16%),
    transparent 100%
  );
  box-shadow:
    0 0 16px rgba(6, 243, 255, 0.55),
    0 0 32px rgba(0, 91, 255, 0.28);
  animation:
    cut-draw 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    line-flow 3.6s ease-in-out 0.85s infinite alternate;
  clip-path: inset(50% 0 50% 0);
}

@keyframes cut-draw {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes line-flow {
  from {
    --line-pos: 12%;
  }
  to {
    --line-pos: 88%;
  }
}

.downloads {
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.downloads__label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.dl {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  animation: card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dl:nth-child(2) {
  animation-delay: 0.45s;
}
.dl:nth-child(3) {
  animation-delay: 0.55s;
}
.dl:nth-child(4) {
  animation-delay: 0.65s;
}
.dl:nth-child(5) {
  animation-delay: 0.75s;
}
.dl:nth-child(6) {
  animation-delay: 0.85s;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dl:hover {
  transform: translateY(-2px);
  border-color: var(--primary-soft);
  box-shadow: 0 10px 28px rgba(0, 91, 255, 0.16);
}

.dl:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.dl.is-recommended {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fff, var(--primary-100));
}

.dl.is-recommended .dl__action {
  background: var(--primary);
  color: var(--white);
}

.dl__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-100);
  color: var(--primary);
}

.dl__icon svg {
  width: 22px;
  height: 22px;
}

.dl__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dl__name {
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dl__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 7px;
  border-radius: 999px;
}

.dl__hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.dl__action {
  display: inline-grid;
  justify-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-light);
}

.dl__action::before {
  content: 'Скачать';
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

button.dl {
  font: inherit;
  width: 100%;
  text-align: left;
  appearance: none;
}

.dl--disabled,
.dl:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.25);
}

.dl--disabled:hover,
.dl:disabled:hover {
  transform: none;
  border-color: transparent;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    animation: none;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .cut {
    display: none;
  }

  .pane {
    min-height: unset;
    padding: 48px 24px;
    justify-content: center;
  }

  .pane--left,
  .pane--right {
    animation: none;
  }

  .brand {
    text-align: center;
  }

  .brand__logo {
    margin-inline: auto;
    width: 112px;
    height: 112px;
  }

  .downloads {
    width: 100%;
  }

  .dl {
    grid-template-columns: 44px 1fr auto;
    padding: 12px 12px;
    gap: 10px;
  }

  .dl__action {
    font-size: 11px;
    padding: 7px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .stage {
    --cut-gap: 28px;
  }
}
