/* =========================================================
   FlowDesk — SaaS-лендинг
   Тёмная тема по умолчанию, светлая — по переключателю.
   ========================================================= */

/* ---------- Токены: общие ---------- */
:root {
  --violet: #7c5cff;
  --pink: #ff5cae;
  --cyan: #4fd8e8;
  --grad: linear-gradient(115deg, var(--violet), var(--pink));

  --font-display: "Space Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-h1: clamp(2.4rem, 1.5rem + 3.6vw, 4.3rem);
  --fs-h2: clamp(1.85rem, 1.3rem + 2.2vw, 2.9rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.3vw, 1.14rem);

  --space-section: clamp(4rem, 2.8rem + 6vw, 7.5rem);
  --container: 1200px;
  --gutter: clamp(1.15rem, 0.6rem + 2.4vw, 2.5rem);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --header-h: 74px;
}

/* ---------- Токены: тёмная ---------- */
:root, :root[data-theme="dark"] {
  --bg: #0b0d16;
  --bg-elev: #12152233;
  --panel: #10131f;
  --card: #141828;
  --card-hover: #1a1f33;
  --line: #262c44;
  --text: #eef1fa;
  --muted: #97a0bd;
  --shadow: 0 30px 70px -40px rgb(0 0 0 / 0.9);
  --shadow-sm: 0 4px 24px -12px rgb(0 0 0 / 0.7);
  --glow-1: rgb(124 92 255 / 0.4);
  --glow-2: rgb(255 92 174 / 0.28);
  --grid-line: rgb(255 255 255 / 0.035);
  --chip: rgb(255 255 255 / 0.06);
}

/* ---------- Токены: светлая ---------- */
:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-elev: #ffffff;
  --panel: #eef1f8;
  --card: #ffffff;
  --card-hover: #ffffff;
  --line: #dfe3ef;
  --text: #131629;
  --muted: #5b6485;
  --shadow: 0 30px 60px -35px rgb(24 28 60 / 0.35);
  --shadow-sm: 0 4px 20px -10px rgb(24 28 60 / 0.22);
  --glow-1: rgb(124 92 255 / 0.22);
  --glow-2: rgb(255 92 174 / 0.16);
  --grid-line: rgb(19 22 41 / 0.045);
  --chip: rgb(19 22 41 / 0.045);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--violet);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s var(--ease);

  &:focus { top: 0; }
}

/* ---------- Раскладка ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-section); position: relative; }
.section--panel { background: var(--panel); }

.section__head { max-width: 46rem; margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-block: 0.55rem 0.9rem;
  text-wrap: balance;
}

.section__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 42rem; text-wrap: pretty; }
.section__head--center .section__lead { margin-inline: auto; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease), border-color 0.22s var(--ease);

  &:active { transform: translateY(0); }
}

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgb(124 92 255 / 0.7);

  &:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px rgb(124 92 255 / 0.85); }
}

.btn--ghost {
  background: var(--chip);
  border-color: var(--line);
  color: var(--text);

  &:hover { transform: translateY(-2px); border-color: var(--violet); }
}

.btn--sm { padding: 0.5rem 1.05rem; font-size: 0.88rem; }
.btn--lg { padding: 0.9rem 1.8rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; gap: 0.55rem; flex: none; }
.logo__mark { width: 32px; height: 32px; }

.logo__text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav { margin-inline-end: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.5vw, 1.6rem);
  font-size: 0.92rem;
  font-weight: 500;

  & a {
    color: var(--muted);
    transition: color 0.2s var(--ease);

    &:hover, &.is-active { color: var(--text); }
  }
}

.header__actions { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--chip);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);

  &:hover { color: var(--text); border-color: var(--violet); }
  & svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity 0.25s var(--ease), rotate 0.4s var(--ease); }
}

:root[data-theme="dark"] .theme-toggle__moon { opacity: 0; rotate: -40deg; }
:root[data-theme="light"] .theme-toggle__sun { opacity: 0; rotate: 40deg; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--chip);
  cursor: pointer;

  & span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }

  &[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  &[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  &[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: calc(var(--header-h) + clamp(2.5rem, 1.5rem + 5vw, 5rem)) clamp(3rem, 2rem + 4vw, 5rem);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 900px;
  background:
    radial-gradient(45% 45% at 22% 28%, var(--glow-1), transparent 70%),
    radial-gradient(40% 40% at 78% 18%, var(--glow-2), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.83rem;
  color: var(--muted);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);

  &:hover { border-color: var(--violet); color: var(--text); }
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgb(79 216 232 / 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(79 216 232 / 0.55); }
  70% { box-shadow: 0 0 0 9px rgb(79 216 232 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(79 216 232 / 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-block: 1.2rem 1.1rem;
}

.hero__lead { font-size: clamp(1rem, 0.95rem + 0.45vw, 1.2rem); color: var(--muted); max-width: 34rem; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block: 2rem 1.1rem; }
.hero__note { font-size: 0.85rem; color: var(--muted); }

/* ---------- Мок интерфейса ---------- */
.mock {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  rotate: 0.6deg;
  transition: rotate 0.5s var(--ease), transform 0.5s var(--ease);

  &:hover { rotate: 0deg; transform: translateY(-4px); }
}

