/* Базовые стили сайта — уникализируйте цвета/шрифт per site при необходимости */

:root {
  --text: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --bg: #ffffff;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.header-phone {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

/* Последние цифры размыты для наблюдателя; полный номер в HTML и tel: для робота */
.phone-link__tail {
  position: relative;
  display: inline-block;
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  isolation: isolate;
  transition: filter 0.25s ease, color 0.25s ease;
}

/* Переливающийся блик как в Telegram */
.phone-link__tail::after {
  content: "";
  position: absolute;
  inset: -2px -8px;
  background: linear-gradient(
    105deg,
    transparent 18%,
    rgba(255, 255, 255, 0.12) 36%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(200, 220, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.55) 52%,
    rgba(255, 255, 255, 0.12) 64%,
    transparent 82%
  );
  background-size: 280% 100%;
  animation: phone-tail-shimmer 2.2s ease-in-out infinite;
  pointer-events: none;
  border-radius: 3px;
}

@keyframes phone-tail-shimmer {
  0% { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}

.phone-link--revealed .phone-link__tail {
  filter: none;
  -webkit-filter: none;
  user-select: text;
}

.phone-link--revealed .phone-link__tail::after {
  content: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .phone-link__tail::after {
    animation: none;
    background-position: 50% 0;
  }
}

@media print {
  .phone-link__tail {
    filter: none;
    -webkit-filter: none;
  }

  .phone-link__tail::after {
    content: none;
  }
}

main {
  padding: 2rem 0 3rem;
}

main h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.content {
  margin-bottom: 2rem;
}

.content p { margin: 0 0 1rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer nav a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer nav a:hover { text-decoration: underline; }

/* --- Layout shell (theme-specific overrides in themes/*.css) --- */

.top-bar {
  font-size: 0.82rem;
  padding: 0.45rem 0;
  background: var(--topbar-bg, #f1f5f9);
  color: var(--topbar-text, var(--muted));
  border-bottom: 1px solid var(--border);
}

.top-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.layout-main {
  padding: 0 0 3rem;
}

.layout-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.layout-content {
  min-width: 0;
}

.page-title {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.page-title--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.hero__lead {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.hero__btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.hero-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.hero-steps span {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.service-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.service-card__label {
  font-weight: 600;
  font-size: 0.92rem;
}

.service-card__arrow {
  color: var(--accent);
}

.layout-sidebar {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: var(--sidebar-bg, #f8fafc);
  height: fit-content;
}

.sidebar__title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.sidebar-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar__link {
  display: block;
  padding: 0.45rem 0.55rem;
  margin: 0.15rem 0;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
}

.sidebar__link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--accent);
}

.sidebar__link.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 900px) {
  .theme-amber .layout-grid,
  .theme-forest.page-inner .layout-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 899px) {
  .layout-sidebar {
    order: 2;
  }
}

/* --- Shared layout components (theme shells) --- */

.hero__tag {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.88;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn--amber {
  background: #d97706;
  color: #1c1917;
}

.svc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0;
}

.svc-nav__link {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.svc-nav--tabs .svc-nav__link {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.svc-nav--chips .svc-nav__link {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.svc-nav--pills .svc-nav__link {
  padding: 0.45rem 0.9rem;
  border-radius: 0;
  border: 2px solid #fed7aa;
  color: #9a3412;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.card-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--border);
  background: var(--card-bg, #fff);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.card-tile__go {
  color: var(--accent);
  font-size: 1.2rem;
}

.side-nav {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: var(--sidebar-bg, #f8fafc);
  height: fit-content;
}

.side-nav__title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.side-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav__link {
  display: block;
  padding: 0.45rem 0.55rem;
  margin: 0.12rem 0;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.side-nav__link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.side-nav__link.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.fact-panel {
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1.25rem;
  background: #f0f9ff;
  height: fit-content;
}

.fact-panel__title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: #0369a1;
}

.fact-panel__list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: #0c4a6e;
}

.fact-panel__cta {
  display: block;
  text-align: center;
  padding: 0.55rem;
  background: #0284c7;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__stats li {
  text-align: center;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.hero__stats strong {
  display: block;
  font-size: 1.15rem;
}

.hero__stats span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.hero__split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero__visual {
  min-height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__visual-inner {
  font-size: 3rem;
  font-weight: 800;
  color: #4338ca;
  opacity: 0.35;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.hero__catalog {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.hero__spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.hero__spec div {
  text-align: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.hero__spec span {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero__spec small {
  font-size: 0.75rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1.4fr 1fr;
  }

  .hero__split {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero__catalog {
    grid-template-columns: 1.3fr 0.9fr;
  }
}
