/* NIGHT SHIFT — общий стиль сайта.
   Темы: день/ночь через data-theme на <html>, авто по времени суток (theme.js). */

/* Палитра строго ЧБ (решение Алекса): ночь — чёрный с белым, день — белый с чёрным.
   Никакой синевы и жёлтого. Свечения — белые/серые, как корона затмения. */
:root {
  --bg: #f6f6f6;
  --bg-soft: #ededee;
  --surface: #ffffff;
  --text: #121214;
  --text-muted: #5c5c62;
  --line: #e3e3e5;
  --accent: #121214;
  --accent-soft: #e9e9eb;
  --accent-contrast: #ffffff;
  --glow: rgba(0, 0, 0, 0.2);
  --glow-strong: rgba(0, 0, 0, 0.38);
  --hero-glow: radial-gradient(60% 50% at 70% 10%, rgba(0, 0, 0, 0.05), transparent 70%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

html[data-theme="night"] {
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --surface: #151517;
  --text: #f1f1f2;
  --text-muted: #9c9ca3;
  --line: #27272a;
  --accent: #ffffff;
  --accent-soft: #202023;
  --accent-contrast: #0a0a0b;
  --glow: rgba(255, 255, 255, 0.24);
  --glow-strong: rgba(255, 255, 255, 0.55);
  --hero-glow: radial-gradient(60% 50% at 70% 10%, rgba(255, 255, 255, 0.06), transparent 70%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Заголовочный шрифт: широкий техно-гротеск под бренд */
h1, h2, .logo, .intro-logo, .step .num, .price, .stat .value {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, p, li { overflow-wrap: break-word; }

/* Ровные переносы: заголовки балансируются, абзацы без рваного правого края */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

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

/* ---------- Интро-заставка (логотип на весь экран при заходе) ---------- */

.intro { display: none; }

html.intro-play .intro {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  animation: introFade 2s ease forwards;
}

.intro-logo {
  font-weight: 700;
  font-size: clamp(30px, 6vw, 72px);
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0;
  will-change: transform, opacity;
}

.intro-logo .dot { color: var(--accent); }

html.intro-play .intro-logo { animation: introLogo 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* только transform и opacity — без пересчёта макета, иначе анимация дёргается */
@keyframes introLogo {
  from { opacity: 0; transform: scale(1.12); }
  45% { opacity: 1; }
  to { opacity: 1; transform: scale(1); }
}

@keyframes introFade {
  0%, 75% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html.intro-play .intro { display: none; }
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.logo .dot { color: var(--accent); }

.nav {
  display: flex;
  align-items: center; /* иначе ссылки растягиваются до высоты пилюли NS и текст уезжает вверх */
  gap: 22px;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav a.active { color: var(--text); font-weight: 700; }

.nav a.active:not(.nav-home)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Кнопка NS — первая «вкладка»: возвращает на главную (там солнце) */
.nav-home {
  font-family: "Unbounded", "Onest", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  height: 38px; /* одна высота с кружком темы */
  padding: 0 14px;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.nav-home:hover { border-color: var(--text); color: var(--text); }

.nav a.nav-home.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

/* Индикатор времени суток в шапке: солнышко днём, месяц ночью (не кнопка) */
.theme-badge {
  margin-left: 8px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-badge svg { width: 18px; height: 18px; }
.theme-badge .icon-sun { display: block; }
.theme-badge .icon-moon { display: none; }
html[data-theme="night"] .theme-badge .icon-sun { display: none; }
html[data-theme="night"] .theme-badge .icon-moon { display: block; }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  padding: 104px 0 96px;
  background: var(--hero-glow), var(--bg);
  overflow: hidden;
}

.hero .wrap { position: relative; z-index: 1; }

/* Затмение: неподвижный тёмный диск, вокруг — аккуратная переливающаяся корона.
   Сам шар НЕ двигается (правка Алекса); переливка — медленное вращение
   неравномерной короны + мягкий блик, поворачивающийся за курсором. */
.eclipse {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(240px, 23vw, 350px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.eclipse i {
  position: absolute;
  display: block;
  border-radius: 50%;
}

/* корона: ровное кольцо света с плавной неравномерностью, зажатое маской у кромки */
.eclipse .corona,
.eclipse .beam {
  inset: -20%;
  -webkit-mask-image: radial-gradient(circle, transparent 40%, #000 51%, #000 60%, transparent 74%);
  mask-image: radial-gradient(circle, transparent 40%, #000 51%, #000 60%, transparent 74%);
}

.eclipse .corona {
  background: conic-gradient(from 0deg,
    transparent, var(--glow) 15%, transparent 32%,
    var(--glow) 52%, transparent 70%,
    var(--glow) 88%, transparent);
  filter: blur(14px);
  animation: coronaSpin 90s linear infinite;
}

.eclipse .beam {
  background: conic-gradient(from -35deg,
    transparent 0deg, var(--glow-strong) 35deg, transparent 72deg);
  filter: blur(18px);
  will-change: transform;
}

.eclipse .disc {
  inset: 0;
  background: radial-gradient(circle at 42% 38%, #17171a, #000000 76%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 2px 20px rgba(255, 255, 255, 0.05),
    0 0 44px var(--glow);
}

@keyframes coronaSpin {
  to { transform: rotate(360deg); }
}

/* на внутренних страницах и на странице Шёпота — компактное затмение */
.page-hero .eclipse,
.hero .wrap.hero-app ~ .eclipse,
.hero:has(.hero-app) .eclipse {
  width: clamp(150px, 15vw, 215px);
  right: 6%;
}

@media (max-width: 900px) {
  .eclipse { display: none; }
}

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

.page-hero { padding: 84px 0 68px; }
.page-hero h1 { max-width: 24ch; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 22px;
  max-width: 19ch;
}

/* акцент-слова в заголовках отключены (Алекс забраковал и курсив, и контур) —
   спаны .fancy остаются в разметке, но рендерятся как обычный текст */
.fancy { font-style: normal; }

.hero p.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 34px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.2s, border-color 0.2s;
}

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

.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

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

.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
}
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }

/* ---------- Секции ---------- */

section { padding: 76px 0; }

/* мягкий градиент по краям вместо резких прямоугольных стыков */
section.alt {
  background: linear-gradient(180deg,
    var(--bg) 0%,
    var(--bg-soft) 16%,
    var(--bg-soft) 84%,
    var(--bg) 100%);
}

.section-head { max-width: 640px; margin-bottom: 44px; }

h2 {
  font-size: clamp(21px, 2.7vw, 29px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- Карточки ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.4s ease, border-color 0.4s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  hyphens: auto;               /* переносы по слогам выравнивают правый край */
  hyphenate-limit-chars: 10 4 4; /* но только в длинных словах */
}

.card .tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

/* ---------- Бегущая лента ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  white-space: nowrap;
  animation: tickerMove 38s linear infinite;
}

.ticker-track span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker-track .dot { color: var(--accent); }

@keyframes tickerMove {
  to { transform: translateX(-50%); }
}

/* ---------- Цифры (полоса метрик) ---------- */

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

.stat .value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.15;
}

.stat .label { color: var(--text-muted); font-size: 14.5px; margin-top: 6px; }

/* ---------- Промо-слот (место под ролик на странице работ) ---------- */

.promo-slot {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    linear-gradient(135deg, var(--glow-strong), transparent 35%, transparent 65%, var(--glow)) border-box;
  box-shadow: 0 0 70px var(--glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.promo-slot .play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* ---------- Тарифы ---------- */

.price-card { display: flex; flex-direction: column; }

.price-card .price {
  font-size: 25px;
  font-weight: 700;
  margin: 8px 0 2px;
}

.price-card .term { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

.price-card ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  color: var(--text-muted);
  font-size: 15px;
  flex: 1;
}

.price-card li {
  padding: 7px 0 7px 26px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.price-card li:last-child { border-bottom: none; }

.price-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.price-card.featured { border-color: var(--accent); }

.price-card.featured .tag { background: var(--accent); color: var(--accent-contrast); }

/* ---------- Приложения ---------- */

.app-card {
  display: flex;
  gap: 26px;
  align-items: center;
}

.app-card img {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  flex-shrink: 0;
}

.app-card .meta { flex: 1; }

.app-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  border-style: dashed;
  min-height: 144px;
  text-align: center;
}
.app-soon:hover { transform: none; box-shadow: none; }

/* ---------- Шаги: 2×2, номер сбоку — широкая колонка текста без рваного края ---------- */

.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.step { position: relative; }

/* горизонтальный макет (номер сбоку) — только в сетке .steps;
   на странице Шёпота шаги вертикальные, структура другая */
.steps .step {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.step .num {
  font-size: 27px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.85;
  line-height: 1.2;
  min-width: 56px;
  margin-bottom: 10px;
}

.step ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

.step li {
  position: relative;
  padding: 5px 0 5px 22px;
}

.step li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 680px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Страница Шёпота ---------- */

.hero-app { display: flex; align-items: center; gap: 44px; }

.hero-app .app-icon {
  width: 168px;
  height: 168px;
  border-radius: 38px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

html[data-theme="night"] .hero-app .app-icon {
  box-shadow: 0 10px 60px rgba(255, 255, 255, 0.16);
}

.download-note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 12px;
}

.kbd {
  display: inline-block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 2px 9px;
}

/* ---------- Контакты / футер ---------- */

.contact-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Появление при скролле ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.visible { opacity: 1; transform: none; }

/* В свежих браузерах — привязка к скроллу: снизу выезжает, сверху растворяется */
@supports (animation-timeline: view()) {
  html.js .reveal,
  html.js .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
    animation: nsFxIn linear both, nsFxOut linear both;
    animation-timeline: view(), view();
    animation-range: entry 0% entry 55%, exit 45% exit 100%;
  }
}

@keyframes nsFxIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes nsFxOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-20px); }
}

/* ---------- Куки-баннер ---------- */

.cookies {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 150;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text-muted);
  animation: cookiesIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cookies .btn { padding: 9px 18px; font-size: 14px; flex-shrink: 0; }

@keyframes cookiesIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .cookies { animation: none; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Мобильная версия ---------- */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .site-header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 8px 20px;
  }
  .theme-badge { margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 3px;
  }
  .nav a { white-space: nowrap; }
  .nav a.active::after { bottom: -4px; }
  .hero { padding: 64px 0 56px; }
  section { padding: 56px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-app { flex-direction: column; text-align: center; align-items: center; }
  .hero-app .cta-row { justify-content: center; }
  .app-card { flex-direction: column; text-align: center; }
  .cookies { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}


/* ---------- GEO-аудит (бесплатная проверка, страница услуг) ---------- */

.geo-audit {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 20px;
  padding: 48px;
}

.geo-audit .eyebrow { color: inherit; opacity: 0.7; }
.geo-audit h2 { color: inherit; }
.geo-audit-text p { opacity: 0.8; margin: 0 0 22px; }

.geo-audit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.geo-audit-list li {
  position: relative;
  padding-left: 26px;
  opacity: 0.9;
}

.geo-audit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.geo-audit-form {
  display: grid;
  gap: 14px;
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 28px;
}

.geo-audit-form label { display: grid; gap: 6px; }

.geo-audit-form label span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.geo-audit-form input {
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.geo-audit-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.geo-audit-form .btn { justify-content: center; margin-top: 4px; }
.geo-audit-form .btn[disabled] { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

/* поле-ловушка для ботов: людям не видно и не доступно */
.geo-audit-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.geo-audit-note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.geo-audit-status { font-size: 14.5px; margin: 0; }
.geo-audit-status:empty { display: none; }
.geo-audit-status a { color: inherit; }

/* Индикатор ожидания на время живого прогона: до ответа сервера здесь
   не бывает текста об ошибке — только нейтральные этапы проверки. */
.geo-progress[hidden] { display: none; }

.geo-progress {
  display: grid;
  gap: 8px;
}

.geo-progress-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.geo-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 20s linear;
}

.geo-progress-fill.is-done { transition: width 0.25s ease; }

.geo-progress-stage {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .geo-progress-track { display: none; }
  .geo-progress-fill { transition: none; }
}

.card-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}

.card-link:hover { border-color: var(--accent); }

@media (max-width: 900px) {
  .geo-audit { grid-template-columns: 1fr; gap: 28px; padding: 32px; }
}

@media (max-width: 680px) {
  .geo-audit { padding: 24px; border-radius: 16px; }
  .geo-audit-form { padding: 20px; }
}

/* ---------- GEO-аудит — результат живой проверки ---------- */

.geo-result {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  display: grid;
  gap: 36px;
}

.geo-result[hidden] { display: none; }

/* Заглушка на время проверки: тот же контур, без прыжка макета при появлении результата */
.geo-result-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

.geo-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  animation: geoSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes geoSpin { to { transform: rotate(360deg); } }

/* Сводка: кольцо балла + подпись */
.geo-summary {
  display: flex;
  align-items: center;
  gap: 32px;
}

.geo-ring-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
}

.geo-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.geo-ring-track { fill: none; stroke: var(--line); stroke-width: 10; }

.geo-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.geo-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.geo-ring-score {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.geo-ring-max { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.geo-band-label {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: none;
}

.geo-band-meaning { margin: 0; color: var(--text-muted); font-size: 15px; }

/* Разбивка по категориям */
.geo-categories { display: grid; gap: 14px; }

.geo-section-title {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.geo-cat-row { display: grid; gap: 6px; }

.geo-cat-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
}

/* min-width: 0 — без него flex-элемент не сжимается уже своего
   min-content (самого длинного слова) и «Структурированные данные (JSON-LD)»
   выталкивает балл справа за пределы карточки на узких экранах */
.geo-cat-name { color: var(--text); min-width: 0; }
.geo-cat-score { color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.geo-cat-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.geo-cat-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* Главные проблемы */
.geo-issues { display: grid; gap: 12px; }

.geo-issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.geo-issue {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}

/* текст рекомендации может содержать длинный URL без пробелов — не должен
   выталкивать бейдж или вылезать за карточку (та же причина, что у .geo-cat-name) */
.geo-issue > span:last-child { min-width: 0; overflow-wrap: break-word; }

.geo-issue-badge {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  white-space: nowrap;
}

/* критичные и высокоприоритетные пункты — заливкой, без цвета, только контраст ЧБ */
.geo-issue-badge.is-strong {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.geo-issues-total { margin: 0; color: var(--text-muted); font-size: 13.5px; }

/* Шаг 2: получить полный отчёт */
.geo-step2 {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: grid;
  gap: 14px;
}

.geo-step2 h3 {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.geo-step2-note { margin: 0; color: var(--text-muted); font-size: 13.5px; }

.geo-step2-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.geo-step2-form input {
  flex: 1 1 240px;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.geo-step2-form input:focus { outline: none; border-color: var(--accent); }
.geo-step2-form .btn { flex-shrink: 0; }
.geo-step2-form .btn[disabled] { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.geo-manual-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .geo-ring-fill { transition: none; }
  .geo-cat-fill { transition: none; }
  .geo-spinner { animation: none; }
}

@media (max-width: 680px) {
  .geo-result { padding: 24px; border-radius: 16px; gap: 28px; }
  /* кольцо над текстом — иначе колонке с описанием остаётся слишком мало места */
  .geo-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .geo-ring-wrap { width: 104px; height: 104px; }
  .geo-ring-score { font-size: 26px; }
  /* строка и балл конкурируют за узкую ширину — на мобиле балл переносим под название,
     а не полагаемся на flex-wrap впритык к краю карточки */
  .geo-cat-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .geo-step2-form { flex-direction: column; }
  .geo-step2-form .btn { width: 100%; justify-content: center; }
}

/* подводящая статистика в блоке GEO-аудита */
.geo-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 8px;
}

.geo-stat-value {
  font-family: "Unbounded", "Onest", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 6px;
}

.geo-stat-label { font-size: 14.5px; opacity: 0.78; line-height: 1.45; }

.geo-stats-source { font-size: 12.5px; opacity: 0.55; margin: 0 !important; }

/* ---------- Страницы продуктов услуг (uslugi-*.html) ---------- */

.product-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.product-fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.product-fact .label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.product-fact .value {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.list-check,
.list-cross {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.list-check li,
.list-cross li {
  position: relative;
  padding: 9px 0 9px 30px;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 15.5px;
}

.list-check li:last-child,
.list-cross li:last-child { border-bottom: none; }

.list-check li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.list-cross li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17.5px;
  width: 14px;
  height: 2px;
  background: var(--text-muted);
  opacity: 0.6;
}

.price-note {
  margin: 18px 0 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

.example-card {
  border-left: 3px solid var(--accent);
}

.example-card p { color: var(--text); font-size: 16.5px; }

.price-card .save {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  margin: -6px 0 16px;
}

.bundle-note {
  text-align: center;
  color: var(--text-muted);
  margin-top: 28px;
}

.bundle-note a { color: var(--text); }

@media (max-width: 900px) {
  .product-facts { grid-template-columns: 1fr; }
}

/* подсказка на страницах без блока проверки */
.geo-hint {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 340px;
  padding: 14px 14px 14px 18px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
}

.geo-hint.is-in { transform: none; opacity: 1; }

.geo-hint a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}

.geo-hint a small { display: block; font-weight: 400; opacity: 0.7; margin-top: 2px; }

.geo-hint button {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-contrast) 30%, transparent);
  background: transparent;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 680px) {
  .geo-stats { grid-template-columns: 1fr; gap: 14px; }
  .geo-hint { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .geo-hint { transition: none; }
}

/* ---------- Соцсети ---------- */

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}

.social-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.social-link:hover { border-color: var(--accent); transform: translateY(-2px); }

.social-link[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.footer-socials a svg { width: 15px; height: 15px; }

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

.footer-socials a[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* соцсети без ссылки не показываем — появятся, когда впишем адрес (README → «Соцсети») */
.footer-socials a[aria-disabled="true"],
.social-link[aria-disabled="true"] { display: none; }

/* карточки со ссылкой внизу: ссылка прижата к нижнему краю, чтобы в ряду стояла на одном уровне */
.card:has(> .card-link) {
  display: flex;
  flex-direction: column;
}
.card:has(> .card-link) > .card-link {
  margin-top: auto;
  padding-top: 14px;
  align-self: flex-start;
}

/* ---------- Кликабельные карточки продуктов (хаб услуг) ---------- */

.card-product {
  color: inherit;
  text-decoration: none;
}

.card-product:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
