/* Финанс Контроль
   Сплошные фоны, один акцент (синий), заголовки Unbounded, текст Manrope.
   Радиусы: кнопки 14px, карточки 24px, крупные блоки 32px.
   Анимации подключаются классом .anim на <html> (ставит script.js), без него всё видно сразу. */

:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #edf1f8;
  --ink: #0a1230;
  --ink-2: #48526f;
  --ink-3: #69738f;
  --line: #dfe4ee;
  --accent: #2c5bff;
  --accent-hover: #1d47e6;
  --accent-soft: #e5ebff;
  --accent-text: #2450f0;
  --navy: #0a1438;
  --navy-card: #121f52;
  --on-navy: #ffffff;
  --on-navy-2: rgba(222, 230, 255, 0.76);
  --on-navy-line: rgba(255, 255, 255, 0.14);
  --sky: #9fb6ff;
  --success: #10956b;
  --danger: #d24b3c;
  --shadow: 0 2px 4px rgba(10, 18, 48, 0.04), 0 18px 40px -18px rgba(10, 18, 48, 0.22);
  --shadow-lg: 0 4px 10px rgba(10, 18, 48, 0.05), 0 40px 80px -30px rgba(10, 24, 80, 0.4);

  --r-btn: 14px;
  --r-card: 24px;
  --r-block: 32px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-top: 14px;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060b1e;
    --surface: #0d1630;
    --surface-2: #131e3d;
    --ink: #eaf0ff;
    --ink-2: #b0bbd8;
    --ink-3: #8794b4;
    --line: #1f2b4a;
    --accent: #4370ff;
    --accent-hover: #5c84ff;
    --accent-soft: #17244d;
    --accent-text: #9fb6ff;
    --navy: #0b1536;
    --navy-card: #142257;
    --success: #34c08f;
    --danger: #f07c6d;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.3), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #060b1e;
  --surface: #0d1630;
  --surface-2: #131e3d;
  --ink: #eaf0ff;
  --ink-2: #b0bbd8;
  --ink-3: #8794b4;
  --line: #1f2b4a;
  --accent: #4370ff;
  --accent-hover: #5c84ff;
  --accent-soft: #17244d;
  --accent-text: #9fb6ff;
  --navy: #0b1536;
  --navy-card: #142257;
  --success: #34c08f;
  --danger: #f07c6d;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.3), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

section[id] {
  scroll-margin-top: 90px;
}

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

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

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

.is-loading body {
  overflow: hidden;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
}

