/* Cycle Ally — сайт. Палитра и сетка отступов те же, что в приложении (DESIGN_LAWS §III).
   Никаких сторонних шрифтов, скриптов и пикселей: страница не делает ни одного сетевого запроса. */

:root {
  --page: #efefeb;
  --card: #ffffff;
  --ink: #191814;
  --secondary: #63615b;
  --accent: #2e6b70;
  --accent-ink: #ffffff;
  --border: rgba(128, 126, 119, 0.38);
  --mark: #b2505a;
  --shadow: 0 1px 2px rgba(25, 24, 20, 0.05), 0 8px 24px rgba(25, 24, 20, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #131311;
    --card: #1c1c1e;
    --ink: #f3efea;
    --secondary: #a09e97;
    --accent: #6bbfc4;
    --accent-ink: #10201f;
    --border: rgba(122, 119, 112, 0.5);
    --mark: #e8959c;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Две ширины, а не одна. `wrap` — сетка блока: ряд плиток, лента экранов, разворот.
   `measure` — строка текста, её держим у 42rem, дальше читать неудобно. */
.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

.measure { max-width: 42rem; }

/* Когда текстовый блок — единственное содержимое секции, ему не с чем выравниваться по левому
   краю, и на широком экране он висит у левой стенки. Тогда центрируем. Там, где под ним лежит
   сетка или лента, он остаётся слева: заголовок должен стоять на одной линии с первой плиткой. */
.wrap > .measure:only-child { margin-inline: auto; }

/* Документы — одна колонка текста, сеток и лент у них нет. */
.doc .wrap { max-width: 41rem; }

/* Шапка */

.top {
  padding: 24px 0 8px;
}

.top a.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent);
  display: inline-block;
}

/* Текст */

h1 {
  font-size: clamp(2rem, 5.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 24px 0 12px;
  text-wrap: balance;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 40px 0 12px;
  text-wrap: balance;
}

h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

p { margin: 0 0 12px; }

.lede {
  font-size: 1.16rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.quiet { color: var(--secondary); }

.small {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--secondary);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

ul { margin: 0 0 12px; padding-left: 1.15em; }
li { margin-bottom: 6px; }

/* Карточки и блоки */

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

.stack { display: flex; flex-direction: column; gap: 16px; }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 16px;
}

section { margin-bottom: 24px; }

/* Форма списка ожидания */

.signup { margin: 24px 0 8px; }

/* Заголовок в начале карточки: без верхнего отступа, он у карточки свой. */
.flush { margin-top: 0; }

.field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

input[type="email"] {
  flex: 1 1 15rem;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

input[type="email"]::placeholder { color: var(--secondary); }

button, .button {
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover, .button:hover { filter: brightness(1.06); }

.consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 8px;
  font-size: 0.92rem;
}

.consent input { margin-top: 0.25em; width: 1.05em; height: 1.05em; accent-color: var(--accent); }

/* Пример сводки */

figure { margin: 16px 0 8px; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

figcaption { margin-top: 8px; }

/* Списки «что делает / чего не делает» */

.points { list-style: none; padding: 0; }

.points li {
  padding-left: 1.6em;
  position: relative;
  margin-bottom: 8px;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.points--never li::before {
  background: transparent;
  border: 1.5px solid var(--secondary);
  width: 8px;
  height: 8px;
  top: 0.6em;
}

/* Цены */

.price {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

/* Калькулятор */

.calc label {
  display: block;
  font-size: 0.92rem;
  color: var(--secondary);
  margin-bottom: 4px;
}

.calc .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.calc input[type="text"], .calc select {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.result {
  font-size: 1.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}

.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--secondary);
  overflow-x: auto;
}

/* Документы */

.doc h2 { font-size: 1.2rem; margin-top: 32px; }
.doc h3 { font-size: 1rem; }
.doc p, .doc li { font-size: 1rem; }

.doc-meta {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 16px 0 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 12px 0;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th { font-weight: 600; }

.table-scroll { overflow-x: auto; }

/* Подвал */

footer {
  margin-top: 40px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--secondary);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

footer a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Шкала отступов лендинга: 8 · 12 · 16 · 24 · 40 · 72 · 112, других значений нет. */
:root {
  --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s10: 40px; --s18: 72px; --s28: 112px;
  --band: #1f5a5f;
  --band-ink: #eef6f5;
  --band-quiet: rgba(238, 246, 245, 0.72);
  --band-soft: #e3ece9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --band: #12312f;
    --band-ink: #eaf6f5;
    --band-quiet: rgba(234, 246, 245, 0.7);
    --band-soft: #17262a;
  }
}


/* ── Главная страница ─────────────────────────────────────────────────────── */

/* Шапка */

.top { padding: var(--s6) 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 10px; display: block; }
.top nav { display: flex; gap: var(--s6); font-size: 0.95rem; }

/* Первый экран: обещание, приватность одной строкой, действие — и телефон, вырастающий из полосы */

.hero { background: var(--band); color: var(--band-ink); padding-top: var(--s18); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s10);
  align-items: end;
}

.hero-text { padding-bottom: var(--s18); }

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 var(--s4);
  text-wrap: balance;
}

.hero .lede { margin-bottom: var(--s6); color: var(--band-quiet); }
.hero .small { color: var(--band-quiet); margin-top: var(--s4); }
.hero a { color: var(--band-ink); }

.hero-shot {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.14), 0 20px 60px rgba(0, 0, 0, 0.32);
}

.button {
  display: inline-block;
  font-weight: 650;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 12px;
  padding: 13px 22px;
  text-decoration: none;
}

.hero .button { background: var(--band-ink); color: var(--band); }

/* Значок App Store и кнопка в один ряд. Высота значка 48px при минимуме Apple 40,
   свободное поле вокруг — не меньше четверти высоты, значок не перекрашиваем. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.hero-actions .button,
.hero-actions .badge { height: 54px; display: inline-flex; align-items: center; box-sizing: border-box; }
.hero-actions .button { padding: 0 22px; }
.badge { line-height: 0; }
.badge img { height: 54px; width: auto; display: block; }

/* Секции: один вертикальный шаг между ними, один внутри */

section { padding: var(--s18) 0; }
.band-soft { background: var(--band-soft); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s18); align-items: center; }
.split figure { margin: 0; }
.split img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.statement {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.026em;
  font-weight: 650;
  margin: 0 0 var(--s4);
  text-wrap: balance;
}

