/* Anton landing — dark glass, app-aligned palette */
:root {
  --bg-0: #352a45;
  --bg-1: #262626;
  --bg-2: #2c2838;
  --bg-3: #2e2a34;
  --purple: #bf5af2;
  --purple-mid: #af52de;
  --text: rgba(255, 255, 255, 0.94);
  --text-muted: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, Ubuntu,
    "Helvetica Neue", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-1);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient gradient (matches app dark owner gradient) */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    135deg,
    var(--bg-0) 0%,
    var(--bg-1) 22%,
    var(--bg-2) 45%,
    var(--bg-1) 72%,
    var(--bg-3) 100%
  );
}

.bg-mesh::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(
      ellipse 80% 50% at 20% -10%,
      rgba(191, 90, 242, 0.28),
      transparent 55%
    ),
    radial-gradient(
      ellipse 60% 40% at 100% 30%,
      rgba(175, 82, 222, 0.18),
      transparent 50%
    );
  animation: mesh-float 28s ease-in-out infinite alternate;
}

@keyframes mesh-float {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-3%, 2%) scale(1.03);
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-mesh::after {
    animation: none;
  }
}

/* Noise overlay — subtle texture */
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(38, 38, 38, 0.55);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: nowrap;
}

.header-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px 12px;
  flex: 1;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
}

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

.lang-switch {
  display: flex;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

@media (max-width: 640px) {
  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
    column-gap: 10px;
  }

  /* Первая строка: только логотип — не пересекается с пунктами меню */
  .logo {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    font-size: 1.12rem;
  }

  /* Вторая строка: шорткаты и язык на всю ширину */
  .header-trailing {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 8px 10px;
  }

  .nav {
    gap: 6px 10px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .nav a {
    font-size: 0.8rem;
    font-weight: 500;
  }

  .lang-switch {
    flex-shrink: 0;
    padding: 2px;
  }

  .lang-switch button {
    padding: 6px 10px;
    font-size: 0.74rem;
  }
}

.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.lang-switch button.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

/* Glass card */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 40%,
    transparent 60%,
    rgba(191, 90, 242, 0.15) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero-mission {
  margin: 0 0 22px;
  padding: 0;
  max-width: min(100%, 42rem);
  font-size: clamp(1.2rem, 3.6vw, 1.65rem);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: none;
}

.hero-mission span {
  display: block;
}

@media (min-width: 901px) {
  .hero-mission {
    margin-top: -6px;
    margin-bottom: 30px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 88px;
  }
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.82));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 52ch;
}

.hero-lead p {
  margin: 0 0 0.65em;
}

.hero-lead p:last-child {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #fff585 0%, var(--purple-mid) 42%, var(--purple) 88%, #fff585 100%);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
  box-shadow: 0 12px 40px rgba(191, 90, 242, 0.35);
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary {
    animation: none;
    background: linear-gradient(135deg, var(--purple-mid), var(--purple));
  }
}

.btn-primary span {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.btn-ghost {
  color: var(--text);
  background: var(--glass-highlight);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

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

/* Hero visual — phone mockup */
.hero-visual {
  perspective: 1200px;
}

.phone-frame {
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(0, 0, 0, 0.2) 100%
  );
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 0.6s var(--ease-out);
}

.phone-frame:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.01);
}

@media (prefers-reduced-motion: reduce) {
  .phone-frame {
    transform: none;
  }
  .phone-frame:hover {
    transform: none;
  }
}

.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: #1a1a1c;
  position: relative;
}

.phone-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.55s var(--ease-out);
  pointer-events: none;
}

.phone-carousel img.is-active {
  opacity: 1;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .phone-carousel img {
    transition: opacity 0.2s ease;
  }
}

