:root {
  --c-primary: #1d4ed8;
  --c-primary-soft: rgba(29, 78, 216, 0.12);
  --c-primary-deep: #1e40af;
  --c-accent: #f97316;
  --c-accent-stroke: #ea580c;
  --c-slate: #64748b;
  --c-ink: #0f172a;
  /* Hero: серо-белая группа */
  --hero-sero: #aeb8cb;
  --hero-sero-soft: #c9d2e0;
  --hero-sero-deep: #8b95a8;
  --c-page: #f8fafc;
  /* Тот же фон, что у блока hero на главной — для внутренних страниц */
  --landing-hero-bg: radial-gradient(120% 80% at 50% -10%, rgba(29, 78, 216, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --c-card: #ffffff;
  --c-night: #0f172a;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 0.95, 0.35, 1);
  --header-h: 64px;
  --radius: 14px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 80px rgba(15, 23, 42, 0.08);
  --snap-h: calc(100vh - var(--header-h));
  --snap-h: calc(100dvh - var(--header-h));
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-h);
  scroll-padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.snap-screen {
  min-height: var(--snap-h);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  box-sizing: border-box;
}

/* Стоимость: смена карточек (hero.js), внутри анимации слова / подсказки / цены */
.hero-pricing-fade {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 0.25rem;
  box-sizing: border-box;
  min-width: 0;
}

.hero-pricing-fade__stack {
  display: grid;
  grid-template: 1fr / 1fr;
  width: 100%;
  min-width: 0;
}

.hero-pricing-fade__item {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 0.75rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.hero-pricing-fade__item.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.hero-pricing-fade__word,
.hero-pricing-fade__hint,
.hero-pricing-fade__val {
  opacity: 0;
  will-change: opacity, transform, filter;
}

.hero-pricing-fade__item:not(.is-active) .hero-pricing-fade__word,
.hero-pricing-fade__item:not(.is-active) .hero-pricing-fade__hint,
.hero-pricing-fade__item:not(.is-active) .hero-pricing-fade__val {
  animation: none !important;
  opacity: 0;
  transform: none;
  filter: none;
}

/* Заголовок чуть раньше, пояснение следом со сдвигом влево и сверху, цена медленно проявляется */
.hero-pricing-fade__item.is-active .hero-pricing-fade__word {
  animation: hero-pricing-word-in 0.52s var(--ease-out) 0s forwards;
}

.hero-pricing-fade__item.is-active .hero-pricing-fade__hint {
  animation: hero-pricing-hint-in 0.58s var(--ease-out) 0.07s forwards;
}

.hero-pricing-fade__item.is-active .hero-pricing-fade__val {
  animation: hero-pricing-val-draw 2.35s ease-out 0.24s forwards;
}

@keyframes hero-pricing-hint-in {
  from {
    opacity: 0;
    transform: translate3d(-36px, -16px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(-8px, 0, 0);
  }
}

@keyframes hero-pricing-word-in {
  from {
    opacity: 0;
    transform: translate3d(-20px, -10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, -3px, 0);
  }
}

@keyframes hero-pricing-val-draw {
  0% {
    opacity: 0;
    filter: blur(5px);
  }
  55% {
    opacity: 0.45;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.hero-pricing-fade__word {
  display: block;
  font-size: clamp(1.35rem, 4.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hero-sero-soft);
  line-height: 1.15;
}

.hero-pricing-fade__hint {
  display: block;
  margin-top: 0.28rem;
  max-width: 26rem;
  font-size: clamp(0.98rem, 2.5vw, 1.1rem);
  color: var(--hero-sero);
  line-height: 1.45;
}

.hero-pricing-fade__val {
  display: block;
  margin-top: 0.55rem;
  font-weight: 600;
  font-size: clamp(1.08rem, 2.8vw, 1.28rem);
  color: var(--hero-sero-deep);
  letter-spacing: -0.02em;
}

.hero-pricing-fade--instant .hero-pricing-fade__item {
  transition-duration: 0.01ms;
}

.hero-pricing-fade--instant .hero-pricing-fade__item.is-active .hero-pricing-fade__word,
.hero-pricing-fade--instant .hero-pricing-fade__item.is-active .hero-pricing-fade__hint,
.hero-pricing-fade--instant .hero-pricing-fade__item.is-active .hero-pricing-fade__val {
  animation: none !important;
  opacity: 1;
  transform: none;
  filter: none;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  font-family: var(--font);
  color: var(--c-ink);
  background: var(--c-page);
  line-height: 1.55;
  font-size: 1rem;
}

a {
  color: var(--c-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-primary-deep);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--c-card);
  border: 2px solid var(--c-primary);
  z-index: 10001;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}

.site-header__tools {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav__burger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: var(--c-ink);
  background: transparent;
  font: inherit;
  line-height: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.site-nav__burger:hover {
  background: rgba(15, 23, 42, 0.06);
}

.site-nav__burger:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

.site-nav__burger-line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}

.site-nav__burger.is-open .site-nav__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav__burger.is-open .site-nav__burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.site-nav__burger.is-open .site-nav__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 200000;
  isolation: isolate;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), visibility 0.22s;
}

.site-nav-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

html.site-nav-open,
html.site-nav-open body {
  overflow: hidden;
}

/* Полноэкранное полупрозрачное меню: клик по фону — dismiss-bg под контентом */
.site-nav-panel__sheet {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: auto;
}

.site-nav-panel__dismiss-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  cursor: pointer;
  appearance: none;
  background: rgba(15, 23, 42, 0.18);
}

.site-nav-panel__content {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 0.75rem) 1.5rem
    calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
  pointer-events: none;
}

.site-nav-panel__content > * {
  pointer-events: auto;
}

.site-nav-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.site-nav-panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-slate);
}