.loader-inner {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.loader-count {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(64px, 14vw, 200px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.loader-brand {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.btn i {
  font-size: 20px;
}

.btn-sm {
  height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

.btn-lg {
  height: 60px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-full {
  width: 100%;
}

/* Заливка снизу при наведении */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}

.btn:hover::before {
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary::before {
  background: var(--navy);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent::before {
  background: #fff;
}

.btn-accent:hover {
  color: var(--navy);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-outline-light::before {
  background: #fff;
}

.btn-outline-light:hover {
  color: var(--navy);
  border-color: #fff;
}

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

.btn-soft::before {
  background: var(--accent);
}

.btn-soft:hover {
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline::before {
  background: var(--ink);
}

.btn-outline:hover {
  color: var(--bg);
  border-color: var(--ink);
}

.ripple {
  position: absolute;
  z-index: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  pointer-events: none;
  animation: ripple 0.7s var(--ease) forwards;
}

@keyframes ripple {
  to {
    transform: scale(48);
    opacity: 0;
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}

.icon-btn i {
  font-size: 19px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

/* ---------- Header: плавающая плашка ---------- */
.header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  pointer-events: none;
  transition: transform 0.5s var(--ease);
}

.header.is-hidden {
  transform: translateY(calc(-100% - 24px));
}

.header-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1296px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 10px 0 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}

.logo-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover,
.nav-link.is-current {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-mobile-extra {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s;
}

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

.burger {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.burger span:nth-child(1) {
  top: 16px;
}

.burger span:nth-child(2) {
  top: 24px;
}

.burger.open span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.burger.open span:nth-child(2) {
  top: 20px;
  transform: rotate(-45deg);
}

/* ---------- Общие для секций ---------- */
.section {
  padding: 140px 0;
}

.section-head {
  max-width: 860px;
  margin-bottom: 64px;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-sub {
  margin-top: 22px;
  max-width: 58ch;
  font-size: 19px;
  color: var(--ink-2);
}

/* Слова в заголовках: обёртки создаёт JS */
[data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

[data-split] .w > span {
  display: inline-block;
  will-change: transform;
}

.anim [data-split] .w > span {
  transform: translateY(110%);
}

.anim .fade-up {
  opacity: 0;
  transform: translateY(40px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 100px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-title em {
  font-style: normal;
  color: var(--sky);
}

.hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-top: 48px;
}

.hero-rotator {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
}

.rotator {
  display: inline-block;
  height: 1.7em;
  overflow: hidden;
  vertical-align: middle;
  border-radius: 10px;
  background: var(--accent);
}

.rotator-track {
  display: flex;
  flex-direction: column;
  animation: rotate-words 10s var(--ease) infinite;
}

.rotator-track span {
  display: block;
  height: 1.7em;
  line-height: 1.7em;
  padding: 0 14px;
  white-space: nowrap;
}

@keyframes rotate-words {
  0%, 16% { transform: translateY(0); }
  20%, 36% { transform: translateY(-1.7em); }
  40%, 56% { transform: translateY(-3.4em); }
  60%, 76% { transform: translateY(-5.1em); }
  80%, 96% { transform: translateY(-6.8em); }
  100% { transform: translateY(-8.5em); }
}

.hero-subtitle {
  margin-top: 18px;
  max-width: 52ch;
  font-size: 19px;
  color: var(--on-navy-2);
}

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

.hero-media {
  position: relative;
  margin-top: 64px;
}

.hero-photo {
  height: clamp(320px, 56vh, 640px);
  border-radius: var(--r-block);
  overflow: hidden;
  background: var(--navy-card);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
}

.hero-card {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 260px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.hero-card-deadline {
  left: 36px;
  bottom: -36px;
}

.hero-card-stat {
  right: 36px;
  top: 36px;
  background: var(--accent);
  color: #fff;
}

.hero-card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.8;
}

.hero-card-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-card-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 44px 0;
  background: var(--bg);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  will-change: transform;
}

.marquee-track span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 112px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.marquee-track span:nth-of-type(even) {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.marquee-track i {
  font-size: clamp(28px, 4vw, 60px);
  color: var(--accent);
}

/* ---------- Manifesto ---------- */
.manifesto {
  padding-top: 80px;
}

.manifesto-text {
  max-width: 1180px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 3.2rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.anim .manifesto-text .mw {
  opacity: 0.16;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 100px;
}

.stat {
  display: grid;
  gap: 10px;
  padding: 32px;
  border-radius: var(--r-card);
  background: var(--surface);
}

.stat:last-child {
  background: var(--accent);
  color: #fff;
}

.stat-value {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-caption {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
}

.stat:last-child .stat-caption {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Services ---------- */
.services {
  padding-top: 40px;
}

.svc-list {
  display: grid;
  gap: 12px;
}

.svc {
  position: relative;
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}

.svc::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}

.svc:hover::before,
.svc.is-open::before {
  transform: none;
}

.svc-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 32px;
  width: 100%;
  padding: 34px 36px;
  border: 0;
  background: transparent;
  text-align: left;
  transition: color 0.4s var(--ease);
}

.svc:hover .svc-head,
.svc.is-open .svc-head {
  color: #fff;
}

.svc-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  transition: transform 0.5s var(--ease);
}

.svc:hover .svc-title {
  transform: translateX(10px);
}

.svc-tags {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-3);
  transition: color 0.4s var(--ease);
}

.svc:hover .svc-tags,
.svc.is-open .svc-tags {
  color: var(--on-navy-2);
}

.svc-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.5s var(--ease);
}

.svc:hover .svc-icon,
.svc.is-open .svc-icon {
  background: var(--accent);
  color: #fff;
}

.svc.is-open .svc-icon {
  transform: rotate(45deg);
}

.svc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}

.svc.is-open .svc-body {
  grid-template-rows: 1fr;
}

.svc-body > div {
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
}

.svc-thumb {
  width: calc(100% - 36px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 0 32px 36px;
}

.svc-body p {
  max-width: 62ch;
  padding: 0 36px 32px 0;
  font-size: 18px;
  color: var(--on-navy-2);
}

.svc-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 340px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  box-shadow: var(--shadow-lg);
}

.svc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Niches: горизонтальная прокрутка ---------- */
.niches {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.niches-pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(100vh, 1000px);
  padding: 120px 0 80px;
}

.niches-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.niches-head .section-title {
  max-width: 14ch;
}

.niches-progress {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: var(--on-navy-2);
  white-space: nowrap;
}

.niches-progress span {
  color: #fff;
}

.niches-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 0 max(32px, calc((100vw - 1296px) / 2));
  will-change: transform;
}

.niche {
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(620px, 82vw);
  height: min(64vh, 620px);
  border-radius: var(--r-block);
  background: var(--navy-card);
  overflow: hidden;
}

.niche-photo {
  overflow: hidden;
  min-height: 0;
}

.niche-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.2s var(--ease);
}

.niche:hover .niche-photo img {
  transform: scale(1);
}

.niche-body {
  padding: 28px 32px 32px;
}

.niche-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
  color: var(--sky);
}

.niche h3 {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  letter-spacing: -0.035em;
}

.niche p {
  margin-top: 10px;
  max-width: 48ch;
  color: var(--on-navy-2);
}

/* Без анимаций ленту ниш листают вручную */
html:not(.anim) .niches-track {
  width: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

html:not(.anim) .niche {
  scroll-snap-align: start;
}

/* ---------- Tools ---------- */
.tools-shell {
  border-radius: var(--r-block);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}

.tools-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 4px;
  border-radius: 24px;
  background: var(--surface-2);
}

.tool-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-2);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

.tool-tab i {
  font-size: 22px;
}

.tool-tab:hover {
  color: var(--ink);
}

.tool-tab.is-active {
  background: var(--navy);
  color: #fff;
}

.tool-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 44px 40px;
}

.tool-panel.is-active {
  animation: panel-in 0.6s var(--ease) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.tool-controls {
  display: grid;
  gap: 32px;
}

.seg {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}

.seg-btn {
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-weight: 800;
  color: var(--ink-2);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.seg-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 700;
  color: var(--ink-2);
}

.field output {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

input[type="range"] {
  --p: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent) 0 var(--p), var(--surface-2) var(--p) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 7px solid var(--accent);
  box-shadow: 0 4px 14px rgba(44, 91, 255, 0.45);
  transition: transform 0.2s var(--ease);
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 7px solid var(--accent);
}

.tool-note,
.res-small {
  font-size: 14px;
  color: var(--ink-3);
}

.tool-result {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--surface-2);
}

.res-row {
  display: grid;
  gap: 10px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 2px solid transparent;
  transition: border-color 0.35s var(--ease);
}

.res-row.is-best {
  border-color: var(--accent);
}

.res-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.res-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.res-row.is-best .res-badge {
  opacity: 1;
  transform: none;
}

.res-sum {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.res-sum-xl {
  font-size: clamp(36px, 4.6vw, 60px);
  color: var(--accent-text);
}

.res-bar {
  height: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.res-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ink-3);
  transition: width 0.6s var(--ease), background-color 0.3s;
}

.res-row.is-best .res-bar span {
  background: var(--accent);
}

.res-verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.res-verdict i {
  flex-shrink: 0;
  font-size: 30px;
  color: var(--sky);
}

.res-warn {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.res-warn i {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--danger);
}

.res-label {
  font-weight: 700;
  color: var(--ink-2);
}

.staff-hidden {
  display: grid;
  gap: 14px;
}

.staff-hidden li {
  display: flex;
  gap: 12px;
  font-weight: 600;
}

.staff-hidden i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 22px;
  color: var(--danger);
}

.staff-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.staff-split div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
}

.staff-split span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.staff-split b {
  font-size: 18px;
  font-weight: 800;
}

/* Подбор тарифа */
#tool-quiz,
#tool-cal {
  grid-template-columns: 1fr;
}

.quiz {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.quiz-progress {
  height: 6px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
}

.quiz-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}

.quiz-step {
  display: none;
  padding-top: 36px;
  text-align: center;
}

.quiz-step.is-active {
  display: block;
  animation: panel-in 0.6s var(--ease) both;
}

.quiz-step h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: -0.03em;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.quiz-options button {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 78px;
  padding: 0 24px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  font-weight: 700;
  font-size: 18px;
  text-align: left;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.quiz-options button i {
  font-size: 28px;
  color: var(--accent-text);
  transition: color 0.3s;
}

.quiz-options button:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.quiz-options button.is-picked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.quiz-options button.is-picked i {
  color: #fff;
}

.quiz-plan {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  color: var(--accent-text);
}

.quiz-result p {
  max-width: 52ch;
  margin: 14px auto 0;
  font-size: 18px;
  color: var(--ink-2);
}

.quiz-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Календарь */
.cal {
  display: grid;
  gap: 24px;
}

.cal-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 700;
  color: var(--ink-2);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.chip.is-active {
  background: var(--navy);
  color: #fff;
}

.cal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cal-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 14px;
  border-radius: 18px;
  background: var(--surface-2);
  animation: panel-in 0.5s var(--ease) both;
  animation-delay: calc(var(--k) * 45ms);
}

.cal-date {
  display: grid;
  place-items: center;
  height: 64px;
  border-radius: 14px;
  background: var(--surface);
  line-height: 1.1;
}

.cal-date b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.cal-date span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.cal-title {
  font-weight: 700;
  line-height: 1.3;
}

.cal-who {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.cal-left {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.cal-item.is-soon .cal-left {
  background: var(--accent);
  color: #fff;
}

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.why-photo {
  height: 640px;
}

.parallax-wrap {
  position: relative;
  border-radius: var(--r-block);
  overflow: hidden;
  background: var(--surface-2);
}

.parallax-img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  will-change: transform;
}

.compare {
  display: grid;
  gap: 8px;
  margin-top: 44px;
}

.compare-head,
.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 18px;
}

.compare-head {
  padding-top: 0;
  padding-bottom: 4px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-3);
}

.compare-head span:last-child {
  color: var(--accent-text);
}

.compare-row {
  background: var(--surface);
  transition: transform 0.35s var(--ease);
}

.compare-row:hover {
  transform: translateX(6px);
}

.compare-row > span:first-child {
  font-weight: 800;
}

.compare-row .no {
  color: var(--ink-3);
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--danger);
}

.compare-row .yes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.compare-row .yes i {
  font-size: 20px;
  color: var(--success);
}

/* ---------- Process: стопка карточек ---------- */
.stack {
  display: grid;
  gap: 28px;
  padding-bottom: 40px;
}

.stack-card {
  position: sticky;
  top: calc(110px + var(--n) * 26px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
  min-height: 300px;
  padding: 48px 56px;
  border-radius: var(--r-block);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform-origin: center top;
  will-change: transform;
}

.stack-card:nth-child(2) {
  background: var(--navy);
  color: #fff;
}

.stack-card:nth-child(3) {
  background: var(--accent);
  color: #fff;
}

.stack-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(72px, 10vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--accent-text);
}

.stack-card:nth-child(2) .stack-num,
.stack-card:nth-child(3) .stack-num {
  color: rgba(255, 255, 255, 0.9);
}

.stack-copy h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.stack-copy p {
  margin-top: 14px;
  max-width: 48ch;
  font-size: 19px;
  opacity: 0.8;
}

.stack-icon {
  font-size: 72px;
  opacity: 0.9;
}

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 2px solid transparent;
  transition: box-shadow 0.45s var(--ease), border-color 0.45s var(--ease), translate 0.45s var(--ease);
}

