:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --green: #00ff41;
  --green-soft: #c0ffc0;
  --gold: #d4af37;
  --cyan: #00d4ff;
  --amber: #ffb000;
  --line: rgba(0, 255, 65, 0.38);
  --line-soft: rgba(0, 255, 65, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% -20%, rgba(0, 255, 65, 0.08), transparent 40%), var(--bg);
  color: var(--green-soft);
  font-family: 'JetBrains Mono', 'Inter', monospace;
  line-height: 1.55;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 2px,
      transparent 4px
    );
  mix-blend-mode: soft-light;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 2;
}

main,
.footer {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  background: rgba(0, 0, 0, 0.86);
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: clamp(150px, 22vw, 210px);
  display: block;
  filter: drop-shadow(0 0 7px rgba(212, 175, 55, 0.35));
}

.lang-toggle {
  border: 1px solid var(--green);
  border-radius: 0;
  background: #020702;
  color: var(--green);
  font: 600 0.9rem 'JetBrains Mono', monospace;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.lang-toggle:hover {
  background: #041004;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.4);
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 0;
}

.hero-inner {
  max-width: 860px;
}

.hero-brain {
  width: clamp(210px, 31vw, 310px);
  margin: 0 auto 1.1rem;
  display: block;
  image-rendering: crisp-edges;
  filter:
    drop-shadow(0 0 16px rgba(212, 175, 55, 0.35))
    drop-shadow(0 0 28px rgba(0, 255, 65, 0.2));
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.76rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Press Start 2P', system-ui;
  line-height: 1.35;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.hero-title {
  font-size: clamp(1.7rem, 5vw, 3.2rem);
  color: var(--gold);
  position: relative;
  display: inline-block;
  letter-spacing: 0.06em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  text-shadow: -2px 0 rgba(0, 212, 255, 0.8);
}

.glitch::after {
  color: var(--green);
  text-shadow: 2px 0 rgba(0, 255, 65, 0.8);
}

.glitch.is-glitching::before {
  opacity: 0.85;
  clip-path: polygon(0 5%, 100% 5%, 100% 42%, 0 42%);
  transform: translateX(-2px);
}

.glitch.is-glitching::after {
  opacity: 0.85;
  clip-path: polygon(0 58%, 100% 58%, 100% 100%, 0 100%);
  transform: translateX(2px);
}

.hero-tagline {
  margin: 1.3rem auto 0.6rem;
  min-height: 3.2em;
  max-width: 740px;
  color: var(--green);
  font-size: clamp(0.95rem, 2.1vw, 1.18rem);
}

.cursor {
  display: inline-block;
  margin-left: 0.15rem;
  color: var(--green);
  animation: blink 1s steps(1) infinite;
}

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

.hero-subtitle {
  margin: 0 auto;
  max-width: 700px;
  color: var(--green-soft);
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-terminal {
  text-decoration: none;
  border: 1px solid var(--green);
  border-radius: 0;
  color: var(--green);
  background: rgba(0, 20, 0, 0.75);
  padding: 0.8rem 1rem;
  font: 700 0.92rem 'JetBrains Mono', monospace;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.btn-terminal:hover {
  background: rgba(0, 30, 0, 0.95);
  color: #e8ffe8;
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.45);
}

.invite-note {
  color: var(--amber);
  font-size: 0.88rem;
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.section-head h2 {
  margin-top: 0.85rem;
  font-size: clamp(1rem, 3.2vw, 1.7rem);
  color: var(--green);
}

.feature-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(0, 15, 0, 0.8), rgba(0, 0, 0, 0.95));
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
  padding: 0;
  overflow: hidden;
}

.terminal-bar {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  color: var(--green);
  background: rgba(0, 28, 0, 0.75);
  font-size: 0.75rem;
}

.feature-card h3 {
  font-size: 0.86rem;
  color: var(--gold);
  padding: 1rem 0.85rem 0;
}

.feature-card p {
  margin: 0;
  padding: 0.6rem 0.85rem 1rem;
  color: var(--green-soft);
  font-size: 0.95rem;
}

.feature-card:hover {
  border-color: rgba(0, 255, 65, 0.75);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.34);
}

.stats-grid {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  border: 1px solid var(--line-soft);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 0.8rem;
  text-align: center;
}

.stat:hover {
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.25);
}

.stat-value {
  margin: 0;
  color: var(--green);
  font: 800 clamp(1.4rem, 5vw, 2.1rem) 'JetBrains Mono', monospace;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.stat-label {
  margin: 0.35rem 0 0;
  color: var(--green-soft);
  font-size: 0.9rem;
}

.prompt-box {
  border: 1px solid var(--green);
  border-radius: 0;
  background: rgba(0, 8, 0, 0.85);
  padding: 1rem;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.28);
}

.prompt-line {
  margin: 0;
  color: var(--green);
  font-weight: 700;
}

.cmd {
  color: var(--gold);
}

.prompt-box p + p {
  margin-top: 0.8rem;
}

.contact-link {
  color: var(--cyan);
  text-decoration: none;
}

.contact-link:hover {
  color: #8beeff;
}

.footer {
  padding: 1.2rem 0 2.5rem;
  text-align: center;
  color: rgba(192, 255, 192, 0.7);
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .hero-title {
    letter-spacing: 0.02em;
  }

  .lang-toggle {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
