/* myprila.ru, the landing (portal/src/views/public.js landing()): the brand, the offer,
   the two ways in, what is coming, and one example of the product at work. The example
   is a terminal in both themes: the human's words in the interface face, the agent's in
   the monospace one, the logo's four bars speaking them. Its one load sequence (about
   three seconds) plays once and is skipped with reduced motion. */

.landing {
  justify-content: center;
}

.lp {
  width: 100%;
  margin: auto 0;
  padding: 8px 0 16px;
  display: grid;
  gap: 40px;
  align-items: center;
}

.lp-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
}

.lp-brand {
  margin: 0 0 clamp(28px, 6vh, 56px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lp-brand .mark {
  color: var(--accent);
}

.lp-title {
  margin: 0;
  font-size: clamp(34px, 8.6vw, 62px);
  line-height: 1.03;
  font-weight: 650;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.lp-lead {
  margin: 20px 0 0;
  max-width: 42ch;
  font-size: clamp(17px, 2.3vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.lp-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lp-actions .btn {
  min-width: 172px;
}

.lp-soon {
  margin: 32px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: balance;
}

.lp-ask {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 15px;
  color: var(--muted);
}

.lp-ask a {
  color: inherit;
  text-underline-offset: 3px;
}

.lp-ask a:hover {
  color: var(--text);
}

/* The example: a terminal, dark in both themes. */
.lp-demo {
  --term-bg: #162c30;
  --term-line: rgba(214, 238, 232, 0.12);
  --term-text: #e7efea;
  --term-muted: #a6bbb7;
  --term-amber: #f2c14e;
  --term-ok: #7fd3a4;
  --term-label: 64px;
  margin: 0;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  padding: 20px 20px 22px;
  border: 1px solid var(--term-line);
  border-radius: 18px;
  background: var(--term-bg);
  box-shadow: var(--shadow);
  color: var(--term-muted);
  font: 400 14px/1.55 var(--font-mono);
  display: grid;
  gap: 9px;
}

.lp-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

/* One label column for every line: the bars, «claude» and ✓ share its width. */
.lp-line b,
.lp-bars {
  flex: none;
  width: var(--term-label);
}

.lp-line b {
  font-weight: 600;
  color: var(--term-amber);
}

.lp-done b {
  color: var(--term-ok);
}

.lp-done span {
  color: var(--term-text);
}

.lp-voice {
  align-items: center;
  margin-bottom: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--term-line);
  color: var(--term-text);
  font: 500 17px/1.35 var(--font-ui);
  letter-spacing: -0.01em;
}

/* The logo's four bars, at the logo's heights (14, 40, 22, 8 of 40). */
.lp-bars {
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lp-bars i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: var(--term-amber);
}

.lp-bars i:nth-child(1) {
  transform: scaleY(0.35);
}

.lp-bars i:nth-child(2) {
  transform: scaleY(1);
}

.lp-bars i:nth-child(3) {
  transform: scaleY(0.55);
}

.lp-bars i:nth-child(4) {
  transform: scaleY(0.2);
}

@media (prefers-color-scheme: light) {
  .lp-demo {
    --term-bg: #12302e;
    box-shadow: 0 22px 56px rgba(18, 48, 46, 0.22);
  }

  .lp-soon {
    border-left-color: var(--accent);
  }
}

/* The one sequence: the bars speak, the words appear, the agent answers line by line. */
@media (prefers-reduced-motion: no-preference) {
  .lp-bars i {
    animation: lp-speak 0.36s ease-in-out 5 alternate;
  }

  .lp-bars i:nth-child(2) {
    animation-delay: 0.09s;
  }

  .lp-bars i:nth-child(3) {
    animation-delay: 0.18s;
  }

  .lp-bars i:nth-child(4) {
    animation-delay: 0.05s;
  }

  .lp-said,
  .lp-line:not(.lp-voice) {
    opacity: 0;
    animation: lp-in 0.24s ease-out forwards;
  }

  .lp-said {
    animation-delay: 0.6s;
  }

  .lp-line:nth-child(2) {
    animation-delay: 1.7s;
  }

  .lp-line:nth-child(3) {
    animation-delay: 2.4s;
  }

  .lp-line:nth-child(4) {
    animation-delay: 3.3s;
  }
}

@keyframes lp-speak {
  from {
    transform: scaleY(0.25);
  }

  to {
    transform: scaleY(1);
  }
}

@keyframes lp-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 920px) {
  .lp {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 64px;
  }

  .lp-demo {
    justify-self: end;
    max-width: 540px;
    padding: 24px 24px 26px;
    font-size: 15px;
    --term-label: 70px;
  }
}

@media (max-width: 420px) {
  .lp-actions {
    width: 100%;
  }

  .lp-actions .btn {
    flex: 1 1 100%;
  }

  .lp-demo {
    padding: 16px 16px 18px;
    font-size: 13px;
    --term-label: 56px;
  }

  .lp-voice {
    font-size: 16px;
  }
}
