/* ==========================================================
   Смета — лендинг
   Мобильная вёрстка 1:1 по прототипу, десктоп — расширение
   той же сетки (media-запросы внизу файла).
   ========================================================== */

/* Светлая тема по умолчанию, тёмная — по настройке системы.
   Первый экран (hero) тёмный всегда. */
:root {
  --bg: #ffffff;
  --bg2: #f5f5f5;
  --bg3: #ebebeb;
  --border: #e0e0e0;
  --fg: #0f0f0f;
  --fg2: #6b6b6b;
  --fg3: #aaa;
  --accent: #0f0f0f;
  --accent-fg: #ffffff;
  --card-bg: #f9f9f9;
  --hero-bg: #111111;
  --hero-fg: #ffffff;
  --hero-fg2: rgba(255, 255, 255, 0.55);

  --container: 1080px;
  color-scheme: light;
  font-family: 'Roboto', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0f;
    --bg2: #1a1a1a;
    --bg3: #242424;
    --border: #2e2e2e;
    --fg: #f0f0f0;
    --fg2: #8a8a8a;
    --fg3: #555;
    --accent: #f0f0f0;
    --accent-fg: #0f0f0f;
    --card-bg: #1a1a1a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #242424;
  --border: #2e2e2e;
  --fg: #f0f0f0;
  --fg2: #8a8a8a;
  --fg3: #555;
  --accent: #f0f0f0;
  --accent-fg: #0f0f0f;
  --card-bg: #1a1a1a;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.5;
}

body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2 { font: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

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

/* ---------- NAV ---------- */
.nav {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 10;
  padding: 18px 20px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hero-fg);
}

.nav-login {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-fg);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.nav-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ---------- HERO ---------- */
.hero {
  background: var(--hero-bg);
  padding: calc(100px + env(safe-area-inset-top, 0px)) 24px 44px;
  position: relative;
  overflow: hidden;
}

/* тонкая сетка-текстура */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  width: fit-content;
}
.hero-tag-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--hero-fg);
  text-wrap: balance;
}

.hero-sub {
  font-size: 15px;
  color: var(--hero-fg2);
  line-height: 1.65;
  font-weight: 500;
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #0f0f0f;
  border: none;
  border-radius: 14px;
  padding: 17px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-trial {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  text-align: center;
}

/* ---------- ЧТО ВНУТРИ ---------- */
.widgets {
  padding: 32px 20px;
  background: var(--bg);
}

.widgets-label,
.preview-label,
.pricing-label,
.forwhom-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg2);
}

.widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget-icon {
  width: 38px;
  height: 38px;
  background: var(--bg3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg);
  font-weight: 700;
}

.widget-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.widget-desc {
  font-size: 12px;
  color: var(--fg2);
  font-weight: 500;
  line-height: 1.5;
}

/* ---------- ПРИМЕР СМЕТЫ ---------- */
.preview {
  padding: 0 20px 32px;
  background: var(--bg);
}

.preview-label { margin-bottom: 14px; }

.mockup-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mockup-obj { font-size: 14px; font-weight: 800; }
.mockup-date { font-size: 12px; color: var(--fg2); font-weight: 500; }

.mockup-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.mockup-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 9px;
}
.mockup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.mockup-item:last-child { border-bottom: none; }
.mockup-item-name { color: var(--fg); font-weight: 500; max-width: 60%; }
.mockup-item-sum { font-weight: 700; font-variant-numeric: tabular-nums; }

