:root {
  --ink: #071126;
  --muted: #65718a;
  --line: #dfe7f5;
  --soft: #f7faff;
  --blue: #176bff;
  --violet: #7b32ff;
  --shadow: 0 18px 54px rgba(19, 48, 103, .07);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 92% 13%, rgba(123, 50, 255, .1), transparent 18%),
    radial-gradient(circle at 74% 24%, rgba(23, 107, 255, .12), transparent 18%),
    #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid #e6edf8;
  backdrop-filter: blur(16px);
}
.nav {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.logo img {
  width: 340px;
  height: 80px;
  object-fit: contain;
  object-position: left center;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.nav-links a {
  padding: 26px 0 24px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  border-color: var(--blue);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, 34px);
  padding: 3px;
  border: 1px solid #dbe6f7;
  border-radius: 7px;
  background: #f8fbff;
}
.lang-switch button {
  height: 28px;
  border: 0;
  border-radius: 5px;
  color: #59677f;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.lang-switch button.active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  box-shadow: 0 8px 18px rgba(47, 92, 242, .18);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(53, 91, 242, .22);
}
.btn:hover { transform: translateY(-1px); }
.btn.secondary {
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 445px;
  padding: 56px 0 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .94) 34%, rgba(255, 255, 255, .34) 56%, rgba(255, 255, 255, 0) 100%),
    url("assets/home-hero.webp") right center / auto 100% no-repeat,
    linear-gradient(180deg, #fbfdff, #fff);
}
.hero:before {
  display: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr;
  align-items: center;
  min-height: 365px;
  gap: 24px;
}
.eyebrow {
  margin: 0 0 18px;
  color: #52617c;
  font-size: 15px;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 4.8vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}
.accent {
  color: transparent;
  background: linear-gradient(90deg, #1274ff, #8638ff);
  -webkit-background-clip: text;
  background-clip: text;
}
.lead {
  max-width: 560px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}
.stats {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 42px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 132px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.stat strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.play-link img {
  width: 142px;
  height: 58px;
  object-fit: contain;
}

.section { padding: 0; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}
.section-inner { padding: 24px 20px; }
.section-title {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.service-card,
.portfolio-card,
.tech-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.service-card {
  min-height: 174px;
  padding: 22px 18px;
  background-image: radial-gradient(#cbd8ee 1px, transparent 1px);
  background-size: 10px 10px;
  background-position: right 13px top 13px;
  background-repeat: no-repeat;
}
.service-card img {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  object-fit: contain;
}
.service-card h3,
.portfolio-card h3 {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.25;
}
.service-card p,
.portfolio-card p,
.small-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.portfolio-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.portfolio-card { overflow: hidden; }
.portfolio-card img {
  width: 100%;
  aspect-ratio: 178 / 95;
  object-fit: cover;
}
.portfolio-card div { padding: 11px 12px 14px; }

.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.process:before {
  content: "";
  position: absolute;
  top: 25px;
  left: 10%;
  right: 10%;
  border-top: 1px dashed #b9cff6;
}
.step {
  position: relative;
  text-align: center;
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  border: 1px solid #d7e4fb;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-weight: 800;
}
.step img {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  object-fit: contain;
}
.step h3 { margin: 0 0 8px; font-size: 15px; }
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 14px;
}
.tech-card {
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 12px;
  color: #23304a;
  font-size: 13px;
}
.tech-card img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 18px;
}
.about-panel,
.home-blog-panel {
  min-height: 236px;
  padding: 28px 22px;
}
.about-body {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 26px;
}
.about-body img {
  width: 165px;
  justify-self: center;
}
.checks {
  margin: 22px 0 0;
  padding: 0;
  color: #33405a;
  list-style: none;
}
.checks li { margin: 13px 0; }
.checks li:before {
  content: "✓";
  margin-right: 12px;
  color: var(--blue);
  font-weight: 900;
}
.home-blog-layout {
  display: grid;
  grid-template-columns: 1fr 175px;
  align-items: center;
  gap: 24px;
}
.mini-articles {
  display: grid;
  gap: 16px;
}
.mini-article {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
}
.mini-article img {
  width: 72px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}
.mini-article h3 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
}
.mini-article time {
  color: #8a98af;
  font-size: 12px;
}
.doc-illustration {
  width: 155px;
  height: 176px;
  justify-self: end;
  object-fit: contain;
  object-position: center;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
}
.contact-title {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.15;
}
.contact-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
}
.contact-icon,
.contact-img {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.contact-icon {
  color: #fff;
  background: linear-gradient(135deg, #20b7e9, #206fff);
  font-size: 25px;
}
.contact-icon.mail {
  color: var(--violet);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.contact-item span {
  color: #5a657c;
  font-size: 13px;
}
.contact-item a,
.email-text {
  display: block;
  margin-top: 4px;
  color: #0a63ff;
  font-weight: 800;
}
.map {
  width: 100%;
  height: 90px;
  border-radius: 7px;
  object-fit: cover;
}
.footer {
  padding: 10px 0 22px;
  color: #8a98af;
  text-align: center;
  font-size: 12px;
}
.admin-link { color: #8190a8; }

.blog-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 74px 0 66px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .94) 34%, rgba(255, 255, 255, .34) 56%, rgba(255, 255, 255, 0) 100%),
    url("assets/home-hero.webp") right center / auto 100% no-repeat,
    linear-gradient(180deg, #fbfdff, #fff);
}
.back-link {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 30px;
  color: #6b7890;
}
.blog-hero h1 { font-size: clamp(42px, 5vw, 58px); }
.blog-hero p { max-width: 650px; }
.blog-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(250px, 330px);
  align-items: center;
  gap: 22px;
  margin: 26px 0 34px;
}
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #17223a;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.chip.active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  border-color: transparent;
}
.search {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.article-card {
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(17, 45, 91, .04);
}
.article-card img {
  width: 100%;
  aspect-ratio: 298 / 140;
  object-fit: cover;
}
.article-body { padding: 18px 18px 20px; }
.meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  color: #8a98af;
  font-size: 12px;
}
.tag {
  padding: 6px 9px;
  border-radius: 999px;
  color: #176bff;
  background: #eef5ff;
  font-weight: 800;
}
.article-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.45;
}
.article-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}
.read-more {
  display: inline-flex;
  gap: 10px;
  color: var(--blue);
  font-weight: 800;
}

