:root {
  --bg: #040507;
  --bg-2: #0a0c12;
  --panel: rgba(15, 18, 28, 0.84);
  --panel-strong: rgba(20, 24, 36, 0.96);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #f4f7fb;
  --muted: #b2bad0;

  --yellow: #efe81a;
  --cyan: #2ecfc5;
  --blue: #4f7dff;
  --violet: #5b16b8;
  --magenta: #bb4aa0;

  --accent: var(--cyan);
  --accent-2: var(--yellow);
  --accent-3: var(--violet);

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 75%, rgba(239, 232, 26, 0.08), transparent 20%),
    radial-gradient(circle at 52% 78%, rgba(46, 207, 197, 0.08), transparent 22%),
    radial-gradient(circle at 83% 30%, rgba(91, 22, 184, 0.16), transparent 24%),
    #020203;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre {
  font-family: "SFMono-Regular", SFMono-Regular, Menlo, Consolas, monospace;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 85%);
  pointer-events: none;
  z-index: -3;
}

.bg-orb {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  pointer-events: none;
  z-index: -2;
}

.orb-yellow {
  left: -8rem;
  bottom: -8rem;
  background: var(--yellow);
}

.orb-cyan {
  left: 35%;
  bottom: -12rem;
  background: var(--cyan);
}

.orb-violet {
  right: -8rem;
  top: 4rem;
  background: var(--violet);
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 800;
}

.tm {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 0.08rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

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

main {
  padding: 2rem 0 4rem;
}

.section {
  margin-top: 4.5rem;
}

.section-head {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: inline-block;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.section-head h2,
.hero h1 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.7rem;
}

.section-head p,
.hero-text,
.tab-note,
.feature-card p,
.timeline-item p,
.download-card p,
.live-card p {
  color: var(--muted);
  line-height: 1.7;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.glow-panel {
  position: relative;
  overflow: hidden;
}

.glow-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      130px circle at var(--mx, 50%) var(--my, 50%),
      rgba(46, 207, 197, 0.22),
      transparent 48%
    );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.glow-panel:hover::before {
  opacity: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  max-width: 12ch;
}

.accent {
  background: linear-gradient(90deg, var(--yellow), var(--cyan), var(--blue), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  max-width: 62ch;
  margin: 1.15rem 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #050607;
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
}

.button-secondary {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

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

.stat-card {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-icon-card {
  width: min(100%, 460px);
  padding: 1rem;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.96), rgba(8, 10, 14, 0.92));
}

.hero-icon {
  width: 100%;
  display: block;
  border-radius: 20px;
  object-fit: cover;
}

.hero-icon-caption {
  margin-top: 0.85rem;
  color: var(--muted);
  text-align: center;
}

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

.mini-panel {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}

.mini-kicker {
  display: block;
  color: var(--cyan);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.2rem;
}

.icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  background: rgba(46, 207, 197, 0.12);
  border: 1px solid rgba(46, 207, 197, 0.18);
  color: var(--cyan);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.timeline-item {
  padding: 1.2rem;
}

.step {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(239, 232, 26, 0.12);
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 800;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
}

.tabs-panel,
.live-panel {
  padding: 1.2rem;
}

.tabs {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  color: #040506;
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
  border-color: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  background: rgba(255,255,255,0.03);
}

.dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff6b6b; }
.dot.yellow { background: #ffd166; }
.dot.green { background: #7dffb3; }

.file-label {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.code-box {
  margin: 0;
  padding: 1rem 1rem 1.1rem;
  background: #06080d;
  border: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  overflow-x: auto;
  color: #eaf0fb;
  line-height: 1.75;
  min-height: 220px;
}

.tab-note {
  margin-top: 0.9rem;
}

.live-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.selector-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font: inherit;
}

.live-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
}

.live-badge {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(91, 22, 184, 0.18);
  color: #d6c4ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.live-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.interactive-area {
  margin-top: 1rem;
}

.compare-block,
.grid-demo,
.sample-demo,
.export-demo {
  display: grid;
  gap: 0.8rem;
}

.compare-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 0.8rem;
  align-items: center;
}

.compare-label,
.compare-time {
  font-size: 0.92rem;
  color: var(--muted);
}

.mini-bar {
  height: 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  border: 1px solid var(--line);
}

.mini-fill {
  height: 100%;
  border-radius: 999px;
}

.slow-fill {
  width: 92%;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  animation: pulseSlow 2.2s ease-in-out infinite;
}

.fast-fill {
  width: 36%;
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
  animation: pulseFast 1.6s ease-in-out infinite;
}

.mini-toggle,
.export-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.mini-toggle.active {
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
  color: #050607;
  border-color: transparent;
}

.grid-demo {
  grid-template-columns: repeat(2, max-content);
}

.grid-preview {
  grid-column: 1 / -1;
  height: 150px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background-color: #091019;
}

.grid-preview.coarse {
  background-image:
    linear-gradient(rgba(46, 207, 197, 0.28) 2px, transparent 2px),
    linear-gradient(90deg, rgba(46, 207, 197, 0.28) 2px, transparent 2px);
  background-size: 28px 28px;
}

.grid-preview.fine {
  background-image:
    linear-gradient(rgba(239, 232, 26, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 232, 26, 0.18) 1px, transparent 1px);
  background-size: 10px 10px;
}

.sample-demo input[type="range"] {
  width: 100%;
}

.sample-readout {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.export-item {
  display: block;
  color: var(--muted);
}

.terminal-box {
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #04060a;
  padding: 1rem;
}

.terminal-line {
  color: #c5d0e2;
  font-family: "SFMono-Regular", SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.8;
}

.prompt {
  color: var(--yellow);
  margin-right: 0.65rem;
}

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

.download-card {
  padding: 1.3rem;
}

.download-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

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

@media (max-width: 1080px) {
  .hero,
  .demo-layout,
  .feature-grid,
  .timeline,
  .download-grid,
  .feature-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .demo-layout,
  .feature-grid,
  .timeline,
  .download-grid,
  .feature-strip,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 1.2rem;
  }

  .tabs-panel,
  .live-panel {
    padding: 1rem;
  }

  .hero h1 {
    max-width: 100%;
  }

  .live-head {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }
}