/* =========================================================
   Альфа.Пуск — Design System
   Официальная стилистика Альфа-Банка
   Red #EF3124 · Ink #1D1D1B · Paper #F4F1EA
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand */
  --red: #EF3124;
  --red-600: #D81E12;
  --red-050: #FEECEA;
  --ink: #1D1D1B;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --paper: #F4F1EA;
  --paper-2: #EDE9DE;

  /* Accents (из презентаций) */
  --lime: #C6F439;
  --lime-ink: #A7D400;
  --blue: #2B6EF2;
  --violet: #7B61FF;
  --green: #5A8A16;

  /* Neutrals */
  --gray-900: #17171A;
  --gray-700: #4B4B52;
  --gray-500: #7A7A82;
  --gray-400: #9A9AA2;
  --gray-300: #C9C9CE;
  --gray-200: #E4E2DC;
  --gray-100: #F2F0EA;
  --line: rgba(29,29,27,.12);
  --line-dark: rgba(255,255,255,.14);

  /* Shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(20,20,20,.06);
  --shadow-md: 0 12px 30px rgba(20,20,20,.10);
  --shadow-lg: 0 30px 70px rgba(20,20,20,.18);

  --container: 1200px;
  --header-h: 72px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------ Reset ------------------ */
* { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Golos Text', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* защита от случайного горизонтального скролла на узких экранах */
}
/* Grid/flex дети не должны раздувать трек своим контентом */
.grid > *, .hero__in > *, .ai-split > *, .control-split > *,
.cockpit-grid > *, .journey__grid > *, .fund-grid > *,
.ai-flow > *, .money-grid > *, .value-grid > * { min-width: 0; }
h1, h2, h3, h4 { overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.04; }
p { margin: 0; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

::selection { background: var(--red); color: #fff; }

/* ------------------ Layout ------------------ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section-head { max-width: 820px; margin-bottom: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--red); border-radius: 2px; }
.eyebrow.is-lime { color: var(--lime-ink); }
.eyebrow.is-lime::before { background: var(--lime); }
.eyebrow.is-blue { color: var(--blue); } .eyebrow.is-blue::before { background: var(--blue); }
.eyebrow.is-violet { color: var(--violet); } .eyebrow.is-violet::before { background: var(--violet); }

.h1 { font-size: clamp(40px, 6vw, 76px); }
.h2 { font-size: clamp(30px, 4.4vw, 52px); }
.h3 { font-size: clamp(22px, 2.6vw, 30px); }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--gray-700); line-height: 1.5; font-weight: 500; }
.muted { color: var(--gray-500); }
.mono { font-variant-numeric: tabular-nums; }

.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
.center { text-align: center; }
.mx-auto { margin-left:auto; margin-right:auto; }

/* ------------------ Buttons ------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { padding: 18px 34px; font-size: 17px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { filter: brightness(.96); }
.btn-white { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-white:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
/* «Открыть в приложении» — акцентная кнопка PWA */
.btn-app { background: linear-gradient(135deg, var(--red), var(--red-600)); color: #fff; border: none; box-shadow: 0 6px 18px rgba(239,49,36,.30); }
.btn-app:hover { filter: brightness(1.07); }
.btn-app .spark { width: 16px; height: 16px; flex: none; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ------------------ Chips / badges ------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: rgba(29,29,27,.06); font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.chip--red { background: var(--red-050); color: var(--red-600); }
.chip--lime { background: rgba(198,244,57,.28); color: #61760a; }
.chip--blue { background: rgba(43,110,242,.12); color: var(--blue); }
.chip--violet{ background: rgba(123,97,255,.14); color: var(--violet); }
.chip--green { background: rgba(90,138,22,.14); color: var(--green); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tag { font-size: 12px; font-weight: 700; letter-spacing:.08em; text-transform: uppercase; color: var(--gray-500); }

/* ------------------ Cards ------------------ */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card--flat { box-shadow: none; }
.card--pad-lg { padding: 36px; }
.card__ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper); margin-bottom: 20px;
}
.card__ico svg { width: 26px; height: 26px; }

/* colored top border accent (как в презентации) */
.card--edge { border-top: 4px solid var(--red); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); }
.edge-blue { border-top-color: var(--blue); }
.edge-red { border-top-color: var(--red); }
.edge-violet { border-top-color: var(--violet); }
.edge-green { border-top-color: var(--green); }
.edge-lime { border-top-color: var(--lime); }

/* ------------------ Header ------------------ */
.header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(244,241,234,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header--dark { background: rgba(10,10,10,.72); border-bottom-color: var(--line-dark); color:#fff; }
.header__in { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { height: 22px; width: auto; }
.brand__sep { width: 1px; height: 22px; background: var(--line); }
.header--dark .brand__sep { background: var(--line-dark); }
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand__name b { color: var(--red); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 9px 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 600; color: var(--gray-700);
  transition: background .18s, color .18s;
}
.header--dark .nav a { color: rgba(255,255,255,.72); }
.nav a:hover { background: rgba(29,29,27,.06); color: var(--ink); }
.header--dark .nav a:hover { background: rgba(255,255,255,.1); color:#fff; }
.nav a.active { color: var(--red); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; }
.burger span { display:block; width:18px; height:2px; background: currentColor; margin: 3px auto; }
.lbl-short { display: none; }
@media (max-width: 560px) {
  .header__in { gap: 12px; }
  .brand__name, .brand__sep { display: none; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
}

/* ------------------ Footer ------------------ */
.footer { background: var(--black); color: rgba(255,255,255,.7); padding: 72px 0 40px; }
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__col h5 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; }
.footer__col li { margin-bottom: 10px; font-size: 15px; }
.footer__bottom {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.5);
}
.footer__logo { height: 24px; margin-bottom: 20px; }

/* ------------------ Stat blocks ------------------ */
.stat { }
.stat__num { font-size: clamp(38px, 5vw, 64px); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.stat__num.c-red { color: var(--red); } .stat__num.c-violet { color: var(--violet); } .stat__num.c-blue { color: var(--blue); }
.stat__label { margin-top: 14px; font-weight: 600; font-size: 18px; }
.stat__sub { margin-top: 6px; color: var(--gray-500); font-size: 15px; }
.stat--bar { padding-left: 22px; border-left: 5px solid var(--red); }
.stat--bar.bl-violet { border-color: var(--violet); } .stat--bar.bl-blue { border-color: var(--blue); }

/* ------------------ Step timeline ------------------ */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.steps__line { position:absolute; left: 0; right: 0; top: 27px; height: 3px; background: rgba(255,255,255,.25); z-index: 0; }
.step { position: relative; z-index: 1; padding-right: 18px; }
.step__dot {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; margin-bottom: 22px;
}
.step__dot.is-active { background: var(--lime); }
.step__t { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; }
.step__d { margin-top: 10px; color: rgba(255,255,255,.6); font-size: 15px; }

/* ------------------ Progress ------------------ */
.progress { height: 8px; background: var(--gray-200); border-radius: var(--r-pill); overflow: hidden; }
.progress__bar { height: 100%; background: var(--red); border-radius: var(--r-pill); transition: width .8s var(--ease); }
.progress__bar.is-lime { background: var(--lime-ink); }
.progress__bar.is-green { background: var(--green); }

/* ------------------ Forms ------------------ */
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.field .hint { color: var(--gray-500); font-size: 13px; margin-top: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--gray-200); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); transition: border-color .18s, box-shadow .18s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(29,29,27,.06);
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7A82' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.range { width: 100%; accent-color: var(--red); }

/* segmented / choice chips */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  padding: 11px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--gray-200);
  background: #fff; font-weight: 600; font-size: 14.5px; transition: all .16s;
}
.choice:hover { border-color: var(--ink); }
.choice.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------ Reveal animation ------------------ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------ Utilities ------------------ */
.stack > * + * { margin-top: 16px; }
.flex { display:flex; } .items-center { align-items:center; } .justify-between { justify-content: space-between; }
.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-24{gap:24px}
.wrap { flex-wrap: wrap; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}
.mb-0{margin-bottom:0}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.hide { display: none !important; }
.text-red { color: var(--red); } .text-white { color:#fff; } .text-muted { color: var(--gray-500); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-black { background: var(--black); color: #fff; }
.bg-paper { background: var(--paper); }
.bg-white { background:#fff; }
.rounded { border-radius: var(--r-lg); }
.fw-900{font-weight:900}.fw-800{font-weight:800}.fw-700{font-weight:700}.fw-600{font-weight:600}
.small { font-size: 14px; }
.xsmall { font-size: 12.5px; }

/* callout band */
.band { background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 26px 32px; }
.band--red { background: var(--red); }
.band--lime { background: var(--lime); color: var(--ink); }
.band strong { font-weight: 800; }

/* ------------------ Toast ------------------ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; z-index: 1000;
  transition: opacity .3s var(--ease), transform .3s var(--ease); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--lime); }
.toast--red svg { color: #fff; } .toast--red { background: var(--red); }

/* ------------------ Mobile nav drawer ------------------ */
@media (max-width: 960px) {
  .nav--open {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; margin: 0;
    background: var(--paper); padding: 20px; z-index: 99; overflow-y: auto;
  }
  .header--dark .nav--open { background: var(--black); }
  .nav--open a { padding: 16px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  body.menu-open { overflow: hidden; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
/* навигация сворачивается в бургер с запасом (чтобы не жать у брейкпоинта) */
@media (max-width: 960px) {
  .nav { display: none; }
  .burger { display: block; }
  /* backdrop-filter создаёт containing block для fixed — из-за него мобильное
     меню-drawer «схлопывалось» внутри шапки. Отключаем на мобильных. */
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(244,241,234,.98); }
  .header--dark { background: rgba(10,10,10,.98); }
}
@media (max-width: 900px) {
  .g-4 { grid-template-columns: repeat(2,1fr); }
  .g-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .steps__line { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .container { padding: 0 18px; }
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .btn { width: 100%; }
  .header__actions .btn { width: auto; }
}