.article-page { padding: 56px 0; }
.article-shell {
  max-width: 860px;
  margin: 0 auto;
}
.article-shell h1 {
  margin: 18px 0;
  font-size: clamp(34px, 4vw, 50px);
}
.article-cover {
  width: 100%;
  margin: 26px 0;
  border-radius: 8px;
}
.article-content {
  color: #2b3852;
  font-size: 18px;
  line-height: 1.8;
}
.article-content h2,
.article-content h3 {
  margin: 28px 0 12px;
  color: var(--ink);
  line-height: 1.25;
}
.article-content p,
.article-content ul,
.article-content ol {
  margin: 0 0 18px;
}
.article-content a {
  color: #1f67ff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-page {
  min-height: calc(100vh - 68px);
  padding: 42px 0 70px;
  background: var(--soft);
}
.admin-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  align-items: start;
  gap: 24px;
}
.form-panel,
.admin-list { padding: 22px; }
.editor-lang-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faff;
}
.editor-lang-tabs button,
.rich-toolbar button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31405a;
  font-weight: 800;
  cursor: pointer;
}
.editor-lang-tabs button {
  min-height: 36px;
}
.editor-lang-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #1f67ff, #7b3ff2);
  box-shadow: 0 8px 18px rgba(31, 103, 255, .2);
}
.editor-lang-panel {
  display: none;
}
.editor-lang-panel.active {
  display: block;
}
.rich-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f7faff;
}
.rich-toolbar button {
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid var(--line);
}
.rich-editor {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.7;
  outline: none;
}
.rich-editor:focus {
  border-color: #8cb1ff;
  box-shadow: 0 0 0 3px rgba(31, 103, 255, .12);
}
.rich-editor a {
  color: #145cff;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  background: rgba(31, 103, 255, .12);
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(31, 103, 255, .12);
}
.rich-context-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(25, 48, 90, .16);
}
.rich-context-menu.active {
  display: block;
}
.rich-context-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.rich-context-menu button:hover {
  background: #f2f6ff;
  color: #1f67ff;
}
.admin-login {
  max-width: 420px;
  padding: 22px;
}
.admin-login-body {
  min-height: 100vh;
  background: #fff;
}
.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.admin-login-card {
  width: fit-content;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(25, 48, 90, .08);
}
.admin-login-logo {
  margin: 0 auto 26px;
  justify-content: center;
}
.admin-login-card h1 {
  margin: 0 0 22px;
  font-size: 30px;
}
.admin-login-field {
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-login-field span {
  color: #0b1430;
  font-size: 14px;
}
.admin-login-field input {
  width: clamp(180px, 20vw, 300px);
  height: 38px;
  padding: 8px 10px;
}
.admin-login-card .btn {
  width: 140px;
  height: 40px;
  min-height: 40px;
  margin: 16px auto 0;
  padding: 0 18px;
}
.is-hidden {
  display: none !important;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  color: #31405a;
  font-weight: 800;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.field textarea {
  min-height: 170px;
  resize: vertical;
}
.admin-article {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.admin-article img {
  width: 108px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
}
.admin-form-actions,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ghost-btn {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #1f67ff;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.danger {
  padding: 9px 12px;
  border: 1px solid #ffd0d0;
  border-radius: 6px;
  color: #d31b31;
  background: #fff;
  cursor: pointer;
}
.empty {
  padding: 24px 0;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .nav-links { gap: 18px; }
  .nav-cta { padding: 0 16px; }
  .hero {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .9) 45%, rgba(255, 255, 255, .18) 100%),
      url("assets/home-hero.webp") right center / auto 100% no-repeat,
      linear-gradient(180deg, #fbfdff, #fff);
  }
}

@media (max-width: 980px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
  }
  .nav-links a { padding: 8px 0 12px; }
  .hero-grid,
  .split,
  .admin-grid { grid-template-columns: 1fr; }
  .services-grid,
  .portfolio-row,
  .process,
  .tech-grid,
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1160px); }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .logo img {
    width: min(340px, 70vw);
    height: auto;
  }
  .nav-cta { display: none; }
  .hero {
    min-height: 590px;
    padding-top: 34px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .96) 47%, rgba(255, 255, 255, .3) 72%, rgba(255, 255, 255, .02) 100%),
      url("assets/home-hero.webp") right bottom / 150% auto no-repeat,
      linear-gradient(180deg, #fbfdff, #fff);
  }
  h1 { font-size: 38px; }
  .stats,
  .blog-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .services-grid,
  .portfolio-row,
  .process,
  .tech-grid,
  .articles-grid,
  .contact-panel { grid-template-columns: 1fr; }
  .process:before { display: none; }
  .about-body,
  .home-blog-layout,
  .admin-article { grid-template-columns: 1fr; }
  .doc-illustration { justify-self: start; }
  .blog-hero {
    min-height: 470px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .96) 48%, rgba(255, 255, 255, .3) 76%, rgba(255, 255, 255, .02) 100%),
      url("assets/home-hero.webp") right bottom / 150% auto no-repeat,
      linear-gradient(180deg, #fbfdff, #fff);
  }
}
