/* ---- ALS-Softwhere base styles ---- */
:root {
  --bg:        #0f1115;
  --surface:   #1a1d24;
  --surface-2: #232734;
  --text:      #e6e8ee;
  --muted:     #9aa1b1;
  --accent:    #4f8cff;
  --accent-2:  #7c5cff;
  --border:    #2c313d;
  --radius:    12px;
  --maxw:      960px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link — hidden until focused by keyboard */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; text-decoration: none; }

main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  flex: 1 0 auto;
}

h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { margin-top: 2rem; }
p.lead { color: var(--muted); font-size: 1.1rem; }

/* ---- Header / nav ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle .bar {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.site-menu a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
}
.site-menu a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-menu a.active { color: var(--text); background: var(--surface-2); }

/* Collapsed menu on small screens */
@media (max-width: 720px) {
  .site-menu {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-menu.open { max-height: 420px; }
  .site-menu ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; }
  .site-menu a { padding: 0.75rem 0.85rem; }
}
@media (min-width: 721px) {
  .menu-toggle { display: none; }
}

/* ---- Cards (catalog listings) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 0.4rem; }
.card p { color: var(--muted); margin: 0 0 1rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---- Hero (home) ---- */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.hero .cta { margin-top: 1.5rem; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  flex-shrink: 0;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
.footer-links a { color: var(--muted); }
.footer-visits { font-variant-numeric: tabular-nums; }

/* ---- Download meta ---- */
.dl-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1rem 0 1.5rem;
}
.dl-meta strong { color: var(--text); }

/* Download button row + explanatory note */
main .cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.75rem;
}
.dl-note {
  color: var(--muted);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}
.dl-note strong { color: var(--text); }

/* ---- Programs picker (dropdown + Go!) ---- */
.program-picker {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.picker-field { display: flex; flex-direction: column; gap: 0.35rem; }
.picker-field label { font-weight: 600; color: var(--text); }
.program-picker select {
  min-width: 240px;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}
.program-picker button.btn { border: 0; cursor: pointer; font: inherit; }

/* ---- Program info list ---- */
.prog-info {
  margin: 1.25rem 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.prog-info > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--border);
}
.prog-info > div:first-child { border-top: 0; }
.prog-info dt { font-weight: 700; color: var(--text); margin: 0; }
.prog-info dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) {
  .prog-info > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* Feature list */
.feature-list { padding-left: 1.25rem; }
.feature-list li { margin: 0.4rem 0; }
.feature-list strong { color: var(--text); }

/* Keyboard keys */
kbd {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.1em 0.45em;
  color: var(--text);
  white-space: nowrap;
}
