/* УП.Заметки — сайт продукта и документы. Токены вверху, компоненты ниже. */

:root {
  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --ink: #15231a;
  --ink-2: #2c3b31;
  --muted: #5f6f64;
  --line: #e1e7df;
  --brand: #1f4d33;
  --brand-2: #2e6a47;
  --accent: #3f9160;
  --accent-soft: #e4f1e7;
  --warn-soft: #fff4dc;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 40, 28, .05), 0 10px 34px rgba(20, 40, 28, .08);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 750; }
h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 720; }
h3 { font-size: 20px; font-weight: 680; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ── Шапка ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 246, 241, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 740; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

/* ── Кнопки ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  font: 600 16px/1 var(--font); color: #fff; text-decoration: none;
  background: var(--brand); border: 0; border-radius: 14px; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #9fb3a6; cursor: not-allowed; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

/* ── Первый экран ──────────────────────────────────────── */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--brand-2);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.lead { font-size: 20px; color: var(--ink-2); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { font-size: 14px; color: var(--muted); }

/* Макет телефона — рисуется разметкой, без чужих скриншотов и реальных данных */
.phone {
  width: min(330px, 100%); margin: 0 auto; aspect-ratio: 9 / 18.5;
  background: #0f1712; border-radius: 42px; padding: 12px;
  box-shadow: var(--shadow), 0 30px 60px rgba(15, 23, 18, .25);
}
.phone-screen {
  height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(160deg, #2a4a36, #16271d 70%);
  display: flex; flex-direction: column; padding: 22px 14px 14px; color: #eaf2ec;
}
.phone-bar { font-weight: 700; font-size: 15px; background: rgba(255,255,255,.08); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.bubble { font-size: 12.5px; line-height: 1.45; padding: 10px 12px; border-radius: 14px; max-width: 86%; margin-bottom: 9px; }
.bubble.me { align-self: flex-end; background: #3f9160; color: #fff; border-bottom-right-radius: 5px; }
.bubble.ai { align-self: flex-start; background: rgba(255,255,255,.1); border-bottom-left-radius: 5px; }
.bubble b { color: #fff; }
.chips { display: flex; gap: 6px; margin: 2px 0 10px; flex-wrap: wrap; }
.chip { font-size: 10.5px; background: rgba(255,255,255,.12); padding: 5px 8px; border-radius: 8px; }
.phone-input { margin-top: auto; font-size: 12px; color: rgba(234,242,236,.6); background: rgba(255,255,255,.08); border-radius: 12px; padding: 11px 12px; }

/* ── Секции ────────────────────────────────────────────── */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { font-size: 18px; color: var(--muted); }
.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 1px 2px rgba(20, 40, 28, .03);
}
.alt .card { background: var(--bg); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.step h3 { font-size: 17px; }
.step p { font-size: 15px; color: var(--muted); margin: 0; }

/* ── Тарифы ────────────────────────────────────────────── */
.billing-switch { display: inline-flex; background: var(--surface-2); border-radius: 14px; padding: 5px; margin-bottom: 26px; }
.billing-switch button {
  font: 600 15px/1 var(--font); border: 0; background: transparent; color: var(--ink-2);
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
}
.billing-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.save { color: var(--accent); font-size: 13px; margin-left: 4px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; border-radius: var(--radius-lg); padding: 32px; background: var(--surface); border: 1px solid var(--line); }
.plan-pro { border: 2px solid var(--brand); box-shadow: var(--shadow); position: relative; }
.plan-badge {
  position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
}
.plan h3 { font-size: 22px; margin-bottom: 4px; }
.plan-desc { color: var(--muted); font-size: 15px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; }
.price-value { font-size: 44px; font-weight: 760; letter-spacing: -.03em; }
.price-period { color: var(--muted); font-size: 16px; }
.price-sub { font-size: 14px; color: var(--muted); min-height: 22px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; }
.plan li { position: relative; padding-left: 30px; margin-bottom: 11px; font-size: 16px; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.5' fill='none' stroke='%232e6a47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.plan .btn { margin-top: auto; }
.plan-foot { font-size: 13px; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* Выделенный блок: главное об автопродлении — то, что эквайрер ищет рядом с ценой */
.notice {
  border-radius: var(--radius); padding: 22px 24px; background: var(--warn-soft);
  border: 1px solid #f1dfae; color: #4b3a12; font-size: 15.5px;
}
.notice strong { color: #3a2c0a; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice ul { padding-left: 20px; margin: 8px 0 0; }
.notice-soft { background: var(--accent-soft); border-color: #cfe5d6; color: var(--ink-2); }

/* ── Оформление подписки ───────────────────────────────── */
.buy { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.buy-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 22px; font-size: 16px; }
.buy-summary dt { color: var(--muted); }
.buy-summary dd { margin: 0; font-weight: 600; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; padding: 0; }
.field input[type="email"] {
  width: 100%; height: 50px; padding: 0 14px; font: 16px var(--font); color: var(--ink);
  border: 1px solid #cdd6cf; border-radius: 12px; background: #fff;
}
.field input[type="email"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio { display: block; border: 1px solid #cdd6cf; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 15px; }
.radio input { margin-right: 8px; accent-color: var(--brand); }
.radio:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; margin-bottom: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.form .btn { width: 100%; margin-top: 8px; }
.form-status { margin: 14px 0 0; font-size: 14.5px; min-height: 22px; }
.form-status.ok { color: var(--brand-2); }

/* ── FAQ ───────────────────────────────────────────────── */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; font-weight: 640; font-size: 18px; padding: 18px 40px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 26px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details p { color: var(--ink-2); padding-bottom: 16px; margin: 0; }

/* ── Документы ─────────────────────────────────────────── */
.doc-hero { padding: 54px 0 20px; }
.doc-hero p { color: var(--muted); max-width: 70ch; }
.doc-meta { font-size: 14px; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 20px 0 80px; align-items: start; }
.toc { position: sticky; top: 90px; font-size: 14.5px; }
.toc b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 52px); max-width: 820px; min-width: 0; }
.doc h2 { font-size: 23px; margin: 38px 0 14px; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 18px; margin: 22px 0 10px; }
.doc p, .doc li { font-size: 16.5px; color: var(--ink-2); }
.doc ol, .doc ul { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 7px; }
.doc .notice { margin: 18px 0; }

.req-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.req-table th, .req-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.req-table th { width: 38%; color: var(--muted); font-weight: 500; padding-right: 18px; }
.req-table td { font-weight: 560; word-break: break-word; }
.table-wrap { overflow-x: auto; }

/* ── Подвал ────────────────────────────────────────────── */
.site-footer { background: #13241a; color: #c9d6cd; padding: 56px 0 26px; font-size: 15px; }
.site-footer a { color: #e5ede7; }
.site-footer .brand { color: #fff; }
.site-footer .muted { color: #93a698; margin-top: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 40px; }
.footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #93a698; margin-bottom: 14px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.req-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.req-list dt { color: #93a698; }
.req-list dd { margin: 0; color: #e5ede7; }
.pay-marks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.mark { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #fff; border: 1px solid #3a5244; border-radius: 8px; padding: 6px 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid #2a3d31; margin-top: 40px; padding-top: 20px; font-size: 14px; color: #93a698;
}

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid, .buy { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .doc-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .header-row .btn-small { margin-left: auto; }
  .hero { padding: 44px 0 30px; }
  section { padding: 54px 0; }
  .grid-3, .steps, .plans, .footer-grid { grid-template-columns: 1fr; }
  .radio-row { grid-template-columns: 1fr; }
  .phone { width: min(280px, 100%); }
  .req-table th { width: 44%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
