:root {
  --bg: #0a0e17;
  --bg-alt: #111827;
  --surface: #1a2234;
  --surface-hover: #222d44;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf5;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s ease;
  --container: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.logo__text span {
  color: var(--primary-light);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
  max-width: 260px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 9rem 0 5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(34, 211, 238, 0.1), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero__stats {
  display: flex;
  gap: 2.5rem;
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 380px;
  animation: float 6s ease-in-out infinite;
}

.code-card__bar {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.code-card__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.code-card__bar span:nth-child(1) { background: #ef4444; }
.code-card__bar span:nth-child(2) { background: #eab308; }
.code-card__bar span:nth-child(3) { background: #22c55e; }

.code-card pre {
  padding: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-card .kw { color: #c084fc; }
.code-card .type { color: #22d3ee; }
.code-card .fn { color: #818cf8; }
.code-card .str { color: #86efac; }
.code-card .cm { color: #64748b; }

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: spin 20s linear infinite;
}

.orbit--1 {
  width: 320px;
  height: 320px;
}

.orbit--2 {
  width: 420px;
  height: 420px;
  animation-direction: reverse;
  animation-duration: 30s;
  border-color: rgba(34, 211, 238, 0.15);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.section__head h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Timeline */
.timeline {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline__item {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-left: 2px solid var(--border);
  margin-left: 1.25rem;
  padding-left: 2rem;
  position: relative;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 4px var(--bg-alt);
}

.timeline__item:last-child {
  border-left-color: transparent;
}

.timeline__num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
  min-width: 2rem;
}

.timeline__item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.timeline__item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tags span:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--surface-hover);
}

/* CTA */
.cta {
  padding-bottom: 6rem;
}

.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 3rem;
  background-image: radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.12), transparent 60%);
}

.cta h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta p {
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding: 3.5rem 0;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 360px;
}

.footer__contacts h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.contact-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.contact-list__label {
  color: var(--text-muted);
  font-weight: 500;
}

.contact-list a {
  color: var(--primary-light);
  transition: color var(--transition);
}

.contact-list a:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Mobile nav */
.header.nav-open .nav {
  display: flex;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cta__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .nav a {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .burger {
    display: flex;
  }

  .header.nav-open .burger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .header.nav-open .burger span:nth-child(2) {
    opacity: 0;
  }

  .header.nav-open .burger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .header__actions .btn--sm {
    display: none;
  }

  .hero {
    padding-top: 7rem;
    min-height: auto;
  }
}