.plan:hover {
  translate: 0 -8px;
  box-shadow: var(--shadow-lg);
}

.plan.is-recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.plan-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
}

.plan-title {
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.plan-text {
  margin-top: 10px;
  min-height: 3.2em;
  font-size: 16px;
  color: var(--ink-2);
}

.plan-list {
  display: grid;
  align-content: start;
  gap: 12px;
  flex: 1;
  margin: 24px 0 28px;
}

.plan-list li {
  display: flex;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.plan-list i {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-text);
}

.plan-featured {
  background: var(--navy);
  color: #fff;
}

.plan-featured .plan-tag {
  background: var(--accent);
  color: #fff;
}

.plan-featured .plan-text {
  color: var(--on-navy-2);
}

.plan-featured .plan-list i {
  color: var(--sky);
}

/* ---------- Cases ---------- */
.cases {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.case {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  padding: 40px;
  border-radius: var(--r-block);
  background: var(--surface);
  overflow: hidden;
  transition: translate 0.5s var(--ease);
}

.case:hover {
  translate: 0 -6px;
}

.case-tag {
  position: absolute;
  top: 32px;
  left: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-text);
}

.case-big {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 7vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--accent-text);
}

.case h3 {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.case p {
  margin-top: 10px;
  max-width: 46ch;
  color: var(--ink-2);
}

.case-dark {
  background: var(--navy);
  color: #fff;
}

.case-dark .case-tag,
.case-photo .case-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.case-dark .case-big {
  color: #fff;
}

.case-dark p {
  color: var(--on-navy-2);
}

.case-photo {
  color: #fff;
  background: var(--navy);
}

.case-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.case-photo:hover img {
  transform: scale(1.06);
}

.case-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 44, 0.62);
}