.mock__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 60%, var(--panel));
}

.mock__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock__dot:nth-child(1) { background: #ff6058; }
.mock__dot:nth-child(2) { background: #ffbd2e; }
.mock__dot:nth-child(3) { background: #28c840; }

.mock__url {
  margin-inline-start: auto;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.68rem;
  color: var(--muted);
}

.mock__body { display: grid; grid-template-columns: 54px 1fr; min-height: 340px; }

.mock__side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
  padding: 0.9rem 0;
  border-inline-end: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, var(--panel));
}

.mock__logo { width: 22px; height: 22px; border-radius: 7px; background: var(--grad); margin-bottom: 0.4rem; }
.mock__nav {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.7rem;
}

.mock__nav.is-active { background: color-mix(in srgb, var(--violet) 30%, transparent); color: #fff; }

.mock__main { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.mock__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }

.mock__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mock__subtitle { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }

.mock__avatars {
  display: flex;
  flex: none;

  & i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--card);
    background: var(--line);
    margin-inline-start: -7px;
    font-size: 0.53rem;
    font-weight: 700;
    font-style: normal;
    color: #fff;
  }

  & i:first-child { background: var(--violet); margin: 0; }
  & i:nth-child(2) { background: var(--pink); }
  & i:nth-child(3) { background: #2b8f8f; }
}

.mock__board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.mock__col { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }

.mock__col-title {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.15rem;

  & b {
    padding: 0.05rem 0.32rem;
    border-radius: 4px;
    background: var(--chip);
    font-size: 0.58rem;
  }
}

.mock__card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.45rem 0.5rem;
  border-radius: 7px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  border: 1px solid var(--line);
  font-size: 0.63rem;
  line-height: 1.25;
  animation: card-breathe 5s ease-in-out infinite;
}

.mock__tag {
  font-style: normal;
  font-size: 0.53rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mock__col:nth-child(2) .mock__card { animation-delay: 0.6s; }
.mock__col:nth-child(3) .mock__card { animation-delay: 1.2s; }

.mock__card--accent {
  background: color-mix(in srgb, var(--violet) 24%, transparent);
  border-color: color-mix(in srgb, var(--violet) 45%, transparent);

  & .mock__tag { color: var(--violet); font-weight: 600; }
}

.mock__card--warn {
  background: color-mix(in srgb, var(--pink) 18%, transparent);
  border-color: color-mix(in srgb, var(--pink) 42%, transparent);

  & .mock__tag { color: var(--pink); font-weight: 600; }
}

@keyframes card-breathe {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

.mock__chartbox {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.mock__chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.62rem;
  color: var(--muted);
}

.mock__chart-flag {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 18%, transparent);
  color: var(--pink);
  font-weight: 600;
}

.mock__chart {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 60px;

  & span {
    flex: 1;
    height: var(--h);
    border-radius: 5px 5px 2px 2px;
    background: var(--grad);
    opacity: 0.85;
    animation: bar-rise 1.1s var(--ease) both;
  }

  & span:nth-child(2) { animation-delay: 0.08s; }
  & span:nth-child(3) { animation-delay: 0.16s; }
  & span:nth-child(4) { animation-delay: 0.24s; }
  & span:nth-child(5) { animation-delay: 0.32s; }
  & span:nth-child(6) { animation-delay: 0.4s; }
  & span:nth-child(7) { animation-delay: 0.48s; }
}

@keyframes bar-rise {
  from { height: 4px; opacity: 0.2; }
  to { height: var(--h); opacity: 0.85; }
}

/* ---------- Логотипы ---------- */
.logos { position: relative; margin-top: clamp(3rem, 2rem + 4vw, 5rem); }

.logos__label {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.logos__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);

  & svg {
    width: 120px;
    height: 32px;
    color: var(--muted);
    opacity: 0.65;
    transition: opacity 0.25s var(--ease), color 0.25s var(--ease);

    &:hover { opacity: 1; color: var(--text); }
  }
}

