/*
 * Общий слой оформления (2026-10-08): глубина, тени, лёгкий 3D.
 * Подключается последним в <head>, поэтому при равной специфичности
 * побеждает встроенные стили страниц, а сами страницы не меняются.
 * Убрать слой — убрать две строки <link>/<script> из страницы.
 */

:root {
  --ps-edge: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --ps-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
  --ps-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.4), 0 28px 56px -20px rgba(0, 0, 0, 0.8),
    0 22px 60px -26px rgba(118, 75, 162, 0.65);
  --ps-ring: rgba(124, 108, 255, 0.45);
}

/* ── Карточки: лежат на фоне, под курсором поднимаются и светятся ── */
.service-card,
.why-card,
.case-card,
.post-card,
.faq-item,
.card,
.metric,
.cta-box {
  position: relative;
  box-shadow: var(--ps-edge), var(--ps-shadow);
  transition:
    transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

.service-card:hover,
.why-card:hover,
.case-card:hover,
.post-card:hover {
  border-color: var(--ps-ring);
  box-shadow: var(--ps-edge), var(--ps-shadow-hover);
}

.service-card:hover,
.why-card:hover,
.post-card:hover {
  transform: translateY(-6px);
}

/* Блик под курсором — отдельным слоем, чтобы не трогать ::before/::after страниц. */
.ps-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(140, 120, 255, 0.16), transparent 55%);
  transition: opacity 0.35s ease;
  z-index: 1;
}
.ps-tilt:hover .ps-glare { opacity: 1; }

/* Иконки услуг — с объёмом. */
.icon-tile {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px -8px rgba(102, 126, 234, 0.6);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.service-card:hover .icon-tile { transform: translateY(-2px) scale(1.06); }

/* ── Кнопки: глубина и свечение ── */
.btn,
.button:not(.secondary) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 26px -10px rgba(118, 75, 162, 0.85),
    0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn:hover,
.button:not(.secondary):hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 18px 36px -12px rgba(118, 75, 162, 0.95),
    0 3px 8px rgba(0, 0, 0, 0.4);
}
.btn:active,
.button:active { transform: translateY(0); }

/* ── Главная: разделы без пустых полос между ними ── */
section.section#services,
section.section#why,
section.section#cases,
section.section#faq {
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
}

/* ── Шапка: стекло с тенью при прокрутке ── */
.ps-scrolled {
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .why-card,
  .case-card,
  .post-card,
  .faq-item,
  .card,
  .metric,
  .cta-box,
  .btn,
  .button,
  .icon-tile { transition: none; }
  .service-card:hover,
  .why-card:hover,
  .post-card:hover,
  .btn:hover,
  .button:hover { transform: none; }
}
