/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f12;
  --bg-card:   #151820;
  --bg-input:  #1c2030;
  --border:    #2a3040;
  --text:      #e2e6ef;
  --text-muted:#7a8499;
  --accent:    #4f8ef7;
  --accent-dim:#2a5298;
  --success:   #3ecf8e;
  --warning:   #f5a623;
  --danger:    #f05a5a;
  --radius:    8px;
  --font:      'Roboto Mono', monospace;
  --mono:      'Roboto Mono', monospace;
  --header-h:  56px;
  --max-w:     960px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited {
  text-decoration: none;
}

/* ── Layout ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.5rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.site-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.site-logo:hover { text-decoration: none; }

.site-logo span { color: var(--accent); }

.site-tagline {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  white-space: nowrap;
  line-height: 1.2;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Typography ───────────────────────────────────────────── */
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

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

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Cards grid (home) ────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  border-color: var(--accent-dim);
  background: rgba(79, 142, 247, 0.06);
  text-decoration: none;
}

.tool-card__icon {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.tool-card__name {
  font-weight: 600;
  font-size: 1rem;
}

.tool-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.tool-card__arrow {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* ── Tool page panels ─────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel + .panel { margin-top: 0; }

/* ── Download buttons ─────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 10.5rem));
  gap: 0.5rem;
}

.download-grid .btn--download {
  width: 100%;
  justify-content: center;
}

/* ── Screenshots ──────────────────────────────────────────── */
.screenshots-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-family: var(--font);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover:not(:disabled) { background: #6aa0ff; }

.btn--download {
  background: #3ecf8e;
  color: #0a1a12 !important;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  box-shadow: 0 2px 10px rgba(62, 207, 142, 0.4);
  transition: background 0.15s, box-shadow 0.15s;
}

.btn--download::before {
  content: '⤓';
  font-size: 1em;
  line-height: 1;
}

.btn--download:hover,
.btn--download:focus {
  background: #5bffb0;
  color: #0a1a12 !important;
  text-decoration: none;
  box-shadow: 0 2px 14px rgba(91, 255, 176, 0.5);
}

.btn--source {
  background: #1a1e28;
  color: var(--text) !important;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn--source:hover,
.btn--source:focus {
  background: #252b3a;
  border-color: #3a4560;
  color: var(--text) !important;
  text-decoration: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--mono);
}

.btn--secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover:not(:disabled) { border-color: var(--accent-dim); }

.btn--danger {
  background: rgba(240, 90, 90, 0.15);
  color: var(--danger);
  border: 1px solid rgba(240, 90, 90, 0.3);
}

.btn--danger:hover:not(:disabled) { background: rgba(240, 90, 90, 0.25); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .download-grid { grid-template-columns: 1fr; }
  .download-grid .btn--download { width: 100%; justify-content: center; }
}
