/* ── Custom Properties ─────────────────────────────────── */
:root {
  --bg: #0a0a0f;
  --bg-panel: #12121a;
  --bg-cell: #1a1a2e;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #ff8c00;
  --accent-2: #ffcc33;
  --danger: #cc0000;
  --border: #333;
  --border-accent: rgba(255, 140, 0, 0.35);
  --max-w: 960px;
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.5;
  font-size: 16px;
}

h1, h2, h3, h4 { margin: 0 0 0.5rem; line-height: 1.2; }
h2 { color: var(--accent-2); font-size: 1.5rem; letter-spacing: 0.05em; }
h3 { color: var(--accent-2); font-size: 1rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-2); }

code {
  font-family: inherit;
  background: rgba(255, 140, 0, 0.08);
  padding: 0 0.25rem;
  border-radius: 2px;
  color: var(--accent-2);
}

pre {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  overflow-x: auto;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* ── Accessibility ────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  background:
    radial-gradient(ellipse at top, rgba(255, 140, 0, 0.08), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.banner {
  display: inline-block;
  margin: 0 auto 1.5rem;
  padding: 0;
  background: none;
  border: none;
  font-size: clamp(0.5rem, 1.6vw, 0.95rem);
  line-height: 1.1;
  text-align: left;
  white-space: pre;
  text-shadow: 0 0 6px rgba(255, 140, 0, 0.35);
  animation: flicker 4.5s infinite;
}

.banner .b-c1 { color: #f5f5f5; }
.banner .b-c2 { color: var(--accent-2); }
.banner .b-c3 { color: var(--accent); }
.banner .b-c4 { color: #ff5a1f; }
.banner .b-c5 { color: #c0392b; }

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.85; }
  98% { opacity: 0.95; }
  99% { opacity: 0.75; }
}

/* Scanlines overlay (hero only) */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

.hero > *:not(.scanlines) { position: relative; z-index: 2; }

.tagline {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 1.5rem;
  letter-spacing: 0.02em;
}

.connect-block {
  display: inline-flex;
  align-items: stretch;
  margin: 0 auto 1rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--bg-panel);
  box-shadow: 0 0 16px rgba(255, 140, 0, 0.15);
  max-width: 100%;
}

.connect-link {
  flex: 1;
  display: flex;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.connect-link:hover code { color: #fff; }

.connect-block code {
  flex: 1;
  background: none;
  color: var(--accent-2);
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  white-space: nowrap;
  overflow-x: auto;
}

.copy-btn {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-left: 1px solid var(--accent);
  padding: 0 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.copy-btn:hover { filter: brightness(1.1); }
.copy-btn:active { filter: brightness(0.9); }
.copy-btn.copied { background: var(--accent-2); }

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: none;
}

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

/* ── Sections ─────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child { border-bottom: none; }

/* ── Feature Grid ─────────────────────────────────────── */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.feature {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  padding: 0.9rem 1rem;
}

.feature h3 { margin-bottom: 0.35rem; }
.feature p { margin: 0; font-size: 0.9rem; color: var(--text); }

/* ── Quickstart Steps ─────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps > li { margin: 0; }

.step-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.25rem 0 0;
}

.builder-links {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  background: var(--bg-panel);
}

.footer-links { margin-bottom: 0.5rem; }
.disclaimer { max-width: 640px; margin: 0 auto; line-height: 1.5; }

/* ── Responsive ───────────────────────────────────────── */
@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr 1fr;
  }

  h2 { font-size: 1.75rem; }

  .tagline { font-size: 1.25rem; }

  .hero { padding: 4rem 1rem 3rem; }
}

@media (max-width: 480px) {
  .connect-block { display: flex; width: 100%; }
  .connect-block code { flex: 1; font-size: 0.85rem; }
}

/* ── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .banner { animation: none; }
  html { scroll-behavior: auto; }
}
