/* Сайт Счетовода. Токены повторяют приложение: серые фоны сгруппированных списков, радиусы
   10/14/20/28, зелёный из иконки. Для текста зелёный темнее (#1d7a50 — 5.3 : 1 на белом):
   цвет иконки #2e9e6b даёт 3.4 : 1 и не проходит WCAG AA. Ни шрифтов, ни скриптов извне:
   страница ничего не загружает с чужих адресов. */

:root {
  color-scheme: light dark;

  --brand: #1d7a50;
  --brand-solid: #2e9e6b;
  --brand-tint: #e3f4ec;

  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-muted: #f7f7fa;
  --line: #e3e3e8;

  --ink: #1c1c1e;
  --ink-2: #3c3c43;
  --ink-3: #6c6c70;

  --warning: #a85b00;
  --warning-tint: #fff1df;

  --badge-bg: #1c1c1e;
  --badge-ink: #ffffff;
  --bezel: #1c1c1e;

  --radius-row: 10px;
  --radius-control: 14px;
  --radius-card: 20px;
  --radius-block: 28px;

  --shadow-phone: 0 30px 60px -20px rgba(28, 28, 30, 0.35), 0 12px 24px -12px rgba(28, 28, 30, 0.25);
  --wrap: 1080px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4dc78a;
    --brand-solid: #4dc78a;
    --brand-tint: rgba(77, 199, 138, 0.14);

    --bg: #000000;
    --surface: #1c1c1e;
    --surface-muted: #151517;
    --line: #2c2c2e;

    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --ink-3: #98989f;

    --warning: #ffb340;
    --warning-tint: rgba(255, 159, 10, 0.14);

    --badge-bg: #f5f5f7;
    --badge-ink: #000000;
    --bezel: #2c2c2e;

    --shadow-phone: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--brand-solid);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 750;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius-row);
  z-index: 10;
}

.skip-link:focus {
  left: 8px;
}

/* Шапка */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-3);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* На узком экране три пункта не влезают в строку; «Возможности» — якорь на главной, без него можно. */
@media (max-width: 420px) {
  .nav-optional {
    display: none;
  }
}

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

.hero {
  padding: 40px 0 24px;
  text-align: center;
}

.eyebrow {
  color: var(--brand);
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 26ch;
  margin-inline: auto;
}

.lead {
  max-width: 40rem;
  margin: 20px auto 0;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 30px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-weight: 600;
}

.store-badge svg {
  flex: none;
}

.store-badge small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.75;
  line-height: 1.1;
}

.store-badge span {
  line-height: 1.2;
  text-align: left;
}

.requirements {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* Телефоны */

.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(12px, 3vw, 40px);
  margin: 56px auto 0;
  padding-bottom: 24px;
}

.phone {
  margin: 0;
  flex: 0 1 260px;
  padding: 7px;
  border-radius: 46px;
  background: var(--bezel);
  box-shadow: var(--shadow-phone);
}

.phone img {
  width: 100%;
  border-radius: 39px;
}

.phone--side {
  flex-basis: 230px;
  margin-bottom: 28px;
}

@media (max-width: 720px) {
  .phone--side {
    display: none;
  }

  .phone {
    flex-basis: 270px;
  }
}

/* Разделы */

.section {
  padding: 72px 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 36px;
}

.section-heading p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.card p {
  margin-top: 8px;
  color: var(--ink-2);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}

/* Раздел с экраном сбоку */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: center;
}

.split .phone {
  flex: none;
}

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

  .split .phone {
    max-width: 270px;
    margin-inline: auto;
  }
}

.feature-list {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
}

.feature-list .card-icon {
  margin: 0;
}

.feature-list p {
  margin-top: 6px;
  color: var(--ink-2);
}

/* Приватность */

.panel {
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-block);
  background: var(--surface);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px 32px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  color: var(--ink-2);
}

.checklist svg {
  margin-top: 3px;
  color: var(--brand);
}

.checklist strong {
  display: block;
  color: var(--ink);
}

.panel-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
}

/* Переезд */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink-2);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 700;
}

/* Вопросы */

.faq {
  display: grid;
  gap: 10px;
  max-width: 48rem;
}

.faq details {
  border-radius: var(--radius-control);
  background: var(--surface);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--ink-3);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.1;
}

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

.faq details > div {
  padding: 0 22px 20px;
  color: var(--ink-2);
}

.faq details > div > * + * {
  margin-top: 10px;
}

/* Документы: политика, поддержка */

.document {
  max-width: 46rem;
  padding: 32px 0 72px;
}

.document h1 {
  font-size: clamp(2rem, 4.6vw, 2.8rem);
}

.document .lead {
  margin: 16px 0 0;
}

.document h2 {
  margin-top: 44px;
  font-size: 1.45rem;
}

.document p,
.document ul {
  margin-top: 14px;
  color: var(--ink-2);
}

.document ul {
  padding-left: 1.2em;
}

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

.document strong {
  color: var(--ink);
}

.meta {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.contact span {
  display: block;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.contact a {
  font-size: 1.2rem;
  font-weight: 650;
  word-break: break-all;
}

.callout {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-control);
  background: var(--warning-tint);
  color: var(--ink-2);
}

.callout strong {
  color: var(--warning);
}

.path {
  color: var(--ink);
  font-weight: 600;
}

/* Подвал */

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--ink-3);
}

/* 404 */

.not-found {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 48px 0;
  text-align: center;
}

.not-found p {
  margin-top: 14px;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
