/* ============================================================
   SmartAI.bg — общ стил (тъмна AI тема, Inter)
   ============================================================ */
:root {
  --bg: #060608;
  --bg-2: #0d0d12;
  --card: #101014;
  --card-2: #16161c;
  --border: rgba(255, 255, 255, 0.09);
  --text: #e9ebef;
  --muted: #a6aab2;
  --accent: #c7cdd6;
  --accent-2: #9ab0c6;
  --accent-grad: linear-gradient(135deg, #ffffff 0%, #aeb6c1 100%);
  --green: #cfd4dc; /* toast / успех */
  --radius: 14px;
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

section { padding: 96px 0; }

/* ---------- Типография ---------- */
h1, h2, h3 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.section-label::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent-grad);
  border-radius: 2px;
}

.section-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 16px; }
.section-desc { color: var(--muted); max-width: 640px; font-size: 1.05rem; }

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

/* ---------- Бутони ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: var(--accent-grad);
  color: #0b0b0e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn svg { flex: none; }

/* ---------- Навигация ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(7, 9, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.nav-logo svg { flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 10px 20px; font-size: 0.88rem; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* ---------- Карти / грид ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(199, 205, 214, 0.35); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(199, 205, 214, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Стъпки ---------- */
.step { position: relative; padding: 28px; }
.step-num {
  font-size: 2.6rem;
  font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 14px;
}

/* ---------- Код блок ---------- */
.code-box {
  background: #0a0d15;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: 'Consolas', 'Menlo', monospace;
  font-size: 0.85rem;
  color: #b8c4dd;
  overflow-x: auto;
  white-space: pre;
}
.code-box .c-tag { color: #7ee0d2; }
.code-box .c-attr { color: #a99cff; }
.code-box .c-val { color: #ffd28a; }

/* ---------- Форма ---------- */
.form-label { display: block; font-size: 0.86rem; font-weight: 600; margin: 18px 0 7px; }
.req { color: var(--accent-2); }
.form-input, .form-textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-submit { width: 100%; justify-content: center; margin-top: 24px; font-size: 1rem; padding: 16px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green);
  color: #04231e;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-2);
}
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-desc { color: var(--muted); font-size: 0.9rem; max-width: 360px; margin-top: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Reveal анимации ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Back to top (долу вляво — вдясно е чат балончето) ---------- */
#back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 899;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#back-to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  max-width: 560px;
  width: calc(100% - 40px);
  display: none;
  gap: 16px;
  align-items: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
#cookie-banner.show { display: flex; }
#cookie-banner p { font-size: 0.86rem; color: var(--muted); flex: 1; }
#cookie-banner p a { color: var(--accent-2); }
#cookie-banner .btn { padding: 10px 18px; font-size: 0.85rem; }

/* ---------- Правни страници ---------- */
.legal-page { padding: 140px 0 80px; }
.legal-page h1 { font-size: 2rem; margin-bottom: 24px; }
.legal-page h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.legal-page ul { padding-left: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  section { padding: 72px 0; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .nav-cta { display: none; }
  #back-to-top { bottom: 20px; left: 20px; }
}
