/* threadron.com — glitch+art minimal */

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

:root {
  --black: #0a0a0a;
  --white: #f0f0f0;
  --gray-1: #1a1a1a;
  --gray-2: #2a2a2a;
  --gray-3: #4a4a4a;
  --gray-4: #9a9a9a;
  --gray-5: #c0c0c0;
  --mono: 'Space Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
  --glitch-1: #ff0040;
  --glitch-2: #00ffff;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- SCANLINES OVERLAY --- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* --- NAV --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-2);
}

nav .logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  text-decoration: none;
}

nav .logo span {
  color: var(--gray-4);
}

nav .links {
  display: flex;
  gap: 32px;
  list-style: none;
}

nav .links a {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-4);
  text-decoration: none;
  transition: color 0.2s;
}

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

nav .links a.active {
  color: var(--white);
}

/* --- LAYOUT --- */
.page {
  padding-top: 100px;
  min-height: 100vh;
}

section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 48px;
}

section.hero {
  max-width: 1200px;
  padding: 120px 48px 80px;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section.full-width {
  max-width: 100%;
  padding-left: 48px;
  padding-right: 48px;
}

/* --- GLITCH TEXT --- */
.glitch {
  position: relative;
  font-family: var(--mono);
  font-weight: 700;
}

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

.glitch::before {
  color: var(--glitch-2);
  z-index: -1;
  animation: glitch-1 3s infinite linear alternate-reverse;
}

.glitch::after {
  color: var(--glitch-1);
  z-index: -2;
  animation: glitch-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, -1px); }
  20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, 1px); }
  40% { clip-path: inset(43% 0 1% 0); transform: translate(-1px, 2px); }
  60% { clip-path: inset(25% 0 58% 0); transform: translate(1px, -1px); }
  80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, 2px); }
  100% { clip-path: inset(58% 0 43% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0% { clip-path: inset(65% 0 13% 0); transform: translate(2px, 1px); }
  20% { clip-path: inset(79% 0 14% 0); transform: translate(-2px, -1px); }
  40% { clip-path: inset(12% 0 64% 0); transform: translate(1px, 2px); }
  60% { clip-path: inset(55% 0 31% 0); transform: translate(-1px, -2px); }
  80% { clip-path: inset(2% 0 78% 0); transform: translate(2px, 1px); }
  100% { clip-path: inset(34% 0 42% 0); transform: translate(-2px, 2px); }
}

/* --- TYPOGRAPHY --- */
h1 {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 32px;
}

h2 {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

p {
  font-size: 1.05rem;
  color: var(--gray-5);
  max-width: 620px;
}

p.lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--gray-4);
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gray-3);
  margin-bottom: 16px;
}

/* --- DIVIDER --- */
.divider {
  border: none;
  border-top: 1px solid var(--gray-2);
  margin: 0;
}

/* --- GLITCH DIVIDER --- */
.glitch-divider {
  height: 1px;
  background: var(--gray-2);
  position: relative;
  overflow: hidden;
  margin: 0;
}

.glitch-divider::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white), transparent);
  animation: divider-scan 4s infinite linear;
}

@keyframes divider-scan {
  0% { left: -50%; }
  100% { left: 100%; }
}

/* --- CODE BLOCK --- */
.code-block {
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: 4px;
  padding: 24px 28px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray-5);
  overflow-x: auto;
  position: relative;
}

.code-block .comment { color: var(--gray-3); }
.code-block .key { color: var(--white); }
.code-block .string { color: var(--gray-4); }
.code-block .method { color: var(--gray-5); }
.code-block .label-tag {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 10px;
  color: var(--gray-3);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- CARDS --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--gray-3);
  transform: translateY(-2px);
}

.card .card-number {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--gray-2);
  margin-bottom: 16px;
  line-height: 1;
}

.card h3 {
  color: var(--white);
}

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

/* --- DIAGRAM / FLOW --- */
.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 48px 0;
}

.flow-node {
  padding: 24px 32px;
  border: 1px solid var(--gray-2);
  background: var(--gray-1);
  position: relative;
}

.flow-node.highlighted {
  border-color: var(--gray-3);
  background: var(--gray-1);
}

.flow-node .flow-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gray-3);
  margin-bottom: 8px;
}

.flow-node h3 {
  margin-bottom: 8px;
}

.flow-node p {
  font-size: 0.9rem;
}

.flow-arrow {
  text-align: center;
  padding: 8px 0;
  color: var(--gray-3);
  font-family: var(--mono);
  font-size: 18px;
}

/* --- PRICING --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.pricing-card {
  border: 1px solid var(--gray-2);
  padding: 40px;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--white);
}

.pricing-card .price {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gray-4);
}

.pricing-card ul {
  list-style: none;
  margin-top: 24px;
}

.pricing-card ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-2);
  font-size: 0.95rem;
  color: var(--gray-4);
}

.pricing-card ul li::before {
  content: '>';
  font-family: var(--mono);
  margin-right: 12px;
  color: var(--gray-3);
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 14px 32px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gray-5);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--gray-3);
}

.btn-secondary:hover {
  border-color: var(--white);
}

.btn-group {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* --- NOISE TEXTURE --- */
.noise {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- GRID BACKGROUND --- */
.grid-bg {
  position: relative;
}

.grid-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(var(--gray-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-2) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  pointer-events: none;
}

/* --- MARQUEE --- */
.marquee-track {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--gray-2);
  border-bottom: 1px solid var(--gray-2);
  padding: 16px 0;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gray-3);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- FOOTER --- */
footer {
  padding: 48px;
  text-align: center;
  border-top: 1px solid var(--gray-2);
}

footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray-3);
  margin: 0 auto;
}

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

footer .footer-links a {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-3);
  text-decoration: none;
}

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

/* --- HERO GLOW --- */
.hero-glow {
  position: relative;
}
.hero-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(147, 130, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- MASCOT --- */
.mascot {
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(147, 130, 255, 0.3));
  mix-blend-mode: lighten;
}

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

.mascot-sm {
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(147, 130, 255, 0.2));
  mix-blend-mode: lighten;
}

/* --- HAMBURGER TOGGLE --- */
.nav-toggle {
  display: none !important;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  font-family: var(--mono);
  line-height: 1;
  padding: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  nav { padding: 16px 24px; position: relative; }
  nav button.nav-toggle[style] { display: block !important; }
  nav .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-2);
    gap: 0;
    list-style: none;
    z-index: 200;
  }
  nav .links.open { display: flex; }
  nav .links a { padding: 8px 0; font-size: 12px; letter-spacing: 1px; }
  section { padding: 60px 24px; }
  section.hero { padding: 100px 24px 60px; }
  .pricing-grid { grid-template-columns: 1fr; }
  h1 { letter-spacing: -1px; }
  .card-grid { grid-template-columns: 1fr; }
  .mascot { width: 200px !important; height: 200px !important; }
}

/* --- DEV BANNER --- */
.dev-banner {
  background: linear-gradient(90deg, rgba(147, 130, 255, 0.15), rgba(255, 130, 200, 0.15));
  border-bottom: 1px solid rgba(147, 130, 255, 0.2);
  text-align: center;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray-5);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 101;
}
.dev-banner strong {
  color: var(--white);
}