/* ---------- Возможности ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
}

.feature {
  position: relative;
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background-color 0.35s var(--ease);

  &::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 2px;
    background: var(--grad);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
  }

  &:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--violet) 45%, transparent);
    background: var(--card-hover);
  }

  &:hover::before { opacity: 1; }

  & h3 { font-family: var(--font-display); font-size: 1.14rem; font-weight: 600; margin-block: 1rem 0.45rem; }
  & p { font-size: 0.93rem; color: var(--muted); }
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--violet) 16%, transparent);
  color: var(--violet);

  & svg { width: 23px; height: 23px; }
}

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 0.8rem + 1.5vw, 2rem);
  counter-reset: step;
}

.step {
  position: relative;
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);

  & h3 { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; margin-block: 1rem 0.45rem; }
  & p { font-size: 0.93rem; color: var(--muted); }
}

.step__num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ---------- Сравнение ---------- */
.scroller { overflow-x: auto; }

.compare__table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);

  & caption {
    caption-side: top;
    text-align: left;
    font-size: 0.85rem;
    color: var(--muted);
    padding-bottom: 0.75rem;
  }

  & th, & td {
    text-align: left;
    padding: 0.85rem 1.05rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 0.9rem;
  }

  & thead th {
    background: var(--panel);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  & thead th:last-child {
    background: color-mix(in srgb, var(--violet) 22%, var(--panel));
    color: var(--text);
  }

  & tbody th { font-weight: 600; width: 24%; color: var(--text); }
  & tbody td { color: var(--muted); }

  & tbody td:last-child {
    color: var(--text);
    font-weight: 500;
    background: color-mix(in srgb, var(--violet) 8%, transparent);
  }

  & tbody tr:last-child :is(th, td) { border-bottom: 0; }
}

.compare__note {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 46rem;
}

/* ---------- Калькулятор ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
  align-items: center;
  margin-top: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  padding: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);

  & h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.9rem; }

  & label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
  }

  & input {
    width: 100%;
    max-width: 11rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;

    &:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); }
  }
}

.calc__hint { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); }

.calc__result {
  padding: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  border-radius: var(--radius);
  background: var(--panel);
}

.calc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);

  &:last-of-type { border-bottom: 0; }
}

.calc__plan { font-size: 0.9rem; color: var(--muted); }

.calc__sum {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc__note { margin-top: 0.8rem; font-size: 0.8rem; color: var(--muted); }

.price-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-top: 1.25rem;
  padding: 0.8rem 1.1rem;
  border: 1px dashed color-mix(in srgb, var(--cyan) 45%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--cyan) 8%, transparent);
  font-size: 0.9rem;
  color: var(--muted);
}

.price-lock__badge {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 22%, transparent);
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Тарифы ---------- */
.billing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-size: 0.92rem;
  color: var(--muted);
}

.billing__label { transition: color 0.25s var(--ease); }
.billing__label.is-active { color: var(--text); font-weight: 600; }

.billing__save {
  display: inline-block;
  margin-inline-start: 0.3rem;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 20%, transparent);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 54px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  cursor: pointer;
  transition: background-color 0.28s var(--ease), border-color 0.28s var(--ease);

  &[aria-checked="true"] { background: var(--grad); border-color: transparent; }
  &[aria-checked="true"] .switch__knob { translate: 24px 0; }
}

.switch__knob {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 22px;
  border-radius: 50%;
  background: var(--text);
  transition: translate 0.28s var(--ease);
}

:root[data-theme="dark"] .switch[aria-checked="true"] .switch__knob,
:root[data-theme="light"] .switch[aria-checked="true"] .switch__knob { background: #fff; }

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  align-items: start;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);

  &:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
}

.plan--featured {
  border-color: color-mix(in srgb, var(--violet) 60%, transparent);
  box-shadow: 0 30px 70px -45px rgb(124 92 255 / 0.9);

  &::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
  }
}

.plan__badge {
  position: absolute;
  inset: -13px auto auto 50%;
  translate: -50% 0;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.plan__name { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; }
.plan__desc { font-size: 0.9rem; color: var(--muted); min-height: 2.6em; }

.plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block: 0.4rem 0.9rem;

  & b {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 1.7rem + 1.4vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.2s var(--ease);
  }

  & span { font-size: 0.84rem; color: var(--muted); }
}

