*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

:root {
  --bg:     #07080f;
  --bg2:    #0b0c18;
  --border: #181a2b;
  --blue:   #3b82f6;
  --silver: #94a3b8;
  --muted:  #4a5568;
  --dim:    #22253a;
  --text:   #e2e8f0;
  --green:  #22c55e;
  --amber:  #f59e0b;
  --red:    #ef4444;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Canvas — Three.js */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

/* Bottom fade — linear, no circular artifact */
body::after {
  content: '';
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

/* ── Container ── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Brand ── */
.brand { text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-sero {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem; font-weight: 700;
  color: var(--blue); letter-spacing: 0.04em;
}
.brand-rat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem; font-weight: 500;
  color: var(--silver);
}
.brand-icon { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 58px;
  background: rgba(7, 8, 15, 0.82);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(24, 26, 43, 0.8);
  display: flex; align-items: center;
  transition: background 0.25s;
}
#nav.scrolled {
  background: rgba(7, 8, 15, 0.97);
  border-bottom-color: rgba(59,130,246,0.18);
}

.nav-inner { display: flex; align-items: center; width: 100%; }

.nav-links {
  display: flex; gap: 28px; list-style: none;
  margin-left: auto; margin-right: 24px;
}
.nav-links a {
  font-size: 0.85rem; color: var(--muted);
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.btn-gh {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; font-size: 0.82rem;
  color: var(--silver);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px; text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.btn-gh:hover { border-color: rgba(59,130,246,0.4); color: var(--text); }

/* ── Hero ── */
.hero {
  position: relative; z-index: 1;
  padding: 148px 0 96px;
}

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; color: var(--muted);
  margin-bottom: 28px;
}
.prompt { color: var(--green); font-weight: 600; user-select: none; }
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 7px var(--green);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.hero h1 {
  font-size: clamp(1.4rem, 4.8vw, 3.2rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.04em; margin-bottom: 24px;
  max-width: 700px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--blue) 0%, #818cf8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-free { color: var(--green); }

.hero-lead {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.75; max-width: 500px; margin-bottom: 36px;
  border-left: 2px solid rgba(59,130,246,0.35);
  padding-left: 16px;
}

.hero-actions {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 40px; flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; font-size: 0.9rem; font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  border-radius: 7px; text-decoration: none; border: none;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.25), 0 4px 16px rgba(59,130,246,0.18);
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.4), 0 6px 24px rgba(59,130,246,0.28);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex; align-items: center;
  padding: 10px 20px; font-size: 0.9rem;
  color: var(--muted); border: 1px solid var(--border);
  border-radius: 7px; text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: rgba(59,130,246,0.35); color: var(--text); }

.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.77rem; color: var(--muted);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hero-meta .sep { color: var(--dim); }

/* ── Screenshot ── */
.screenshot-section {
  position: relative; z-index: 1;
  padding-bottom: 96px;
  overflow: hidden;
}
.screen-frame {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.03);
}
.screen-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.screen-dot { width: 10px; height: 10px; border-radius: 50%; }
.screen-dot.red    { background: #ff5f57; }
.screen-dot.yellow { background: #febc2e; }
.screen-dot.green  { background: #28c840; }
.screen-label {
  margin-left: 8px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem; color: var(--muted);
}
.screen-body { background: var(--bg2); }
.screen-body img { width: 100%; height: auto; display: block; }

/* Gradient section divider — fades at edges, no harsh line */
.oss-section, .features-section, .price-section,
.showcase-section, .tech-section, .deepdive-section, .cta-section {
  position: relative; z-index: 1; padding: 80px 0; border-top: none;
}
.oss-section::before, .features-section::before, .price-section::before,
.showcase-section::before, .tech-section::before, .deepdive-section::before,
.cta-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--border) 15%, var(--border) 85%, transparent 100%);
}

/* ── OSS section ── */
.oss-section {
.oss-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 64px; align-items: start;
}
.oss-sep { width: 1px; background: var(--border); align-self: stretch; }
.oss-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.c-green { color: var(--green); }
.c-amber { color: var(--amber); }
.oss-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.oss-list li { font-size: 0.88rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.63rem;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
  background: rgba(245,158,11,0.09); border: 1px solid rgba(245,158,11,0.22);
  color: var(--amber);
}
.oss-note { font-size: 0.8rem; color: var(--muted); margin-top: 20px; line-height: 1.65; }

/* ── Features ── */
.features-section {
  position: relative; z-index: 1;
  padding: 80px 0; border-top: 1px solid var(--border);
}
.section-h {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.03em; margin-bottom: 48px;
}
.section-sub { color: var(--muted); font-size: 0.9rem; margin-top: -36px; margin-bottom: 44px; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.feat-col h4 {
  font-family: 'JetBrains Mono', monospace; font-size: 0.67rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.feat-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.feat-col li {
  font-size: 0.865rem; color: var(--muted);
  padding-left: 16px; position: relative; line-height: 1.5;
}
.feat-col li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--blue); font-size: 0.72rem; top: 2px;
}

/* ── Pricing ── */
.price-section {
  position: relative; z-index: 1;
  padding: 80px 0; border-top: 1px solid var(--border);
}
.price-table-wrap { overflow-x: auto; margin-top: 44px; -webkit-overflow-scrolling: touch; }
.price-table { width: 100%; border-collapse: collapse; min-width: 420px; }
.price-table td {
  padding: 15px 20px; font-size: 0.9rem;
  color: var(--muted); border-bottom: 1px solid var(--border);
}
.price-table td:first-child { color: var(--text); }
.price-val { font-family: 'JetBrains Mono', monospace; font-size: 0.83rem; }
.strike { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--red); }
.price-note-cell { font-size: 0.77rem; text-align: right; }
.red-note { color: #f87171; }
.price-highlight td { background: rgba(34,197,94,0.03); border-bottom-color: rgba(34,197,94,0.15); }
.price-highlight td:first-child { color: var(--text); font-weight: 600; }
.green-val { color: var(--green); font-weight: 600; }

/* ── Gallery / Showcase ── */
.showcase-section {
  position: relative; z-index: 1;
  padding: 80px 0; border-top: 1px solid var(--border);
}
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.gallery-item {
  position: relative; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.45s ease;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(7,8,15,0.92));
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem; color: var(--muted);
}

