/* Аванс Контроль — маркетинговый сайт
   Токены и компоненты — из docs/ui-kit (локальный канон) */

@font-face {
  font-family: 'Syncopate Cyr';
  src:
    url('brand/fonts/Syncopate-Bold.woff2') format('woff2'),
    url('brand/fonts/SyncopateCyr-Bold.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-primary: #3875f9;
  --brand-primary-soft: #64b4ff;
  --brand-primary-bg: #eef3fe;
  --neutral-ink: #3d3d3d;
  --neutral-ink-strong: #222222;
  --neutral-muted: #aeaeae;
  --neutral-border: #d9d9d9;
  --neutral-canvas: #f6f6f6;
  --neutral-surface: #ffffff;
  --neutral-cream: #fbf6ed;
  --status-success: #16a34a;
  --status-success-bg: #f0fdf4;
  --status-warning: #f2c534;
  --status-warning-bg: #fffbeb;
  --status-error: #dc2626;
  --radius-m: 24px;
  --radius-s: 12px;
  --radius-pill: 9999px;
  --font-ui: 'Roboto', sans-serif;
  --font-brand: 'Syncopate Cyr', sans-serif;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-ink);
  background: var(--neutral-canvas);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-primary); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ——— Buttons (kit) ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--neutral-ink);
  text-decoration: none;
  transition: filter 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-secondary {
  background: transparent;
  border-color: var(--neutral-border);
  color: var(--neutral-ink);
}
.btn-secondary:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-ghost { color: var(--brand-primary); }
.btn-ghost:hover { background: var(--brand-primary-bg); }
.btn-lg { padding: 14px 28px; font-size: 17px; }

/* ——— Pills / meter (kit) ——— */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--neutral-canvas);
  color: var(--neutral-ink);
}
.pill.fns { background: var(--brand-primary-bg); color: var(--brand-primary); }
.pill.draft { background: var(--neutral-canvas); color: var(--neutral-muted); }

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--neutral-muted);
  margin-bottom: 6px;
}
.meter {
  height: 8px;
  background: var(--neutral-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
  border-radius: var(--radius-pill);
}

.amount {
  font-size: 28px;
  font-weight: 500;
  color: var(--neutral-ink-strong);
  letter-spacing: -0.02em;
  margin: 0;
}
.muted { color: var(--neutral-muted); font-size: 14px; margin: 8px 0 16px; }

.kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 246, 246, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--neutral-border);
  background: rgba(255, 255, 255, 0.92);
}
.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}
.site-logo img { height: 32px; width: auto; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}
.site-nav a {
  color: var(--neutral-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--brand-primary); }
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--neutral-ink-strong);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(100, 180, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(56, 117, 249, 0.12), transparent 50%),
    linear-gradient(165deg, #eef3fe 0%, var(--neutral-canvas) 42%, #fbf6ed 100%);
}
.hero__atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233875F9' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__grid {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}
.hero__brand {
  font-family: var(--font-brand);
  text-transform: uppercase;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.02em;
  margin: 0 0 20px;
  line-height: 1.15;
}
.hero__title {
  font-family: var(--font-ui);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  color: var(--neutral-ink-strong);
  margin: 0 0 16px;
  line-height: 1.25;
  max-width: 18ch;
  text-transform: none;
}
.hero__lead {
  font-size: 18px;
  color: var(--neutral-ink);
  margin: 0 0 28px;
  max-width: 38ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.hero__note {
  font-size: 14px;
  color: var(--neutral-muted);
  margin: 0;
}

/* Product stage — dominant visual, not a card collage */
.hero__visual { min-height: 420px; position: relative; }
.product-stage {
  position: relative;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-stage__glow {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 117, 249, 0.22), transparent 70%);
  filter: blur(8px);
  animation: pulse-glow 5s ease-in-out infinite;
}
.receipt-sheet {
  position: relative;
  width: min(100%, 340px);
  background: var(--neutral-surface);
  border-radius: var(--radius-m);
  padding: 24px;
  box-shadow: var(--shadow-card), 0 24px 48px rgba(56, 117, 249, 0.08);
  z-index: 2;
}
.receipt-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.receipt-sheet__time { font-size: 13px; color: var(--neutral-muted); }
.receipt-sheet__merchant { margin: 0; font-size: 16px; }
.receipt-sheet__amount {
  font-size: 32px;
  font-weight: 500;
  color: var(--neutral-ink-strong);
  letter-spacing: -0.02em;
  margin: 4px 0 20px;
}
.receipt-sheet__lines {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-top: 1px solid var(--neutral-border);
}
.receipt-sheet__lines li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-border);
  font-size: 15px;
}
.receipt-sheet__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--status-success);
  background: var(--status-success-bg);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}
.balance-sheet {
  position: absolute;
  right: 0;
  top: 12px;
  width: min(248px, 74%);
  background: var(--neutral-cream);
  border-radius: var(--radius-m);
  padding: 20px;
  box-shadow: var(--shadow-card);
  z-index: 3;
}
.balance-sheet__label {
  margin: 0;
  font-size: 13px;
  color: var(--neutral-muted);
}
.balance-sheet__value {
  margin: 4px 0 8px;
  font-size: 28px;
  font-weight: 500;
  color: var(--neutral-ink-strong);
  letter-spacing: -0.02em;
}
.balance-sheet__hint {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--neutral-ink);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.reveal-float { animation: float-y 6s ease-in-out infinite; }
.reveal-float-delay { animation: float-y 6s ease-in-out 1.2s infinite; }

