/* =========================================================
   Ventiro – основни стилове
   Цветовете се сменят от :root по-долу
   ========================================================= */
:root {
  --bg: #060914;
  --bg-2: #0b1022;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef1fb;
  --muted: #9aa3c0;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --container: 1200px;
  --font-head: "Onest", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* стандартни (нелокализирани) кирилски форми за по-добра четимост */
  font-feature-settings: "locl" 0;
}
input, select, textarea, button { font-feature-settings: "locl" 0; }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { left: 8px; }

/* ---------- фон ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(124, 92, 255, 0.22), transparent 70%),
    radial-gradient(500px 400px at 5% 40%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(244, 114, 182, 0.10), transparent 70%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- бутони ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.7);
}
.btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(34, 211, 238, 0.6); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; }

/* ---------- хедър ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 9, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px -6px rgba(124, 92, 255, .8);
}
.logo-mark svg { width: 20px; height: 20px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-prefs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
}
/* на широк екран групата стои почти до десния край на екрана (~40px от ръба) */
@media (min-width: 961px) {
  .nav-prefs { margin-right: min(0px, calc((1240px - 100vw) / 2)); }
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  font-size: 0.8rem;
  font-weight: 700;
}
.lang-switch a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
}
.lang-switch a.active { background: var(--surface-2); color: var(--text); }
.nav .btn { padding: 10px 20px; font-size: 0.9rem; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 44px; height: 44px;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 26px;
}
.eyebrow .dot {
  background: rgba(34, 211, 238, .15);
  color: var(--accent-2);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.hero p.slogan {
  margin: -8px 0 16px;
  font-family: "Lora", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.005em;
  color: var(--accent);
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-platforms {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.hero-platforms .pf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.hero-platforms svg { width: 20px; height: 20px; color: var(--text); }

.hero-visual {
  position: relative;
  height: 600px;
}
#scene3d {
  position: absolute;
  inset: -40px -60px;
  width: calc(100% + 120px);
  height: calc(100% + 80px);
}
#scene3d canvas { display: block; width: 100% !important; height: 100% !important; }
.scene-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.scene-loaded .scene-fallback { display: none; }

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(15, 20, 40, 0.7);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
  pointer-events: none;
}
.float-chip .ic {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--grad);
}
.float-chip .ic svg { width: 16px; height: 16px; }
.float-chip small { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.chip-1 { top: 6%; left: -2%; }
.chip-2 { bottom: 14%; right: -4%; animation-delay: -2s; }
.chip-3 { bottom: 2%; left: 8%; animation-delay: -4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 20px;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- лента със статистики ---------- */
.stats {
  padding: 20px 0 40px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.stat {
  padding: 30px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  margin-bottom: 6px;
}
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- секции ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* карти */
.card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease, background .3s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 92, 255, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.98rem; }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #b9a8ff;
}
.card .icon.cyan { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.35); color: #7de8f7; }
.card .icon.pink { background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.35); color: #f9a8d4; }
.card .icon svg { width: 26px; height: 26px; }
.card ul.ticks { margin: 16px 0 0; }

ul.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.ticks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.95rem;
}
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 5px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.services-grid .card.wide { grid-column: span 2; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ---------- данни / интеграции ---------- */
.data-section {
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.05) 40%, transparent);
}
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.data-options { display: grid; gap: 16px; margin-top: 30px; }
.data-option {
  display: flex;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.data-option .num {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}
.data-option h3 { margin-bottom: 6px; font-size: 1.05rem; }
.data-option p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.diagram {
  position: relative;
  aspect-ratio: 1 / 0.92;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.18), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.diagram svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.diagram .flow {
  stroke-dasharray: 6 10;
  animation: dash 1.4s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -32; } }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.node .bubble {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(15, 20, 40, 0.9);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}
.node .bubble svg { width: 28px; height: 28px; }
.node.core .bubble {
  width: 96px; height: 96px;
  border-radius: 26px;
  background: var(--grad);
  border: none;
  box-shadow: 0 0 60px rgba(124, 92, 255, 0.6);
}
.node.core .bubble svg { width: 40px; height: 40px; }
.node.core { color: var(--text); font-size: 0.9rem; }

