/* LEVT Finans — тёмный хром и тёплые лица. Токены сверху, дальше по порядку страницы. */

:root {
  --ink: #070f18;
  --navy: #0e1b2b;
  --slate: #25324a;
  --line: #22304a;
  --chrome: #c8cdd6;
  --muted: #98a3b6;
  --paper: #f4f6fa;
  --blue: #4f63e0;
  --blue-soft: #8fa6da;
  --lav: #8a7fb0;
  --lav-deep: #3a3358;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(56px, 8vw, 104px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(79, 99, 224, .16), transparent 60%),
    radial-gradient(800px 700px at -10% 30%, rgba(37, 50, 74, .55), transparent 60%),
    var(--ink);
  background-attachment: fixed;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2 { margin: 0; }
:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

/* Заголовки секций: тяжёлый капс, как на обложках */
.h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.015em;
  text-transform: uppercase;
  text-wrap: balance;
}
.block { padding: var(--section) 0; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 15, 24, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 48, 74, .7);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(143, 166, 218, .25); }
.brand-name { font-weight: 800; letter-spacing: .01em; font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-size: .95rem; }
.nav a { text-decoration: none; color: var(--chrome); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: #fff; border-color: var(--blue); }
.nav .nav-phone { color: #fff; font-weight: 700; padding: 9px 16px; border: 1px solid var(--slate); border-radius: 999px; }
.nav .nav-phone:hover { border-color: var(--blue); }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(24px, 5vw, 64px); }
.hero-title { font-size: clamp(2.2rem, 5.1vw, 4.9rem); line-height: 1; letter-spacing: -.025em; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line-in { display: block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.line:nth-child(2) .line-in { animation-delay: .12s; }
.line:nth-child(3) .line-in { animation-delay: .24s; }
.light { font-weight: 300; color: var(--chrome); }
.heavy { font-weight: 800; text-transform: uppercase; color: #fff; }
.hero-lead { margin-top: clamp(22px, 3vw, 36px); font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--chrome); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-art { justify-self: center; width: min(100%, 500px); }
.coins { width: 100%; height: auto; overflow: visible; }
.coin-top { animation: float 6s ease-in-out infinite; transform-box: fill-box; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Кнопки и ссылки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #6477ea; }
.btn-ghost { color: #fff; border-color: var(--slate); }
.btn-ghost:hover { border-color: var(--blue-soft); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.link { color: var(--blue-soft); font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.link:hover { color: #fff; }

/* ---------- Ситуации ---------- */
.sit-list { margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
.sit-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(16px, 4vw, 56px); padding: clamp(22px, 3.2vw, 36px) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sit-problem { margin: 0; font-size: clamp(1.35rem, 2.8vw, 2.1rem); font-weight: 300; line-height: 1.2; color: #fff; text-wrap: balance; }
.sit-fix { margin: 0; color: var(--muted); }

/* ---------- Услуги ---------- */
.services { background: linear-gradient(180deg, transparent, rgba(14, 27, 43, .85) 20%, rgba(14, 27, 43, .85) 80%, transparent); }
.services-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.services-head { position: sticky; top: 112px; }
.services-head .muted { margin-top: 22px; max-width: 34ch; }
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 0; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.25;
  transition: color .2s;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-right: 4px;
  border-right: 3px solid var(--blue-soft); border-bottom: 3px solid var(--blue-soft);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s;
}
.acc-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.acc-item summary:hover { color: var(--blue-soft); }
.acc-item p { margin: 0; padding: 0 0 26px; color: var(--chrome); max-width: 54ch; }

/* ---------- Преимущества ---------- */
.why-list { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px); }
.why-list li { border-top: 3px solid var(--blue); padding-top: 18px; font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 300; line-height: 1.25; color: #fff; }

/* ---------- Аутсорс или штат ---------- */
.compare { background: var(--navy); }
.tabs { display: inline-flex; margin-top: clamp(28px, 4vw, 44px); padding: 5px; background: var(--ink); border: 1px solid var(--line); border-radius: 999px; }
.tab { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 12px 24px; cursor: pointer; transition: background .2s, color .2s; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { background: var(--blue); color: #fff; }
.panel { margin-top: clamp(28px, 4vw, 44px); max-width: 760px; }
.panel[hidden] { display: none; }
.panel-lead { font-size: clamp(1.4rem, 2.8vw, 2.1rem); font-weight: 300; line-height: 1.2; margin-bottom: 22px; color: #fff; }
.panel-list li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--chrome); }
.panel-list li:last-child { border-bottom: 1px solid var(--line); }
.compare-cta { margin: 32px 0 0; }

/* ---------- О компании ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-logo { margin-top: 32px; width: 260px; max-width: 60%; height: auto; border-radius: 28px; box-shadow: 0 0 0 1px rgba(143, 166, 218, .25), 0 24px 60px rgba(0, 0, 0, .45); }
.about-big { font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 300; line-height: 1.3; color: #fff; max-width: 30ch; }
.about-text p:not(.about-big) { color: var(--chrome); }

/* ---------- Наставничество (тёплая лавандовая полоса) ---------- */
.mentor { padding: clamp(48px, 7vw, 88px) 0; background: linear-gradient(120deg, var(--lav-deep), #4a4170 60%, #5c5190); }
.mentor-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.mentor-grid > div { flex: 1 1 520px; }
.mentor-text { margin: 18px 0 0; color: #e6e1f3; max-width: 56ch; }

/* ---------- Клиенты ---------- */
.clients-list { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.clients-list li { padding: clamp(20px, 3vw, 34px) 0; border-bottom: 1px solid var(--line); font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; text-transform: uppercase; color: var(--chrome); }
.clients-list li:nth-child(odd) { padding-right: 20px; }

/* ---------- Отзывы ---------- */
.reviews-grid { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.quote { margin: 0; padding: clamp(24px, 3.5vw, 40px); border-radius: 28px 28px 28px 6px; background: #3c526c; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.quote blockquote { margin: 0; }
.quote p { margin: 0; font-size: 1.08rem; line-height: 1.65; color: #fff; }
.quote:not(.quote-long) { background: var(--slate); border-radius: 28px 28px 6px 28px; }
.quote:not(.quote-long) p { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 300; line-height: 1.3; }
.quote figcaption { font-weight: 700; color: var(--paper); }
.reviews-more { margin: 32px 0 0; }

/* ---------- Контакты и форма ---------- */
.contacts { background: var(--navy); }
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contacts-info .muted { margin-top: 22px; }
.facts { margin: clamp(28px, 4vw, 44px) 0 0; }
.facts > div { padding: 18px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 1.15rem; }
.facts a { color: #fff; text-underline-offset: 4px; }
.facts a:hover { color: var(--blue-soft); }

.form { display: grid; gap: 20px; padding: clamp(24px, 3.5vw, 40px); background: var(--ink); border: 1px solid var(--line); border-radius: 24px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; }
.opt { font-weight: 300; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: #fff; background: var(--navy);
  border: 1px solid var(--slate); border-radius: 12px; padding: 14px 16px; min-height: 52px;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--blue-soft) 50%), linear-gradient(135deg, var(--blue-soft) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3a4c6e; }
.field input::placeholder { color: #6d7a90; }
.field.invalid input { border-color: #ff8a8a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { margin: 6px 0 0; color: #ffb0b0; font-size: .92rem; min-height: 0; }
.err:empty { display: none; }
.form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.4em; color: var(--chrome); }
.form-status.ok { color: #9fe0b5; }
.form-status.bad { color: #ffb0b0; }

/* ---------- Подвал ---------- */
.foot { padding: 40px 0; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot-note { margin: 0; color: var(--chrome); }
.foot-copy { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Адаптив ---------- */

/* Большие экраны: масштабируем весь интерфейс через rem и расширяем колонку */
@media (min-width: 1600px) {
  :root { --max: 1360px; --gutter: 64px; }
  html { font-size: 112.5%; }
}
@media (min-width: 2200px) {
  :root { --max: 1560px; --gutter: 80px; }
  html { font-size: 125%; }
}
@media (min-width: 3000px) {
  html { font-size: 150%; }
}

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1080px) {
  .hero-title { font-size: clamp(2.2rem, 6vw, 4.2rem); }
}
@media (max-width: 960px) {
  .hero-grid, .services-grid, .about-grid, .contacts-grid, .reviews-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: min(52%, 340px); justify-self: center; }
  .services-head { position: static; }
  .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sit-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* Меню-«бургер» включаем раньше: семь ссылок и телефон не помещаются в узкую шапку */
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; border: 1px solid var(--slate); border-radius: 50%; cursor: pointer; color: #fff; }
  .menu-btn-bars, .menu-btn-bars::before, .menu-btn-bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-btn-bars { position: relative; }
  .menu-btn-bars::before, .menu-btn-bars::after { content: ""; position: absolute; left: 0; }
  .menu-btn-bars::before { top: -7px; }
  .menu-btn-bars::after { top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-btn-bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn-bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn-bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-left)) 24px; background: var(--ink); border-bottom: 1px solid var(--line);
    display: none; font-size: 1.1rem;
    max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-phone { margin-top: 16px; text-align: center; border-radius: 999px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero-art { order: -1; width: min(58%, 220px); justify-self: start; }
  .hero { padding-top: 28px; }
  .top-row { min-height: 64px; }
  .quote { border-radius: 22px 22px 22px 6px; }
  .quote:not(.quote-long) { border-radius: 22px 22px 6px 22px; }
  .form { border-radius: 20px; }
  .why-list, .clients-list { grid-template-columns: minmax(0, 1fr); }
  .clients-list li:nth-child(odd) { padding-right: 0; }
  .actions .btn, .form .btn, .mentor-grid .btn { width: 100%; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; padding: 12px 10px; font-size: .95rem; }
}

/* Узкие телефоны */
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .brand-name { font-size: 1rem; }
  .brand .logo { width: 40px; height: 40px; }
  .hero-title { font-size: 2rem; }
  .h2 { font-size: 1.65rem; }
  .btn { padding: 0 20px; min-height: 50px; }
  .tab { padding: 12px 8px; font-size: .88rem; }
  .acc-item summary { padding: 20px 0; }
  .form, .quote { padding: 20px; }
}

/* Телефон в горизонтальном положении: мало высоты */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 24px 0 40px; }
  .hero-art { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .top { position: static; }
  .block { padding: 48px 0; }
}

/* Устройства с точным указателем: мелкие элементы не нужно увеличивать, а с касанием нужны крупные цели */
@media (pointer: coarse) {
  .nav a, .link, .facts a { min-height: 44px; display: inline-flex; align-items: center; }
  .nav a { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line-in, .coin-top { animation: none; }
  * { transition-duration: .01ms !important; }
}
