/* Сайт DoMirror. Белый фон, Inter, чёрно-белые элементы.
   Содержимое идёт колонкой по центру без рамок. Цвета логотипа остались в одном месте:
   свечение за главной картинкой на первом экране. */
@font-face {
  font-family: 'Inter';
  src: url('/assets/Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Сайт всегда светлый: скриншоты на нём светлые, и тёмный фон с ними спорит. */
  color-scheme: light;
  --cyan: #1ec8ff;
  --blue: #1f6bff;
  --violet: #a62bff;
  --brand: linear-gradient(90deg, var(--cyan), var(--blue) 50%, var(--violet));

  --page: #ffffff;
  --bg: #ffffff;
  --soft: #f6f6f6;
  --panel: #ffffff;
  --border: #e5e5e5;
  --text: #171717;
  --muted: #6b6b6b;
  --primary: #171717;
  --primary-hover: #333333;
  --on-primary: #ffffff;
  --link: #1f6bff;
  --glow: 0.3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Свечение первого экрана выходит за колонку и растворяется в фоне на всю ширину окна;
   обрезается оно только по краю окна, чтобы не появлялась горизонтальная прокрутка. */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--text);
  font: 17px/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-feature-settings: 'cv11', 'ss03';
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

/* ---------- Колонка страницы ---------- */

.frame-wrap {
  max-width: 1240px;
  margin: 0 auto;
}


/* ---------- Шапка ---------- */

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
}

.logo img {
  height: 32px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 28px;
  margin: 0 auto;
  font-size: 15px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.languages {
  position: relative;
  font-size: 15px;
}

.languages summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.languages summary::-webkit-details-marker {
  display: none;
}

.languages ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 150px;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.languages a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
}

.languages a:hover {
  background: var(--soft);
}

