/* Базовые стили (Этап 0) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Manrope', sans-serif;
  color: #1a1a1a;
  background-color: #fafafa;
  line-height: 1.6;
  font-size: 16px;
}
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
a:hover { color: #3b82f6; }

/* Хедер */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky; top: 0; z-index: 100;
}
.header__container {
  max-width: 1200px; margin: 0 auto; padding: 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.header__logo { font-size: 1.5rem; font-weight: 700; color: #3b82f6; }
.nav__list { display: flex; gap: 1.5rem; list-style: none; }
.nav__list a { font-weight: 500; position: relative; }
.nav__list a::after {
  content: ""; position: absolute; width: 0; height: 2px; left: 0; bottom: -3px;
  background: #3b82f6; transition: width 0.3s ease;
}
.nav__list a:hover::after { width: 100%; }

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 80% 10%, rgba(16,185,129,0.08), transparent),
              radial-gradient(1000px 500px at 15% 20%, rgba(59,130,246,0.10), transparent);
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__container {
  position: relative;
  max-width: 1100px; width: 100%;
  padding: 5rem 1rem 3rem;
  display: grid; gap: 1.25rem;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; border-radius: 999px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,.06);
  width: fit-content; font-weight: 600;
}
.hero__title {
  font-size: clamp(1.8rem, 2.8vw + 1rem, 3rem);
  font-weight: 800; letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 1.05rem; max-width: 720px; opacity: .85;
}
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem; border-radius: 12px; font-weight: 700;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
.btn--primary {
  background: #3b82f6; color: #fff; box-shadow: 0 8px 24px rgba(59,130,246,.25);
}
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost {
  background: #ffffff; border-color: #e5e5e5;
}
.btn--ghost:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }

.hero__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem; margin-top: .25rem; list-style: none;
}
.hero__facts-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem .75rem; border: 1px dashed rgba(0,0,0,.08); border-radius: 12px;
  background: rgba(255,255,255,.65); backdrop-filter: blur(6px);
}
.hero__illustration {
  margin-top: .5rem; max-width: 760px;
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 12px 36px rgba(0,0,0,.08);
}
.hero__illustration img { width: 100%; display: block; }