/* ---------- процес ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 34px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.4;
}
.step { position: relative; text-align: center; padding: 0 6px; }
.step .step-num {
  width: 68px; height: 68px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 8px var(--bg);
}
.step:nth-child(odd) .step-num { color: var(--accent-2); }
.step:nth-child(even) .step-num { color: #b9a8ff; }
.step h3 { font-size: 1rem; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- модели на сътрудничество ---------- */
.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.model { display: flex; flex-direction: column; }
.model .badge {
  position: absolute;
  top: 22px; right: 22px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
}
.model.featured {
  border-color: rgba(124, 92, 255, 0.5);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(34, 211, 238, 0.04));
  box-shadow: 0 30px 80px -30px rgba(124, 92, 255, 0.5);
}
.model .price {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin: 4px 0 14px;
}
.model .price small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
.model ul.ticks { margin: 10px 0 26px; flex: 1; }
.model .btn { width: 100%; }
.models-note {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- портфолио ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.project {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.project .shot {
  height: 330px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.project .shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(6,9,20,0.6));
  pointer-events: none;
}
.project .info { padding: 22px 24px 26px; }
.project .info h3 { margin-bottom: 4px; }
.project .info .cat { font-size: 0.8rem; font-weight: 700; color: var(--accent-2); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.project .info p { font-size: 0.92rem; }

.featured-project {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 40px;
  padding: 40px 50px;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.08));
  border-color: rgba(124, 92, 255, 0.4);
}
.featured-project > * { min-width: 0; }
.featured-project .shot-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  align-items: flex-end;
}
.featured-project .phone:nth-child(2) { transform: translateY(-24px); }

