/*
 * Оформление лендинга.
 *
 * Токены повторяют web-frontend/src/app/styles/tokens.css, чтобы визитка и
 * приложение выглядели как один продукт. Внешних шрифтов и картинок нет:
 * Content-Security-Policy этого vhost'а запрещает запросы наружу, да и
 * страница должна открываться без сети.
 */

:root {
  --font-sans:
    "Inter Variable", "Segoe UI", system-ui, -apple-system, sans-serif;

  --color-canvas: #f5f7fa;
  --color-canvas-elevated: #eef2f7;
  --color-surface: #ffffff;
  --color-surface-subtle: #f8fafc;
  --color-surface-muted: #f1f5f9;

  --color-ink: #0f172a;
  --color-ink-secondary: #475569;
  --color-ink-muted: #64748b;
  --color-ink-inverse: #f8fafc;

  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  --color-accent: #1d4ed8;
  --color-accent-hover: #1e40af;
  --color-accent-soft: #eff6ff;
  --color-accent-ink: #ffffff;

  --color-success: #047857;
  --color-success-soft: #ecfdf5;
  --color-warning: #b45309;
  --color-warning-soft: #fffbeb;
  --color-teal: #0d9488;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 6%);
  --shadow-md: 0 8px 24px rgb(15 23 42 / 8%);
  --shadow-lg: 0 24px 64px rgb(15 23 42 / 16%);

  --container: 1120px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  /* Якорные ссылки не уезжают под липкую шапку. */
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1 {
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* Доступность ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Шапка ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 255 255 / 82%);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  font-weight: 650;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-text {
  font-size: 0.9375rem;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 0.875rem;
}

.header-nav a {
  color: var(--color-ink-secondary);
}

.header-nav a:hover {
  color: var(--color-ink);
  text-decoration: none;
}

.header-inner > .button {
  margin-left: auto;
}

@media (min-width: 880px) {
  .header-nav {
    display: flex;
    margin-left: auto;
  }

  .header-inner > .button {
    margin-left: 8px;
  }
}

/* Полоса прогресса чтения: тонкая, не отвлекает. */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-accent);
  transition: width 80ms linear;
}

/* Кнопки ------------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: var(--color-accent-hover);
}

.button-primary:active {
  transform: translateY(1px);
}

.button-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-ink);
}

.button-secondary:hover {
  border-color: var(--color-ink-muted);
  background: var(--color-surface-subtle);
}

.button-sm {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

/* Герой ------------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 6vw, 84px) 0 clamp(36px, 5vw, 72px);
  background:
    radial-gradient(
      60rem 32rem at 12% -20%,
      rgb(29 78 216 / 10%),
      transparent 62%
    ),
    radial-gradient(
      46rem 28rem at 100% 0%,
      rgb(13 148 136 / 8%),
      transparent 58%
    ),
    var(--color-canvas);
}

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

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.lead {
  margin-top: 20px;
  max-width: 56ch;
  color: var(--color-ink-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 16px;
  color: var(--color-ink-muted);
  font-size: 0.8125rem;
}

/* Карточка с цепочкой документов. */
.hero-card {
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.card-head {
  display: flex;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
}

.dot-blue {
  background: var(--color-accent);
}
.dot-teal {
  background: var(--color-teal);
}
.dot-slate {
  background: var(--color-border-strong);
}

.chain {
  display: grid;
  gap: 2px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.chain-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
}

/* Вертикальная линия между шагами. */
.chain-item:not(.chain-item-last)::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 44px;
  bottom: -2px;
  width: 1px;
  background: var(--color-border);
}

.chain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.chain-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ink);
}

.chain-meta {
  margin-top: 2px;
  color: var(--color-ink-muted);
  font-size: 0.78125rem;
  font-variant-numeric: tabular-nums;
}

/* Полоса статуса ---------------------------------------------------------- */

.status-band {
  padding: 28px 0;
  background: var(--color-warning-soft);
  border-top: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
}

.status-inner {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 880px) {
  .status-inner {
    grid-template-columns: 200px 1fr;
    gap: 28px;
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  width: fit-content;
  background: var(--color-surface);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-full);
  color: #92400e;
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-warning);
}

.status-text h2 {
  font-size: 1.125rem;
  line-height: 1.35;
  color: #78350f;
}

.status-text p {
  margin-top: 8px;
  max-width: 78ch;
  color: #78350f;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.status-text strong {
  font-weight: 650;
}

/* Секции ------------------------------------------------------------------ */