/* Футер */
.footer {
  background: #1a1a1a; color: #fafafa; padding: 3rem 1rem;
}
.footer__container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem;
}
.footer__logo { font-size: 1.3rem; font-weight: 700; color: #3b82f6; }
.footer__col h4 { margin-bottom: 0.8rem; font-weight: 600; }
.footer__col ul { list-style: none; }
.footer__col ul li { margin-bottom: 0.5rem; }
.footer__col ul li a { color: #fafafa; opacity: 0.8; }
.footer__col ul li a:hover { opacity: 1; }

/* Адаптив */
@media (min-width: 768px) {
  .hero__container { padding-top: 6rem; padding-bottom: 4rem; }
}

/* SECTION BASE */
.section { padding: 3.5rem 1rem; }
.section__container { max-width: 1100px; margin: 0 auto; }
.section__header { margin-bottom: 1.25rem; }
.section__title { font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.section__subtitle { max-width: 720px; opacity: .85; }

/* TABS */
.tabs { display: grid; gap: 1rem; }
.tabs__nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.tabs__btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; border-radius: 10px; border: 1px solid #e5e5e5;
  background: #fff; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tabs__btn--active { border-color: #3b82f6; box-shadow: 0 6px 18px rgba(59,130,246,.18); }
.tabs__btn:hover { transform: translateY(-1px); }
.tabs__panel { border: 1px solid rgba(0,0,0,.06); border-radius: 14px; background: #fff; padding: 1rem; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card { border: 1px solid rgba(0,0,0,.06); border-radius: 14px; background: #fff; padding: 1rem; display: grid; gap: .4rem; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.card__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(59,130,246,.1); }
.card__title { font-weight: 800; }
.card__text { opacity: .9; }

/* TABLE (responsive) */
.table__wrap { width: 100%; overflow-x: auto; margin-top: .75rem; }
.cmp { width: 100%; border-collapse: collapse; min-width: 520px; }
.cmp th, .cmp td { text-align: left; padding: .7rem .6rem; border-bottom: 1px dashed rgba(0,0,0,.08); }
.cmp thead th { font-weight: 700; background: rgba(0,0,0,.03); }

/* TOOLS BLOCK */
.tools { display: grid; gap: 1rem; }
.tool { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 768px) {
  .tool { grid-template-columns: 1fr 1.2fr; }
}
.tool__img { width: 100%; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; display: block; }
.tool__title { font-weight: 800; margin-bottom: .25rem; }
.tool__list { margin: .25rem 0 .75rem 1rem; }
.tool__list li { margin: .25rem 0; }

/* AI-ASSISTANTS */
.grid--assist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.aicard {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: .5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.aicard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.aicard__head { display: flex; align-items: center; gap: .6rem; }
.aicard__title { font-weight: 800; }
.aicard__text { opacity: .9; }
.aicard__list { margin-left: 1rem; }
.aicard__list li { margin: .25rem 0; }

/* ACCORDION */
.accordion { border: 1px solid rgba(0,0,0,.06); border-radius: 14px; background: #fff; overflow: hidden; }
.acc__item {
  width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px dashed rgba(0,0,0,.08);
  padding: .9rem 1rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background .2s ease;
}
.acc__item:hover { background: rgba(0,0,0,.02); }
.acc__item:last-of-type + .acc__panel:last-of-type { border-bottom: 0; }
.acc__icon { width: 18px; height: 18px; position: relative; }
.acc__icon::before, .acc__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: #1a1a1a; transform: translate(-50%, -50%);
}
.acc__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s ease; }
.acc__item[aria-expanded="true"] .acc__icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.acc__panel { padding: .85rem 1rem; border-bottom: 1px dashed rgba(0,0,0,.08); }
.acc__list li { margin: .25rem 0; }
.acc__code {
  background: #0b1020; color: #e6eaf5; border-radius: 10px; padding: .8rem; overflow-x: auto;
  font-family: 'Fira Sans', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
}

/* CASES */
.casegrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.casecard {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: .4rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.casecard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}
.casecard__top {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .3rem;
}
.casecard__title { font-weight: 800; }
.casecard__problem,
.casecard__solution,
.casecard__metric { font-size: .95rem; }
.casecard__metric b { color: #10b981; }

/* BLOG */
.bloggrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.blogcard {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blogcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}
.blogcard__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.blogcard__body {
  padding: 1rem;
  display: grid;
  gap: .5rem;
  flex-grow: 1;
}
.blogcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.tag {
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 8px;
  background: rgba(59,130,246,.1);
  color: #3b82f6;
  font-weight: 600;
}
.blogcard__title {
  font-weight: 800;
  font-size: 1.1rem;
}
.blogcard__excerpt {
  font-size: .95rem;
  opacity: .9;
  flex-grow: 1;
}

/* CONTACT */
.form {
  display: grid;
  gap: 1rem;
  max-width: 520px;
  margin: 0 auto;
}
.form__row {
  display: grid;
  gap: .4rem;
}
.form__row label {
  font-weight: 600;
  font-size: .95rem;
}
.form__row input[type="text"],
.form__row input[type="email"],
.form__row input[type="tel"],
.form__row input[type="number"] {
  padding: .7rem .8rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  transition: border .2s ease;
}
.form__row input:focus {
  outline: none;
  border-color: #3b82f6;
}
.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.form__checkbox input { margin-top: .25rem; }
.form__captcha label { font-weight: 700; }
.form__message {
  font-weight: 600;
  margin-top: .5rem;
}
.form__message--success { color: #10b981; }
.form__message--error { color: #ef4444; }

/* COOKIE POPUP */
.cookie {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 9999;
  padding: .75rem; background: transparent; display: grid; place-items: center;
}
.cookie__inner {
  width: min(1100px, 100%); display: flex; gap: .75rem; align-items: center; justify-content: space-between;
  background: #1a1a1a; color: #fafafa; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: .85rem 1rem; box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.cookie__text { margin-right: .5rem; }
.cookie__text a { color: #60a5fa; text-decoration: underline; }
.cookie__btn { white-space: nowrap; }

/* PAGES (privacy, cookies, terms...) */
.pages .container {
  max-width: 900px; margin: 0 auto; padding: 2rem 1rem;
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 14px;
}
.pages h1 {
  font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.2rem);
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: .75rem;
}
.pages p { margin: .8rem 0; font-size: 1rem; opacity: .95; }
.pages h2 { margin-top: 1.2rem; font-size: 1.25rem; font-weight: 800; }
.pages ul { margin: .6rem 0 .8rem 1.25rem; }
.pages li { margin: .35rem 0; }
.pages a { color: #3b82f6; text-decoration: underline; }
@media (max-width: 520px) {
  .cookie__inner { flex-direction: column; align-items: stretch; gap: .6rem; }
  .cookie__btn { width: 100%; }
}