/* ---------- Кнопки ---------- */

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.button:hover {
  border-color: var(--muted);
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button.small {
  padding: 8px 14px;
  font-size: 15px;
}

:is(a, summary):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Значок системы перед названием или текстом кнопки. */
.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.os-icon {
  flex: none;
}

/* На телефоне кнопки растянуты на всю ширину: значок с текстом остаются по центру. */
.button.with-icon {
  justify-content: center;
}

.button .os-icon {
  width: 17px;
  height: 17px;
}

/* У значка Apple визуальный центр ниже геометрического. */
.with-icon .os-icon:has(path[d^='M12.152']) {
  margin-top: -3px;
}

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

.hero {
  position: relative;
  padding: 72px 32px 0;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

h1 {
  max-width: 13em;
  margin: 22px auto 0;
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.lead {
  max-width: 38em;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 19px;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.note a {
  color: var(--link);
}

.note.center {
  text-align: center;
  max-width: 44em;
  margin-left: auto;
  margin-right: auto;
}

/* Скриншот в рамке. */
.shot {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Картинка без рамки: окна на ней сами со скруглёнными углами и прозрачным фоном. */
.shot.bare {
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.hero-shot {
  position: relative;
  max-width: 1040px;
  margin: 64px auto 0;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  overflow: visible;
}

/* Нижний ряд окон плавно растворяется в фоне. */
.hero-shot img {
  position: relative;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}

/* Мягкое свечение в цветах логотипа за главным скриншотом. */
.hero-shot::before {
  content: '';
  position: absolute;
  inset: -6% -4% 26%;
  background: var(--brand);
  opacity: var(--glow);
  filter: blur(80px);
  border-radius: 50%;
}

/* ---------- Разделы ---------- */

.section {
  padding: 112px 32px 0;
  max-width: 1104px;
  margin: 0 auto;
}

.section.narrow {
  max-width: 820px;
}

.hero + .section {
  max-width: none;
  padding-left: max(32px, calc((100% - 1040px) / 2));
  padding-right: max(32px, calc((100% - 1040px) / 2));
}

.section-head {
  max-width: 40em;
  margin: 0 auto 56px;
  text-align: center;
}

h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.grid {
  display: grid;
  gap: 32px;
  list-style: none;
  padding: 0;
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Содержимое ячейки не должно раздвигать сетку шире экрана: длинная строка с командой
   прокручивается внутри своей рамки. */
.grid > * {
  min-width: 0;
}

.grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

/* Пункты, отделённые тонкой линией сверху. */
.ruled > div {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}

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

.feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 96px;
}

.feature.reverse {
  grid-template-columns: 7fr 5fr;
}

.feature.reverse .feature-text {
  order: 2;
}

.feature-text h3 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.feature-text p {
  margin-top: 14px;
  color: var(--muted);
}

.checks {
  margin-top: 20px;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.checks li {
  position: relative;
  padding-left: 26px;
}

.checks li + li {
  margin-top: 8px;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--muted);
}

/* ---------- Модератор ---------- */

.board-shot {
  max-width: 900px;
  margin: 0 auto 48px;
}

.sub-head {
  margin: 72px 0 32px;
  text-align: center;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.section .note.center {
  margin-top: 40px;
}

/* ---------- Форма «Написать нам» ---------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.fab:hover {
  background: var(--primary-hover);
}

dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

dialog form {
  display: grid;
  gap: 14px;
  padding: 26px;
}

dialog h2 {
  font-size: 24px;
}

dialog p {
  color: var(--muted);
  font-size: 15px;
}

dialog label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

dialog :is(input, textarea) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

dialog textarea {
  resize: vertical;
}

/* Поле-ловушка для программ-спамеров: людям оно не видно. */
dialog .trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

dialog #feedback-status:empty {
  display: none;
}

dialog #feedback-status.done {
  color: var(--text);
}

dialog #feedback-status.failed {
  color: #d6264a;
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dialog-actions .button {
  cursor: pointer;
  font-family: inherit;
}

:is(button, input, textarea):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ---------- Шаги ---------- */

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Цена ---------- */

.price-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.plan {
  color: var(--muted);
  font-size: 15px;
}

.price {
  margin-top: 6px;
}

.price strong {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.price span,
.extra {
  color: var(--muted);
  font-size: 16px;
}

.extra {
  margin: 6px 0 24px;
}

.price-card .checks {
  margin-top: 0;
}

/* Текст в левой половине блока идёт от левого края, кнопка стоит по центру этой половины. */
.price-card .button {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* ---------- Первый запуск и вопросы ---------- */

.card ol {
  margin-top: 14px;
  padding-left: 22px;
  font-size: 16px;
}

.card li + li {
  margin-top: 8px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.card .small {
  margin-top: 16px;
}

/* Строка с командой и кнопкой «Скопировать» справа. */
.code-line {
  position: relative;
}

.code-line pre {
  padding-right: 44px;
}

.copy {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(calc(-50% + 4px));
  display: inline-flex;
  padding: 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.copy:hover {
  background: var(--border);
  color: var(--text);
}

.copy.done {
  color: #17924a;
}

pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.faq details {
  border-top: 1px solid var(--border);
}

.faq details:last-child {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 16px;
  color: var(--muted);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.2;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  padding: 0 40px 22px 0;
  color: var(--muted);
}

/* ---------- Подвал ---------- */

.site-footer {
  margin-top: 112px;
  padding: 32px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  font-size: 15px;
}

.site-footer a {
  color: var(--link);
}

.footer-languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.footer-languages a {
  color: var(--muted);
  text-decoration: none;
}

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

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

@media (max-width: 900px) {
  .site-header nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .grid.three,
  .grid.two,
  .feature,
  .feature.reverse,
  .price-card {
    grid-template-columns: 1fr;
  }

  .feature {
    gap: 28px;
    margin-bottom: 72px;
  }

  .feature.reverse .feature-text {
    order: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .site-header .button {
    display: none;
  }

  .hero {
    padding: 48px 16px 0;
  }

  .section {
    padding: 80px 16px 0;
  }

  .hero + .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .actions .button {
    width: 100%;
  }

  .hero-shot {
    margin-top: 44px;
  }

  .price-card,
  .card {
    padding: 22px;
  }

  .site-footer {
    margin-top: 80px;
    padding: 28px 16px;
  }
}

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