:root {
  --bg: #0b0f14;
  --bg-elevated: #111820;
  --bg-card: #151c26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-dim: rgba(255, 255, 255, 0.4);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --success: #22c55e;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.header.scrolled {
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.logo__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-toggle__btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-toggle__btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 32px var(--accent-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn--lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Hero */
.hero {
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: flex;
  gap: 2.5rem;
}

.hero__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* Terminal */
.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.terminal__body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  min-height: 280px;
}

.terminal__line {
  opacity: 0;
  animation: fadeIn 0.4s forwards;
}

.terminal__line:nth-child(1) { animation-delay: 0.2s; }
.terminal__line:nth-child(2) { animation-delay: 0.5s; }
.terminal__line:nth-child(3) { animation-delay: 0.8s; }
.terminal__line:nth-child(4) { animation-delay: 1.1s; }
.terminal__line:nth-child(5) { animation-delay: 1.4s; }
.terminal__line:nth-child(6) { animation-delay: 1.7s; }
.terminal__line:nth-child(7) { animation-delay: 2s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

.terminal__prompt { color: var(--accent); }
.terminal__cmd { color: var(--text); }
.terminal__out { color: var(--text-muted); }
.terminal__ok { color: var(--success); }
.terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section--border {
  border-top: 1px solid var(--border);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section__desc {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* Value cards */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.value-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.value-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.value-card__icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.value-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.value-card__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.product-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
}

.product-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.product-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-card__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Portfolio */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.portfolio-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-3px);
}

.portfolio-card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.portfolio-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-card__play {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 32px var(--accent-glow);
  transition: transform 0.2s;
}

.portfolio-card:hover .portfolio-card__play {
  transform: scale(1.08);
}

.portfolio-card__play svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

.portfolio-card__no-video {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-align: center;
  padding: 1rem;
}

.portfolio-card__body {
  padding: 1.25rem;
}

.portfolio-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
}

.portfolio-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pricing-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.pricing-card--featured {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 40px var(--accent-glow);
}

.pricing-card__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.pricing-card__price span {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 400;
}

.pricing-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pricing-card__features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-card__features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.pricing-card__features li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.process-step {
  padding: 1.5rem;
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
}

.process-step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.process-step__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.process-step__text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 4rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.03));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta__desc {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.cta__telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 32px var(--accent-glow);
}

.cta__telegram:hover {
  background: var(--accent-hover);
}

.cta__handle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal.open {
  display: grid;
}

.modal__box {
  width: min(100%, 900px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-size: 1rem;
  font-weight: 600;
}

.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.modal__video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal__video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal__placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.modal__body {
  padding: 1.25rem;
}

.modal__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(11, 15, 20, 0.98);
  backdrop-filter: blur(16px);
  z-index: 99;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 1rem;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .value-grid,
  .products-grid,
  .portfolio-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }
}

@media (max-width: 640px) {
  .value-grid,
  .products-grid,
  .portfolio-grid,
  .pricing-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    gap: 1.5rem;
  }

  .cta {
    padding: 2.5rem 1.5rem;
  }

  .lang-toggle {
    display: none;
  }
}
