:root {
  --bg: #0f1115;
  --bg-alt: #141821;
  --text: #e6e8ee;
  --muted: #aab0c0;
  --primary: #6ea8fe;
  --primary-600: #5b9bff;
  --accent: #9747ff;
  --border: #232838;
  --card: #121521;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --elevate: 0 10px 30px rgba(80, 120, 255, 0.15);
  --glow-start: var(--primary);
  --glow-end: var(--accent);
  --glow-blur: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; filter: blur(40px) saturate(140%); opacity: 0.75; }

img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
.muted { color: var(--muted); }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand-logo { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); }
.brand:hover .brand-logo { animation: spin360 700ms ease; }
@keyframes spin360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.brand-name { letter-spacing: 0.3px; }
.badge {
  font-size: 12px;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
}

.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); font-weight: 500; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: linear-gradient(90deg, var(--glow-start), var(--glow-end)); transition: width .3s ease; border-radius: 2px; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav a.active { color: var(--text); }
.nav a.active::after { width: 100%; }

.hero {
  padding: 56px 0 24px;
  background: radial-gradient(1200px 600px at 80% -20%, rgba(110,168,254,0.2), transparent 55%),
              radial-gradient(1000px 500px at -20% 0%, rgba(151, 71, 255, 0.16), transparent 50%);
}
.hero, .section { scroll-margin-top: 76px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.hero-content h1 { font-size: 52px; line-height: 1.05; margin: 0 0 10px; }
.subtitle { color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 12px; margin: 18px 0 8px; }
.hero-socials { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 8px; }
.hero-media { box-shadow: var(--shadow); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); transform: translateY(0); transition: transform .4s ease, box-shadow .4s ease; }
.hero-media:hover { transform: translateY(-3px); box-shadow: var(--elevate); }
.hero-media img { width: 100%; height: auto; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  transition: transform .15s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease;
  position: relative; z-index: 0; overflow: visible;
}
.btn::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; z-index: -1; background: linear-gradient(135deg, var(--glow-start), var(--glow-end)); filter: blur(var(--glow-blur)); opacity: 0; transition: opacity .35s ease, transform .35s ease; }
.btn:hover { border-color: color-mix(in oklab, var(--primary), var(--border)); transform: translateY(-1px); box-shadow: var(--elevate); }
.btn-primary { background: var(--primary); color: #08112b; border-color: var(--primary-600); }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: transparent; }
.btn-primary::before { opacity: 0.38; }
.btn:hover::before, .btn:focus-visible::before { opacity: 0.75; transform: scale(1.03); }
.btn-ghost::before { opacity: 0; }
.btn-ghost:hover::before, .btn-ghost:focus-visible::before { opacity: 0.55; }

/* Ripple/волна */
.btn-ripple { overflow: hidden; }
.btn-ripple .ripple {
  position: absolute; border-radius: 999px; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow-start) 0%, var(--glow-end) 60%, rgba(0,0,0,0) 70%);
  filter: blur(2px); opacity: 0.55; width: 10px; height: 10px; animation: ripple 600ms ease forwards;
}
@keyframes ripple {
  0% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.2); }
  50% { opacity: 0.35; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(16); }
}
.btn-icon .icon { width: 18px; height: 18px; fill: currentColor; }
.btn-icon span { transform: translateY(0.5px); }

.section { padding: 48px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 28px; margin: 0 0 18px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; transition: transform .2s ease, box-shadow .3s ease, border-color .3s ease; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--elevate); border-color: color-mix(in oklab, var(--primary), var(--border)); }
.feature-icon { font-size: 22px; opacity: 0.9; }
.feature h3 { margin: 8px 0 6px; }
.feature p { color: var(--muted); margin: 0; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); transition: transform .2s ease, box-shadow .3s ease, border-color .3s ease; }
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--elevate); border-color: color-mix(in oklab, var(--primary), var(--border)); }
.gallery-item img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; filter: saturate(0.95); transition: filter .3s ease; }
.gallery-item:hover img { filter: saturate(1.05); }

.download-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.download-info h3 { margin: 0 0 4px; }
.download-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.secondary-actions { display: flex; gap: 10px; align-items: center; }
/* Горизонтальный ряд для hero */
.hero-socials.btn-row { display: flex; gap: 10px; }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }

.faq-list { display: grid; gap: 10px; }
.faq-list details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.faq-list summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] { box-shadow: var(--elevate); }
.faq-list div { color: var(--muted); margin-top: 6px; }

.contacts { display: flex; gap: 10px; flex-wrap: wrap; }
.contact { background: var(--card); border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; }
.contact:hover { border-color: color-mix(in oklab, var(--primary), var(--border)); }

.site-footer { border-top: 1px solid var(--border); padding: 16px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.86); display: grid; place-items: center; padding: 20px; animation: fadeIn .25s ease; }
.lightbox[hidden] { display: none; }
.lightbox-image { max-width: 92vw; max-height: 86vh; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); background: #000; }
.lightbox-close { position: fixed; top: 14px; right: 14px; font-size: 24px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }

/* Плавные появления секций */
.reveal { opacity: 0; transform: translateY(14px); animation: none; }
.reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity .6s ease, transform .6s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Градиентный блум для элементов */
.feature, .gallery-item, .download-card, .contact, .hero-media { position: relative; z-index: 0; }
.feature::before, .gallery-item::before, .download-card::before, .contact::before, .hero-media::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(80% 80% at 20% 20%, var(--glow-start), transparent 70%),
              radial-gradient(80% 80% at 80% 80%, var(--glow-end), transparent 70%);
  filter: blur(calc(var(--glow-blur) * 1.2)); opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
.feature:hover::before, .gallery-item:hover::before, .download-card:hover::before, .contact:hover::before { opacity: .35; transform: scale(1.02); }
.hero-media:hover::before { opacity: .45; transform: scale(1.03); }

/* Фокус-ринги */
.btn:focus-visible, a:focus-visible, .contact:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--glow-end) 35%, transparent); }

/* Светящаяся линия под шапкой */
.site-header { position: sticky; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--glow-start), var(--glow-end)); opacity: .35; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  /* на мобильных оставляем ряд с переносом */
}

@media (max-width: 560px) {
  .nav { display: none; }
  .hero-content h1 { font-size: 38px; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .download-card { flex-direction: column; align-items: stretch; }
}