.mockup-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 12px;
}
.mockup-total-label { font-size: 12px; font-weight: 700; }
.mockup-total-value { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- ДЛЯ КОГО ---------- */
.forwhom {
  padding: 32px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.forwhom-title,
.pricing-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.forwhom-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fw-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fw-num {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--fg2);
  flex-shrink: 0;
}

.fw-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.fw-desc {
  font-size: 13px;
  color: var(--fg2);
  font-weight: 500;
  line-height: 1.55;
}

/* ---------- ТАРИФ ---------- */
.pricing {
  padding: 32px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.price-card {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
}

.price-amount { font-size: 46px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.price-period { font-size: 13px; opacity: 0.5; font-weight: 500; margin-top: 4px; }

.price-features { display: flex; flex-direction: column; gap: 9px; }
.price-feat {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}
.price-check {
  width: 19px;
  height: 19px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.btn-white {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-white:hover { opacity: 0.85; }

.price-card-light {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-card-light-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.price-amount-dark {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
}

.price-period-dark {
  font-size: 12px;
  color: var(--fg2);
  font-weight: 500;
  margin-top: 4px;
}

.price-month-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg2);
  background: var(--bg3);
  border-radius: 20px;
  padding: 5px 12px;
  white-space: nowrap;
}

.btn-dark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-dark:hover { opacity: 0.85; }

.trial-note {
  text-align: center;
  font-size: 12px;
  color: var(--fg2);
  font-weight: 500;
}

/* ---------- ОТЗЫВЫ / БЛОГ / FAQ: общие подписи ---------- */
.reviews-label,
.blog-label,
.faq-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: 16px;
}

/* ---------- ОТЗЫВЫ ---------- */
.reviews-section {
  padding: 32px 20px 16px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  font-weight: 500;
  flex: 1;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}

.review-role {
  font-size: 12px;
  color: var(--fg3);
  font-weight: 500;
}

@media (max-width: 680px) {
  .reviews-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    scroll-padding-left: 20px;
  }
  .reviews-grid::-webkit-scrollbar { display: none; }
  .reviews-grid::after {
    content: '';
    flex: 0 0 4px;
  }
  .review-card {
    flex: 0 0 80vw;
    scroll-snap-align: start;
  }
}

/* ---------- БЛОГ ---------- */
.blog-section {
  padding: 16px 20px 32px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.blog-card:hover { border-color: var(--fg3); }

.blog-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg3);
}

.blog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-desc {
  font-size: 13px;
  color: var(--fg2);
  font-weight: 500;
  line-height: 1.55;
}

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

/* ---------- FAQ ---------- */
.faq-section {
  padding: 16px 20px 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: var(--bg2); }

.faq-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--fg3);
  font-weight: 400;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 40px 20px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: 14px;
}

.footer-nav-links,
.footer-doc-links,
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  font-size: 13px;
  color: var(--fg2);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
a.footer-link:hover { color: var(--fg); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-copy {
  font-size: 12px;
  color: var(--fg3);
  font-weight: 500;
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ==========================================================
   ДЕСКТОП / ПЛАНШЕТ
   Те же блоки и стили, только шире сетки.
   ========================================================== */

@media (min-width: 768px) {
  .nav { padding: 24px 32px; }

  .hero { padding: 140px 32px 72px; }
  .hero-inner { gap: 24px; }
  .hero-title { font-size: 56px; max-width: 760px; }
  .hero-sub { font-size: 17px; max-width: 560px; }

  .cta-group { flex-direction: row; }
  .btn-primary,
  .btn-ghost { width: auto; padding-left: 32px; padding-right: 32px; }
  .hero-trial { text-align: left; }

  .widgets,
  .forwhom,
  .pricing { padding: 56px 32px; }
  .preview { padding: 0 32px 56px; }
  .reviews-section { padding: 56px 32px 16px; }
  .blog-section,
  .faq-section { padding: 16px 32px 56px; }
  .footer { padding: 48px 32px 56px; }

  .section-stack { gap: 20px; }

  .widget-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .widget { padding: 22px 20px; }

  .mockup-card { max-width: 640px; }

  .forwhom-title,
  .pricing-title { font-size: 34px; }
  .forwhom-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .price-cards {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .trial-note { text-align: left; }
}

@media (min-width: 1024px) {
  .hero { padding-top: 160px; padding-bottom: 88px; }
  .hero-title { font-size: 64px; }
  .forwhom-cards { grid-template-columns: repeat(4, 1fr); }
}