/* ── Technical ── */
.tech-section {
  position: relative; z-index: 1;
  padding: 80px 0; border-top: 1px solid var(--border);
}
.tech-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.tech-list { list-style: none; display: flex; flex-direction: column; gap: 28px; margin-top: 36px; }
.tech-list li {
  padding-left: 16px;
  border-left: 2px solid rgba(59,130,246,0.25);
}
.tech-list li strong { display: block; font-size: 0.9rem; margin-bottom: 5px; color: var(--text); }
.tech-list li p { font-size: 0.83rem; color: var(--muted); line-height: 1.7; }

.code-block {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #050610;
}
.code-header {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 16px; background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.cdot { width: 10px; height: 10px; border-radius: 50%; }
.cdot.red    { background: #ff5f57; }
.cdot.yellow { background: #febc2e; }
.cdot.green  { background: #28c840; }
.code-filename {
  margin-left: 8px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem; color: var(--muted);
}
.code-body { padding: 20px; overflow-x: auto; }
.code-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; line-height: 1.85; display: block;
}
.cm  { color: #2e4060; }
.kw  { color: #7c5ce8; }
.num { color: #f9e2af; }

/* ── CTA ── */
.cta-section {
  text-align: center;
}
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta-logo { width: 110px; opacity: 0.55; margin-bottom: 16px; filter: drop-shadow(0 0 24px rgba(59,130,246,0.25)); }
.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.cta-section > .container > p { color: var(--muted); font-size: 0.95rem; max-width: 420px; }
.legal { font-size: 0.73rem; color: var(--dim); max-width: 480px; line-height: 1.65; }

/* ── Footer ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand p { font-size: 0.8rem; color: var(--muted); margin-top: 7px; }
.footer-brand p a { color: var(--blue); text-decoration: none; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.82rem; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-domain { font-family: 'JetBrains Mono', monospace; font-size: 0.77rem; color: var(--muted); }
.footer-copy { font-size: 0.73rem; color: var(--dim); }

/* ── Deep-dive cards ── */
.deepdive-section {
.deepdive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.deepdive-card {
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(59,130,246,0.35);
  border-radius: 10px; padding: 32px;
}
.dd-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.deepdive-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.deepdive-card p {
  font-size: 0.875rem; color: var(--muted); line-height: 1.75; margin-bottom: 12px;
}
.deepdive-card code {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8em;
  color: var(--blue); background: rgba(59,130,246,0.08);
  padding: 1px 5px; border-radius: 3px;
}
.dd-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.dd-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.67rem;
  padding: 3px 9px; border-radius: 4px;
  background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.14);
  color: var(--blue);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .container { padding: 0 28px; }
}
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .nav-links { display: none; }
  .oss-grid { grid-template-columns: 1fr; gap: 40px; }
  .oss-sep { display: none; }
  .feat-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .tech-layout { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .deepdive-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 32px; }
  .footer-right { align-items: flex-start; }
  .features-section, .price-section, .showcase-section,
  .tech-section, .oss-section, .deepdive-section { padding: 60px 0; }
  .cta-section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 100px 0 48px; }
  .hero-lead { font-size: 0.95rem; border-left: none; padding-left: 0; }
  .hero-meta { font-size: 0.72rem; gap: 7px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { justify-content: center; }
  .feat-grid { grid-template-columns: 1fr; gap: 28px; }
  .btn-gh { font-size: 0.78rem; padding: 6px 10px; }
  .price-table td { padding: 11px 10px; font-size: 0.82rem; }
  .price-note-cell { display: none; }
  .deepdive-card { padding: 20px; }
  .screen-bar { padding: 9px 12px; }
  .screen-frame { box-shadow: 0 16px 40px rgba(0,0,0,0.6); }
  .features-section, .price-section, .showcase-section,
  .tech-section, .oss-section, .deepdive-section { padding: 48px 0; }
  .cta-section { padding: 56px 0; }
  .cta-section h2 { font-size: 1.75rem; }
  .cta-logo { width: 72px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .tech-list li { padding-left: 12px; }
  .code-body code { font-size: 0.72rem; }
  .section-h { margin-bottom: 28px; }
}
@media (max-width: 420px) {
  .container { padding: 0 14px; }
  .hero { padding: 82px 0 36px; }
  .hero h1 { font-size: clamp(1.5rem, 9vw, 2.2rem); }
  .hero-lead { font-size: 0.88rem; }
  .eyebrow { font-size: 0.68rem; }
  .btn-primary, .btn-outline { font-size: 0.85rem; padding: 10px 16px; }
  .deepdive-card { padding: 16px; }
  .oss-list li { font-size: 0.82rem; }
  .feat-col li { font-size: 0.82rem; }
  .feat-col h4 { font-size: 0.63rem; }
  .gallery { grid-template-columns: 1fr; }
  .footer-inner { gap: 20px; }
  .footer-links { gap: 12px; }
  .cta-section h2 { font-size: 1.5rem; }
  .cta-logo { width: 56px; }
  .cta-section p, .legal { font-size: 0.82rem; }
  /* Hide <br> tags in CTA on very small screens */
  .cta-section br { display: none; }
}
