@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;0,800;1,400&display=swap');

:root {
  --bg-dark: #0A0A0F;
  --text-main: #E0E0E0;
  --matrix-green: #00FF88;
  --matrix-green-dim: rgba(0, 255, 136, 0.15);
  --matrix-green-bg: rgba(0, 255, 136, 0.03);
  --alert-red: #FF3366;
  --font-mono: 'JetBrains Mono', monospace;
  --grid-color: rgba(255, 255, 255, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: crosshair;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-mono);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* CSS Grid Pattern */
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 30px 30px;
  background-attachment: fixed;
}

/* Scanline Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
}

a {
  text-decoration: none;
  color: var(--matrix-green);
  transition: all 0.2s ease;
}

a:hover {
  text-shadow: 0 0 8px var(--matrix-green);
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Cyber Card */
.cyber-card {
  background: var(--matrix-green-bg);
  border: 1px solid var(--matrix-green-dim);
  padding: 32px;
  position: relative;
  transition: all 0.3s ease;
}

.cyber-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 2px solid var(--matrix-green);
  border-left: 2px solid var(--matrix-green);
}

.cyber-card::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 2px solid var(--matrix-green);
  border-right: 2px solid var(--matrix-green);
}

.cyber-card:hover {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
  transform: translateY(-2px);
}

/* Header / Nav */
header {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--matrix-green-dim);
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo::before {
  content: "[SYS]";
  color: var(--alert-red);
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 24px;
}

/* Hero Section - Fake Terminal */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
  position: relative;
}

.terminal-box {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--matrix-green-dim);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.05);
}

.term-header {
  color: var(--matrix-green);
  margin-bottom: 24px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--matrix-green);
  text-shadow: 0 0 10px var(--matrix-green-dim);
}

.typewriter {
  overflow: hidden;
  border-right: .15em solid var(--matrix-green);
  white-space: nowrap;
  margin: 0 auto;
  animation: 
    typing 2s steps(40, end),
    blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--matrix-green); }
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 2s;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.cta-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 0.5s ease forwards 2.5s;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--matrix-green);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--matrix-green);
  border: 1px solid var(--matrix-green);
}

.btn-secondary:hover {
  background: var(--matrix-green-bg);
  box-shadow: 0 0 15px var(--matrix-green-dim);
}

/* Section Shared */
section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  font-size: 1.5rem;
  color: var(--matrix-green);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-header::before {
  content: ">>";
}

/* Glitch Effect */
.glitch-hover:hover {
  animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch-anim {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 2px) }
  40% { transform: translate(-2px, -2px) }
  60% { transform: translate(2px, 2px) }
  80% { transform: translate(2px, -2px) }
  100% { transform: translate(0) }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

.feature-card h3::before {
  content: "// ";
  color: var(--matrix-green);
}

.feature-card p {
  color: #888;
  font-size: 0.95rem;
}

/* Support Icons Grid */
.support-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.support-tag {
  border: 1px solid var(--matrix-green-dim);
  padding: 8px 16px;
  color: var(--text-main);
  background: rgba(0,0,0,0.5);
  font-size: 0.9rem;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card.alert {
  border-color: rgba(255, 51, 102, 0.3);
}

.pricing-card.alert::before,
.pricing-card.alert::after {
  border-color: var(--alert-red);
}

.pricing-card h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--matrix-green);
}

.pricing-card.alert h3 {
  color: var(--alert-red);
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.price span {
  font-size: 1rem;
  color: #888;
}

.pricing-features {
  margin-bottom: 32px;
  flex-grow: 1;
}

.pricing-features li {
  margin-bottom: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li::before {
  content: ">";
  color: var(--matrix-green);
}

.pricing-card.alert .pricing-features li::before {
  color: var(--alert-red);
}

.pricing-card .btn {
  width: 100%;
}

/* Blog / Articles Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.blog-card p {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.read-more {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--matrix-green);
}

.read-more::after {
  content: " _";
  animation: blink-caret 1s step-end infinite;
}

/* Ping Ticker */
#ping-ticker {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--matrix-green);
  padding: 8px 16px;
  color: var(--matrix-green);
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

#ping-ticker::before {
  content: "LATENCY: ";
  color: #888;
}

/* Article Content Pages */
.article-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--matrix-green-dim);
  padding-bottom: 24px;
}

.article-header h1 {
  font-size: 2rem;
  color: var(--matrix-green);
  margin-bottom: 16px;
}

.article-meta {
  color: #888;
  font-size: 0.9rem;
}

.article-content {
  max-width: 800px;
}

.article-content h2 {
  color: var(--text-main);
  margin: 32px 0 16px;
  font-size: 1.5rem;
}

.article-content h2::before {
  content: "# ";
  color: var(--matrix-green);
}

.article-content p {
  color: #bbb;
  margin-bottom: 16px;
  line-height: 1.8;
}

.article-content a {
  text-decoration: underline;
  text-decoration-color: var(--matrix-green-dim);
}

.article-content a:hover {
  background: var(--matrix-green);
  color: #000;
  text-decoration: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--matrix-green-dim);
  padding: 40px 0;
  margin-top: 80px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-links a {
  color: #888;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--matrix-green);
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .terminal-box { padding: 24px; }
  .cta-group { flex-direction: column; }
  .btn { width: 100%; }
}
