:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-dark: #0f1117;
  --fg: #0f1117;
  --fg-soft: #4a5160;
  --fg-muted: #8a91a3;
  --line: #e6e8ef;
  --accent: #5b6cff;
  --accent-hover: #4554e6;
  --accent-soft: #eef0ff;
  --gold: #ffb547;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 23, 0.05), 0 4px 12px rgba(15, 17, 23, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 17, 23, 0.06), 0 18px 40px rgba(15, 17, 23, 0.08);
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg);
  font-size: 17px;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent), #8a99ff);
  color: white;
  border-radius: 8px;
  font-size: 16px;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--fg-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  background: var(--fg);
  color: white !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px !important;
}
.nav-cta:hover { background: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--fg);
}

/* HERO */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(800px 400px at 20% -10%, rgba(91, 108, 255, 0.10), transparent),
    radial-gradient(700px 500px at 90% 10%, rgba(255, 181, 71, 0.08), transparent);
}
.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.hl {
  background: linear-gradient(120deg, var(--accent), #b56bff 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--fg-soft);
  max-width: 620px;
  margin: 0 0 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 620px;
}
.hero-meta > div {
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}
.hero-meta strong { font-size: 22px; font-weight: 700; }
.hero-meta span { font-size: 13px; color: var(--fg-muted); }

/* BUTTONS */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--fg);
  color: white;
}
.btn-primary:hover { background: var(--accent); color: white; }
.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: white; }
.btn-ghost {
  background: white;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--fg); }
.btn-full { width: 100%; }
.btn-large { padding: 18px 32px; font-size: 16px; }

/* SECTIONS */
.section { padding: 90px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}
.section-head h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-head p {
  font-size: 17px;
  color: var(--fg-soft);
  margin: 0;
}

/* PACKAGES */
.packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.pkg {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pkg:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.pkg-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff, #fafbff);
}
.pkg-tag {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--fg);
  color: white;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pkg h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}
.pkg-tagline {
  color: var(--fg-muted);
  font-size: 14px;
  margin: 0 0 20px;
}
.pkg-price {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line);
}
.pkg-price-main {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pkg-price-sub {
  display: block;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}
.pkg-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex-grow: 1;
}
.pkg-features li {
  font-size: 14.5px;
  color: var(--fg-soft);
  padding: 6px 0 6px 26px;
  position: relative;
}
.pkg-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--accent);
  font-weight: 700;
}
.pkg-case {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--fg-soft);
  margin: 0 0 22px;
  border-left: 3px solid var(--accent);
}

