/* VAVADA Brand SEO Hub — Design System 2026 */
/* Тёмная тема: синевато-серый фон, красный логотип, зелёные кнопки */

:root {
  /* Логотип */
  --logo: #e53e3e;
  --logo-hover: #dc2626;

  /* Кнопки */
  --primary: #22c55e;
  --primary-dark: #15803d;
  --primary-shadow: rgba(34, 197, 94, 0.35);

  /* Фон */
  --bg-base: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-overlay: rgba(15, 23, 42, 0.95);

  /* Акцент */
  --accent: #60a5fa;
  --accent-red: #ef4444;

  /* Текст */
  --text: rgba(255, 255, 255, 0.94);
  --text-muted: rgba(255, 255, 255, 0.58);

  /* Карточки */
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);

  /* Callout */
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Радиусы */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;

  /* Тени */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 4px 6px rgba(0, 0, 0, 0.25);
  --shadow-3: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-4: 0 20px 25px rgba(0, 0, 0, 0.35);
  --shadow-5: 0 25px 50px rgba(0, 0, 0, 0.45);
  --shadow-6: 0 30px 60px rgba(0, 0, 0, 0.55);
  --shadow-btn: 0 4px 14px var(--primary-shadow);

  /* Градиенты */
  --grad-hero: radial-gradient(ellipse 80% 50% at 50% 0%, #1e293b 0%, #0f172a 60%);
  --grad-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --grad-button: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  --grad-divider: linear-gradient(90deg, var(--primary), var(--accent), transparent);

  /* Типографика */
  --font-system: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: clamp(0.7rem, 1vw, 0.75rem);
  --text-sm: clamp(0.8rem, 1.2vw, 0.875rem);
  --text-base: clamp(0.95rem, 1.5vw, 1.06rem);
  --text-lg: clamp(1.1rem, 1.8vw, 1.2rem);
  --text-xl: clamp(1.25rem, 2vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 2.5vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 3vw, 2.25rem);
  --line-tight: 1.35;
  --line-normal: 1.6;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-system);
  font-size: var(--text-base);
  line-height: var(--line-normal);
  color: var(--text);
  background: var(--grad-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Skip-link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-md);
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus-visible { top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: rgba(15, 23, 42, 0.85);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--card-border);
}

.logo {
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--logo);
  letter-spacing: 0.02em;
}
.logo:hover { color: var(--logo-hover); text-decoration: none; }

.nav-desktop {
  display: none;
  gap: 1.5rem;
  align-items: center;
}
.nav-desktop a { color: var(--text); }
.nav-desktop a:hover { color: var(--accent); text-decoration: none; }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .burger-btn { display: none !important; }
}

/* Burger button */
.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s;
}
.burger-btn:hover { background: var(--card-bg); }
.burger-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.burger-btn span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-open { overflow: hidden; }

/* Nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 2rem;
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.nav-overlay-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s;
}
.nav-overlay-close:hover { background: var(--card-bg); }
.nav-overlay-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}
.nav-overlay .btn-cta {
  flex-shrink: 0;
  margin-top: 1rem;
}
.nav-overlay-links a {
  display: block;
  padding: 1rem 1.25rem;
  min-height: 44px;
  color: var(--text);
  font-size: var(--text-lg);
  border-radius: var(--r-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: transform 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.nav-overlay-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
  text-decoration: none;
  color: var(--accent);
}

/* CTA button */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.5rem;
  background: var(--grad-button);
  color: #fff !important;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-shadow);
  text-decoration: none !important;
}
.btn-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Hero */
.hero {
  position: relative;
  padding: 4rem 1.5rem 3rem;
  background: var(--grad-hero);
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: var(--text-3xl);
  line-height: var(--line-tight);
  text-align: center;
}
.hero p {
  margin: 0 auto;
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 48rem;
  text-align: center;
  line-height: 1.6;
}
@media (max-width: 480px) {
  .hero { padding: 3rem 1rem; }
}

/* Hero screenshot — скриншот главного вида VAVADA */
.hero-screenshot {
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}
.screenshot-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 2px solid var(--card-border);
  box-shadow:
    var(--shadow-3),
    0 0 20px rgba(34, 197, 94, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
}
.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--r-md);
  vertical-align: middle;
  background: var(--bg-base);
}
.hero-screenshot figcaption {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 600px) {
  .hero-screenshot {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Ticker */
.ticker-wrap {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.75rem 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.ticker {
  display: flex;
  width: max-content;
  animation: ticker 25s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
.ticker span {
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker { animation: none; }
}

/* Main layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}
@media (min-width: 900px) {
  .container.has-toc {
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .toc-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}

/* TOC */
.toc-sidebar nav { padding: 1rem 0; }
.toc-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-sidebar li { margin-bottom: 0.5rem; }
.toc-sidebar a {
  display: block;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--text-muted);
  font-size: var(--text-sm);
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.toc-sidebar a:hover { color: var(--text); text-decoration: none; }
.toc-sidebar a.is-active { color: var(--primary); border-left-color: var(--primary); }

.toc-inline {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.toc-inline h2, .toc-inline h3 { margin-top: 0; font-size: var(--text-lg); }
.toc-inline ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.toc-inline a { color: var(--accent); }

/* Content */
.content {
  min-width: 0;
  width: 100%;
}
.content h2 {
  font-size: var(--text-2xl);
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--card-border);
  text-align: left;
}
.content h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.content h2[id] { scroll-margin-top: 100px; }
.content h3 {
  font-size: var(--text-xl);
  margin: 1.5rem 0 0.75rem;
  text-align: left;
}
.content p { margin: 0 0 1rem; text-align: left; }
.content ol, .content ul:not(.checklist) { margin: 0 0 1rem; padding-left: 1.5rem; }
.content ol { list-style: decimal; }
.content li { margin-bottom: 0.35rem; }

/* Data tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--r-md);
  border: 1px solid var(--card-border);
}
@media (max-width: 600px) {
  main { padding-left: 1.25rem; padding-right: 1.25rem; }
  .container { gap: 1.5rem; }
  .table-wrap {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
  }
  table { min-width: 380px; }
}
table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
table caption {
  padding: 0.5rem 1rem;
  font-weight: 600;
  text-align: left;
  caption-side: top;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
}
tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Checklist */
.checklist {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Callout */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  border-left: 4px solid;
}
.callout-tip {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--primary);
}
.callout-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}
.callout-risk {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}
.callout strong { display: block; margin-bottom: 0.25rem; }

/* FAQ accordion */
.faq-list { margin: 1rem 0; }
.faq-list details {
  margin-bottom: 0.5rem;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-list details[open] { border-color: var(--primary); }
.faq-list summary {
  padding: 1rem 1.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
  color: var(--primary);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list .faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
}

/* Comparison cards */
.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.comparison-cards a {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  min-height: 44px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.comparison-cards a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
  text-decoration: none;
  color: var(--accent);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--card-border);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.author-block { margin-top: 1rem; text-align: center; }
.cta-block { margin-top: 2rem; margin-bottom: 1rem; text-align: center; }