.case-photo-body {
  position: relative;
  z-index: 1;
}

.case-photo .case-tag {
  position: static;
  display: inline-block;
  margin-bottom: 20px;
}

.case-photo .case-big {
  color: #fff;
}

.case-photo p {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- FAQ ---------- */
.faq-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 120px;
}

.faq-intro .btn {
  margin-top: 32px;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 26px 28px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 800;
  font-size: 18px;
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  transition: background-color 0.35s var(--ease), transform 0.5s var(--ease);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-icon {
  background: var(--accent);
  transform: rotate(180deg);
}

.faq-item.is-open .faq-icon::before,
.faq-item.is-open .faq-icon::after {
  background: #fff;
}

.faq-item.is-open .faq-icon::after {
  transform: rotate(0);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a > div {
  overflow: hidden;
}

.faq-a p {
  padding: 0 28px 26px;
  max-width: 62ch;
  font-size: 17px;
  color: var(--ink-2);
}

/* ---------- CTA ---------- */
.cta {
  padding: 40px 0 120px;
}

.cta-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 24px;
  border-radius: 40px;
  background: var(--navy);
  color: #fff;
}

.cta-copy {
  padding: 48px 32px 48px 40px;
}

.cta-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.cta-sub {
  margin-top: 22px;
  max-width: 44ch;
  font-size: 19px;
  color: var(--on-navy-2);
}

.cta-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.cta-phone,
.cta-mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 68px;
  padding: 0 28px;
  border-radius: 18px;
  font-weight: 800;
  transition: background-color 0.3s, color 0.3s;
}