/* реални снимки в телефонна рамка */
.phone.real { margin: 0; aspect-ratio: 414 / 900; }
.phone.real .screen { background: #eef6f6; }
.phone.real img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.featured-project .phone.real { --w: 165px; }
.featured-project .phone.real:nth-child(2) { --w: 190px; }

/* мини телефон (CSS мокъп) */
.phone {
  --w: 170px;
  width: var(--w);
  aspect-ratio: 9 / 19;
  border-radius: calc(var(--w) * 0.16);
  padding: calc(var(--w) * 0.035);
  background: linear-gradient(150deg, #2a2f45, #0c0f1c);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.12);
  transform: rotate(-6deg);
  transition: transform .5s ease;
  flex: none;
}
.card:hover .phone { transform: rotate(0deg) translateY(-6px); }
.featured-project .phone { transform: none; }
.phone .screen {
  width: 100%; height: 100%;
  border-radius: calc(var(--w) * 0.13);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: calc(var(--w) * 0.055);
  line-height: 1.3;
  color: #0f172a;
}
.phone .notch {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 5.5%;
  max-height: 18px;
  background: #000;
  border-radius: 999px;
  z-index: 3;
}
.ui-top { padding: 30% 9% 6%; color: #fff; }
.ui-top .t1 { font-weight: 800; font-size: 1.25em; font-family: var(--font-body); }
.ui-top .t2 { opacity: .8; font-size: .82em; }
.ui-body { flex: 1; background: #f5f6fb; border-radius: 1.2em 1.2em 0 0; padding: 8%; display: flex; flex-direction: column; gap: 6%; }
.ui-row { background: #fff; border-radius: .8em; padding: 7%; display: flex; align-items: center; gap: 8%; box-shadow: 0 2px 6px rgba(15,23,42,.06); }
.ui-av { width: 2.2em; height: 2.2em; border-radius: .6em; flex: none; }
.ui-lines { flex: 1; display: flex; flex-direction: column; gap: .35em; }
.ui-l { height: .45em; border-radius: 1em; background: #e2e5f0; }
.ui-l.s { width: 55%; }
.ui-l.d { background: #c7cbe0; width: 80%; }
.ui-big { font-weight: 800; font-size: 2em; color: #fff; letter-spacing: -0.02em; }
.ui-chart { display: flex; align-items: flex-end; gap: 6%; height: 4.5em; padding: 0 2%; }
.ui-chart i { flex: 1; border-radius: .3em .3em 0 0; display: block; }
.ui-btn { margin-top: auto; border-radius: 1em; padding: 6% 0; text-align: center; color: #fff; font-weight: 800; font-size: .9em; }
.ui-ring { width: 5em; height: 5em; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-weight: 800; }
.ui-pill-row { display: flex; gap: 5%; }
.ui-pill { flex: 1; border-radius: .6em; padding: 6% 0; text-align: center; font-weight: 700; font-size: .78em; background: #fff; }
.ui-math { font-family: var(--font-head); font-weight: 700; font-size: 1.9em; text-align: center; color: #1e1b4b; padding: 8% 0 4%; }
.ui-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; }
.ui-grid2 span { background: #fff; border-radius: .7em; padding: 14% 0; text-align: center; font-weight: 800; font-size: 1.1em; box-shadow: 0 2px 6px rgba(15,23,42,.06); }

.project-note { margin-top: 22px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* ---------- защо ние ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.why-grid .card { padding: 26px; }
.why-grid h3 { font-size: 1.02rem; }

/* ---------- технологии ---------- */
.tech-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  padding: 10px 0;
}
.tech-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.tech-marquee:hover .tech-track { animation-play-state: paused; }
.tech-track + .tech-track { margin-top: 14px; animation-direction: reverse; animation-duration: 46s; }
.tech-item {
  padding: 14px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tech-item i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--grad);
  display: block;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  transition: border-color .2s, background .2s;
}
.faq-item[open] { border-color: rgba(124, 92, 255, 0.45); background: rgba(124, 92, 255, 0.06); }
.faq-item summary {
  list-style: none;
  padding: 22px 60px 22px 26px;
  font-weight: 700;
  font-size: 1.04rem;
  cursor: pointer;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 1.2rem;
  font-weight: 500;
  transition: transform .3s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .answer { padding: 0 26px 22px; color: var(--muted); }
.faq-item .answer p:last-child { margin: 0; }

/* ---------- CTA ---------- */
.cta-band {
  position: relative;
  border-radius: 32px;
  padding: 70px 50px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(124, 92, 255, 0.5), transparent 70%),
    radial-gradient(600px 300px at 80% 100%, rgba(34, 211, 238, 0.35), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border-strong);
}
.cta-band h2 { max-width: 760px; margin-left: auto; margin-right: auto; }
.cta-band p { color: var(--muted); max-width: 600px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta-band .hero-ctas { justify-content: center; margin: 0; }

/* ---------- контакт ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.contact-list .icon {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(124, 92, 255, 0.14);
  color: #b9a8ff;
}
.contact-list .icon svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--muted); font-size: 0.8rem; }
.contact-list a, .contact-list strong { font-weight: 700; }

.form-card { padding: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(6, 9, 20, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3c0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px; }
.field select option { background: var(--bg-2); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.2);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s;
}
.chips input:checked + span { background: rgba(124, 92, 255, 0.2); border-color: var(--accent); color: var(--text); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.4); }
.form-foot { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: 0.82rem; flex: 1; min-width: 200px; }
.form-status { margin-top: 14px; font-weight: 600; font-size: 0.95rem; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }
.hp { display: none !important; }

/* ---------- футър ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h4 { font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { color: var(--text); opacity: .85; font-size: 0.95rem; }
.site-footer ul a:hover { opacity: 1; color: var(--accent-2); }
.site-footer p { color: var(--muted); font-size: 0.95rem; max-width: 320px; margin-top: 16px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- плаващ бутон ---------- */
.fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -6px rgba(124, 92, 255, .8);
  transition: transform .2s, opacity .3s;
  opacity: 0;
  pointer-events: none;
}
.fab.show { opacity: 1; pointer-events: auto; }
.fab:hover { transform: scale(1.08); }
.fab svg { width: 26px; height: 26px; }

/* ---------- reveal анимации ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- правни страници ---------- */
.legal { padding: 140px 0 80px; max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal p, .legal li { color: var(--muted); }

/* ---------- адаптивност ---------- */
@media (max-width: 1100px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .process::before { display: none; }
}

@media (max-width: 960px) {
  .nav-links, .nav-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .menu-toggle { order: -1; }
  .nav-prefs { margin-left: 4px; gap: 6px; }
  .site-header.open { background: rgba(6, 9, 20, 0.96); backdrop-filter: blur(16px); }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 76px; left: 0; right: 0;
    padding: 20px 20px 30px;
    gap: 18px;
    background: rgba(6, 9, 20, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .site-header.open .nav-links a { font-size: 1.1rem; color: var(--text); }

  .hero { padding-top: 110px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-visual { height: 440px; order: -1; margin: 0 -20px; }
  #scene3d { inset: 0; width: 100%; height: 100%; }
  .hero-copy { text-align: left; }
  .scroll-hint { display: none; }
  .chip-1 { left: 4%; }
  .chip-2 { right: 4%; }

  .stat { padding: 24px 10px; }
  .stat span { font-size: 0.82rem; }
  .stat span { display: block; line-height: 1.4; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .services-grid .card.wide { grid-column: span 2; }
  .data-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .models-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .featured-project { grid-template-columns: 1fr; padding: 32px 24px; }
  .featured-project .shot-row { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero-visual { height: 360px; margin: 0 -16px; }
  .float-chip { font-size: 0.75rem; padding: 8px 12px; }
  .float-chip .ic { width: 26px; height: 26px; }
  .chip-3 { display: none; }
  .services-grid, .why-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .services-grid .card.wide { grid-column: auto; }
  .process { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px 20px; }
  .card { padding: 24px; }
  .cta-band { padding: 50px 22px; border-radius: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .featured-project .phone.real { --w: 84px; }
  .featured-project .phone.real:nth-child(2) { --w: 100px; transform: translateY(-12px); }
  .featured-project .shot-row { gap: 10px; }
  .lang-switch a { padding: 5px 8px; }
}

/* =========================================================
   СВЕТЛА ТЕМА (активна при <html class="theme-light">)
   ========================================================= */
.theme-light {
  --bg: #f6f7fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f1fa;
  --border: rgba(24, 28, 70, 0.08);
  --border-strong: rgba(24, 28, 70, 0.16);
  --text: #14162e;
  --muted: #5a6185;
  --accent: #6d4aff;
  --accent-2: #0891b2;
  --grad: linear-gradient(120deg, #6d4aff 0%, #19b5d8 100%);
  --shadow: 0 20px 50px -24px rgba(40, 40, 110, 0.28);
  color-scheme: light;
}
.theme-light body { background: var(--bg); }
.theme-light .bg-glow {
  background:
    radial-gradient(700px 480px at 85% 5%, rgba(109, 74, 255, 0.16), transparent 70%),
    radial-gradient(600px 440px at 0% 35%, rgba(25, 181, 216, 0.12), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(244, 114, 182, 0.10), transparent 70%);
}
.theme-light .bg-grid {
  background-image:
    linear-gradient(rgba(24, 28, 70, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 28, 70, 0.045) 1px, transparent 1px);
}

/* хедър */
.theme-light .site-header.scrolled { background: rgba(255, 255, 255, 0.82); }
.theme-light .site-header.open,
.theme-light .site-header.open .nav-links { background: rgba(255, 255, 255, 0.98); }

/* бутони */
.theme-light .btn-primary { box-shadow: 0 10px 26px -8px rgba(109, 74, 255, 0.55); }
.theme-light .btn-ghost { background: #fff; box-shadow: 0 4px 14px -6px rgba(40, 40, 110, 0.18); }
.theme-light .btn-ghost:hover { background: var(--surface-2); }

/* hero */
.theme-light .eyebrow { background: #fff; }
.theme-light .eyebrow .dot { background: rgba(8, 145, 178, 0.1); }
.theme-light .float-chip { background: rgba(255, 255, 255, 0.88); box-shadow: 0 16px 40px -18px rgba(40, 40, 110, 0.35); }
.theme-light .scroll-hint::after { background: var(--accent); }

/* карти и повърхности */
.theme-light .card,
.theme-light .stats-grid,
.theme-light .data-option,
.theme-light .tech-item,
.theme-light .faq-item,
.theme-light .contact-list li {
  background: #fff;
  box-shadow: 0 10px 30px -18px rgba(40, 40, 110, 0.22);
}
.theme-light .card::before { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(109, 74, 255, 0.08), transparent 45%); }
.theme-light .card:hover { box-shadow: 0 24px 50px -24px rgba(40, 40, 110, 0.35); }
.theme-light .card .icon { background: rgba(109, 74, 255, 0.09); border-color: rgba(109, 74, 255, 0.22); color: #6d4aff; }
.theme-light .card .icon.cyan { background: rgba(8, 145, 178, 0.09); border-color: rgba(8, 145, 178, 0.22); color: #0891b2; }
.theme-light .card .icon.pink { background: rgba(219, 39, 119, 0.08); border-color: rgba(219, 39, 119, 0.2); color: #db2777; }
.theme-light .tag { background: var(--surface-2); }
.theme-light ul.ticks li::before { background-color: rgba(8, 145, 178, 0.12); }

/* бази данни – схема */
.theme-light .data-section { background: linear-gradient(180deg, transparent, rgba(109, 74, 255, 0.05) 40%, transparent); }
.theme-light .diagram {
  background: radial-gradient(circle at 50% 50%, rgba(109, 74, 255, 0.12), transparent 60%), #fff;
  box-shadow: 0 20px 50px -28px rgba(40, 40, 110, 0.3);
}
.theme-light .node .bubble { background: #fff; color: var(--text); box-shadow: 0 10px 24px -12px rgba(40, 40, 110, 0.3); }
.theme-light .node.core .bubble { background: var(--grad); color: #fff; box-shadow: 0 0 50px rgba(109, 74, 255, 0.35); }

/* процес */
.theme-light .step .step-num { background: #fff; box-shadow: 0 0 0 8px var(--bg), 0 10px 24px -10px rgba(40, 40, 110, 0.25); }
.theme-light .step:nth-child(even) .step-num { color: #6d4aff; }

/* модели */
.theme-light .model.featured {
  background: linear-gradient(180deg, rgba(109, 74, 255, 0.08), #fff 60%);
  border-color: rgba(109, 74, 255, 0.35);
  box-shadow: 0 30px 70px -30px rgba(109, 74, 255, 0.4);
}

/* проекти */
.theme-light .featured-project {
  background: linear-gradient(120deg, rgba(109, 74, 255, 0.09), rgba(25, 181, 216, 0.07)), #fff;
  border-color: rgba(109, 74, 255, 0.25);
}
.theme-light .featured-project p[style] { color: var(--text) !important; }
.theme-light .project .shot::after { background: linear-gradient(transparent, rgba(255, 255, 255, 0.5)); }
.theme-light .phone { box-shadow: 0 26px 50px -20px rgba(30, 30, 80, 0.45), inset 0 0 0 1px rgba(255,255,255,0.12); }

/* FAQ */
.theme-light .faq-item[open] { background: #fbfaff; border-color: rgba(109, 74, 255, 0.35); }

/* CTA лента – цветна */
.theme-light .cta-band {
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(120deg, #6d4aff 0%, #19b5d8 100%);
  border: none;
  box-shadow: 0 30px 70px -30px rgba(109, 74, 255, 0.6);
}
.theme-light .cta-band h2 { color: #fff; }
.theme-light .cta-band .grad-text { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.theme-light .cta-band p { color: rgba(255, 255, 255, 0.88); }
.theme-light .cta-band .btn-primary { background: #fff; color: #4c2fe0; box-shadow: 0 12px 30px -10px rgba(20, 20, 60, 0.4); }
.theme-light .cta-band .btn-ghost { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; box-shadow: none; }

/* контакт и форма */
.theme-light .contact-list .icon { background: rgba(109, 74, 255, 0.09); color: #6d4aff; }
.theme-light .field input,
.theme-light .field select,
.theme-light .field textarea { background: #f8f9fd; }
.theme-light .field select option { background: #fff; }
.theme-light .chips span { background: #fff; }
.theme-light .chips input:checked + span { background: rgba(109, 74, 255, 0.1); }
.theme-light .form-status.ok { color: #15803d; }
.theme-light .form-status.err { color: #dc2626; }

/* футър */
.theme-light .site-footer { background: #fff; }
.theme-light .fab { box-shadow: 0 12px 28px -8px rgba(109, 74, 255, 0.6); }

/* ---------- бутон за тема ---------- */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  transition: background .2s, transform .3s;
  flex: none;
}
.theme-toggle:hover { background: var(--surface-2); transform: rotate(-15deg); }
.theme-toggle svg { width: 19px; height: 19px; grid-area: 1 / 1; }
.theme-toggle .ic-moon { display: none; }
.theme-light .theme-toggle .ic-moon { display: block; }
.theme-light .theme-toggle .ic-sun { display: none; }
.theme-light .theme-toggle { background: #fff; }
html.theme-anim, html.theme-anim * { transition: background-color .4s ease, color .4s ease, border-color .4s ease !important; }