/* CASES (dark section) */
.section-dark {
  background: var(--bg-dark);
  color: #e7e9f0;
}
.section-dark .section-head h2 { color: white; }
.section-dark .section-head p { color: #9ca3b8; }

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.case {
  display: flex;
  flex-direction: column;
  background: #181b25;
  border: 1px solid #262a37;
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.case:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(91, 108, 255, 0.18);
}
.case-video {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  object-fit: cover;
  border-bottom: 1px solid #262a37;
  display: block;
  cursor: default;     /* video has its own controls — don't pretend it's a link */
}
.case-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-body .case-num { margin: 0; }
.case-body h3        { margin: 0; }
.case-body p         { margin: 0 0 6px; color: #b6bccc; }
.case-cta {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  align-self: flex-start;
  transition: color 0.12s ease, transform 0.12s ease;
}
.case-cta:hover { color: white; transform: translateX(2px); }
.case:hover .case-cta { color: white; }
.case-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.case h3 {
  color: white;
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.case p {
  color: #b6bccc;
  font-size: 15px;
  margin: 0 0 18px;
}
.case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.case-tags span {
  background: #232735;
  color: #c5cad9;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* PROCESS */
.process {
  list-style: none;
  padding: 0;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
.process li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  align-items: start;
}
.process-step {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 14px;
  font-weight: 800;
  font-size: 18px;
}
.process-body h3 {
  margin: 0 0 6px;
  font-size: 19px;
}
.process-body p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 15px;
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq details {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 22px;
  font-weight: 400;
  color: var(--fg-muted);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  margin: 12px 0 0;
  color: var(--fg-soft);
  font-size: 15px;
}

/* CTA SECTION */
.section-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-soft), #ffffff);
}
.section-cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-cta p {
  font-size: 18px;
  color: var(--fg-soft);
  max-width: 540px;
  margin: 0 auto 36px;
}
.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cta-fine {
  font-size: 14px !important;
  color: var(--fg-muted) !important;
}

/* LEAD FORM */
.lead-form {
  max-width: 540px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: white;
  color: var(--fg);
  transition: border-color 0.15s ease;
}
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lead-form textarea { resize: vertical; min-height: 110px; }
.lead-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.lead-status {
  margin: 4px 0 0;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
}
.lead-status.ok    { color: #1f8a4d; }
.lead-status.err   { color: #d84d52; }
.lead-status.busy  { color: var(--fg-muted); }

@media (max-width: 600px) {
  .lead-row { grid-template-columns: 1fr; }
}

/* FOOTER */
.site-footer {
  background: #0a0c12;
  color: #b6bccc;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.logo-footer .logo-text { color: white; }
.site-footer h4 {
  color: white;
  font-size: 14px;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 4px 0; font-size: 14px; }
.site-footer a { color: #b6bccc; }
.site-footer a:hover { color: white; }
.footer-bot {
  padding-top: 22px;
  border-top: 1px solid #1a1d26;
  font-size: 13px;
  color: #7a8094;
  text-align: center;
}

/* MOBILE */
@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; align-items: flex-start; }
  .nav-links a { padding: 8px 0; }
  .nav-toggle { display: block; }

  .section { padding: 60px 0; }
  .hero { padding: 50px 0 40px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .process li { grid-template-columns: 1fr; gap: 14px; }
}

/* v9: static case cover (no video) */
.case-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: radial-gradient(120% 120% at 20% 10%, #2a3350 0%, #12151f 60%, #0d0f16 100%);
  border-bottom: 1px solid #262a37;
  text-align: center;
}
.case-cover-icon  { font-size: 56px; line-height: 1; }
.case-cover-title { font-size: 26px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.case-cover-sub   { font-size: 13px; color: #9aa3b8; }

/* v11: store links */
.hero-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }
.case-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.case-links .case-cta { margin-top: 8px; }
.site-footer li a { color: inherit; text-decoration: underline; text-decoration-color: #3a4152; }

/* v14: RU version */
.nav-lang { font-size: 13px; font-weight: 600; color: var(--fg-muted); text-decoration: none; margin-left: 14px; padding: 6px 10px; border: 1px solid #d9dce6; border-radius: 999px; }
.nav-lang:hover { color: var(--accent); border-color: var(--accent); }
.footer-bot a { color: inherit; }

/* v17: переключатель региона — сегменты, активный подсвечен */
.nav-lang.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid #d9dce6; background: #f3f4f8; margin-left: 14px; }
.nav-lang.seg a, .nav-lang.seg .seg-on { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; text-decoration: none; color: var(--fg-muted); white-space: nowrap; }
.nav-lang.seg a:hover { color: var(--accent); }
.nav-lang.seg .seg-on { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 640px) { .nav-lang.seg a, .nav-lang.seg .seg-on { padding: 5px 8px; font-size: 12px; } }

/* v18: на телефоне — только символы валют, имя в одну строку */
.logo-text { white-space: nowrap; }
@media (max-width: 640px) {
  .nav-lang.seg .seg-l { display: none; }
  .nav-lang.seg a, .nav-lang.seg .seg-on { padding: 5px 7px; font-size: 12px; }
  .nav-lang.seg a, .nav-lang.seg .seg-on { padding: 5px 10px; font-size: 14px; }
  .nav-lang.seg { margin-left: 8px; }
}

/* v19: живая молния в логотипе */
.logo-bolt { position: relative; overflow: visible; background: linear-gradient(135deg, #1b1f2e, #2a3350); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 18px rgba(124,140,255,.35); }
.logo-bolt svg { display: block; overflow: visible; transform-origin: 50% 50%; animation: bolt-jitter 4.5s ease-in-out infinite; }
.logo-bolt .bolt-spark { opacity: 0; animation: bolt-strike 4.5s ease-out infinite; }
.logo-bolt .bolt-core { animation: bolt-glow 4.5s ease-in-out infinite; }
.logo-bolt .bolt-flash { position: absolute; inset: -6px; border-radius: 12px; pointer-events: none; background: radial-gradient(circle, rgba(255,214,74,.55) 0%, rgba(255,138,61,.15) 45%, transparent 70%); opacity: 0; animation: bolt-flash 4.5s ease-out infinite; }
.logo:hover .logo-bolt svg, .logo:hover .logo-bolt .bolt-spark, .logo:hover .logo-bolt .bolt-flash, .logo:hover .logo-bolt .bolt-core { animation-duration: 1.2s; }
@keyframes bolt-strike { 0%, 78% { opacity: 0 } 80% { opacity: .95 } 83% { opacity: .2 } 85% { opacity: .9 } 90%, 100% { opacity: 0 } }
@keyframes bolt-flash  { 0%, 78% { opacity: 0; transform: scale(.7) } 80% { opacity: 1; transform: scale(1.15) } 86% { opacity: .35 } 100% { opacity: 0; transform: scale(1.4) } }
@keyframes bolt-glow   { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255,214,74,.6)) } 50% { filter: drop-shadow(0 0 5px rgba(255,214,74,.95)) } 80% { filter: drop-shadow(0 0 9px #fff) } }
@keyframes bolt-jitter { 0%, 76%, 92%, 100% { transform: none } 80% { transform: translate(-.6px,.4px) scale(1.08) } 82% { transform: translate(.6px,-.4px) scale(1.04) } 85% { transform: scale(1.06) } }
@media (prefers-reduced-motion: reduce) { .logo-bolt *, .logo-bolt svg { animation: none !important } .logo-bolt .bolt-spark { opacity: .35 } }

/* v20: настоящая молния на canvas (процедурная, ветвящаяся) */
.logo-bolt { width: 36px; height: 36px; border-radius: 10px; background: radial-gradient(120% 120% at 30% 20%, #2a3350 0%, #151a2b 55%, #0b0e17 100%); overflow: hidden; }
.logo-bolt .bolt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo-bolt.live svg, .logo-bolt.live .bolt-flash { display: none; }
.logo-bolt.live { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 18px var(--bolt-glow, rgba(124,140,255,.35)); transition: box-shadow .12s; }

/* ───── валюта: страница хранит оба варианта, показывается один (html[data-cur]) ───── */
html[data-cur="usd"] .cur-rub, html[data-cur="rub"] .cur-usd,
html[data-cur="usd"] .cur-cad, html[data-cur="cad"] .cur-usd { display: none !important; }
.nav-lang.seg button { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; white-space: nowrap; }
.nav-lang.seg button:hover { color: var(--accent); }
.nav-lang.seg button.seg-on { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 640px) { .nav-lang.seg button { padding: 5px 9px; font-size: 12px; } }