/* Три экрана в ряд: подпись сверху, чтобы взгляд читал утверждение до картинки */

.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s10); margin-top: var(--s10); }
.strip figure { margin: 0; }
.strip figcaption { font-weight: 600; margin-bottom: var(--s3); }
.strip img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); }

/* Плитки */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s4); margin-top: var(--s6); }
.tile { background: var(--card); border-radius: 16px; padding: var(--s6); border: 1px solid var(--border); }
.price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--s2); font-variant-numeric: tabular-nums; }

/* Список отрицаний */

.nots { list-style: none; margin: var(--s6) 0 var(--s6); padding: 0; display: grid; gap: var(--s3); font-size: 1.14rem; }
.nots li { padding-left: 1.5em; position: relative; }
.nots li::before { content: "—"; position: absolute; left: 0; opacity: 0.5; }

/* Тот же список, но перечисляет то, что есть, а не то, чего нет. */
.nots--yes { font-size: 1rem; }
.nots--yes li::before { content: "·"; }

/* Кому это — строка в первом экране, набрана крупнее подзаголовка не бывает. */
.hero .for-whom { font-size: 1.05rem; opacity: 0.85; margin-top: var(--s4); }

/* Вопросы и ответы. Свёрнуты: справку читают, когда застряли, а не подряд (NN/g, эвристика 10).
   Открытым держать ничего не надо — заголовки и есть список возражений. */
details {
  border-top: 1px solid var(--border);
  padding: var(--s4) 0;
}
details:last-of-type { border-bottom: 1px solid var(--border); }
details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  flex: none;
  opacity: 0.5;
  font-weight: 400;
}
details[open] summary::after { content: "\2212"; }
details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
details > p { margin: var(--s3) 0 0; max-width: 40rem; }

/* Значок платной функции — тот же, что в справочнике. */
.plus {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 0.15em 0.55em;
  vertical-align: 0.1em;
}

/* Звёздочка перед словом — та же, что в приложении: чипы Plus там подписаны «6 months ✦»
   (TrendsView, SummaryView). Значок на сайте и в интерфейсе должны читаться как одно и то же. */
.plus::before {
  content: "\2726";
  margin-right: 0.3em;
  text-transform: none;
}


.after-block { margin-top: var(--s6); }

footer { border-top: 1px solid var(--border); padding: var(--s10) 0 var(--s18); font-size: 0.9rem; color: var(--secondary); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin-bottom: var(--s3); }

@media (max-width: 880px) {
  .hero { padding-top: var(--s10); }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: var(--s10); }
  .hero-text { padding-bottom: 0; }
  .split figure { order: -1; }
  section { padding: var(--s10) 0; }
  .strip { grid-template-columns: 1fr; gap: var(--s6); }
  .strip img { max-width: 300px; margin: 0 auto; }
  .strip figcaption { text-align: center; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