.section {
  padding: clamp(48px, 6vw, 84px) 0;
}

.section-muted {
  background: var(--color-canvas-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-head {
  max-width: 68ch;
  margin-bottom: 36px;
}

.section-lead {
  margin-top: 12px;
  color: var(--color-ink-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.grid {
  display: grid;
  gap: 18px;
}

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

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Возможности ------------------------------------------------------------- */

.feature {
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  font-size: 1.125rem;
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  color: var(--color-ink-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Клиенты ----------------------------------------------------------------- */

.client-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.client-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.client-tag {
  color: var(--color-ink-muted);
  font-size: 0.78125rem;
}

.client-card p {
  color: var(--color-ink-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.client-link {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
}

.client-link-muted {
  color: var(--color-ink-muted);
}

/* Шаги -------------------------------------------------------------------- */

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

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--color-ink-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Тарифы ------------------------------------------------------------------ */

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.price-card-featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.price-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price {
  color: var(--color-ink-secondary);
  font-size: 0.875rem;
}

.price span {
  color: var(--color-ink);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-ink-secondary);
  font-size: 0.9375rem;
}

.price-list li {
  position: relative;
  padding-left: 22px;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.price-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  color: var(--color-ink-muted);
  font-size: 0.8125rem;
}

/* Чего пока нет ----------------------------------------------------------- */

.todo-list {
  display: grid;
  gap: 10px;
  max-width: 78ch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-list li {
  position: relative;
  padding: 12px 16px 12px 42px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-ink-secondary);
  font-size: 0.9375rem;
}

.todo-list li::before {
  content: "—";
  position: absolute;
  left: 18px;
  color: var(--color-ink-muted);
}

/* Призыв ------------------------------------------------------------------ */

.cta {
  padding: clamp(40px, 5vw, 64px) 0;
  background:
    radial-gradient(
      40rem 24rem at 0% 0%,
      rgb(29 78 216 / 16%),
      transparent 60%
    ),
    var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.cta-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 880px) {
  .cta-inner {
    grid-template-columns: 1.3fr 0.7fr;
  }

  .cta-actions {
    justify-content: flex-end;
  }
}

.cta h2 {
  margin-bottom: 12px;
}

.cta p {
  max-width: 62ch;
  color: var(--color-ink-secondary);
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Подвал ------------------------------------------------------------------ */

.site-footer {
  padding: 40px 0 48px;
  background: var(--color-canvas-elevated);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 880px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-name {
  font-weight: 650;
}

.footer-note {
  margin-top: 2px;
  color: var(--color-ink-muted);
  font-size: 0.8125rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.875rem;
}

.footer-nav a {
  color: var(--color-ink-secondary);
}

.footer-legal {
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-ink-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Тёмная тема: следует системной настройке. */
@media (prefers-color-scheme: dark) {
  :root {
    --color-canvas: #0b1220;
    --color-canvas-elevated: #0f172a;
    --color-surface: #111827;
    --color-surface-subtle: #0f172a;
    --color-surface-muted: #1e293b;

    --color-ink: #e5e7eb;
    --color-ink-secondary: #cbd5e1;
    --color-ink-muted: #94a3b8;

    --color-border: #273449;
    --color-border-strong: #334155;

    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-accent-soft: #172554;
    --color-accent-ink: #0b1220;

    --color-success: #34d399;
    --color-teal: #2dd4bf;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 8px 24px rgb(0 0 0 / 45%);
    --shadow-lg: 0 24px 64px rgb(0 0 0 / 55%);
  }

  .site-header {
    background: rgb(17 24 39 / 82%);
  }

  .status-band {
    background: #3b2a08;
    border-color: #78350f;
  }

  .status-text h2,
  .status-text p {
    color: #fde68a;
  }

  .status-badge {
    background: #111827;
    border-color: #78350f;
    color: #fcd34d;
  }

  .hero {
    background:
      radial-gradient(
        60rem 32rem at 12% -20%,
        rgb(96 165 250 / 12%),
        transparent 62%
      ),
      radial-gradient(
        46rem 28rem at 100% 0%,
        rgb(45 212 191 / 8%),
        transparent 58%
      ),
      var(--color-canvas);
  }

  .cta {
    background:
      radial-gradient(
        40rem 24rem at 0% 0%,
        rgb(96 165 250 / 14%),
        transparent 60%
      ),
      var(--color-surface);
  }
}

/* Печать: без шапки и кнопок, только текст. */
@media print {
  .site-header,
  .hero-actions,
  .cta-actions,
  .read-progress {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