.plan__price.is-changing b { opacity: 0.35; }

.plan__list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  font-size: 0.91rem;
  color: var(--muted);

  & li {
    position: relative;
    padding-inline-start: 1.6rem;
  }

  & li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.45em;
    width: 11px;
    height: 6px;
    border-inline-start: 2px solid var(--cyan);
    border-bottom: 2px solid var(--cyan);
    rotate: -45deg;
  }
}

/* ---------- Отзывы ---------- */
.voices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
}

.voice {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);

  &:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--pink) 40%, transparent); }

  & blockquote p { font-size: 0.97rem; line-height: 1.7; text-wrap: pretty; }

  & figcaption {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
  }

  & figcaption > span:last-child { display: flex; flex-direction: column; }
  & strong { font-size: 0.95rem; font-weight: 600; }
  & small { font-size: 0.82rem; color: var(--muted); }
}

.voice__ava {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--violet) 70%, transparent);
}

/* ---------- Фото в блоке «Как работает» ---------- */
.how__media {
  margin: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem) 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);

  & img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
  }

  & figcaption {
    padding: 1rem 1.35rem 1.15rem;
    font-size: 0.9rem;
    color: var(--muted);
  }
}

/* ---------- FAQ ---------- */
.faq__inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.faq .section__head { margin-bottom: 0; }
.accordion { display: grid; gap: 0.7rem; }

.acc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease);

  &:hover, &[open] { border-color: color-mix(in srgb, var(--violet) 45%, transparent); }

  & summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.25rem;
    font-weight: 600;
    font-size: 0.99rem;
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker { display: none; }

    &::after {
      content: "";
      flex: none;
      width: 11px;
      height: 11px;
      border-inline-end: 2px solid var(--violet);
      border-bottom: 2px solid var(--violet);
      rotate: 45deg;
      translate: 0 -3px;
      transition: rotate 0.3s var(--ease);
    }
  }

  &[open] summary::after { rotate: 225deg; translate: 0 2px; }
}

.acc__body {
  padding: 0 1.25rem 1.2rem;

  & p { font-size: 0.92rem; color: var(--muted); text-wrap: pretty; }
}

/* ---------- CTA ---------- */
.cta { padding-block: var(--space-section); }

.cta__inner {
  position: relative;
  padding: clamp(2.5rem, 2rem + 4vw, 5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 40px);
  background: var(--card);
  overflow: hidden;
}

.cta__glow {
  position: absolute;
  inset: -50% -10% auto -10%;
  height: 420px;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-1), transparent 70%);
  pointer-events: none;
}

.cta__title {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cta__lead {
  position: relative;
  max-width: 40rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  text-wrap: pretty;
}

.cta__form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: 34rem;
  margin: 2rem auto 1rem;

  & input {
    flex: 1 1 16rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.96rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);

    &:focus {
      outline: none;
      border-color: var(--violet);
      box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 20%, transparent);
    }
  }

  &.has-error input { border-color: var(--pink); }
}

.cta__status {
  flex: 1 0 100%;
  min-height: 1.2rem;
  font-size: 0.88rem;

  &.is-ok { color: var(--cyan); font-weight: 600; }
  &.is-error { color: var(--pink); font-weight: 600; }
}

.cta__note { position: relative; font-size: 0.84rem; color: var(--muted); }

/* ---------- Демо: модальное окно ---------- */
.demo-dialog {
  width: min(100% - 2rem, 34rem);
  max-height: min(90vh, 46rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 40px 90px -50px rgb(0 0 0 / 0.9);
  overflow: visible;

  &::backdrop { background: rgb(6 8 16 / 0.72); backdrop-filter: blur(3px); }
}

.demo-dialog__body {
  padding: clamp(1.4rem, 1.1rem + 1.4vw, 2.25rem);
  max-height: min(90vh, 46rem);
  overflow-y: auto;
}

.demo-dialog__close {
  position: absolute;
  inset: 0.8rem 0.8rem auto auto;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);

  & svg { width: 17px; height: 17px; }
  &:hover { color: var(--pink); border-color: var(--pink); }
}

.demo-dialog__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.8rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin-block: 0.4rem 0.6rem;
  padding-inline-end: 2.5rem;
}

.demo-dialog__lead { font-size: 0.94rem; color: var(--muted); margin-bottom: 1.5rem; }

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.demo-form .field { grid-column: 1 / -1; display: grid; gap: 0.35rem; }
.demo-form .field--half { grid-column: span 1; }

