/* TOXTUI — acid/neon dark theme, Wonderland-inspired typography
 *
 * Font stack (Google Fonts, Latin/English):
 *   --font-display: Cinzel Decorative (hero + section titles)
 *   --font-ui: Cinzel (nav, buttons, labels — supports weight)
 *   --font-body: Lora (readable body serif)
 *   --font-accent: Cormorant Garamond (tags, footer, subtle flair)
 *   --font-decorative: Cinzel Decorative (step numbers)
 * Optional: drop .woff2 into fonts/ and add @font-face for offline hosting.
 */

:root {
  --bg: #050505;
  --bg-card: #0d0d0d;
  --bg-elevated: #111111;
  --green: #39ff14;
  --green-dim: #2bcc10;
  --green-glow: rgba(57, 255, 20, 0.35);
  --text: #e8e8e8;
  --text-muted: #888;
  --border: #1a3d14;
  --accent-cyan: #00e5ff;
  --font-display: "Cinzel Decorative", "Cinzel", "Times New Roman", serif;
  --font-ui: "Cinzel", "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-accent: "Cormorant Garamond", "Lora", Georgia, serif;
  --font-decorative: "Cinzel Decorative", "Cinzel", serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --font: var(--font-body);
  --radius: 4px;
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.06em;
}

h1 {
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.12);
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--green-glow);
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Scanline overlay */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--green); text-shadow: none; }

.brand-logo {
  width: 94px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 0 16px var(--green-glow);
}

.brand-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-sub {
  color: var(--green);
  margin-left: 0.25rem;
  font-size: 0.85rem;
  font-family: var(--font-accent);
  text-transform: none;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green);
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.hero-logo {
  width: min(364px, 71.5vw);
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  box-shadow: 0 0 48px var(--green-glow), 0 0 96px rgba(57, 255, 20, 0.18);
}

.hero-tag {
  color: var(--green);
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  margin: 0 0 1rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.hero h1 .accent {
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}

.hero-lead {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--green);
  color: #000;
  border: 1px solid var(--green);
}

.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px var(--green-glow);
  text-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  text-shadow: none;
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-dark {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.section-title .prompt {
  color: var(--green);
  margin-right: 0.5rem;
  font-family: var(--font-mono);
}

.section-lead {
  color: var(--text-muted);
  margin: -1rem 0 2rem;
}

/* Grid & cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.08);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-display);
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 0.3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feature-list li::before {
  content: "▸ ";
  color: var(--green);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(57, 255, 20, 0.08);
  color: var(--green);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* Screenshots */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.screenshot-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: zoom-in;
}

.screenshot-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.screenshot-card:hover {
  box-shadow: 0 0 24px var(--green-glow);
  border-color: var(--green-dim);
}

.screenshot-card img {
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.screenshot-card figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Lightbox gallery */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 3.5rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 40px var(--green-glow);
}

.lightbox-caption {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.lightbox-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.85);
  border: 1px solid var(--border);
  color: var(--green);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
  font-family: var(--font-ui);
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 16px var(--green-glow);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  font-size: 1.75rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 3.5rem;
  border-radius: var(--radius);
  font-size: 1.5rem;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

body.lightbox-open {
  overflow: hidden;
}

/* Download */
.download-panel {
  text-align: center;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.08);
}

.download-meta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.download-version {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
}

.download-size {
  font-size: 0.85rem;
  color: var(--text-muted);
  align-self: center;
}

.btn-download {
  display: inline-block;
  padding: 1rem 2.25rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 0 24px var(--green-glow);
  transition: all 0.2s;
}

.btn-download:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 32px var(--green-glow);
  text-shadow: none;
}

.download-hint {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-steps {
  max-width: 640px;
  margin: 0 auto;
}

/* Install steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step {
  position: relative;
  padding-left: 3.5rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-decorative);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--green);
  opacity: 0.55;
  text-shadow: 0 0 12px var(--green-glow);
}

.step h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-block {
  margin: 0;
  padding: 1rem 1.25rem;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

.code-block code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  white-space: pre;
}

.code-block-wide code { font-size: 0.72rem; }

.card-inline { margin-top: 1rem; }

/* Contacts — two-row compact bar */
#contacts .section-title-compact {
  margin-bottom: 1rem;
}

.contacts-bar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contacts-bar:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.08);
}

.contacts-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
}

.contacts-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.contacts-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  line-height: 1.2;
}

.contacts-email a {
  font-size: 0.82rem;
  word-break: break-all;
}

.contacts-qr {
  align-items: center;
  text-align: center;
}

.contacts-qr-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.25rem;
  image-rendering: pixelated;
}

.contacts-wallet {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.wallet-address {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.4;
  padding: 0.45rem 0.6rem;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  word-break: break-all;
}

.btn-copy {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.4rem 0.75rem;
}

@media (min-width: 960px) {
  .contacts-bar {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .contacts-top {
    gap: 0.85rem 1rem;
  }

  .contacts-qr-img {
    width: 72px;
    height: 72px;
  }

  .wallet-address {
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
  }
}

.btn-copy.copied {
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 12px var(--green-glow);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.footer-logo {
  width: 62px;
  height: auto;
  opacity: 0.85;
  border-radius: var(--radius);
  box-shadow: 0 0 8px var(--green-glow);
}

.footer-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 5, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  .nav-links.open { display: flex; }

  .nav { position: relative; }

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

  .step { padding-left: 0; padding-top: 2.5rem; }

  .step-num { font-size: 1.2rem; }

  .lightbox {
    padding: 3rem 0.5rem 2.5rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 2.25rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