.cta-phone {
  background: #fff;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
}

.cta-phone:hover {
  background: var(--accent);
  color: #fff;
}

.cta-mail {
  border: 1px solid var(--on-navy-line);
  font-size: 17px;
}

.cta-mail:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cta-phone i,
.cta-mail i {
  font-size: 24px;
}

.cta-hours {
  margin-top: 20px;
  font-size: 15px;
  color: var(--on-navy-2);
}

.cta-photo {
  min-height: 440px;
  border-radius: 28px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 32px;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}

.footer-text {
  max-width: 32ch;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-2);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-cols h3 {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-3);
}

.footer-cols a {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-cols a:hover {
  color: var(--accent-text);
}

.footer-word {
  margin: 72px 0 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 7.3vw;
  line-height: 0.95;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: var(--accent);
}

.footer-word .ch {
  display: inline-block;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}

/* ---------- Call modal ---------- */
.call-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(6, 12, 36, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.call-modal.active {
  opacity: 1;
  visibility: visible;
}

.call-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 40px 32px 32px;
  border-radius: var(--r-block);
  background: var(--surface);
  text-align: center;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.5s var(--ease);
}

.call-modal.active .call-modal-content {
  transform: none;
}

.call-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.call-modal-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 32px;
}

.call-modal.active .call-modal-icon i {
  animation: ring 1.2s 0.3s ease-in-out 2;
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-14deg); }
  20%, 40% { transform: rotate(14deg); }
  50% { transform: rotate(0); }
}

.call-modal-title {
  margin-top: 20px;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.call-modal-content p {
  margin-top: 6px;
  color: var(--ink-2);
}

.call-modal-phone {
  display: block;
  margin: 20px 0 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--accent-text);
}

