/* HDLBoard — GitHub Pages site
   Plain HTML/CSS, no build step, no external fonts or scripts. */

:root {
  --bg: #fafafa;
  --bg-alt: #f2f4f7;
  --surface: #ffffff;
  --border: #e3e6ec;
  --text: #1a1f2b;
  --text-muted: #5b6472;
  --accent: #2f6fed;
  --accent-hover: #1f56d6;
  --accent-soft: #eaf1ff;
  --radius: 10px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Reserve a matching gutter on both edges so the page doesn't
     visually shift left once a vertical scrollbar appears. */
  scrollbar-gutter: stable both-edges;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.7rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 1em; color: var(--text-muted); }
code {
  font-family: var(--font-mono);
  background: var(--bg-alt);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text);
}
a { color: var(--accent); }
abbr { text-decoration-style: dotted; cursor: help; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:not(.btn):hover { color: var(--text); }
.nav-github { display: inline-flex; align-items: center; gap: 6px; }
.nav-github .ext-icon { opacity: 0.55; }
.btn-nav { padding: 8px 16px; font-size: 0.9rem; }

.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(700px 320px at 50% -80px, var(--accent-soft), transparent 70%);
}
.hero-inner { text-align: center; }
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 6px;
}
.hero-tagline {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
}
.hero-copy {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-shot {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 40px -24px rgba(20, 30, 60, 0.25);
}
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---------- New here / glossary ---------- */
.glossary { padding: 56px 0; border-top: 1px solid var(--border); }
.glossary h2 { text-align: center; margin-bottom: 32px; }
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.glossary-item h3 {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.glossary-item p { font-size: 0.92rem; margin: 0; }

/* ---------- Features ---------- */
.features { padding: 56px 0; background: var(--bg-alt); }
.features h2 { text-align: center; margin-bottom: 36px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* ---------- How it works ---------- */
.how { padding: 32px 0; }
.how h2 { text-align: center; margin-bottom: 40px; }
.how-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.how-flow li { text-align: center; position: relative; }
.how-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 2px;
  background: var(--border);
}
.how-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.how-flow h3 { font-size: 0.98rem; }
.how-flow p { font-size: 0.88rem; margin: 0; }
.how-note {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Get started ---------- */
.get-started { padding: 64px 0; background: var(--bg-alt); }
.get-started h2 { text-align: center; margin-bottom: 6px; }
.section-lede { text-align: center; max-width: 520px; margin: 0 auto 36px; }
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.start-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.start-card p { font-size: 0.92rem; }
.link-arrow {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.start-footnote {
  text-align: center;
  margin: 32px 0 0;
  font-size: 0.9rem;
}

/* ---------- Open source ---------- */
.open-source { padding: 64px 0; }
.os-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.os-text p { font-size: 0.98rem; }
.tech-list {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.tech-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.tech-list > div:last-child { border-bottom: none; }
.tech-list dt { color: var(--text-muted); margin: 0; }
.tech-list dd { margin: 0; font-family: var(--font-mono); text-align: right; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-tagline {
  width: 100%;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  order: 3;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .glossary-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-flow { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .how-flow li:nth-child(2)::after { display: none; }
  .start-grid { grid-template-columns: 1fr; }
  .os-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }
  .site-nav a:not(.btn) { padding: 10px 0; width: 100%; }
  .btn-nav { margin-top: 8px; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

@media (max-width: 560px) {
  .glossary-grid, .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --bg-alt: #171b24;
    --surface: #1a1e28;
    --border: #2a2f3b;
    --text: #eef0f4;
    --text-muted: #9aa3b2;
    --accent: #5b8bff;
    --accent-hover: #7ba0ff;
    --accent-soft: #1c2540;
  }
  .site-header { background: rgba(18, 21, 28, 0.85); }
  .hero-shot { box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.6); }
}