/* Sections */
section {
  padding: 56px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

/* «Почему это работает иначе»: заголовок и лид по центру на десктопе */
@media (min-width: 901px) {
  #features .section-head {
    margin-left: auto;
    margin-right: auto;
    max-width: min(100%, 52rem);
    text-align: center;
  }

  #features .section-lead-panel {
    margin-left: auto;
    margin-right: auto;
  }
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.section-lead-rich {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.section-lead-rich p {
  margin: 0 0 10px;
}

.section-lead-rich p:last-child {
  margin-bottom: 0;
}

.section-lead-panel {
  margin-top: 6px;
  padding: 16px 20px;
  max-width: min(100%, 52rem);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 720px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 24px 22px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  transition: transform 0.35s var(--ease-out), border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(191, 90, 242, 0.35);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: rgba(191, 90, 242, 0.18);
  border: 1px solid rgba(191, 90, 242, 0.35);
  color: #e8c7ff;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.expert-block {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .expert-block {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px 32px;
  }
}

.expert-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.expert-title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.expert-block p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 1.02rem;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.expert-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(191, 90, 242, 0.12);
  border: 1px solid rgba(191, 90, 242, 0.4);
  color: #f0d4ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: normal;
  transition: background 0.2s, transform 0.2s;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .expert-link {
    flex: 0 1 min(340px, 42%);
    align-self: flex-start;
  }
}

.expert-link:hover {
  background: rgba(191, 90, 242, 0.22);
  transform: translateY(-2px);
}

.expert-link-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.expert-link small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.expert-link svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Benchmark chart */
.benchmark-section {
  padding-top: 32px;
}

.benchmark-heading {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.15;
}

.benchmark-sub {
  margin: 0 0 22px;
  max-width: 52rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.chart-panel.glass {
  overflow: visible;
}

.chart-panel {
  padding: 24px 20px 20px;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 0;
}

.chart-panel > * {
  position: relative;
  z-index: 1;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 8px;
  align-items: end;
  width: 100%;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chart-bar-area {
  width: 100%;
  max-width: 52px;
  height: 200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  height: var(--bar-pct);
  min-height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chart-bar--anton {
  background: linear-gradient(
    180deg,
    rgba(191, 90, 242, 0.95) 0%,
    rgba(175, 82, 222, 0.75) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 2px rgba(191, 90, 242, 0.45),
    0 10px 36px rgba(191, 90, 242, 0.28);
}

.chart-col--anton .chart-name {
  color: #e8c7ff;
  font-weight: 700;
}

.chart-name {
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
  word-break: break-word;
}

.chart-ratio {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* Та же сетка 6 колонок, что на десктопе — компактнее на узких экранах */
@media (max-width: 900px) {
  .chart-bars {
    gap: clamp(4px, 1.2vw, 10px) clamp(3px, 1vw, 8px);
  }

  .chart-bar-area {
    height: clamp(112px, 32vw, 200px);
    max-width: min(52px, 100%);
  }

  .chart-name {
    font-size: clamp(0.62rem, 2.5vw, 0.76rem);
  }

  .chart-ratio {
    font-size: clamp(0.58rem, 2.2vw, 0.7rem);
  }

  .chart-panel {
    padding: 20px 12px 16px;
  }
}

@media (max-width: 480px) {
  .chart-bars {
    gap: 3px 4px;
  }

  .chart-bar-area {
    height: clamp(96px, 30vw, 160px);
  }

  .chart-panel {
    padding: 16px 8px 14px;
  }
}

/* Store buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(191, 90, 242, 0.45);
}

.store-btn svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.store-icon-google {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
}

.store-icon-img {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  object-position: center;
  display: block;
}

#download {
  display: flex;
  justify-content: center;
}

#download .wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

#download .download-panel {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.stores-heading {
  margin: 0 0 14px;
  padding: 0 4px;
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  text-align: center;
}

#download .store-row {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 0;
  width: 100%;
}

.store-btn {
  flex: 0 1 auto;
  min-width: 0;
}

@media (max-width: 560px) {
  #download .store-row {
    flex-wrap: wrap;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Footer */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--glass-border);
  margin-top: 32px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

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

.footer-copy {
  margin: 28px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.38);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
