/* AI Dialog — landing styles (ua.aidialog.org / aidialog.org/ua|/ru)
   Общий файл стилей для UA и RU версий. */

:root {
  --bg: #0a0f18;
  --bg-2: #0e1524;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --text: #eef4ff;
  --muted: #9fb0ca;
  --brand: #2dd4bf;
  --brand-2: #3b82f6;
  --brand-3: #8b5cf6;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ok: #22c55e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.35);
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* фоновая атмосфера */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 8% -8%, rgba(45, 212, 191, 0.22), transparent 60%),
    radial-gradient(45% 40% at 100% 0%, rgba(59, 130, 246, 0.24), transparent 55%),
    radial-gradient(60% 50% at 50% 120%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 70%);
}

.container { width: min(var(--max), calc(100% - 2.4rem)); margin: 0 auto; }

a { color: inherit; }

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 15, 24, 0.72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 34px; height: 34px; display: block; }
.brand small { display: block; font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: .93rem;
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle a {
  padding: .42rem .8rem;
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
  color: var(--muted);
  transition: all .2s var(--ease);
}
.lang-toggle a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #041019; }

/* ---------- buttons ---------- */
.btn {
  --pad: .85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: var(--pad);
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04141b;
  box-shadow: 0 10px 26px rgba(45, 212, 191, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(45, 212, 191, 0.38); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-2); }
.btn:active { transform: scale(.98); }

/* ---------- generic sections ---------- */
section { padding: 3.4rem 0; }
.section-head { max-width: 62ch; margin: 0 auto 2.2rem; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  padding: .32rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 1rem;
}

h1, h2, h3 { line-height: 1.08; margin: 0; text-wrap: balance; font-family: "Space Grotesk", sans-serif; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.025em; margin-bottom: .7rem; }
h3 { font-size: 1.16rem; letter-spacing: -0.01em; }
.gradient-text {
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: 1.08rem; }
.muted { color: var(--muted); }

.card {
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- hero ---------- */
.hero { padding: 4.6rem 0 3rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.4rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { max-width: 54ch; margin: 0 0 1.7rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.1rem;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .stat span { font-size: .86rem; color: var(--muted); }

.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -8% -8% -8%;
  background: radial-gradient(closest-side, rgba(45, 212, 191, 0.35), transparent 70%);
  filter: blur(18px);
  z-index: 0;
}
.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: block;
}
.floating-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: rgba(12, 20, 33, 0.9);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
  font-size: .82rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.floating-badge .dot { width: 9px; height: 9px; border-radius: 999px; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.fb-1 { top: 12%; left: -6%; }
.fb-2 { bottom: 10%; right: -5%; }

/* ---------- logos / trust strip ---------- */
.trust { padding: 1.4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.4rem; }
.trust-inner span { color: var(--muted); font-weight: 600; font-size: .92rem; }
.trust-inner .pill { border: 1px solid var(--line-strong); border-radius: 999px; padding: .35rem .8rem; }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.service { grid-column: span 2; padding: 1.5rem; position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.service:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.service.wide { grid-column: span 3; }
.service .ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(45,212,191,.18), rgba(59,130,246,.18));
  border: 1px solid var(--line-strong);
  margin-bottom: 1rem;
}
.service .ico svg { width: 24px; height: 24px; stroke: var(--brand); }
.service h3 { margin-bottom: .5rem; }
.service p { color: var(--muted); font-size: .95rem; margin: 0; }
.service p + p { margin-top: .6rem; }
.service a { color: #bfe0ff; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.pricing { padding: 1.6rem; display: flex; flex-direction: column; position: relative; transition: transform .25s var(--ease); }
.pricing:hover { transform: translateY(-4px); }
.pricing.featured { border-color: rgba(45, 212, 191, 0.5); box-shadow: 0 0 0 1px rgba(45,212,191,.25), var(--shadow); }
.pricing .tag {
  align-self: flex-start;
  font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: #d5e2f4; background: var(--surface);
}
.badge-popular {
  position: absolute; top: -12px; right: 16px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: .3rem .65rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #041019;
}
.pricing h3 { margin: .9rem 0 .3rem; }
.price { font-family: "Space Grotesk", sans-serif; font-size: 1.9rem; letter-spacing: -0.02em; margin: .2rem 0 .3rem; }
.price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.pricing p { color: var(--muted); font-size: .93rem; }
.pricing ul { list-style: none; margin: .9rem 0 1.2rem; padding: 0; display: grid; gap: .5rem; }
.pricing li { display: flex; gap: .55rem; font-size: .9rem; color: #cdd9ec; }
.pricing li svg { width: 18px; height: 18px; stroke: var(--brand); flex: none; margin-top: 2px; }
.pricing .btn { margin-top: auto; }
.pricing-note { margin-top: 1.1rem; }
.pricing-note .price { font-size: 1.5rem; }

/* ---------- cases ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.case { overflow: hidden; transition: transform .25s var(--ease); }
.case:hover { transform: translateY(-4px); }
.case img { width: 100%; height: 180px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.case .case-body { padding: 1.2rem; }
.case h3 { margin-bottom: .45rem; font-size: 1.05rem; }
.case p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- faq ---------- */
.faq-wrap { max-width: 820px; margin: 0 auto; display: grid; gap: .8rem; }
details.faq {
  padding: 0 1.2rem;
  transition: border-color .25s;
}
details.faq[open] { border-color: var(--line-strong); }
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .25s var(--ease);
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 0 0 1.1rem; color: var(--muted); }

/* ---------- chat zone ---------- */
.chat-zone {
  padding: 1.8rem;
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(45,212,191,.10));
  border: 1px solid var(--line-strong);
}

/* ---------- contacts ---------- */
.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 1.4rem; }
.contact { padding: 1.6rem; }
.contact-list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.contact-list li { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.contact-list svg { width: 18px; height: 18px; stroke: var(--brand); flex: none; }
.contact-list a { color: #cfe0f6; text-decoration: none; }
form { display: grid; gap: .8rem; }
label.field { display: grid; gap: .35rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(9, 14, 23, 0.7);
  color: var(--text);
  border-radius: 12px;
  padding: .8rem .9rem;
  font: inherit;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: #7f90ab; }
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .8rem; color: var(--muted); }

/* ---------- footer ---------- */
.footer { margin-top: 2.6rem; padding: 2.4rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.6rem; }
.footer h4 { font-family: "Space Grotesk", sans-serif; color: var(--text); font-size: .95rem; margin: 0 0 .7rem; }
.footer a { color: #cbd8ec; text-decoration: none; display: block; padding: .18rem 0; }
.footer a:hover { color: #fff; }
.requisites { font-size: .84rem; line-height: 1.7; }
.requisites strong { color: #dbe6f7; }
.footer-bottom { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* ---------- floating chat widget ---------- */
.chat-widget { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.chat-toggle {
  border: 0; border-radius: 999px; padding: .9rem 1.15rem;
  font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #041019;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  display: inline-flex; align-items: center; gap: .5rem;
}
.chat-toggle svg { width: 20px; height: 20px; }
.chat-panel {
  width: min(360px, calc(100vw - 34px));
  margin-top: .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0c1420;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
}
.chat-panel.open { display: block; animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-head { padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.chat-head small { color: var(--muted); font-weight: 500; }
.chat-body { padding: .9rem; max-height: 280px; overflow: auto; display: grid; gap: .55rem; }
.msg { max-width: 86%; padding: .6rem .75rem; border-radius: 12px; font-size: .9rem; }
.msg.bot { background: #16233a; border: 1px solid rgba(255,255,255,.08); color: #dce7f8; }
.msg.user { margin-left: auto; background: rgba(45,212,191,.16); border: 1px solid rgba(45,212,191,.36); color: #e7fff9; }
.chat-input { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .7rem; }
.chat-input input { border-radius: 10px; }
.chat-input button { border: 0; background: var(--brand); color: #04291f; font-weight: 800; border-radius: 10px; padding: 0 .9rem; cursor: pointer; }

/* ---------- reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- legal pages ---------- */
.legal { width: min(880px, calc(100% - 2.4rem)); margin: 0 auto; padding: 2.4rem 0 3.5rem; }
.legal h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: .6rem; }
.legal .meta { color: var(--muted); font-size: .92rem; margin-bottom: 1.4rem; }
.legal .card { padding: 1.3rem 1.4rem; margin: .9rem 0; }
.legal .card h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: .5rem 0; padding-left: 1.2rem; }
.legal a { color: #bfe0ff; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; text-decoration: none; color: var(--brand); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service, .service.wide { grid-column: span 1; }
  .pricing-grid, .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .fb-1, .fb-2 { display: none; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.2rem; }
  .chat-toggle span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
