:root {
  color-scheme: dark;
  --bg: #05070c;
  --bg-soft: #0b111c;
  --surface: #101827;
  --surface-strong: #131f33;
  --text: #f6f8ff;
  --muted: #9aa7bd;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #2477ff;
  --blue-strong: #0a5fff;
  --blue-soft: rgba(36, 119, 255, 0.14);
  --shadow: 0 28px 90px rgba(0, 16, 45, 0.48);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fd;
  --bg-soft: #eef4ff;
  --surface: #ffffff;
  --surface-strong: #edf4ff;
  --text: #07111f;
  --muted: #526071;
  --line: rgba(7, 17, 31, 0.13);
  --blue: #075fff;
  --blue-strong: #004ddd;
  --blue-soft: rgba(7, 95, 255, 0.1);
  --shadow: 0 24px 70px rgba(14, 44, 91, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 46%, var(--bg) 100%);
  letter-spacing: 0;
  transition: background-color 180ms ease, color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 62%);
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.header-actions,
.header-contact,
.lang-toggle,
.theme-toggle,
.hero-actions,
.contact {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background:
    linear-gradient(135deg, var(--blue), transparent 58%),
    var(--text);
  border-radius: 7px;
  box-shadow: 0 0 0 6px var(--blue-soft);
}

.nav {
  justify-content: center;
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  transition: color 160ms ease;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  justify-content: flex-end;
  gap: 10px;
}

.header-contact {
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.header-contact:hover {
  transform: translateY(-1px);
  background: var(--blue-strong);
  border-color: var(--blue-strong);
}

.lang-toggle {
  justify-content: center;
  gap: 2px;
  height: 40px;
  padding: 3px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
}

.lang-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.lang-toggle span.is-active {
  color: #ffffff;
  background: var(--blue);
}

.theme-toggle {
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  height: 40px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
}

.theme-icon {
  width: 16px;
  height: 16px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: inset -5px -5px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .theme-icon {
  box-shadow: 0 0 0 4px rgba(7, 95, 255, 0.16);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 560px;
  padding: 56px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-bg {
  position: absolute;
  inset: 24px 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.72;
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 92%, transparent 100%);
}

.hero-bg::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: translate3d(0, 0, 0);
  animation: gridShift 18s linear infinite;
}

.hero-bg::after {
  position: absolute;
  top: 46%;
  right: 5%;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  content: "";
  border: 1px solid color-mix(in srgb, var(--blue) 38%, transparent);
  transform: translateY(-50%) rotate(45deg);
  animation: frameFloat 10s ease-in-out infinite;
}

.hero-line {
  position: absolute;
  left: 45%;
  width: min(48vw, 560px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0;
  animation: lineScan 6.5s ease-in-out infinite;
}

.hero-line:nth-child(1) {
  top: 30%;
}

.hero-line:nth-child(2) {
  top: 52%;
  animation-delay: 1.8s;
}

.hero-line:nth-child(3) {
  top: 74%;
  animation-delay: 3.4s;
}

.hero-node {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 0 8px var(--blue-soft);
  animation: nodePulse 3.8s ease-in-out infinite;
}

.hero-node:nth-child(4) {
  top: 28%;
  right: 28%;
}

.hero-node:nth-child(5) {
  top: 58%;
  right: 12%;
  animation-delay: 1.1s;
}

.hero-node:nth-child(6) {
  top: 72%;
  right: 39%;
  animation-delay: 2.2s;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-title-muted {
  max-width: 620px;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.lead {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.58;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.button-primary {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(7, 95, 255, 0.28);
}

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

.button-ghost {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.button-ghost:hover {
  border-color: var(--blue);
}

.services,
.process,
.contact {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 42px;
}

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

.service-card {
  min-height: 275px;
  padding: 28px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-number {
  display: block;
  margin-bottom: 58px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.service-card p,
.process-item p,
.contact-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.process-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.process-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr);
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.process-item > span {
  color: var(--blue);
  font-weight: 800;
}

.process-item h3 {
  margin-bottom: 8px;
}

.contact {
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 120px;
}

.contact-copy {
  max-width: 650px;
}

.contact-copy h2 {
  margin-bottom: 20px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease;
}

.contact-link:hover {
  transform: translateY(-2px);
  background: var(--blue-strong);
}

@keyframes gridShift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 48px 48px, 48px 48px;
  }
}

@keyframes frameFloat {
  0%,
  100% {
    transform: translateY(-50%) rotate(45deg) scale(1);
  }

  50% {
    transform: translateY(-54%) rotate(45deg) scale(1.04);
  }
}

@keyframes lineScan {
  0% {
    opacity: 0;
    transform: translateX(-18%);
  }

  18%,
  72% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translateX(18%);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.86);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 50px 0 66px;
  }

  .hero-bg {
    inset: 12px 0;
    opacity: 0.45;
  }

  .hero-line {
    left: 8%;
    width: 92%;
  }

  .hero-bg::after {
    right: -18%;
    width: 360px;
  }

  .section-heading,
  .service-grid,
  .process-item,
  .contact {
    grid-template-columns: 1fr;
  }

  .contact {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .site-header,
  .section {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 66px;
    gap: 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .theme-toggle {
    min-width: 86px;
    height: 38px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-contact {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .lang-toggle {
    height: 38px;
  }

  .lang-toggle span {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
  }

  .hero {
    padding: 38px 0 56px;
  }

  h1 {
    font-size: clamp(36px, 11.5vw, 52px);
    line-height: 1;
  }

  .hero-title-muted {
    margin-top: 10px;
    font-size: clamp(24px, 7.4vw, 34px);
    line-height: 1.12;
  }

  h2 {
    font-size: 32px;
    line-height: 1.08;
  }

  .lead {
    font-size: 16px;
    line-height: 1.6;
  }

  .button {
    width: 100%;
  }

  .hero-bg {
    opacity: 0.32;
  }

  .hero-node {
    display: none;
  }

  .services,
  .process,
  .contact {
    padding: 70px 0;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 30px;
  }

  .service-card {
    min-height: 230px;
    padding: 22px;
  }

  .service-number {
    margin-bottom: 42px;
  }

  .process-item {
    gap: 14px;
    padding: 24px 0;
  }

  .contact-link {
    width: 100%;
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg::before,
  .hero-bg::after,
  .hero-line,
  .hero-node {
    animation: none;
  }
}