.demo-form label {
  font-size: 0.82rem;
  font-weight: 600;
}

.demo-form :is(input, select) {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: 0.93rem;

  &:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); }
}

.demo-form .field__error { font-size: 0.78rem; color: var(--pink); display: none; }

.demo-form .field.has-error {
  & :is(input, select) { border-color: var(--pink); }
  & .field__error { display: block; }
}

.demo-form button[type="submit"] { grid-column: 1 / -1; margin-top: 0.2rem; }
.demo-form__note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted); }

.demo-dialog .form__status {
  margin-top: 0.9rem;
  min-height: 1.2rem;
  font-size: 0.9rem;

  &.is-ok { color: var(--cyan); font-weight: 600; }
  &.is-error { color: var(--pink); font-weight: 600; }
}

/* ---------- Юридические страницы ---------- */
.legal { padding-block: calc(var(--header-h) + 3rem) 4rem; }

.legal__inner {
  max-width: 46rem;

  & h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-block: 0.6rem 0.5rem;
    text-wrap: balance;
  }

  & h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-block: 2.25rem 0.6rem; }
  & p { margin-bottom: 0.9rem; }
  & ul { list-style: disc; padding-inline-start: 1.25rem; margin-bottom: 0.9rem; }
  & li { margin-bottom: 0.35rem; }
  & a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
}

.legal__updated { font-size: 0.85rem; color: var(--muted); }

.legal__lead {
  font-size: 1.04rem;
  padding: 1rem 1.25rem;
  margin-block: 1.5rem 2rem !important;
  border-inline-start: 3px solid var(--violet);
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.legal__demo {
  margin-block: 2.5rem 2rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

.footer__legal {
  padding-top: 1.5rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 1.5rem;
  background: var(--panel);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: clamp(1.75rem, 3vw, 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.footer .logo__text { display: inline-block; margin-bottom: 0.85rem; }
.footer__brand p { font-size: 0.9rem; color: var(--muted); max-width: 26rem; }

.footer h3 {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer__col li + li { margin-top: 0.55rem; }

.footer__col li, .footer__bottom {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer a { transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}

.reveal.is-visible { opacity: 1; translate: 0 0; }

.feature-grid .reveal:nth-child(2), .steps .reveal:nth-child(2), .plans .reveal:nth-child(2), .voices__grid .reveal:nth-child(2), .accordion .reveal:nth-child(2) { transition-delay: 0.08s; }
.feature-grid .reveal:nth-child(3), .steps .reveal:nth-child(3), .plans .reveal:nth-child(3), .voices__grid .reveal:nth-child(3), .accordion .reveal:nth-child(3) { transition-delay: 0.16s; }
.feature-grid .reveal:nth-child(4), .accordion .reveal:nth-child(4) { transition-delay: 0.24s; }
.feature-grid .reveal:nth-child(5), .accordion .reveal:nth-child(5) { transition-delay: 0.32s; }
.feature-grid .reveal:nth-child(6) { transition-delay: 0.4s; }

/* ---------- Адаптив ---------- */
@media (width <= 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .mock { order: 2; max-width: 640px; }
  .faq__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .header__login { display: none; }
}

@media (width <= 900px) {
  .burger { display: block; }
  .nav { margin: 0; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    translate: 0 -130%;
    visibility: hidden;
    transition: translate 0.4s var(--ease), visibility 0.4s;
  }

  .nav.is-open { translate: 0 0; visibility: visible; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; font-size: 1.02rem; }

  .nav__list a {
    display: block;
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  .header__actions { margin-inline-start: auto; }
}

@media (width <= 820px) {
  .calc { grid-template-columns: 1fr; }
}

@media (width <= 620px) {
  .footer__inner { grid-template-columns: 1fr; }
  .demo-form { grid-template-columns: 1fr; }
  .demo-form .field--half { grid-column: 1 / -1; }
  .header__actions .btn--primary { display: none; }
  .billing { flex-wrap: wrap; }
  .mock__body { min-height: 280px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; translate: none; }
  .mock { rotate: 0deg; }
}

/* ---------- Печать ---------- */
@media print {
  .site-header, .burger, .mock, .hero__glow, .hero__grid-lines { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; translate: none; }
}

/* ---------- Межстраничные переходы ----------
   Плавный переход между витриной и работой.
   Baseline с 14.10.2025; без поддержки — обычная навигация. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
