:root {
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --charcoal: #1a1d23;
  --charcoal-light: #252930;
  --charcoal-dark: #12141a;
  --cyan: #00e5ff;
  --text: #e8eaed;
  --muted: #9ca3af;
  --border: #2d3139;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  background: var(--charcoal);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--charcoal);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  height: 100dvh;
  min-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

.container {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
}

.slim {
  width: min(980px, calc(100% - 3rem));
}

.section {
  padding: 6rem 0;
}

.section-divider {
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--charcoal-dark);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, #2d313930 1px, transparent 1px),
    linear-gradient(to bottom, #2d313930 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 70%, transparent 100%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1,
.section-header h2,
.feature-card h3,
.compare-card h3,
.brand,
.panel-head,
.terminal-body,
.stats-grid,
.footer-bottom {
  font-family: var(--font-mono);
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin: 0;
  line-height: 1.12;
}

.hero-copy p {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  color: var(--muted);
  max-width: 52ch;
  margin: 1.4rem 0 0;
}

.accent {
  color: var(--cyan);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.88rem 1.35rem;
  transition: 220ms ease;
  font-family: var(--font-mono);
}

.btn-primary {
  background: var(--cyan);
  color: var(--charcoal);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--cyan);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--charcoal-light);
}

.hero-meta {
  margin-top: 1.2rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}

.hero-visual {
  width: min(380px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  position: relative;
  display: grid;
  place-items: center;
}

.icon {
  width: clamp(7.5rem, 25vw, 10rem);
  height: clamp(7.5rem, 25vw, 10rem);
}

.folder-state,
.bolt-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.folder-icon {
  color: var(--muted);
}

.bolt-state {
  color: var(--cyan);
}

.bolt-glow {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  filter: blur(30px);
  background: rgba(0, 229, 255, 0.45);
  animation: boltGlow 1.5s ease-in-out infinite;
}

.hero-visual.cycle .folder-state {
  animation: folderOut 1s ease-in-out forwards;
}

.hero-visual.cycle .bolt-state {
  opacity: 0;
  animation: boltIn 1s ease-in-out 0.5s forwards;
}

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.hero-visual.cycle .particle {
  animation: particleBurst 1s ease-out forwards;
}

.section-header {
  text-align: center;
  margin: 0 auto 3rem;
  max-width: 52rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.15;
}

.section-header p {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 999px;
  background: var(--charcoal-light);
  color: var(--cyan);
  font: 500 0.84rem var(--font-mono);
  padding: 0.45rem 0.8rem;
}

.feature-grid,
.compare-grid,
.interface-grid,
.footer-grid {
  display: grid;
  gap: 1.4rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  background: var(--charcoal-light);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.5rem;
  transition: 260ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.45);
}

.feature-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 229, 255, 0.35);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(145deg, var(--charcoal-dark), var(--charcoal));
}

.feature-icon {
  color: var(--cyan);
  font-size: 1.45rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.feature-card p {
  margin: 0.8rem 0 1.1rem;
  color: var(--muted);
}

.feature-card code {
  display: inline-block;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  color: rgba(0, 229, 255, 0.8);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-card {
  border-radius: 0.85rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.compare-card-danger {
  border-color: rgba(239, 68, 68, 0.35);
}

.compare-card-good {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.08);
}

.snippet {
  margin-top: 0.7rem;
  padding: 0.8rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--charcoal-dark);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

mark {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0 0.25rem;
}

.good-mark {
  background: rgba(0, 229, 255, 0.2);
  color: var(--cyan);
}

.compare-note {
  margin: 0.9rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.danger {
  color: #f87171;
}

.good {
  color: var(--cyan);
}

.stats-grid {
  margin-top: 3.3rem;
  border-top: 1px solid var(--border);
  padding-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  text-align: center;
}

.stat-value {
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: var(--cyan);
}

.stat-label {
  color: var(--muted);
  margin-top: 0.2rem;
  font-family: var(--font-sans);
}

.interface-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--charcoal-light);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  overflow: hidden;
  transition: 260ms ease;
}

.panel:hover {
  border-color: rgba(0, 229, 255, 0.45);
}

.panel-head {
  background: var(--charcoal-dark);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.8rem 1rem;
}

.terminal-body,
.dashboard-body {
  padding: 1rem;
}

.terminal-body p {
  margin: 0.45rem 0;
  font-size: 0.88rem;
}

.muted {
  color: var(--muted);
}

.query {
  color: var(--text);
}

.cursor {
  color: var(--cyan);
  animation: blink 1.2s steps(1, end) infinite;
}

.dashboard-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card,
.mini-item {
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--charcoal-dark);
}

.mini-card {
  padding: 0.85rem;
}

.mini-value {
  color: var(--cyan);
  font: 600 1.4rem var(--font-mono);
}

.mini-label {
  color: var(--muted);
  font-size: 0.76rem;
}

.mini-list {
  margin-top: 1rem;
}

.mini-list-title {
  color: var(--muted);
  font: 500 0.76rem var(--font-mono);
  margin-bottom: 0.6rem;
}

.mini-item {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
}

.mini-item span {
  display: block;
  font: 500 0.86rem var(--font-mono);
}

.mini-item small {
  color: var(--muted);
  font: 0.75rem var(--font-mono);
}

.status-row {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  font: 0.76rem var(--font-mono);
}

.ok {
  color: #22c55e;
}

.footer {
  border-top: 1px solid var(--border);
}

.footer-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
}

.brand {
  margin: 0;
  font-size: 2rem;
}

.footer-grid p {
  color: var(--muted);
  max-width: 40ch;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 200ms ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  margin-top: 2.2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes folderOut {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(-45deg) translate(-20px, 20px);
  }
}

@keyframes boltIn {
  0% {
    opacity: 0;
    transform: scale(2) rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes boltGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes particleBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1);
  }
}

@media (max-width: 980px) {
  .hero-layout,
  .feature-grid,
  .compare-grid,
  .interface-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 6rem 0;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy p {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