/* ---------- Cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(620px, calc(100% - 32px));
  padding: 14px 14px 14px 22px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 160%);
  transition: transform 0.6s var(--ease);
}

.cookie-banner.active {
  transform: translate(-50%, 0);
}

.cookie-banner-text {
  flex: 1;
  font-size: 14px;
  color: var(--ink-2);
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
}

/* Смена темы: круг от кнопки */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  z-index: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .header-phone {
    display: none;
  }

  .pricing {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }

  .header {
    padding: 0 16px;
  }

  .burger {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-top) + var(--header-h) + 10px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0.3s;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 14px;
    font-size: 18px;
  }

  .nav-mobile-extra {
    display: grid;
    gap: 10px;
    margin-top: 10px;
  }

  .nav-mobile-phone {
    padding: 10px 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 20px;
  }

  .hero {
    padding: 132px 0 80px;
  }

  .hero-row,
  .tool-panel,
  .why-grid,
  .faq-wrap,
  .cta-card,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .hero-row {
    gap: 28px;
  }

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

  .svc-head {
    grid-template-columns: 1fr auto;
  }

  .svc-tags,
  .svc-preview {
    display: none;
  }

  .tools-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .tool-panel {
    padding: 32px 20px 24px;
    gap: 32px;
  }

  .cal-list {
    grid-template-columns: 1fr;
  }

  .why-photo {
    height: 420px;
  }

  .stack-card {
    grid-template-columns: auto 1fr;
    gap: 28px;
    padding: 36px;
  }

  .stack-icon {
    display: none;
  }

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

  .faq-intro {
    position: static;
  }

  .cta-copy {
    padding: 24px 12px 8px;
  }

  .cta-photo {
    min-height: 300px;
  }

  .section {
    padding: 100px 0;
  }

  /* Ниши на планшете и телефоне: свайп */
  .niches-pin {
    min-height: 0;
    padding: 96px 0;
  }

  .niches-track {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 24px;
    transform: none !important;
  }

  .niches-track::-webkit-scrollbar {
    display: none;
  }

  .niche {
    scroll-snap-align: center;
    height: 540px;
  }

  .niches-progress {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .header-bar {
    gap: 12px;
  }

  .logo-text {
    font-size: 14px;
  }

  .hero {
    padding: 116px 0 64px;
  }

  .hero-title br {
    display: none;
  }

  .hero-rotator {
    font-size: 18px;
    flex-wrap: wrap;
  }

  .hero-subtitle,
  .section-sub,
  .cta-sub {
    font-size: 17px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-media {
    margin-top: 40px;
  }

  .hero-photo {
    height: 380px;
    border-radius: 24px;
  }

  .hero-card {
    position: static;
    width: auto;
    margin-top: 12px;
  }

  .marquee {
    padding: 28px 0;
  }

  .stats {
    gap: 12px;
    margin-top: 64px;
  }

  .stat {
    padding: 22px;
  }

  .svc-head {
    padding: 24px 20px;
    gap: 16px;
  }

  .svc-icon {
    width: 44px;
    height: 44px;
  }

  .svc-body > div {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .svc-thumb {
    width: calc(100% - 40px);
    margin: 0 20px;
  }

  .svc-body p {
    padding: 0 20px 24px;
  }

  .niche {
    height: 500px;
  }

  .tools-shell {
    padding: 8px;
    border-radius: 24px;
  }

  .tool-tab {
    height: 56px;
    font-size: 14px;
    gap: 8px;
  }

  .tool-result {
    padding: 18px;
  }

  .staff-split {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .cal-item {
    grid-template-columns: 56px 1fr;
  }

  .cal-left {
    grid-column: 2;
    justify-self: start;
  }

  .compare-head {
    display: none;
  }

  .compare-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
  }

  .compare-row > span:first-child {
    grid-column: 1 / -1;
  }

  .stack-card {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 28px 24px;
    top: calc(96px + var(--n) * 16px);
  }

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

  .case {
    min-height: 320px;
    padding: 28px;
  }

  .case-tag {
    top: 24px;
    left: 28px;
  }

  .faq-q {
    padding: 20px;
    font-size: 17px;
  }

  .faq-a p {
    padding: 0 20px 20px;
  }

  .cta-card {
    padding: 12px;
    border-radius: 28px;
  }

  .cta-phone,
  .cta-mail {
    width: 100%;
    justify-content: center;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .cookie-banner-actions .btn {
    flex: 1;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .loader {
    display: none;
  }

  .stack-card {
    position: static;
  }
}

/* Колонки инструментов не должны распирать экран на телефоне */
.tool-controls,
.tool-result,
.field {
  min-width: 0;
}

@media (max-width: 1024px) {
  .tool-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(1.85rem, 8.6vw, 2.4rem);
  }

  .field-row {
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .field output {
    font-size: 19px;
  }

  .tools-tabs {
    gap: 4px;
  }

  .tool-tab {
    padding: 0 8px;
  }
}
