/* =========================================================
   Портфолио веб-разработчика — стили
   Тёмная тема, акцент — лаймовый. Mobile-first.
   Меняешь фирменный цвет — правишь только --accent ниже.
   ========================================================= */

:root {
  /* Палитра */
  --bg:            #0a0a0d;
  --bg-alt:        #0e0f13;
  --surface:       #131419;
  --surface-2:     #17191f;
  --line:          rgba(255, 255, 255, 0.09);
  --line-strong:   rgba(255, 255, 255, 0.16);

  --text:          #f2f3f5;
  --text-mute:     #a0a4ad;
  /* Контраст на --surface: mute 7.4:1, dim 5.7:1 — обычный текст проходит WCAG AA */
  --text-dim:      #8b909b;

  --accent:        #d6ff4b;   /* акцентный цвет — меняй здесь */
  --accent-soft:   rgba(214, 255, 75, 0.14);
  --accent-line:   rgba(214, 255, 75, 0.45);
  --on-accent:     #101206;

  /* Типографика */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Метрики */
  --container: 1180px;
  --pad: 20px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  /* Место под скроллбар держится всегда: при открытии модалки страница не дёргается */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* Иконки — единый стиль обводки */
svg[viewBox] path,
svg[viewBox] circle,
svg[viewBox] rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ Анимация появления при скролле ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  /* Слой отпускается после появления — иначе браузер держит в памяти десятки текстур */
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==================== ШАПКА ==================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.logo__text { font-size: 15px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--text-mute);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}
.nav__link--cta {
  margin-left: 8px;
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
}
.nav__link--cta:hover {
  color: var(--on-accent);
  background: #e4ff74;
  box-shadow: 0 6px 24px rgba(214, 255, 75, 0.22);
}
.nav__link--cta.is-active::after { display: none; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.7px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--pad) 22px;
    background: rgba(10, 10, 13, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    /* visibility, а не только opacity: иначе скрытые пункты меню
       остаются в порядке табуляции и ловят фокус с клавиатуры */
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
                visibility 0s linear 0.25s;
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
  }
  .nav__link { padding: 14px 12px; font-size: 17px; }
  .nav__link.is-active::after { display: none; }
  .nav__link--cta { margin: 8px 0 0; text-align: center; }
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 64px) 0 96px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 90vh;
  background:
    radial-gradient(46% 52% at 22% 28%, rgba(214, 255, 75, 0.13), transparent 70%),
    radial-gradient(40% 46% at 78% 12%, rgba(90, 140, 255, 0.12), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero::after {
  /* тонкая сетка на фоне */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px;
  color: var(--text-mute);
  margin-bottom: 26px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214, 255, 75, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(214, 255, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 255, 75, 0); }
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  max-width: 16ch;
  margin-bottom: 26px;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__lead {
  max-width: 56ch;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--text-mute);
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 64px;
}

