/* Снова тут — общий стиль сайта.
   Направление: продуктовая страница в духе маркетинга Apple. Крупный шрифт, одна мысль на секцию, много воздуха.
   Секции разделяются фоном (--bg / --bg-2), а не линиями. Внутри макетов телефона — системный iOS (grouped-списки).
   Шрифт системный (SF на Apple), веб-шрифтов нет.
   Роли цвета: --tint только для того, на что можно нажать; --ok только для состояния «вернулось». */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --tile: #ffffff;
  --sys-bg: #f2f2f7;        /* фон экрана iOS внутри макетов */
  --cell: #ffffff;
  --fill: rgb(120 120 128 / 0.12);
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --sep: rgb(0 0 0 / 0.1);
  --tint: #0071e3;          /* ссылки и иконки действий */
  --tint-fill: #0071e3;     /* заливка главной кнопки */
  --tint-ink: #ffffff;
  --ok: #248a3d;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f11; --bg-2: #18181b; --tile: #232327; --sys-bg: #000000; --cell: #1c1c1e;
    --fill: rgb(118 118 128 / 0.24); --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #86868b;
    --sep: rgb(255 255 255 / 0.14); --tint: #2997ff; --tint-fill: #0071e3; --ok: #30d158; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f11; --bg-2: #18181b; --tile: #232327; --sys-bg: #000000; --cell: #1c1c1e;
  --fill: rgb(118 118 128 / 0.24); --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #86868b;
  --sep: rgb(255 255 255 / 0.14); --tint: #2997ff; --tint-fill: #0071e3; --ok: #30d158; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--font); letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(42px, 7.4vw, 88px); line-height: 1.03; font-weight: 700; letter-spacing: -0.045em; }
h2 { font-size: clamp(32px, 4.8vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -0.038em; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.lead { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 46ch; letter-spacing: -0.018em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
section { padding-block: clamp(56px, 7.5vw, 104px); }
.band { background: var(--bg-2); }

/* Кнопки: синяя пилюля — главное действие, серая с синим текстом — второстепенное */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 17px/1 var(--font); letter-spacing: -0.012em; text-decoration: none;
  transition: opacity .15s, transform .15s, background-color .15s;
}
.btn:active { opacity: .7; transform: scale(.98); }
.btn-primary { background: var(--tint-fill); color: var(--tint-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--tint-fill) 88%, #000); }
.btn-gray { background: var(--fill); color: var(--tint); }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 14px; }
.link { color: var(--tint); text-decoration: none; }
.link:hover { text-decoration: underline; }
.more-link { color: var(--tint); text-decoration: none; font-size: 17px; }
.more-link::after { content: " ›"; }
.more-link:hover { text-decoration: underline; }

/* Шапка: полупрозрачная панель */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bg);
}
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--sep); transition: border-color .3s;
}
.top.flat { border-bottom-color: transparent; }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.top .btn { white-space: nowrap; }
@media (max-width: 860px) { .nav { display: none; } .top .btn { margin-left: auto; } }

/* Шапка: «Задать вопрос» рядом с кнопкой справа; на узком экране вопрос сжимается до иконки */
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.top-actions .btn { margin-left: 0; }
.ask svg { width: 16px; height: 16px; }
@media (max-width: 480px) { .top .ask { width: 32px; padding: 0; } .top .ask span { display: none; } }
@media (max-width: 360px) { .top .brand { font-size: 0; gap: 0; } }

