/* ============================================================
   Task2Do — лендинг. Швейцарский «редакционный» минимализм.
   Тот же стиль, что и у CRM-шаблона.
   ============================================================ */

:root {
  --paper: #fbfaf6;
  --paper-raised: #ffffff;
  --sidebar-bg: #f9f9f9;

  --line: #e5e5e5;
  --line-strong: #d6d3cc;

  --ink: #161616;
  --ink-full: #000000;
  --muted: #66635c;
  --muted-2: #8f8b83;

  --accent: #d7262e;
  --on-ink: #ffffff;
  --btn-hover: #2b2b2b;

  --sans: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --header-h: 68px;
  --content-max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--ink-full);
  color: var(--on-ink);
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink-full);
}

.btn-lg {
  height: 48px;
  padding: 0 26px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--ink-full);
}

/* ---------- Логотип ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: block;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-full);
}

.accent {
  color: var(--accent);
}

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 400;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink-full);
}

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

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--paper-raised);
  border-left: 1px solid var(--line);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.28s;
}

.mobile-nav.open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}

.mobile-nav-close:hover {
  color: var(--ink-full);
  border-color: var(--ink-full);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
}

.mobile-nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 300;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-links a:hover {
  color: var(--ink-full);
}

.mobile-nav-actions {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nav-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   БАННЕР
   ============================================================ */
.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 96px 24px 72px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

.hero-title {
  margin: 0;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-full);
}

.hero-title-sub {
  display: block;
  font-weight: 300;
  font-size: 56px;
}

.brand-word {
  font-weight: 700;
}

.hero-text {
  margin: 28px 0 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}

.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 64px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  max-width: 640px;
}

.stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 24px;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-full);
  line-height: 1.1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   СЕКЦИИ
   ============================================================ */
.section {
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--sidebar-bg);
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 24px;
}

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

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 48px;
}

.section-index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  padding-top: 6px;
  flex: 0 0 auto;
}

.section-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink-full);
}

.section-sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Возможности ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.feature {
  padding: 30px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature svg {
  color: var(--ink-full);
}

.feature:nth-child(3n + 2) {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.feature:nth-child(n + 4) {
  border-bottom: 0;
}

.feature-title {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-full);
}

.feature-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Цены ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trial-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 28px;
  border: 1px solid var(--ink-full);
  background: var(--paper-raised);
}

.trial-badge {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-ink);
  background: var(--accent);
  padding: 5px 10px;
  white-space: nowrap;
}

.trial-banner-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.trial-banner-text strong {
  font-weight: 600;
  color: var(--ink-full);
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.price-card-featured {
  border-color: var(--ink-full);
  border-width: 1px;
}

.price-tag {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--ink-full);
  color: var(--on-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.price-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-full);
}

.price-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-amount {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-full);
  line-height: 1;
}

.price-period {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.price-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink);
}

.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  background: var(--ink-full);
}

.tariff-desc {
  margin: -8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-full);
}

.faq-question svg {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  margin: 0;
  padding: 0 0 22px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 640px;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}

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

/* ============================================================
   МОДАЛЬНЫЕ ОКНА
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-full);
}

.modal-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.modal-close:hover {
  color: var(--ink-full);
  border-color: var(--ink-full);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-raised);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.field-input::placeholder {
  color: var(--muted-2);
}

.field-input:focus {
  border-color: var(--ink-full);
}

/* ---------- Согласие (чекбокс) ---------- */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  cursor: pointer;
  position: relative;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.consent input[type="checkbox"]:checked {
  background: var(--ink-full);
  border-color: var(--ink-full);
}

.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--on-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent a:hover {
  color: var(--ink-full);
}

/* ---------- Ошибки формы ---------- */
.form-error {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--accent);
  background: rgba(215, 38, 46, 0.06);
  border: 1px solid rgba(215, 38, 46, 0.25);
}

.form-error[hidden] {
  display: none;
}

.form-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--line);
}

.form-note[hidden] {
  display: none;
}

/* ---------- Яндекс SmartCaptcha ---------- */
.captcha {
  min-height: 40px;
}

/* ---------- Правовая информация (модалка) ---------- */
.modal-overlay-top {
  z-index: 110;
}

.modal-wide {
  max-width: 640px;
}

.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.legal-body h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-full);
}

.legal-body h3:not(:first-child) {
  margin-top: 22px;
}

.legal-body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.legal-body ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.legal-body li {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- Баннер cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--paper-raised);
  border-top: 1px solid var(--line-strong);
  padding: 16px 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 640px;
}

.cookie-text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-text a:hover {
  color: var(--ink-full);
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .header-actions .btn {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero-inner {
    padding: 64px 24px 48px;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-title-sub {
    font-size: 38px;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature:nth-child(3n + 2) {
    border-left: 0;
    border-right: 0;
  }

  .feature:nth-child(2n) {
    border-left: 1px solid var(--line);
  }

  .feature:nth-child(n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .feature:nth-child(n + 6) {
    border-bottom: 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-title-sub {
    font-size: 32px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    flex-direction: column;
  }

  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature:nth-child(2n) {
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .section-inner {
    padding: 56px 20px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions .btn {
    flex: 1 1 auto;
  }
}
