@font-face {
  font-family: "Yandex Sans Text";
  src: url("/static/fonts/YandexSansText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yandex Sans Text";
  src: url("/static/fonts/YandexSansText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yandex Sans Display";
  src: url("/static/fonts/YandexSansDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --panel: rgba(16, 16, 20, 0.8);
  --panel-strong: rgba(25, 25, 30, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f6;
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #ef4444;
  --accent-soft: rgba(239, 68, 68, 0.12);
  --accent-border: rgba(248, 113, 113, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Yandex Sans Text", "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(239, 68, 68, 0.2), transparent 24%),
    radial-gradient(circle at 85% 85%, rgba(127, 29, 29, 0.22), transparent 28%),
    #09090b;
}

.landing-noise,
.landing-grid,
.landing-glow {
  position: absolute;
  pointer-events: none;
}

.landing-noise {
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.26) 0, transparent 18%),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,0.18) 0, transparent 12%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.14) 0, transparent 10%);
  background-size: 320px 320px, 420px 420px, 260px 260px;
  animation: noiseShift 16s linear infinite;
}

.landing-grid {
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 95%);
}

.landing-glow-top {
  inset: -12% 0 auto;
  height: 360px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.18), transparent 62%);
  filter: blur(30px);
}

.landing-glow-side {
  top: 22%;
  right: -12%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.12), transparent 60%);
  filter: blur(34px);
}

.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 60px;
}

.landing-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(6, 6, 8, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Yandex Sans Display", "Yandex Sans Text", sans-serif;
  font-size: 1.06rem;
  line-height: 1;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.87rem;
}

.landing-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn,
.primary-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-btn.accent {
  border-color: var(--accent-border);
  background: rgba(239, 68, 68, 0.08);
}

.primary-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, #ef5353, #d93737);
  box-shadow: 0 16px 32px rgba(217, 55, 55, 0.28);
}

.ghost-btn:hover,
.primary-btn:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 26px;
  align-items: center;
  padding: 86px 0 44px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: rgba(239, 68, 68, 0.1);
  color: #ffd8d8;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.hero-title {
  margin: 0;
  max-width: 11ch;
  font-family: "Yandex Sans Display", "Yandex Sans Text", sans-serif;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-title-glitch {
  position: relative;
  display: inline-block;
}

.hero-title-glitch::before,
.hero-title-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-title-glitch::before {
  color: rgba(239, 68, 68, 0.54);
  transform: translate(-2px, 1px);
  animation: glitchLeft 2.8s ease-in-out infinite;
}

.hero-title-glitch::after {
  color: rgba(255, 255, 255, 0.16);
  transform: translate(2px, -1px);
  animation: glitchRight 2.8s ease-in-out infinite;
}

.hero-title-accent {
  display: block;
  color: #ff7070;
}

.hero-text {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

.text-link {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 500;
  transition: transform 180ms ease, color 180ms ease;
}

.hero-preview {
  perspective: 1400px;
}

.preview-card {
  position: relative;
  padding: 18px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    rgba(9, 9, 11, 0.72);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
  transform: rotateX(5deg) rotateY(-7deg);
  transform-origin: center;
}

.preview-card::after {
  content: "";
  position: absolute;
  inset: auto 6% -34px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(18px);
  z-index: -1;
}

.preview-card-head {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.preview-card-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.preview-stack {
  display: grid;
  gap: 14px;
}

.preview-bubble {
  display: grid;
  gap: 4px;
  max-width: 88%;
  padding: 15px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.07);
  background: var(--panel-strong);
  animation: cardFloat 5.4s ease-in-out infinite;
}

.preview-bubble.outgoing {
  justify-self: end;
  background: rgba(239, 68, 68, 0.13);
}

.preview-bubble.incoming {
  justify-self: start;
}

.preview-bubble:nth-child(2) {
  animation-delay: 0.2s;
}

.preview-bubble:nth-child(3) {
  animation-delay: 0.4s;
}

.preview-bubble:nth-child(4) {
  animation-delay: 0.6s;
}

.preview-bubble.wide {
  max-width: 100%;
}

.preview-bubble-title {
  font-weight: 600;
}

.preview-bubble-text {
  color: var(--muted);
  line-height: 1.5;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.24);
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #ffc9c9;
  font-size: 1rem;
}

.feature-card h2 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@keyframes noiseShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-1%, 1%, 0); }
  50% { transform: translate3d(1%, -1%, 0); }
  75% { transform: translate3d(1%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes glitchLeft {
  0%, 100% { transform: translate(-2px, 1px); opacity: 0.44; }
  18% { transform: translate(0, 0); opacity: 0.14; }
  20% { transform: translate(-3px, 2px); opacity: 0.52; }
  22% { transform: translate(0, 0); opacity: 0.16; }
}

@keyframes glitchRight {
  0%, 100% { transform: translate(2px, -1px); opacity: 0.18; }
  18% { transform: translate(0, 0); opacity: 0.06; }
  20% { transform: translate(3px, -2px); opacity: 0.24; }
  22% { transform: translate(0, 0); opacity: 0.08; }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 1040px) {
  .landing-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }

  .hero-title {
    max-width: none;
  }

  .preview-card {
    transform: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .landing-nav,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .preview-bubble {
    max-width: 100%;
  }
}