.site-nav-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--c-slate);
  cursor: pointer;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-nav-panel__close:hover {
  background: #f1f5f9;
  color: var(--c-ink);
}

.site-nav-panel__link {
  display: block;
  padding: 0.85rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
  border-radius: 10px;
}

.site-nav-panel__link:hover {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 700;
  font-size: 1rem;
}

.site-header__brand:hover {
  color: var(--c-ink);
}

.site-header__mark {
  height: 32px;
  width: auto;
  display: block;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1.25rem;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--landing-hero-bg);
}

.hero__glow {
  position: absolute;
  inset: auto 10% -30%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.08), transparent 65%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(1.35rem, 4.5vh, 2.75rem));
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(1.35rem, 4.5vh, 2.75rem));
  box-sizing: border-box;
}

.hero__top {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.55rem, 1.8vh, 1.1rem);
  min-height: 0;
}

.hero__mid {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(4.25rem, 11vh, 7.5rem);
  width: 100%;
  padding: clamp(0.15rem, 1vh, 0.5rem) 0;
}

.hero__cta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: min(22rem, 100%);
  max-width: 100%;
  margin-inline: auto;
  align-self: center;
  padding-top: clamp(0.45rem, 2vh, 1.1rem);
}

.hero-brand {
  margin: 0;
  line-height: 0;
}

.hero-brand__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0, 0.5vw, 0.25rem);
  width: clamp(220px, 52vw, 360px);
  max-width: 100%;
  margin: 0 auto;
}

.hero-brand__mascot {
  flex: 0 0 auto;
  height: clamp(4.75rem, 12.5vw, 8.25rem);
  width: auto;
  display: block;
  margin-right: clamp(-0.35rem, -0.8vw, -0.12rem);
  animation: mascot-bob 2.6s ease-in-out infinite;
  transform-origin: 50% 80%;
}

.hero-brand__wordmark {
  flex: 0 1 auto;
  height: clamp(4rem, 10.5vw, 7rem);
  width: auto;
  min-width: 0;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand__mascot {
    animation: none;
  }
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1.5deg);
  }
}

.hero-word {
  display: inline-block;
  color: inherit;
  opacity: 0;
  transform: translateY(0.14em);
  filter: blur(5px);
  animation: hero-ink 0.72s cubic-bezier(0.22, 0.82, 0.24, 1) forwards;
  animation-delay: calc(0.42s + var(--wi) * 95ms);
}

