/* RESET — минимальный reset + базовый body */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  tab-size: 4;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: var(--fs-body, 16px);
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-0);
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--grad-mesh);
  z-index: -1;
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

::selection {
  background: var(--accent-violet-dim);
  color: var(--text-0);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-2);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* Touch devices — увеличенные тап-таргеты */
@media (pointer: coarse) {
  .btn, .nav a, .faq-item summary, .burger,
  button, .cta, a[role="button"] {
    min-height: 48px;
  }
  .faq-item summary::after { width: 32px; height: 32px; }
}

/* Тачи — отключаем hover-эффекты чтобы не залипали в нажатом состоянии после тапа */
@media (hover: none) {
  .btn:hover,
  .pain:hover, .sol-card:hover, .feature-cat:hover,
  .step:hover, .tariff:hover, .calc:hover,
  .faq-item:hover, .preset-chip:hover {
    transform: none !important;
    box-shadow: none;
  }
  .btn-primary:hover { box-shadow: var(--shadow-md); }
  .tariff.pro:hover { box-shadow: var(--shadow-md), 0 0 40px rgba(178, 75, 243, 0.15); }
}

/* Reduced motion — полное отключение анимаций */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .parallax, .tilt-3d, .sparkles, .float, .spin-slow,
  [class*="reveal"], [class*="animate"] {
    transform: none !important;
    animation: none !important;
  }
}