.hero__stats {
  display: grid;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero__stats li { display: flex; flex-direction: column; gap: 2px; }
.hero__stats strong {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hero__stats span { font-size: 14px; color: var(--text-mute); }

@media (min-width: 700px) {
  .hero__stats { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrolldot 1.9s var(--ease) infinite;
}
@keyframes scrolldot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55%      { transform: translateY(14px); opacity: 0.15; }
}
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* ==================== КНОПКИ ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), box-shadow 0.3s var(--ease), color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: #e6ff7d;
  box-shadow: 0 10px 32px rgba(214, 255, 75, 0.24);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.btn--full { width: 100%; }

.btn__arrow { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ==================== СЕКЦИИ ==================== */
.section { padding: clamp(72px, 11vw, 132px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--contact {
  background:
    radial-gradient(70% 90% at 85% 10%, rgba(214, 255, 75, 0.07), transparent 70%),
    var(--bg);
}

.section__head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 68px);
  text-align: center;
}
.section__head--left { margin-inline: 0; text-align: left; margin-bottom: 24px; }

.section__num {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.section__title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.section__sub {
  margin-top: 14px;
  color: var(--text-mute);
  font-size: clamp(0.98rem, 1.8vw, 1.06rem);
}

/* ==================== КАРТОЧКИ УСЛУГ ==================== */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.card {
  position: relative;
  padding: 28px 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.card::before {
  /* мягкая подсветка за курсором */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(214, 255, 75, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}
.card__icon svg { width: 22px; height: 22px; }

.card__title {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.card__desc { color: var(--text-mute); font-size: 14.8px; margin-bottom: 18px; }

.card__list { display: grid; gap: 9px; margin-bottom: 20px; }
.card__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.4px;
  color: var(--text);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.8;
}
.card__for {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.2px;
  color: var(--text-dim);
}

/* ==================== КЕЙСЫ ==================== */
.works {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .works { grid-template-columns: repeat(2, 1fr); } }

.work {
  display: flex;
  flex-direction: column;
  cursor: pointer;   /* карточка кликабельна целиком, а не только «Подробнее» */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.work:hover { transform: translateY(-5px); border-color: var(--line-strong); }

.work__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(140deg, #16181f, #0d0e12);
  overflow: hidden;
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s;
  opacity: 0.9;
}
.work:hover .work__media img { transform: scale(1.04); opacity: 1; }

.work__soon {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 13, 0.78);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
  font-size: 12.4px;
  color: var(--text-mute);
}

.work__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.work__tag {
  font-size: 12.4px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.work__title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.work__result {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 13.4px;
  font-weight: 600;
}
.work__more {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.6px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s;
}
.work__more svg { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
.work__more:hover { color: var(--accent); }
.work__more:hover svg { transform: translateX(4px); }

/* ==================== ПРОЦЕСС ==================== */
.timeline {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 860px;
  margin-inline: auto;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.step__num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s;
}
.step:hover .step__num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.step__title {
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.step__body p { color: var(--text-mute); font-size: 15px; max-width: 62ch; }
.step__time {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  border: 1px dashed var(--accent-line);
  border-radius: 999px;
  padding: 4px 12px;
}

@media (min-width: 780px) {
  .step { grid-template-columns: 64px 1fr; gap: 26px; padding: 28px 0; }
}

/* ==================== ТАРИФЫ ==================== */
.pricing {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .pricing { grid-template-columns: repeat(3, 1fr); } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.plan:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.plan--featured {
  background: linear-gradient(180deg, rgba(214, 255, 75, 0.07), rgba(255, 255, 255, 0.01) 42%), var(--surface);
  border-color: var(--accent-line);
  box-shadow: 0 24px 60px -30px rgba(214, 255, 75, 0.35);
}
@media (min-width: 900px) { .plan--featured { transform: scale(1.03); } }
@media (min-width: 900px) { .plan--featured:hover { transform: scale(1.03) translateY(-4px); } }

.plan__badge {
  position: absolute;
  top: -12px;
  left: 26px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12.2px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.plan__name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.plan__tagline { color: var(--text-mute); font-size: 14.4px; margin-top: -8px; }
.plan__price {
  font-size: 15px;
  color: var(--text-dim);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.plan__price strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(1.9rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--text);
}
.plan__list { display: grid; gap: 11px; margin-bottom: 6px; flex: 1; }
.plan__list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.6px;
  color: var(--text-mute);
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 13px;
  height: 8px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}
.pricing__note {
  margin-top: 26px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* ==================== ОБО МНЕ ==================== */
.about {
  display: grid;
  gap: 36px;
  align-items: start;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: center; }
}

.about__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 30% 15%, rgba(214, 255, 75, 0.12), transparent 65%),
    linear-gradient(160deg, #16181f, #0c0d11);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.about__media img { border-radius: 24px; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about__initials {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.07);
}
.about__badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 10, 13, 0.7);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: var(--text-mute);
}

.about__text p { color: var(--text-mute); font-size: 15.6px; margin-bottom: 16px; max-width: 62ch; }
.about__points { display: grid; gap: 12px; margin-top: 26px; }
.about__points li {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.8px;
  color: var(--text-mute);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.about__points li:hover { border-color: var(--accent-line); transform: translateX(4px); }
.about__points strong { color: var(--text); font-weight: 600; }

/* ==================== ОТЗЫВЫ ==================== */
.reviews { position: relative; }
.reviews__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 88%);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
}
.reviews__track::-webkit-scrollbar { display: none; }
.reviews__track > * { scroll-snap-align: start; }

@media (min-width: 900px) {
  .reviews__track {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    gap: 18px;
  }
}

.review {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.review:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.review__stars { color: var(--accent); letter-spacing: 3px; font-size: 14px; }
.review blockquote { color: var(--text-mute); font-size: 15.2px; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.review figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.review figcaption strong { font-size: 14.6px; font-weight: 600; }
.review figcaption span span { font-size: 13px; color: var(--text-dim); }
.review__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}

.reviews__controls { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.rbtn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  transition: background 0.25s var(--ease), border-color 0.25s;
}
.rbtn:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.rbtn svg { width: 20px; height: 20px; }

/* На широком экране отзывы стоят сеткой в три колонки — листать нечего.
   Правило должно идти ПОСЛЕ .reviews__controls, иначе каскад его перебивает. */
@media (min-width: 900px) {
  .reviews__controls { display: none; }
}

/* ==================== КОНТАКТЫ / ФОРМА ==================== */
.contact { display: grid; gap: 40px; }
@media (min-width: 940px) { .contact { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

.contact__links { display: grid; gap: 10px; margin-top: 30px; }
.contact__links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
}
.contact__links a:hover { border-color: var(--accent-line); background: var(--surface-2); transform: translateX(4px); }
.contact__links span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.contact__links strong { font-size: 14.8px; font-weight: 600; }
.contact__links span span { font-size: 13.4px; color: var(--text-dim); }
.contact__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.contact__ico svg { width: 21px; height: 21px; }

.form {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
@media (min-width: 560px) { .form { padding: 34px 30px; } }

.field { display: grid; gap: 7px; }
.field label { font-size: 13.6px; color: var(--text-mute); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color 0.25s var(--ease), background 0.25s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a4ad' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
.field select option { background: var(--bg); color: var(--text); }
.field input::placeholder,
.field textarea::placeholder { color: #787d88; }   /* 4.8:1 — подсказка читается, но не спорит с введённым текстом */
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface-2);
}
.field.has-error input,
.field.has-error textarea { border-color: #ff6b6b; }
.field__err { font-size: 12.8px; color: #ff8787; min-height: 0; }
.field.has-error .field__err { min-height: 18px; }

/* Поле-ловушка для ботов: уводим за пределы экрана, а не display:none —
   часть ботов пропускает скрытые через display поля */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__send { display: grid; gap: 10px; margin-top: 6px; }
.form__alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form__alt .btn { padding: 13px 16px; font-size: 14.4px; }

.form__note {
  font-size: 13.4px;
  color: var(--text-dim);
  min-height: 20px;
}
.form__note.is-success { color: var(--accent); }
.form__policy { font-size: 12.6px; color: var(--text-dim); }
.form__policy a {
  color: var(--text-mute);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.form__policy a:hover { color: var(--accent); border-color: var(--accent-line); }

/* ==================== ПОДВАЛ ==================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 40px;
  background: var(--bg-alt);
}
.footer__inner { display: grid; gap: 26px; }
@media (min-width: 780px) {
  .footer__inner { grid-template-columns: 1.4fr 1fr auto; align-items: center; gap: 30px; }
}
.footer__desc { margin-top: 12px; font-size: 13.8px; color: var(--text-dim); max-width: 40ch; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__nav a { font-size: 14.4px; color: var(--text-mute); transition: color 0.25s; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { font-size: 13.4px; color: var(--text-dim); }

/* ==================== МОДАЛКА КЕЙСА ==================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  animation: fade 0.3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal__window {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 34px 24px 30px;
  animation: pop 0.35s var(--ease);
}
@media (min-width: 640px) { .modal__window { padding: 40px 40px 36px; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-mute);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.modal__close:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.modal__close svg { width: 18px; height: 18px; }

.modal__tag { font-size: 12.6px; letter-spacing: 0.1em; color: var(--accent); }
.modal__title {
  font-size: clamp(1.5rem, 4vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 10px 0 20px;
  padding-right: 44px;
}
.modal__block { margin-bottom: 22px; }
.modal__block h4 {
  font-size: 12.8px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.modal__block p { color: var(--text-mute); font-size: 15.2px; }
.modal__metrics { display: grid; gap: 12px; margin: 24px 0 26px; }
@media (min-width: 520px) { .modal__metrics { grid-template-columns: repeat(3, 1fr); } }
.modal__metric {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.modal__metric strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.modal__metric span { font-size: 13px; color: var(--text-dim); }

/* ==================== КНОПКА «НАВЕРХ» ==================== */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top svg { width: 20px; height: 20px; }
.to-top svg path { stroke-width: 2; }

/* ==================== ПРАВОВЫЕ СТРАНИЦЫ (политика) ==================== */
/* Шапка без бургера: одна кнопка, которая не должна прятаться на телефоне */
.nav--plain { position: static; opacity: 1; transform: none; pointer-events: auto; padding: 0; }
@media (max-width: 900px) {
  .nav--plain {
    inset: auto;
    flex-direction: row;
    background: none;
    backdrop-filter: none;
    border: 0;
  }
  .nav--plain .nav__link--cta { margin: 0; padding: 10px 16px; font-size: 14px; }
}

.legal { padding: calc(var(--header-h) + 56px) 0 96px; }
.legal__inner { max-width: 780px; }

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.legal__back:hover { color: var(--accent); }
.legal__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.legal h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.legal__date { margin-top: 10px; font-size: 14px; color: var(--text-dim); }
.legal__lead { margin-top: 22px; font-size: 17px; color: var(--text-mute); }

.legal h2 {
  margin-top: 40px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.legal h2 + p, .legal h2 + ul { margin-top: 12px; }
.legal p, .legal li { color: var(--text-mute); font-size: 15.5px; line-height: 1.75; }
.legal p + p, .legal ul + p { margin-top: 14px; }

.legal ul { margin: 12px 0 0; padding-left: 0; list-style: none; }
.legal li { position: relative; padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.legal a:not(.btn):not(.legal__back) {
  color: var(--text);
  border-bottom: 1px solid var(--accent-line);
  transition: color 0.2s var(--ease);
}
.legal a:not(.btn):not(.legal__back):hover { color: var(--accent); }

.legal__cta { margin-top: 48px; }
