:root {
  --navy: #0A1128;
  --navy-deep: #070C1D;
  --slate: #1E293B;
  --green: #00FF87;
  --green-dim: rgba(0, 255, 135, .12);
  --white: #FFFFFF;
  --text: #E2E8F0;
  --muted: #94A3B8;
  --line: rgba(148, 163, 184, .16);
  --radius: 12px;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--white); margin: 0; line-height: 1.15; }
p { margin: 0; }
code { font-family: var(--font-mono); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.accent { color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 8px; border: 1px solid transparent;
  font: 600 15px/1 var(--font-body); cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: var(--navy); }
.btn--primary:hover { box-shadow: 0 0 0 4px var(--green-dim), 0 8px 30px rgba(0, 255, 135, .25); }
.btn--ghost { border-color: var(--line); color: var(--white); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--sm { padding: 10px 16px; font-size: 14px; }

.tag, .eyebrow {
  display: inline-block; font: 500 12px/1 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--green);
}
.tag { padding: 8px 12px; border: 1px solid rgba(0, 255, 135, .4); border-radius: 6px; background: var(--green-dim); }
.eyebrow { margin-bottom: 14px; }

/* Header */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgba(10, 17, 40, .75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__name { font: 700 18px/1 var(--font-head); letter-spacing: .14em; color: var(--white); }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--green); }
.header__actions { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.lang button {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 500 12px/1 var(--font-mono); padding: 7px 9px; border-radius: 5px;
}
.lang button.is-active { background: var(--slate); color: var(--green); }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; padding: 0; }
.burger span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--white); transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: calc(var(--header-h) + 80px) 0 100px; overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  opacity: .5;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(40px, 6vw, 68px); letter-spacing: -.02em; margin: 24px 0 22px; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.terminal {
  background: var(--navy-deep); border: 1px solid rgba(0, 255, 135, .25); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 60px rgba(0, 255, 135, .06); overflow: hidden;
}
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--slate); }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.terminal__bar span { margin-left: 10px; font: 12px var(--font-mono); color: var(--muted); }
.terminal__body {
  margin: 0; padding: 22px; min-height: 290px; white-space: pre-wrap;
  font: 13.5px/1.75 var(--font-mono); color: var(--green);
}
.terminal__body .dim { color: var(--muted); }
.terminal__body .white { color: var(--white); }

.cursor { display: inline-block; width: 8px; height: 1.05em; margin-left: 4px; vertical-align: text-bottom; background: var(--green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 100px 0; }
.section--alt { background: var(--navy-deep); border-block: 1px solid var(--line); }
.section__title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.01em; margin-bottom: 16px; }
.section__lead { max-width: 560px; margin-bottom: 48px; }

.card {
  background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.card__title { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

.about__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.about__grid .muted { font-size: 17px; }
.about__cards { display: grid; gap: 18px; }
.about__cards .card { border-left: 3px solid var(--green); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  display: flex; flex-direction: column; gap: 12px; padding: 30px;
  background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
/* Непарна остання картка займає весь рядок, щоб не лишалась сама з порожнечею */
.service:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.service:hover { border-color: rgba(0, 255, 135, .5); transform: translateY(-3px); }
.service h3 { font-size: 20px; }
.service p { color: var(--muted); font-size: 15px; flex: 1; }
.service code { font-size: 12px; color: var(--green); opacity: .8; }
.service__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--green-dim); margin-bottom: 6px; }
.service__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Process */
.process { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; }
.process li { position: relative; padding-top: 28px; border-top: 2px solid var(--line); }
.process li::before { content: ''; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--green); }
.process__num { font: 500 13px var(--font-mono); color: var(--green); }
.process h3 { font-size: 19px; margin: 10px 0 8px; }
.process p { color: var(--muted); font-size: 15px; }

/* Security */
.security { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.security .muted { font-size: 17px; }
.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 5px;
  background: var(--green-dim) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300FF87' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat;
}
.report {
  background: var(--navy); border: 1px solid rgba(0, 255, 135, .3); border-radius: var(--radius);
  padding: 28px; font: 14px/1.6 var(--font-mono); color: var(--green);
}
.report__head { padding-bottom: 14px; margin-bottom: 10px; border-bottom: 1px dashed rgba(0, 255, 135, .35); }
.report__row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.report__row span { color: var(--muted); }
.report__row b { font-weight: 500; color: var(--white); }
.report__row b.ok { color: var(--green); }
.report__foot { margin-top: 16px; }

/* Stack */
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stack li {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--slate);
  font: 14px var(--font-mono); color: var(--text); transition: border-color .2s, color .2s;
}
.stack li:hover { border-color: var(--green); color: var(--green); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }

/* Contact */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact .muted { font-size: 17px; }
.contact__info { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; }
.contact__info li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--green); }
.contact__info span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact__info b, .contact__info a { color: var(--white); font-weight: 600; }
.contact__info a:hover { color: var(--green); }

.form { display: grid; gap: 18px; padding: 32px; background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius); }
.form label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--navy); color: var(--white); font: 16px var(--font-body); transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.form .is-invalid { border-color: #F87171; }
.form__status { min-height: 1.4em; font: 14px var(--font-mono); color: var(--green); }
.form__status.is-error { color: #F87171; }

/* Footer */
.footer { padding: 36px 0; border-top: 1px solid var(--line); background: var(--navy-deep); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.footer__code { color: var(--green); font-size: 13px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero__inner, .about__grid, .security, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .services, .values { grid-template-columns: repeat(2, 1fr); }
  .service:last-child:nth-child(3n+1) { grid-column: auto; }
  .service:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .nav { gap: 20px; }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .header__cta { display: none; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    padding: 8px 24px 24px; background: var(--navy); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: calc(var(--header-h) + 48px) 0 72px; }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .services, .values, .process { grid-template-columns: 1fr; }
  .terminal__body { font-size: 12px; min-height: 260px; padding: 18px; }
  .brand__name { font-size: 16px; }
  .form, .card, .service, .report { padding: 22px; }
  .report { font-size: 12.5px; }
  .footer__inner { flex-direction: column; text-align: center; }
}