/* Макет iPhone: герой лендинга и экран «Откройте на iPhone» в приложении */
/* iPhone: титановая рамка с бликами, чёрный безель, боковые кнопки, стекло с отражением */
.phone {
  --w: min(360px, 88vw);
  position: relative; flex: none; width: var(--w); aspect-ratio: 71.5 / 149.6; text-align: left;
  border-radius: calc(var(--w) * .175); padding: 4px;
  background: linear-gradient(135deg, #6b6b70 0%, #2c2c2e 18%, #1c1c1e 50%, #2c2c2e 82%, #77777c 100%);
  box-shadow: 0 0 0 .5px rgb(0 0 0 / .6), inset 0 0 1px 1px rgb(255 255 255 / .18), 0 50px 90px -40px rgb(0 0 0 / .45), 0 18px 30px -18px rgb(0 0 0 / .3);
}
.phone .key { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #8a8a8f, #3a3a3c); }
.phone .key.l { left: -3px; } .phone .key.r { right: -3px; background: linear-gradient(270deg, #8a8a8f, #3a3a3c); }
.k-act { top: 17%; height: 5%; } .k-up { top: 25%; height: 9%; } .k-down { top: 36%; height: 9%; }
.k-pow { top: 27%; height: 14%; } .k-cam { top: 58%; height: 8%; }
.bezel { height: 100%; border-radius: calc(var(--w) * .165); background: #000; padding: calc(var(--w) * .026); }
.screen {
  height: 100%; border-radius: calc(var(--w) * .14); background: var(--sys-bg); position: relative; overflow: hidden;
  padding: 0 calc(var(--w) * .04); color: var(--ink);
}
.screen::after {   /* блик на стекле */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(120deg, rgb(255 255 255 / .16) 0%, rgb(255 255 255 / .04) 28%, transparent 42%);
  mix-blend-mode: soft-light;
}
.isl { position: absolute; top: calc(var(--w) * .03); left: 50%; translate: -50% 0; width: 33%; height: calc(var(--w) * .095); background: #000; border-radius: 99px; z-index: 2; }
.isl::after { content: ""; position: absolute; right: 18%; top: 50%; translate: 0 -50%; width: 22%; aspect-ratio: 1; max-width: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3a55, #0a0d14 70%); }
.sb { display: grid; grid-template-columns: 1fr 33% 1fr; align-items: center; height: calc(var(--w) * .155); margin: 0 calc(var(--w) * -.04) 34px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.sb > span { text-align: center; }
.sb .ind { display: flex; gap: 5px; align-items: center; justify-content: center; }
.sb svg { fill: currentColor; height: 11px; width: auto; }
.sb .bat { height: 12px; }
.home { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; width: 36%; height: 5px; border-radius: 3px; background: var(--ink); opacity: .9; }
.phone .apps .row { grid-template-columns: 46px minmax(0, 1fr) auto; min-height: 68px; padding: 11px 12px; gap: 12px; --inset: 70px; }
.phone .apps .row > div { min-width: 0; }
.phone .apps b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .apps small { transition: color .3s; white-space: nowrap; }
.phone .apps .row[data-s="open"] small { color: var(--ok); }
/* Иконки: в облаке бесцветные и бледные, после возврата наливаются цветом */
.phone .ico {
  width: 46px; height: 46px; border-radius: 23%; display: block; object-fit: cover;
  outline: .5px solid rgb(0 0 0 / .1); outline-offset: -.5px;
  filter: grayscale(1) opacity(.42);
  transition: filter .6s, scale .4s cubic-bezier(.3, 1.6, .5, 1);
}
.phone .apps .row[data-s="load"] .ico { filter: grayscale(.6) opacity(.7); scale: .92; }
.phone .apps .row[data-s="open"] .ico { filter: none; }
.get { display: grid; place-items: center; width: 72px; height: 30px; }
.get > * { grid-area: 1 / 1; opacity: 0; scale: .7; transition: opacity .2s, scale .2s; }
.row[data-s="cloud"] .cloud, .row[data-s="load"] .ring, .row[data-s="open"] .open { opacity: 1; scale: 1; }
.get .cloud, .get .ring { width: 28px; height: 28px; }
.ring .arc { stroke-dasharray: 69.1; stroke-dashoffset: 69.1; }
.row[data-s="load"] .ring .arc { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.4, 0, .6, 1); }
.row[data-s="open"] .ring .arc { stroke-dashoffset: 0; }
.get .open { width: 100%; padding: 0 8px; }
@media (max-width: 420px) {
  .phone .apps .row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; --inset: 64px; }
  .phone .ico { width: 42px; height: 42px; }
  .phone .apps b { font-size: 15px; }
  .get { width: 68px; }
  .get .open { font-size: 13px; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Grouped-список iOS — только внутри макетов телефона */
.group-head { font-size: 13px; color: var(--ink-2); padding: 0 16px 7px; text-transform: uppercase; letter-spacing: 0.02em; }
.group { background: var(--cell); border-radius: var(--r); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  min-height: 44px; padding: 10px 16px; position: relative;
}
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); border-top: 1px solid var(--sep); }
.row small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.3; }
.group-foot { font-size: 13px; color: var(--ink-2); padding: 7px 16px 0; line-height: 1.4; }

/* Футер */
.foot { background: var(--bg-2); padding-block: 0 48px; font-size: 14px; color: var(--ink-2); }
.foot .wrap { display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1fr; padding-top: 40px; border-top: 1px solid var(--sep); }
.foot .brand { color: var(--ink); margin-bottom: 12px; }
.foot .about p { max-width: 38ch; }
.foot h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 24px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--ink-3); }
.todo { background: var(--fill); color: var(--ink); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
@media (max-width: 720px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .about { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