/* ——— Sections ——— */
.section {
  padding: 88px 0;
}
.section__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.section__inner--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.section__inner--reverse .section__copy { order: 2; }
.section__inner--reverse .demo-panel { order: 1; }

.section__head {
  max-width: 560px;
  margin-bottom: 48px;
}
.section__head h2,
.section__copy h2,
.section--charity h2,
.section--cta h2,
.section--pricing .section__head h2 {
  font-family: var(--font-brand);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 28px);
  color: var(--neutral-ink-strong);
  margin: 0 0 16px;
  line-height: 1.2;
  border: 0;
  padding: 0;
}
.section__head p,
.section__copy > p:not(.kicker):not(.section__aside) {
  margin: 0 0 20px;
  font-size: 17px;
  max-width: 42ch;
}
.section__lead {
  font-size: 18px;
  max-width: 52ch;
  margin: 0;
}
.section__aside {
  padding: 16px 18px;
  background: var(--neutral-cream);
  border-radius: var(--radius-s);
  font-size: 15px;
  margin: 0 0 24px !important;
  max-width: 42ch;
}

.plain-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plain-list li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
}
.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
}

/* How */
.section--how {
  background: var(--neutral-surface);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: none;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--brand-primary-bg);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-ui);
  text-transform: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-ink-strong);
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  color: var(--neutral-ink);
  font-size: 16px;
  max-width: 28ch;
}

/* Demo panels — product UI fragments, interaction-adjacent */
.demo-panel {
  background: var(--neutral-surface);
  border-radius: var(--radius-m);
  padding: 8px 20px;
  box-shadow: var(--shadow-card);
}
.demo-panel--cream {
  background: var(--neutral-cream);
  padding: 28px;
}
.demo-panel__eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.demo-panel__foot {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--neutral-ink);
}

.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--neutral-border);
}
.list-row:last-child { border-bottom: 0; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-primary-bg);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.list-row .title { font-weight: 500; color: var(--neutral-ink-strong); font-size: 15px; }
.list-row .sub { font-size: 13px; color: var(--neutral-muted); }
.list-row .side { text-align: right; }

/* Charity */
.section--charity {
  background:
    linear-gradient(135deg, var(--brand-primary-bg) 0%, var(--neutral-cream) 100%);
}
.section--charity .section__inner {
  max-width: 640px;
}

/* Pricing — tariff cards = selection interaction */
.section--pricing { background: var(--neutral-surface); }
.pricing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 28px;
}
.pricing-tab {
  appearance: none;
  border: 1px solid var(--neutral-border);
  background: var(--neutral-canvas);
  color: var(--neutral-ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pricing-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.pricing-tab.is-active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.tariffs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.tariffs[hidden] { display: none !important; }
.tariffs[data-pricing-panel="reports"] {
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
}
.tariff {
  background: var(--neutral-canvas);
  border-radius: var(--radius-m);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}
.tariff:hover {
  border-color: var(--neutral-border);
  transform: translateY(-2px);
}
.tariff--featured {
  background: var(--neutral-surface);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-card);
}
.tariff h3 {
  font-family: var(--font-brand);
  text-transform: uppercase;
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--neutral-ink-strong);
}
.tariff__price {
  font-size: 28px;
  font-weight: 500;
  color: var(--neutral-ink-strong);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.tariff__price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--neutral-muted);
}
.tariff ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  flex: 1;
  display: grid;
  gap: 10px;
}
.tariff li {
  font-size: 15px;
  padding-left: 0;
}
.tariff .btn { width: 100%; }
.pricing-note {
  margin: 28px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--neutral-muted);
}

/* Final CTA */
.section--cta {
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(56, 117, 249, 0.15), transparent 60%),
    var(--neutral-canvas);
  text-align: center;
}
.section--cta .section__inner { max-width: 560px; }
.section--cta p {
  margin: 0 0 28px;
  font-size: 17px;
}
.section--cta .hero__cta { justify-content: center; }

/* ——— Footer ——— */
.site-footer {
  background: var(--neutral-ink-strong);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 28px;
}
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}
.site-footer__brand p {
  margin: 16px 0 0;
  max-width: 36ch;
  font-size: 15px;
}
.site-footer__brand img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.site-footer__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 12px;
  font-weight: 500;
}
.site-footer__cols a {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 8px;
}
.site-footer__cols a:hover { color: #fff; }
.site-footer__bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* ——— Reveal on scroll ——— */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    padding-top: 32px;
    gap: 40px;
  }
  .hero {
    min-height: auto;
  }
  .hero__title { max-width: none; }
  .hero__visual { min-height: 380px; }
  .balance-sheet { right: 4px; top: 0; }
  .section__inner--split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .section__inner--reverse .section__copy,
  .section__inner--reverse .demo-panel { order: unset; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .tariffs,
  .tariffs[data-pricing-panel="reports"] {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }
  .pricing-tabs { justify-content: stretch; }
  .pricing-tab { flex: 1; min-width: 0; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--neutral-surface);
    border-bottom: 1px solid var(--neutral-border);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    margin: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--neutral-border);
    color: var(--neutral-ink);
  }
  .site-header__inner { position: relative; }
  .site-header__actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-nav-open .nav-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }
  .site-header.is-nav-open .nav-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
  .section { padding: 64px 0; }
  .hero__cta .btn { width: 100%; }
  .site-footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-float,
  .reveal-float-delay,
  .product-stage__glow { animation: none; }
}