@keyframes hero-ink {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.hero__tagline {
  font-size: clamp(1.5rem, 4.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: clamp(0.45rem, 1.5vh, 0.75rem) 0 0;
  max-width: 26em;
  color: var(--hero-sero-soft);
}

.hero__lead {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: var(--c-slate);
  max-width: 38rem;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn--sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  border-radius: 10px;
}

.btn--hero {
  min-height: 48px;
  padding: 0.9rem 1.5rem;
  font-size: clamp(0.94rem, 2.6vw, 1.06rem);
  font-weight: 500;
  border-radius: var(--radius-md);
  border-width: 1.5px;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  box-shadow: none;
}

@media (max-width: 380px) {
  .btn--hero {
    flex: 1 1 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}

.btn:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

.btn--primary:focus-visible {
  outline-color: rgba(234, 88, 12, 0.55);
}

.btn:active {
  transform: scale(0.98);
}

/* В покое одинаково; оранжевый / синий только при наведении */
.btn--primary,
.btn--ghost {
  background: transparent;
  color: var(--c-slate);
  border-color: rgba(148, 163, 184, 0.55);
}

.btn--primary:hover,
.btn--ghost:hover {
  background: transparent;
}

.btn--primary:hover {
  color: var(--c-accent-stroke);
  border-color: var(--c-accent-stroke);
}

.btn--ghost:hover {
  color: var(--c-primary);
  border-color: var(--c-primary);
}

/* ——— Footer ——— */
.site-footer {
  position: relative;
  z-index: 0;
  background: var(--c-night);
  color: #cbd5e1;
  padding: 3rem 1.25rem 1.5rem;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__grid {
  max-width: 1080px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.site-footer__h {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  font-weight: 600;
}

.site-footer__muted {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  display: block;
}

.site-footer__bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.site-footer__copy {
  flex-shrink: 0;
}

.site-footer__bottom .site-footer__disclaimer {
  margin: 0 0 0 auto;
  max-width: min(100%, 34rem);
  font-size: 0.65rem;
  line-height: 1.4;
  color: #94a3b8;
  text-align: right;
}

@media (max-width: 640px) {
  .site-footer__bottom .site-footer__disclaimer {
    margin-left: 0;
    width: 100%;
    max-width: none;
    text-align: right;
  }
}

.site-footer__company {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.site-footer__company strong {
  font-weight: 600;
  color: #f1f5f9;
}

.site-footer__legal {
  display: block;
  width: 100%;
  margin: 0 0 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: #e2e8f0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.site-footer__legal:hover {
  color: #fff;
}

.site-footer__legal:focus-visible {
  outline: 2px solid rgba(226, 232, 240, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

.legal-dialog {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  max-width: calc(100vw - 2rem);
  width: min(560px, 100%);
  box-shadow: var(--shadow-lg);
}

.legal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.legal-dialog__form {
  padding: 0;
  margin: 0;
}

.legal-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-dialog__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-ink);
}

.legal-dialog__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--c-slate);
}

.legal-dialog__close:hover {
  background: #e2e8f0;
  color: var(--c-ink);
}

.legal-dialog__body {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
}

.legal-dialog__body p {
  margin: 0;
}

.legal-dialog__foot {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.legal-dialog__btn {
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  color: var(--c-ink);
}

.legal-dialog__btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary-deep);
}

.inner-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--header-h);
  background: var(--landing-hero-bg);
  background-color: #f1f5f9;
}

.inner-page__main {
  flex: 0 1 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inner-page .site-footer {
  flex-shrink: 0;
}

.inner-page__main h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}

.inner-page__main p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
}

.inner-page__main p + p {
  margin-top: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
  .hero-word {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .hero-pricing-fade__item.is-active .hero-pricing-fade__word,
  .hero-pricing-fade__item.is-active .hero-pricing-fade__hint,
  .hero-pricing-fade__item.is-active .hero-pricing-fade__val {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
