:root {
  --bg: #0b1442;
  --bg-elevated: #121b56;
  --text-primary: #f5f6fa;
  --text-secondary: #a9b3d9;
  --text-muted: #8b96c9;
  --text-on-light: #10163a;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #4fc3ff;
  --accent-2: #8f6bff;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --font-heading: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --container-w: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; }

a { color: var(--accent); transition: color .15s ease; }
a:hover { color: #8fdcff; }

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Global network background */
.bg-network {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Topbar */
.topbar {
  padding: 24px 0;
  position: relative;
  z-index: 3;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 8px 1px rgba(79, 195, 255, 0.55);
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9d2f0;
}

.topbar__tag {
  font-size: 14px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn--primary {
  color: var(--text-on-light);
  background: linear-gradient(135deg, #ffffff 0%, #eaf6ff 100%);
  box-shadow: 0 10px 28px -12px rgba(79, 195, 255, 0.4);
  transition: background .2s ease, transform .15s ease, box-shadow .25s ease;
}

.btn--primary:hover {
  color: var(--text-on-light);
  background: linear-gradient(135deg, #ffffff 0%, #dff1ff 100%);
  box-shadow: 0 0 32px 4px rgba(79, 195, 255, 0.45), 0 0 60px 14px rgba(143, 107, 255, 0.28);
  transform: translateY(-1px);
}
.btn--primary:active { transform: scale(0.98); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 140px;
}

.hero__glow {
  position: absolute;
  top: -220px;
  left: 15%;
  width: 900px;
  height: 600px;
  max-width: 160vw;
  background: radial-gradient(closest-side, rgba(79, 195, 255, 0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.hero__decor-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px clamp(32px, 6vw, 120px) 0 0;
  pointer-events: none;
}

.hero__decor {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  user-select: none;
  max-width: 48vw;
}

.hero__decor span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(26px, 9vw, 104px);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(143, 215, 255, 0.28);
  text-align: right;
  white-space: nowrap;
}

.hero__bgimage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__bgimage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 40%;
  filter: blur(3px) brightness(0.85) saturate(1.05);
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 72% 42%, black 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 65% 60% at 72% 42%, black 35%, transparent 78%);
}

.hero__bgimage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--bg) 0%, var(--bg) 30%, rgba(11, 20, 66, 0.35) 55%, rgba(11, 20, 66, 0.05) 80%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0;
  padding-top: 96px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 13px;
  color: #c3cbef;
  background: rgba(255, 255, 255, 0.04);
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 6px 1px rgba(79, 195, 255, 0.6);
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
  background: linear-gradient(115deg, #ffffff 20%, var(--accent) 68%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 560px;
}

/* Sections */
.section {
  padding: 96px 0;
  position: relative;
  z-index: 1;
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
  margin-bottom: 56px;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.25;
  margin: 0;
  color: #f6f7fc;
}

.grid {
  display: grid;
  gap: 28px;
}

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

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.6);
  transition: border-color .2s ease, transform .2s ease;
}

.card:hover {
  border-color: rgba(143, 107, 255, 0.4);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.6), 0 0 32px -12px rgba(79, 195, 255, 0.3);
  transform: translateY(-2px);
}

.card__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(79, 195, 255, 0.12);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  margin: 0;
  color: #f0f2fa;
}

.card__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Steps ("Как я работаю") */
.steps {
  list-style: none;
  margin: 0 0 64px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}

.steps__item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  box-shadow: 0 0 14px -4px rgba(79, 195, 255, 0.7);
  flex-shrink: 0;
}

.steps__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
  color: #f0f2fa;
}

.steps__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Case placeholders */
.cases {
  margin-bottom: 64px;
}

.case-card--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.case-card__label {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 16px;
}

/* About */
.about {
  max-width: 700px;
}

.about__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 16px;
  color: #f0f2fa;
}

.about__text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* CTA */
.cta {
  padding: 96px 0;
  text-align: left;
  position: relative;
  z-index: 1;
}

.cta__content {
  max-width: 620px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.cta__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.3;
  margin: 0;
  background: linear-gradient(115deg, #ffffff 25%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta__text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

.footer__copy {
  width: 100%;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero__decor-wrap { display: none; }
  .hero__bgimage img { opacity: 0.35; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 80px; }
  .hero__content { padding-top: 72px; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 40px; }
  .cta { padding: 64px 0; }
  .btn { width: 100%; justify-content: center; }
  .card { padding: 24px; }
  .steps { gap: 28px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* Motion: hero entrance + scroll reveal (skipped entirely if the user prefers reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero__content > * {
    opacity: 0;
    animation: heroIn .7s ease forwards;
  }
  .hero__content > *:nth-child(1) { animation-delay: .05s; }
  .hero__content > *:nth-child(2) { animation-delay: .16s; }
  .hero__content > *:nth-child(3) { animation-delay: .3s; }
  .hero__content > *:nth-child(4) { animation-delay: .44s; }

  @keyframes heroIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
