/* Есепшім — лендинг. Цвета — из приложения (app/lib/theme.dart), шрифт — Onest. */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f3ee;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #5a5f68;
  --line: #e3e1da;
  --accent: #0b6e62;
  --accent-dark: #075248;
  --accent-soft: #e3f1ee;
  --accent-on-dark: #cfe7e2;
  --warn-text: #8a4304;
  --warn-soft: #fcefd9;
  --critical: #a8321f;
  --gold: #e7b54b;
  --radius: 18px;
  --gutter: 20px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  hyphens: auto;
}

h1 {
  font-size: clamp(30px, 7.4vw, 52px);
  font-weight: 750;
}

h2 {
  font-size: clamp(24px, 5.2vw, 34px);
  font-weight: 700;
}

h3 {
  font-size: 19px;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

section {
  padding: 56px 0;
}

/* Шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 243, 238, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.lang {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

/* Кнопки */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.actions.center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 14px;
  font: inherit;
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-wide {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn .tg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

/* Первый экран */

.hero {
  padding: 40px 0 48px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 15px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 36em;
}

.note {
  font-size: 15px;
  color: var(--muted);
}

/* Пример экрана: сверка с КГД */

.mock {
  max-width: 420px;
  width: 100%;
  justify-self: center;
  padding: 18px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -28px rgba(11, 110, 98, 0.45);
}

.mock-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.mock-tax {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
}

.mock-tax span {
  color: var(--accent-on-dark);
  font-size: 15px;
}

.mock-tax strong {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.mock-card {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.mock-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.mock-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mock-row span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.mock-row strong {
  font-size: 18px;
}

.mock-diff {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn-text);
  font-size: 14px;
  line-height: 1.45;
}

/* Сроки */

.deadlines {
  padding: 0 0 24px;
}

.h-small {
  font-size: 17px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 12px;
}

.deadline-grid {
  display: grid;
  gap: 12px;
}

.deadline {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.deadline span {
  color: var(--muted);
  font-size: 15px;
}

.deadline strong {
  font-size: 22px;
  font-weight: 700;
}

/* Что сделает */

.feature-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.feature {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.feature-focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--accent-soft);
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Как это будет */

.steps {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.step-list {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Данные и подпись */

.trust-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.trust-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 550;
}

.check {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Вопросы */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 36px 16px 0;
  position: relative;
  font-weight: 650;
  font-size: 18px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 26px;
  font-weight: 400;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* Финальный призыв */

.final {
  background: var(--accent);
  color: #fff;
}

.final p {
  color: var(--accent-on-dark);
}

.final .btn-primary {
  background: #fff;
  color: var(--accent);
}

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

.final .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.final .btn-secondary:hover {
  border-color: #fff;
}

.final :focus-visible {
  outline-color: #fff;
}

/* Форма */

.lead-form-section {
  scroll-margin-top: 64px;
}

.form-intro {
  color: var(--muted);
}

#lead-form {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.field label {
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
}

#phone {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  font: inherit;
  font-size: 19px;
  border: 1px solid #d6d3ca;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}

#phone[aria-invalid="true"] {
  border-color: var(--critical);
}

.q {
  border: 0;
  margin: 22px 0 0;
  padding: 0;
  min-width: 0;
}

.q legend {
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}

.optional {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
}

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

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 15px;
  cursor: pointer;
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0 6px;
  font-size: 15px;
  cursor: pointer;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--accent);
}

.field-error {
  color: var(--critical);
  font-size: 14px;
  margin: 6px 0 0;
}

#lead-form .btn-wide {
  margin-top: 18px;
}

.form-status {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--muted);
  min-height: 1.5em;
}

.form-status.error {
  color: var(--critical);
}

.form-done {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.form-done[hidden],
.field-error[hidden],
#lead-form[hidden] {
  display: none;
}

.form-done p {
  margin: 0;
}

/* Подвал */

.foot {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.foot p {
  margin: 0 0 6px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px !important;
}

/* Юридические страницы */

.legal {
  padding: 40px 0 56px;
}

.legal h1 {
  font-size: clamp(28px, 6vw, 40px);
}

.legal h2 {
  font-size: 21px;
  margin-top: 1.6em;
}

.legal .version {
  color: var(--muted);
}

.legal ul {
  padding-left: 1.2em;
}

.legal li {
  margin-bottom: 0.4em;
}

/* Корень и 404 */

.root .root-choice {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.root .root-choice img {
  border-radius: 18px;
  margin-bottom: 16px;
}

/* Шире телефона */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  section {
    padding: 80px 0;
  }

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

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

  .feature-focus {
    grid-column: 1 / -1;
  }

  .trust-list {
    grid-template-columns: repeat(3, 1fr);
  }

  #lead-form {
    padding: 32px;
  }
}

@media (min-width: 980px) {
  .hero {
    padding: 72px 0 80px;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-focus {
    grid-column: span 2;
  }

  .step-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .step-list li {
    padding: 56px 0 0;
    align-items: flex-start;
  }
}
