/* ==========================================================================
   AutomatAI — основні стилі сайту
   ========================================================================== */

:root {
  --color-bg: #0b1020;
  --color-bg-soft: #0f1630;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f7fb;
  --color-border: #e4e8f1;
  --color-text: #1b2033;
  --color-text-soft: #5a6178;
  --color-text-invert: #f3f5fb;
  --color-text-invert-soft: #aab2cf;
  --color-primary: #4f6bff;
  --color-primary-dark: #3a4fd1;
  --color-accent: #8a5cff;
  --color-success: #1fa971;
  --color-danger: #e5484d;
  --gradient-brand: linear-gradient(135deg, #4f6bff 0%, #8a5cff 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(16, 24, 56, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 24, 56, 0.12);
  --shadow-lg: 0 24px 60px rgba(16, 24, 56, 0.18);
  --container-w: 1180px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }

p { margin: 0 0 1em; color: var(--color-text-soft); }

button { font-family: inherit; cursor: pointer; }

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

section { padding: 96px 0; }

.section--tight { padding: 64px 0; }

.section--alt { background: var(--color-surface-alt); }

.section--dark {
  background: var(--color-bg);
  color: var(--color-text-invert);
}
.section--dark p { color: var(--color-text-invert-soft); }
.section--dark h2, .section--dark h3 { color: var(--color-text-invert); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(79, 107, 255, .1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 { font-size: clamp(28px, 4vw, 38px); }
.section-head p { font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 107, 255, .35);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(79, 107, 255, .45); }

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .28);
  color: var(--color-text-invert);
}
.btn--ghost:hover { border-color: rgba(255, 255, 255, .6); }

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn--block { width: 100%; }
.btn--lg { padding: 16px 32px; font-size: 16px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 32, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav__links a {
  color: var(--color-text-invert-soft);
  font-weight: 500;
  font-size: 15px;
  transition: color .15s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: #fff; }

.nav__actions { display: flex; align-items: center; gap: 14px; }

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 20px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 880px) {
  .nav__links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #0b1020;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, rgba(138, 92, 255, .35), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(79, 107, 255, .35), transparent 55%),
              var(--color-bg);
  color: var(--color-text-invert);
  padding: 90px 0 110px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 20px;
}
.hero h1 span { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero p.lead { font-size: 18px; color: var(--color-text-invert-soft); max-width: 520px; }

.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .12);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.hero__stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero__stats div strong { display: block; font-size: 26px; color: #fff; }
.hero__stats div span { font-size: 13px; color: var(--color-text-invert-soft); }

.page-hero {
  background: var(--color-bg);
  color: var(--color-text-invert);
  padding: 72px 0;
}
.page-hero .eyebrow { background: rgba(255,255,255,.1); color: #c7cffb; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
.page-hero p { max-width: 640px; color: var(--color-text-invert-soft); font-size: 17px; }
.breadcrumbs { font-size: 14px; color: var(--color-text-invert-soft); margin-bottom: 18px; }
.breadcrumbs a { color: var(--color-text-invert-soft); }
.breadcrumbs a:hover { color: #fff; }

/* ---------- Lead form in hero ---------- */
.lead-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.lead-card h3 { font-size: 20px; margin-bottom: 4px; }
.lead-card p.lead-card__sub { font-size: 14px; margin-bottom: 20px; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  margin-bottom: 18px;
}

.card--media { padding: 0; overflow: hidden; }
.card--media img { width: 100%; height: 190px; object-fit: cover; }
.card--media .card__body { padding: 26px; }

/* ---------- Service rows (alternating image/text) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}
.service-row:last-child { border-bottom: none; }
.service-row__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/3; object-fit: cover; }
.service-row.reverse .service-row__media { order: 2; }
.service-row__list li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--color-text-soft);
  font-size: 15px;
}
.service-row__list li::before { content: "✓"; color: var(--color-success); font-weight: 700; }

@media (max-width: 860px) {
  .service-row { grid-template-columns: 1fr; gap: 28px; }
  .service-row.reverse .service-row__media { order: 0; }
}

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--color-bg);
  color: #fff;
}
.stats-band .grid--4 { text-align: center; }
.stats-band strong { display: block; font-size: 36px; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-band span { color: var(--color-text-invert-soft); font-size: 14px; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--color-border);
}
.testimonial p { color: var(--color-text); font-style: italic; }
.testimonial__who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial__who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial__who strong { display: block; font-size: 14px; }
.testimonial__who span { font-size: 13px; color: var(--color-text-soft); }

/* ---------- Pricing ---------- */
.price-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  position: relative;
  background: var(--color-surface);
}
.price-card--highlight {
  border-color: transparent;
  background: var(--color-bg);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.price-card--highlight p { color: var(--color-text-invert-soft); }
.price-card--highlight .price-card__tag { background: var(--gradient-brand); }
.price-card__tag {
  position: absolute;
  top: -14px;
  left: 28px;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.price-card__amount { font-size: 38px; font-weight: 800; margin: 14px 0 4px; }
.price-card__amount span { font-size: 15px; font-weight: 500; color: var(--color-text-soft); }
.price-card ul { margin: 22px 0; }
.price-card ul li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; }
.price-card ul li::before { content: "✓"; color: var(--color-success); font-weight: 700; }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item__q {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 20px 4px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
}
.faq-item__q::after { content: "+"; font-size: 22px; color: var(--color-primary); transition: transform .2s ease; }
.faq-item.is-open .faq-item__q::after { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-item.is-open .faq-item__a { max-height: 240px; }
.faq-item__a p { padding: 0 4px 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-bg);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 90% 10%, rgba(138,92,255,.35), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band__media img { border-radius: var(--radius-md); aspect-ratio: 16/10; object-fit: cover; }
@media (max-width: 860px) {
  .cta-band { grid-template-columns: 1fr; padding: 36px; }
}

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 107, 255, .15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field small { color: var(--color-text-soft); font-size: 12px; }

.field-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--color-text-soft); }
.field-check input { width: 16px; height: 16px; margin-top: 3px; flex: none; }
.field-check a { color: var(--color-primary); text-decoration: underline; }

.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }

.form-alert {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.form-alert.is-visible { display: block; }
.form-alert--success { background: rgba(31, 169, 113, .12); color: #0f7a51; border: 1px solid rgba(31, 169, 113, .3); }
.form-alert--error { background: rgba(229, 72, 77, .1); color: #b6262b; border: 1px solid rgba(229, 72, 77, .3); }

/* ---------- Contact info cards ---------- */
.contact-info {
  display: grid;
  gap: 18px;
}
.contact-info__item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.contact-info__icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex: none;
}
.contact-info__item h4 { margin-bottom: 4px; font-size: 15px; }
.contact-info__item p { margin: 0; font-size: 14px; }

.map-placeholder {
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="300"><rect width="400" height="300" fill="%23eef1fa"/></svg>');
  border: 1px solid var(--color-border);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-soft);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.map-placeholder__pin {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 14px;
  box-shadow: 0 10px 24px rgba(79,107,255,.35);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg);
  color: var(--color-text-invert-soft);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-grid h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { font-size: 14px; max-width: 280px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a:hover { color: #fff; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.social-row a:hover { border-color: #fff; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-bg);
  color: var(--color-text-invert);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 13px; color: var(--color-text-invert-soft); flex: 1 1 260px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}
.back-to-top.is-visible { display: flex; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Misc content pages (privacy/terms) ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 24px; margin-top: 44px; }
.prose h3 { font-size: 18px; margin-top: 28px; }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; }
.prose ul li { margin-bottom: 6px; color: var(--color-text-soft); }
.prose p { color: var(--color-text-soft); }
.prose__updated { font-size: 13px; color: var(--color-text-soft); margin-bottom: 40px; }

/* ---------- 404 ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page h1 { font-size: 96px; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }

/* ---------- Values / team grids ---------- */
.value-card { text-align: left; }
.team-card { text-align: center; }
.team-card img { width: 100%; border-radius: var(--radius-md); aspect-ratio: 1/1; object-fit: cover; margin-bottom: 16px; }
.team-card h4 { margin-bottom: 2px; }
.team-card span { font-size: 13px; color: var(--color-primary); font-weight: 600; }

.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}
.step:last-child { border-bottom: none; }
.step__num {
  flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--color-primary);
}
