/* Посадочная Maily — те же цвета и шрифт, что у приложения («Марка»):
   индиго — бренд и главное действие, Manrope, мягкие карточки. */

@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/Manrope-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/Manrope-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/Manrope-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand: #5048e5;
  --brand-dark: #433bca;
  --brand-soft: #eef0ff;
  --surface: #f6f7fa;
  --card: #ffffff;
  --text: #1e2333;
  --text-secondary: #474e5f;
  --text-tertiary: #7c8496;
  --border: #e1e4ec;
  --codes: #b45309;
  --codes-soft: #fff6e5;
  --important: #5048e5;
  --notifications: #0e7490;
  --notifications-soft: #e6f6f9;
  --private: #138755;
  --private-soft: #e8f7ef;
  --newsletters: #be185d;
  --newsletters-soft: #fdeef5;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(30 35 51 / 0.06), 0 8px 24px rgb(30 35 51 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8183f8;
    --brand-dark: #6563f1;
    --brand-soft: #23224a;
    --surface: #0d1018;
    --card: #161a24;
    --text: #eff1f6;
    --text-secondary: #c9ceda;
    --text-tertiary: #a0a7b8;
    --border: #252b38;
    --codes-soft: #2a2010;
    --notifications-soft: #0f2930;
    --private-soft: #0f261b;
    --newsletters-soft: #2d1320;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Тени и наклонённый телефон не должны давать странице прокрутку вбок. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'tnum';
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 40px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

main > section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 24px;
}

/* Шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
}

.top-links a:not(.button) {
  color: var(--text-secondary);
  text-decoration: none;
}

.top-links a:not(.button):hover {
  color: var(--text);
}

/* Кнопки — пилюли, как в приложении */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: background 0.15s;
}

.button:hover {
  background: var(--brand-dark);
}

.button-ghost {
  background: var(--brand-soft);
  color: var(--brand);
}

.button-ghost:hover {
  background: var(--brand-soft);
  filter: brightness(0.97);
}

.button-small {
  min-height: 40px;
  padding: 0 20px;
  font-size: 15px;
}

/* Первый экран */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 48px;
}

.lead {
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--text-secondary);
  margin: 24px 0 32px;
  max-width: 34em;
}

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

.hero-note {
  margin-top: 20px;
  color: var(--text-tertiary);
  font-size: 15px;
}

.hero-phones {
  position: relative;
  height: 620px;
}

.phone {
  position: absolute;
  width: 280px;
  height: auto;
  border-radius: 40px;
  border: 8px solid #10131c;
  box-shadow: 0 30px 60px rgb(30 35 51 / 0.18);
  background: #10131c;
}

.phone-front {
  right: 40px;
  top: 0;
}

.phone-back {
  right: 230px;
  top: 60px;
  transform: rotate(-6deg);
  opacity: 0.92;
}

/* Возможности */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.feature p {
  color: var(--text-secondary);
  margin: 10px 0 0;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}

.feature-icon-important {
  background: var(--brand-soft);
  color: var(--important);
}

.feature-icon-codes {
  background: var(--codes-soft);
  color: var(--codes);
}

.feature-icon-push {
  background: var(--notifications-soft);
  color: var(--notifications);
}

.feature-icon-setup {
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon-private {
  background: var(--private-soft);
  color: var(--private);
}

.feature-icon-everywhere {
  background: var(--newsletters-soft);
  color: var(--newsletters);
}

/* ИИ-агенты */

.agent {
  /* Карточка, а не полоса во всю ширину: отступы снаружи вместо внутренних
     у обычной секции. */
  max-width: 1112px;
  margin: 48px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

.agent h2 {
  text-align: left;
  margin: 0 0 14px;
}

.agent-text p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.agent-kicker {
  color: var(--brand) !important;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 8px !important;
}

.agent-points {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-secondary);
}

.agent-points li {
  margin-bottom: 8px;
}

.agent-points b {
  color: var(--text);
}

.agent-how {
  font-size: 14px;
  color: var(--text-tertiary) !important;
  margin: 0 !important;
}

.agent-demo {
  margin: 0;
  background: #10131c;
  color: #d9dcf5;
  border-radius: 16px;
  padding: 24px;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.agent-you {
  color: #ffffff;
  font-weight: 700;
}

.agent-tool {
  color: #8b85ff;
}

.agent-ai {
  color: #7ee0b5;
  font-weight: 700;
}

@media (max-width: 860px) {
  .agent {
    grid-template-columns: 1fr;
    padding: 24px;
    margin: 24px 16px;
  }
}

/* Галерея */

.desktop-shot {
  margin: 0 auto 48px;
  max-width: 1100px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgb(30 35 51 / 0.12);
}

.desktop-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.phone-row figure {
  margin: 0;
  text-align: center;
}

.phone-row img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  border: 6px solid #10131c;
  background: #10131c;
}

.phone-row figcaption {
  margin-top: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Скачать */

.section-lead {
  text-align: center;
  color: var(--text-tertiary);
  margin: -24px 0 36px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}

a.platform:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.platform-name {
  font-size: 22px;
  font-weight: 700;
}

.platform-file {
  color: var(--brand);
  font-weight: 600;
}

.platform-hint {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 6px;
}

.platform-soon .platform-file {
  color: var(--text-tertiary);
}

/* Система посетителя — первой и выделенной */
.platform-current {
  border: 2px solid var(--brand);
}

.platform-web {
  background: var(--brand-soft);
}

/* Архивы без установки — мелко под карточками: большинству нужен установщик. */
.download-more {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 24px;
}

.download-more a {
  color: var(--brand);
}

/* Подвал */

.bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 24px 56px;
  color: var(--text-tertiary);
}

/* Политика конфиденциальности */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  line-height: 1.6;
}

.legal h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 24px 0 8px;
}

.legal h2 {
  font-size: 24px;
  margin: 40px 0 12px;
  text-align: left;
}

.legal-date {
  color: var(--text-tertiary);
  margin-top: 0;
}

.legal li {
  margin-bottom: 8px;
}

.legal code {
  font-size: 0.9em;
  background: var(--brand-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

.bottom a {
  color: inherit;
}

/* Узкие экраны */

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

  /* Один телефон по центру: два внахлёст на узком экране налезают на края. */
  .hero-phones {
    height: auto;
    display: flex;
    justify-content: center;
  }

  .phone-back {
    display: none;
  }

  .phone-front {
    position: static;
  }

  .feature-grid,
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .top-links a:not(.button) {
    display: none;
  }

  .feature-grid,
  .download-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone {
    width: 220px;
  }

}
