:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --border: #e5e7eb;
  --text: #111827;
  --text-secondary: #6b7280;
  --accent: #4b6cb7;
  --accent-hover: #3a5ba8;
  --accent-light: #eef2ff;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --max-w: 1200px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

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

/* Cyrillic font support */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--gray { background: var(--surface); }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}
.nav__links a {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a.active {
  color: var(--text);
  background: var(--surface);
}
.nav__dropdown { position: relative; }
.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 4px;
  list-style: none;
}
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown-menu a {
  display: block;
  padding: 8px 12px;
  font-size: .875rem;
  color: var(--text-secondary);
  border-radius: var(--radius);
}
.nav__dropdown-menu a:hover { color: var(--text); background: var(--surface); }
.nav__right { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn svg { width: 14px; height: 14px; color: var(--text-secondary); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  padding: 4px;
  z-index: 200;
}
.lang-switcher.open .lang-menu { display: block; }
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: .875rem;
  color: var(--text-secondary);
  border-radius: var(--radius);
  text-align: left;
  transition: background .1s, color .1s;
}
.lang-menu button:hover { background: var(--surface); color: var(--text); }
.lang-menu button.active { color: var(--accent); font-weight: 600; }

/* Mobile menu */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: none;
  background: none;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav__mobile {
  display: none;
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
}
.nav__mobile.open { display: block; }
.nav__mobile a {
  display: block;
  padding: 10px 24px;
  font-size: .9375rem;
  color: var(--text-secondary);
}
.nav__mobile a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero__tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero__sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero__advantages {
  font-size: .9375rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 16px; font-size: .875rem; }

/* ── Section headings ── */
.section-label {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
}
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-sub { margin: 0 auto; }

/* ── Service cards ── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #d1d5db; }
.card__icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 10px; }
.card__desc { font-size: .9375rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 20px; }
.card__link { font-size: .875rem; font-weight: 600; color: var(--accent); }
.card__link:hover { text-decoration: underline; }

/* ── Process steps ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  position: relative;
  z-index: 1;
}
.step__num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  transition: border-color .2s, background .2s;
}
.step:hover .step__num { border-color: var(--accent); background: var(--accent-light); }
.step__label { font-size: .8125rem; color: var(--text-secondary); line-height: 1.4; }

/* ── Portfolio grid ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.portfolio-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.portfolio-item:hover { box-shadow: var(--shadow-md); }
.portfolio-item__img {
  aspect-ratio: 4/3;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
}
.portfolio-item__img svg { width: 64px; height: 64px; }
.portfolio-item__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.portfolio-item__body { padding: 20px; }
.portfolio-item__tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.portfolio-item__title { font-size: 1rem; font-weight: 600; }

/* ── FAQ ── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.faq-q svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform .2s;
}
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 0 20px;
  font-size: .9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ── Form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }
.form-label { font-size: .875rem; font-weight: 500; color: var(--text); }
.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-area:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-area input { display: none; }
.upload-area__icon { color: var(--text-secondary); margin-bottom: 8px; }
.upload-area__icon svg { width: 32px; height: 32px; }
.upload-area__text { font-size: .875rem; color: var(--text-secondary); }
.upload-area__hint { font-size: .75rem; color: #9ca3af; margin-top: 4px; }
.upload-area__filename { font-size: .875rem; color: var(--accent); margin-top: 8px; font-weight: 500; }
.form-gdpr { font-size: .8125rem; color: var(--text-secondary); }
.form-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .9375rem;
  display: none;
}
.form-msg--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.form-msg--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.form-msg.show { display: block; }

/* ── CTA banner ── */
.cta-banner {
  background: var(--accent);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.cta-banner__title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 12px; }
.cta-banner__sub { font-size: 1rem; opacity: .85; margin-bottom: 32px; }
.cta-banner .btn--outline { border-color: rgba(255,255,255,.5); color: #fff; }
.cta-banner .btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ── Footer ── */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo { font-size: 1.125rem; font-weight: 700; color: #fff; }
.footer__tagline { font-size: .875rem; }
.footer__right { font-size: .8125rem; text-align: right; }

/* ── Page hero (inner pages) ── */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}
.page-hero__title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.page-hero__sub { font-size: 1.0625rem; color: var(--text-secondary); max-width: 560px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .process-steps::before { display: none; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__right { text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .cards { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
}
