:root {
  --bg:       #0e0e0e;
  --surface:  #161616;
  --border:   #2a2a2a;
  --text:     #d4d4d4;
  --muted:    #909090;
  --green:    #4ec94e;
  --amber:    #d4a843;
  --red:      #d45c5c;
  --teal:     #4ec9b0;
  --blue:     #569cd6;
  --mono:     "JetBrains Mono", "Fira Mono", "Inconsolata", "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── layout ── */
.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* ── nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0e0e0ecc;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0;
}
nav .wrap {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}
nav .brand {
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: auto;
}
nav a {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
nav a:hover { color: var(--text); text-decoration: none; }

/* ── hero ── */
#hero {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.hero-icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 22px;
  box-shadow: 0 0 40px #1a3a1a, 0 0 0 1px var(--border);
}
.hero-text { flex: 1; }
@media (max-width: 520px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .hero-icon { width: 80px; height: 80px; border-radius: 15px; }
}
.hero-badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}
.badge {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gpl   { border-color: var(--green); color: var(--green); }
.badge-jack  { border-color: var(--amber); color: var(--amber); }
.badge-qt    { border-color: var(--blue);  color: var(--blue);  }
.badge-cpp   { border-color: var(--teal);  color: var(--teal);  }

.ascii-logo {
  color: var(--green);
  font-size: 0.82rem;
  line-height: 1.25;
  white-space: pre;
  margin-bottom: 1.6rem;
  user-select: none;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
h1 span { color: var(--green); }

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--green);
  color: #0e0e0e;
}
.btn-primary:hover { background: #6ed86e; text-decoration: none; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--muted); text-decoration: none; }

/* ── sections ── */
section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
h2::before { content: "## "; color: var(--border); }

h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal);
  margin: 1.6rem 0 0.6rem;
}
h3::before { content: "### "; color: var(--border); }

p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

/* ── feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}
.feature-card {
  background: var(--surface);
  padding: 1.1rem 1.2rem;
}
.feature-card .icon { font-size: 1.1rem; margin-bottom: 0.4rem; }
.feature-card strong { color: #e0e0e0; display: block; margin-bottom: 0.3rem; font-size: 0.88rem; }
.feature-card p { color: var(--muted); font-size: 0.8rem; margin: 0; }

/* ── terminal blocks ── */
.term {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}
.term-bar {
  background: #1e1e1e;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }
.term pre {
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
  tab-size: 2;
}
.term pre .prompt { color: var(--green); }
.term pre .comment { color: var(--muted); }

/* ── kbd shortcuts ── */
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}
@media (max-width: 560px) {
  .shortcut-grid { grid-template-columns: 1fr; }
}
.shortcut-group h3 { margin-top: 0; }
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.83rem;
}
.shortcut-row:last-child { border-bottom: none; }
.shortcut-row .action { color: var(--muted); }
kbd {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
}

/* ── screenshots ── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.ss-thumb {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: border-color 0.2s;
}
.ss-thumb:hover { border-color: var(--teal); }
.ss-thumb img {
  width: 100%;
  display: block;
  transition: filter 0.2s;
}
.ss-thumb:hover img { filter: brightness(1.08); }
.ss-thumb::after {
  content: "⊕";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.2s;
}
.ss-thumb:hover::after { opacity: 1; }
.ss-thumb figcaption { display: none; }

/* ── lightbox ── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#lightbox.lb-open {
  opacity: 1;
  pointer-events: all;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}
.lb-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
#lightbox.lb-open .lb-content { transform: scale(1); }
#lb-img {
  max-width: 88vw;
  max-height: 80vh;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  display: block;
}
.lb-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.8rem;
}
.lb-caption { color: var(--text); }
.lb-caption::before { content: "$ "; color: var(--green); }
.lb-counter { color: var(--muted); }
.lb-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 3px;
  width: 2rem;
  height: 2rem;
  font-size: 0.9rem;
  font-family: var(--mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.lb-close:hover { color: var(--text); border-color: var(--muted); }
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 3px;
  width: 2.5rem;
  height: 4.5rem;
  font-size: 1.8rem;
  line-height: 1;
  font-family: var(--mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.lb-nav:hover { color: var(--text); border-color: var(--muted); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* ── deps table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin: 1rem 0;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid #1a1a1a;
}
tr:last-child td { border-bottom: none; }
code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.05rem 0.3rem;
  font-family: var(--mono);
  font-size: 0.83em;
  color: var(--teal);
}

/* ── limitations ── */
.limitation-list {
  list-style: none;
  padding: 0;
}
.limitation-list li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
  color: var(--muted);
  font-size: 0.87rem;
}
.limitation-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border);
}
.limitation-list li strong { color: var(--text); }

/* ── philosophy box ── */
.philosophy {
  border-left: 2px solid var(--green);
  padding: 0.8rem 1.2rem;
  background: #0e170e;
  border-radius: 0 4px 4px 0;
  color: var(--text);
  font-size: 0.9rem;
  margin: 1.2rem 0;
}

/* ── footer ── */
footer {
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── responsive ── */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .ascii-logo { display: none; }
  .screenshot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* già presenti */
  h1 { font-size: 1.5rem; }
  .ascii-logo { display: none; }
  .screenshot-grid { grid-template-columns: 1fr; }

  /* aggiunte */
  body { font-size: 16px; }

  nav a { font-size: 0.88rem; }

  .badge { font-size: 0.78rem; }

  .feature-card strong { font-size: 0.93rem; }
  .feature-card p { font-size: 0.87rem; }

  .term pre { font-size: 0.88rem; }

  .shortcut-row { font-size: 0.88rem; }

  .limitation-list li { font-size: 0.92rem; }

  table { font-size: 0.88rem; }

  footer { font-size: 0.83rem; }

  .tagline { font-size: 1rem; }
}
