:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #eef4f8;
  --ink: #101624;
  --ink-soft: #273244;
  --muted: #5b6575;
  --line: #dbe3ee;
  --blue: #1c5cff;
  --blue-deep: #1647bf;
  --green: #0f766e;
  --orange: #c55218;
  --yellow: #eab308;
  --shadow: 0 20px 50px rgba(16, 22, 36, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 22, 36, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 22, 36, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
}

a {
  color: inherit;
}

main {
  flex: 1 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 227, 238, 0.9);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header-inner,
.hero,
.section,
.contact-band,
.page-main,
.site-footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.site-nav a,
.site-footer a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.site-nav a {
  padding: 11px 12px;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-footer a:hover {
  color: var(--blue-deep);
  background: rgba(28, 92, 255, 0.08);
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.lang-trigger {
  min-width: 122px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.lang-trigger:hover,
.lang-switch.is-open .lang-trigger {
  border-color: rgba(28, 92, 255, 0.34);
  color: var(--blue-deep);
}

.lang-trigger:focus-visible,
.lang-option:focus-visible {
  outline: 3px solid rgba(28, 92, 255, 0.18);
  outline-offset: 2px;
}

.lang-current {
  line-height: 1;
  white-space: nowrap;
}

.lang-caret {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
}

.lang-switch.is-open .lang-caret {
  transform: rotate(225deg) translateY(-1px);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 180px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lang-menu[hidden] {
  display: none;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
}

.lang-option::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(28, 92, 255, 0.36);
  border-radius: 50%;
}

.lang-option:hover,
.lang-option.is-active {
  border-color: rgba(28, 92, 255, 0.14);
  background: rgba(28, 92, 255, 0.08);
  color: var(--blue-deep);
}

.lang-option.is-active::after {
  border-color: var(--blue);
  background: var(--blue);
}

.hero {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 52px;
  padding: 36px 0 46px;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 66px;
  font-weight: 850;
}

h2 {
  margin-bottom: 14px;
  font-size: 40px;
  font-weight: 800;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 760;
}

.hero-subtitle {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 24px;
  font-weight: 720;
  line-height: 1.35;
}

.hero-lede,
.section-head p,
.service-card p,
.page-lede,
.page-card p,
.legal-copy p,
.legal-copy li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.68;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 0;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--blue);
  color: #fff;
}

.button-primary:hover {
  background: var(--blue-deep);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: rgba(28, 92, 255, 0.32);
  color: var(--blue-deep);
}

.hero-panel {
  display: grid;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-mark {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
}

.agent-stack {
  display: grid;
  gap: 10px;
}

.agent-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.agent-row strong {
  color: var(--ink);
  font-size: 13px;
}

.agent-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.agent-dot-blue {
  background: var(--blue);
}

.agent-dot-green {
  background: var(--green);
}

.agent-dot-orange {
  background: var(--orange);
}

.section {
  padding: 70px 0;
}

.hero + .section {
  padding-top: 28px;
}

.install-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1.22fr);
  align-items: start;
  gap: 24px;
  padding: 30px 0 70px;
}

.install-copy {
  max-width: 450px;
}

.install-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.install-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101624;
  box-shadow: var(--shadow);
  color: #f8fafc;
}

.install-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.install-panel-head strong {
  color: #fff;
  font-size: 13px;
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.install-cmd {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow-x: auto;
  padding: 15px 16px;
  border: 1px solid rgba(203, 213, 225, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.94);
  color: #e0f2fe;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre;
}

code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

p code,
li code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(16, 22, 36, 0.08);
  color: var(--ink);
  font-size: 0.9em;
}

.copy-btn {
  min-width: 90px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.copy-btn:hover {
  background: #3b82f6;
}

.copy-btn.is-copied {
  background: var(--green);
}

.install-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding-left: 20px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.install-list li::marker {
  color: #60a5fa;
}

.section-head {
  max-width: 720px;
  margin-bottom: 26px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card,
.page-card,
.legal-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(16, 22, 36, 0.05);
}

.service-card {
  min-height: 278px;
  padding: 24px;
}

.service-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 26px;
  border-radius: 50%;
  background: rgba(28, 92, 255, 0.1);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
}

.service-card:nth-child(2) .service-number {
  background: rgba(15, 118, 110, 0.12);
  color: var(--green);
}

.service-card:nth-child(3) .service-number {
  background: rgba(197, 82, 24, 0.12);
  color: var(--orange);
}

.service-card:nth-child(4) .service-number {
  background: rgba(234, 179, 8, 0.16);
  color: #8a5a00;
}

.service-card p {
  margin-bottom: 0;
}

.about-preview {
  padding-top: 28px;
}

.about-preview .section-head {
  margin-bottom: 20px;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 74px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #102033;
  color: #fff;
}

.contact-band .eyebrow {
  color: #7dd3fc;
}

.contact-band h2 {
  max-width: 660px;
  margin-bottom: 0;
  color: #fff;
}

.contact-band .button-primary {
  background: #fff;
  color: #102033;
}

.contact-band .button-primary:hover {
  background: #dbeafe;
}

.telegram-note {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 700;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer a {
  padding: 6px 0;
}

.page-main {
  padding: 70px 0 86px;
}

.page-header {
  max-width: 780px;
  margin-bottom: 30px;
}

.page-header h1 {
  margin-bottom: 18px;
  font-size: 54px;
}

.page-lede {
  margin-bottom: 0;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.page-card,
.legal-copy {
  padding: 28px;
}

.page-card p:last-child,
.legal-copy p:last-child,
.legal-copy ul:last-child {
  margin-bottom: 0;
}

.contact-list,
.legal-copy ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.contact-list a {
  color: var(--blue-deep);
  font-weight: 800;
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.legal-copy {
  max-width: 860px;
}

.legal-copy h2 {
  margin-top: 32px;
  font-size: 26px;
}

.legal-copy h2:first-child {
  margin-top: 0;
}

@media (max-width: 980px) {
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
  }

  h1 {
    font-size: 54px;
  }

  .install-section {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 138px;
  }

  .site-header-inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .header-actions {
    width: 100%;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    padding: 8px 9px;
  }

  .lang-switch {
    width: 100%;
    justify-content: space-between;
  }

  .lang-trigger {
    min-width: 0;
    flex: 1 1 auto;
  }

  .lang-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  h1,
  .page-header h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .hero-lede,
  .section-head p,
  .service-card p,
  .page-lede,
  .page-card p,
  .legal-copy p,
  .legal-copy li {
    font-size: 16px;
  }

  .service-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 0;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-header-inner,
  .hero,
  .section,
  .install-section,
  .contact-band,
  .page-main,
  .site-footer-inner {
    width: min(1120px, calc(100% - 24px));
  }

  .hero {
    gap: 34px;
    padding-top: 34px;
    padding-bottom: 30px;
  }

  h1,
  .page-header h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 24px;
  }

  .button {
    width: 100%;
    min-height: 46px;
  }

  .install-section {
    padding: 24px 0 52px;
  }

  .install-panel {
    padding: 16px;
  }

  .install-copy p {
    font-size: 16px;
  }

  .command-row {
    flex-direction: column;
  }

  .install-cmd {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .copy-btn {
    min-height: 44px;
  }

  .service-card,
  .page-card,
  .legal-copy,
  .contact-band {
    padding: 20px;
  }

  .hero-panel {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
  }

  .hero-mark {
    width: 82px;
    height: 82px;
    aspect-ratio: 1;
  }

  .agent-stack {
    gap: 7px;
    min-width: 0;
  }

  .agent-row {
    min-height: 34px;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .agent-row strong {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}
