/* ============================================================
   Ifmoney — главная страница (front26)
   Современный лендинг сервиса учёта расходов и доходов
   ============================================================ */

:root {
  --indigo: #2f7d78;
  --violet: #2c6a86;
  --emerald: #10b981;
  --amber: #f59e0b;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #0b1120;
  --grad: linear-gradient(135deg, #356d94 0%, #2f8b7f 100%);
  --grad-btn: linear-gradient(135deg, #2f6f8f 0%, #2f8b7f 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 8px 24px -12px rgba(15, 23, 42, .25);
  --shadow-lg: 0 24px 48px -20px rgba(15, 23, 42, .35);
  --container: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .45em;
  letter-spacing: -.02em;
  font-weight: 800;
}

p { margin: 0 0 .8em; }

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--violet); }

img { max-width: 100%; display: block; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- Кнопки ---------------- */
.btn {
  --btn-pad: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-pad);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(47, 123, 130, .8);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 28px -12px rgba(47, 123, 130, .9); transform: translateY(-2px); }

.btn-ghost {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateY(-2px); }

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { color: var(--indigo); border-color: var(--indigo); transform: translateY(-2px); }

.btn-success {
  background: linear-gradient(135deg, #2f8b7f 0%, #256b63 100%);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(47, 139, 127, .8);
}
.btn-success:hover { color: #fff; box-shadow: 0 14px 28px -12px rgba(47, 139, 127, .9); transform: translateY(-2px); }

.btn-lg { --btn-pad: 13px 26px; font-size: 15.5px; }
.btn-sm { --btn-pad: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------------- Шапка ---------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(15, 23, 42, .6);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 62px;
}
.brand { display: flex; align-items: center; }
.brand img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter .25s ease;
}
.site-header.scrolled .brand img { filter: none; }

.main-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-nav a {
  color: rgba(255, 255, 255, .88);
  font-weight: 600;
  font-size: 14px;
  transition: color .2s ease, opacity .2s ease;
}
.main-nav a:hover { color: #fff; }
.site-header.scrolled .main-nav a { color: var(--ink-2); }
.site-header.scrolled .main-nav a:hover { color: var(--indigo); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.main-nav .header-actions { display: none; }

.header-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  color: #fff;
}
.site-header.scrolled .header-toggle { color: var(--ink); }
.header-toggle svg { width: 24px; height: 24px; display: block; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 102px 0 38px;
  color: #fff;
  background: radial-gradient(1200px 600px at 15% -10%, #3a7d8c 0%, transparent 60%),
              radial-gradient(1000px 700px at 100% 0%, #2f8b7f 0%, transparent 55%),
              linear-gradient(160deg, #2b4a63 0%, #2e6b6a 50%, #14262e 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
}
.hero::before { width: 380px; height: 380px; background: #7dd3fc; top: -120px; left: -100px; }
.hero::after { width: 340px; height: 340px; background: #5eead4; bottom: -140px; right: -80px; opacity: .35; }

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .25);
}

.hero h1 { color: #fff; font-size: clamp(27px, 4vw, 42px); margin-bottom: 14px; }
.hero h1 .accent {
  background: linear-gradient(120deg, #bae6fd, #99f6e4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  color: rgba(255, 255, 255, .85);
  max-width: 500px;
  margin-bottom: 22px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-checks {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  list-style: none; padding: 0; margin: 0;
  color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 500;
}
.hero-checks li { display: flex; align-items: center; gap: 6px; }
.hero-checks svg { width: 15px; height: 15px; flex: none; color: #6ee7b7; }

/* Мокап с приложением */
.showcase { position: relative; z-index: 2; }
.browser {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform .5s ease;
}
.showcase:hover .browser { transform: perspective(1400px) rotateY(0) rotateX(0); }
.browser-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px;
  background: #111a2e;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.browser-bar i:nth-child(1) { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-url {
  margin-left: 10px; flex: 1;
  background: rgba(255, 255, 255, .08);
  border-radius: 6px;
  font-size: 11.5px; color: rgba(255, 255, 255, .6);
  padding: 4px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { width: 100%; height: auto; display: block; }

/* Плавающая карточка статистики */
.float-card {
  position: absolute;
  right: -12px; bottom: -18px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 13px 15px;
  width: 186px;
  color: var(--ink);
  z-index: 3;
}
.float-card .fc-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.float-card .fc-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.float-card .fc-bar { height: 7px; border-radius: 999px; background: var(--line); margin-top: 10px; overflow: hidden; }
.float-card .fc-bar span { display: block; height: 100%; width: 68%; border-radius: 999px; background: var(--grad); }
.float-card .fc-note { font-size: 11.5px; color: var(--emerald); font-weight: 700; margin-top: 7px; }

/* ---------------- Секции ---------------- */
.section { padding: 34px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #cbd5e1; }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--indigo);
  margin-bottom: 10px;
}
.section-dark .eyebrow { color: #7dd3fc; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 10px; }
.section-head p { font-size: 15.5px; color: var(--muted); margin: 0; }
.section-dark .section-head p { color: #94a3b8; }

/* ---------------- Возможности ---------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #bfe3dd; }
.feature .fi {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eaf3fb, #e6f6f3);
  color: var(--indigo);
  margin-bottom: 14px;
}
.feature .fi svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------- Шаги ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.step .num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}
.step h3 { font-size: 16px; margin-bottom: 5px; }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------- Мобильные экраны ---------------- */
.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
}
.phone-card { text-align: center; }
.phone-card h3 { font-size: 15.5px; margin: 14px 0 4px; }
.phone-card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.phone-frame {
  position: relative;
  width: 208px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 32px;
  padding: 9px;
  background: #0b1120;
  box-shadow: var(--shadow-lg);
  border: 1px solid #1e293b;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 7px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; border-radius: 999px;
  background: #334155;
}
.phone-frame img { border-radius: 24px; width: 100%; }

/* ---------------- CTA полоса ---------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 120%, rgba(255, 255, 255, .25), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { color: #fff; font-size: clamp(21px, 2.6vw, 30px); position: relative; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, .9); font-size: 15.5px; max-width: 520px; margin: 0 auto 20px; position: relative; }
.cta-band .btn { position: relative; }
.cta-band .btn-outline:hover { color: var(--indigo); }

/* ---------------- Подвал ---------------- */
.site-footer {
  background: var(--bg-dark);
  color: #94a3b8;
  padding: 38px 0 24px;
  font-size: 13.5px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.footer-brand { display: flex; align-items: center; }
.footer-brand img { height: 26px; filter: brightness(0) invert(1); }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a { color: #94a3b8; font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { padding-top: 16px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-bottom a { color: #cbd5e1; }

/* ---------------- Модальные окна ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal.open { display: flex; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: pop .25s cubic-bezier(.2, .8, .3, 1.1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 4px;
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
  background: var(--bg-soft);
  border: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  display: grid; place-items: center;
  transition: background .2s ease, color .2s ease;
  flex: none;
}
.modal-close:hover { background: #eaf6f4; color: var(--indigo); }
.modal-body { padding: 6px 20px 2px; }
.modal-footer { padding: 8px 20px 18px; display: flex; gap: 10px; }
.modal-footer .btn { flex: 1; }
.modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

/* Поля формы */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.field .control { position: relative; }
.field .control svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #94a3b8; pointer-events: none;
}
.field input[type=text],
.field input[type=email],
.field input[type=password] {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--indigo);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 125, 120, .18);
}
.field .error {
  display: none;
  color: #dc2626;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 600;
}
.field.invalid input { border-color: #f87171; background: #fef2f2; }
.field.invalid .error { display: block; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 10px;
  cursor: pointer;
  line-height: 1.45;
}
.check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--indigo); flex: none; }

.form-note { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.form-note a { font-weight: 700; }

.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.captcha-img {
  height: 40px; flex: 1;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
}
.captcha-img img { height: 100%; width: auto; }
.captcha-reload {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  transition: color .2s ease, border-color .2s ease; flex: none;
}
.captcha-reload:hover { color: var(--indigo); border-color: var(--indigo); }
.captcha-reload svg { width: 18px; height: 18px; }

.form-alert {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.form-alert.show { display: block; }
.form-alert.ok { background: #ecfdf5; color: #047857; }
.form-alert.err { background: #fef2f2; color: #b91c1c; }

.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 12.5px; margin: 4px 0 12px;
}
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------------- Cookie ---------------- */
.cookie {
  position: fixed;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 900;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: none;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
.cookie.show { display: flex; }
.cookie p { margin: 0; color: var(--ink-2); }
.cookie-actions { display: flex; gap: 8px; flex: none; }

/* ---------------- Анимации ---------------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Адаптив ---------------- */
@media (max-width: 992px) {
  .hero { padding: 90px 0 30px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .showcase { max-width: 640px; }
  .browser { transform: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .phones { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    padding: 12px 18px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { color: var(--ink-2) !important; padding: 10px 6px; border-radius: 10px; font-size: 14px; }
  .main-nav a:hover { background: var(--bg-soft); }
  .header-inner > .header-actions { display: none; }
  .main-nav.open .header-actions { display: flex; padding: 8px 6px 0; width: 100%; }
  .main-nav.open .header-actions .btn { flex: 1; }
  .header-toggle { display: block; margin-left: auto; }

  .section { padding: 26px 0; }
  .section-head { margin-bottom: 22px; }
  .features { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 20px; }
  .float-card { display: none; }
  .cookie { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: center; }
}
