:root {
  --bg:        #0A0A0A;
  --bg-card:   #111111;
  --bg-card2:  #141414;
  --border:    #262626;
  --border-hi: #333333;
  --green:     #00FF66;
  --green-dim: #00CC52;
  --yellow:    #FFCC00;
  --red:       #FF3333;
  --white:     #E8E8E8;
  --muted:     #666666;
  --font:      'JetBrains Mono', 'Fira Mono', 'Cascadia Code', 'Consolas', monospace;
  --radius:    2px;
  --container: 1100px;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
}

header, main, footer { position: relative; z-index: 1; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.accent-green  { color: var(--green); }
.accent-yellow { color: var(--yellow); }
.accent-red    { color: var(--red); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.logo:hover { color: #fff; }

.logo-img {
  height: 22px;
  width: auto;
  display: block;
}

.header-tag {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 8px;
  flex: 1;
  letter-spacing: 0.02em;
}

.header-sub { color: #444; margin-left: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  font-weight: 700;
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--border-hi);
}

.btn-ghost:hover {
  border-color: var(--green);
  background: rgba(0,255,102,0.06);
}

.btn-sm { padding: 7px 14px; font-size: 0.78rem; }

.section-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title .prompt { color: var(--green); }

.hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tag {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 28px;
  color: #fff;
}

.hero-typewriter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
  min-height: 1.8em;
}

.hero-typewriter .prompt { color: var(--green); flex-shrink: 0; }

#typewriter {
  color: var(--white);
  font-weight: 500;
}

.cursor {
  color: var(--green);
  font-weight: 700;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-slogan {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-actions .btn { font-size: 0.95rem; padding: 13px 26px; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em; }
.stat-sep { color: var(--border-hi); font-size: 1.2rem; }

.services {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.card-featured { grid-column: 1 / -1; }

.card {
  background: var(--bg-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.15s var(--ease);
}

.card:hover { background: var(--bg-card2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon { font-size: 1.4rem; }
.card-num  { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; }

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

.card-featured-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}

.card-featured-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-featured-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.platform-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 3px 8px;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.why {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.why-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.why-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 540px;
}

.why-table thead th {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: left;
}

.why-table tbody tr { border-bottom: 1px solid var(--border); }
.why-table tbody tr:last-child { border-bottom: none; }

.why-table td {
  padding: 14px 20px;
  vertical-align: top;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  line-height: 1.6;
}

.why-table tbody tr:nth-child(odd)  td { background: var(--bg-card); }
.why-table tbody tr:nth-child(even) td { background: var(--bg); }
.why-table tbody td:first-child { color: var(--red); }
.why-table tbody td:last-child  { color: var(--green); }

.contacts { padding: 80px 0; }

.terminal-block {
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 680px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: #1A1A1A;
  border-bottom: 1px solid var(--border);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.t-red    { background: #FF5F57; }
.t-yellow { background: #FFBD2E; }
.t-green  { background: #28C840; }

.t-title { font-size: 0.72rem; color: var(--muted); margin-left: 8px; }

.terminal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.85rem;
  background: var(--bg-card);
}

.t-line { display: flex; gap: 10px; line-height: 1.7; }
.t-prompt { color: var(--green); flex-shrink: 0; }
.t-out { color: var(--white); padding-left: 20px; }
.t-indent { padding-left: 40px; }
.t-link { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.t-link:hover { color: #fff; }
.t-blink { color: var(--green); animation: blink 1s step-end infinite; }

.terminal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: #111;
  border-top: 1px solid var(--border);
}

.terminal-actions .btn { font-size: 0.8rem; padding: 8px 16px; }

.copy-toast {
  display: none;
  font-size: 0.75rem;
  color: var(--green);
  padding: 8px 24px 12px;
  background: #111;
}

.copy-toast.show { display: block; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-copy { font-size: 0.72rem; color: var(--muted); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #bg-canvas { display: none; }
}

@media (max-width: 900px) {
  .card-featured-body { grid-template-columns: 1fr; }
  .card-featured-platforms { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  .header-tag { display: none; }
  .hero { padding: 56px 0 48px; }
  .services, .why, .contacts { padding: 56px 0; }
  .hero-stats { gap: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .why-table { font-size: 0.78rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .card-featured-platforms { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2.2rem; }
  .container { padding: 0 16px; }
}

/* Interactive Terminal */
.t-input-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.t-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.85rem;
  width: 100%;
  caret-color: var(--green);
}

.t-input::placeholder {
  color: #444;
}

/* Color Themes for Terminal Command */
body.theme-amber {
  --green: #FFB000;
  --green-dim: #CC8D00;
}

body.theme-cyan {
  --green: #00E5FF;
  --green-dim: #00B2CC;
}

/* Glitch Easter Egg */
@keyframes glitch-anim {
  0% { transform: translate(0); }
  25% { transform: translate(-5px, 5px); filter: invert(0.8); }
  50% { transform: translate(5px, -5px); filter: hue-rotate(180deg); }
  75% { transform: translate(-3px, -3px); }
  100% { transform: translate(0); }
}

.glitch-mode {
  animation: glitch-anim 0.12s infinite;
}