:root {
  --bg: #16181d;
  --bg-alt: #1d2027;
  --text: #e6e6e6;
  --text-muted: #a3a7b0;
  --accent: #ffd966;
  --border: #2c2f38;
  --max-width: 920px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

h1, h2 {
  color: var(--accent);
  font-weight: 600;
}

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

a:hover {
  text-decoration: underline;
}

code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9em 1em;
  overflow-x: auto;
}

pre code {
  border: none;
  padding: 0;
  background: none;
}

.hero {
  position: relative;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 217, 102, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 1rem 0 0;
}

.hero-icon {
  /* Source image is 720x480 (3:2) - constrain width only so it isn't stretched to a square. */
  width: 220px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--border);
}

.hero h1 {
  font-size: 2.5rem;
  margin: 1rem 0 0.5rem;
}

.punchline {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 auto;
}

.hero-links {
  margin-top: 1.75rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 600;
  padding: 0.65em 1.4em;
  border-radius: 6px;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

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

.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section {
  margin-top: 3.5rem;
}

section h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.req-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.req-badge svg {
  width: 0.9em;
  height: 0.9em;
  flex-shrink: 0;
}

.req-badge strong {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.3em;
}

.req-badge--required {
  border-color: var(--accent);
}

.requires-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hook {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 1.25rem 0;
}

.note {
  color: var(--text-muted);
  font-size: 0.95rem;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.features-intro {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.feature-grid li {
  position: relative;
  padding-left: 1.6rem;
}

.feature-grid li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.lead-in {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -0.75rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.gallery figure {
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.gallery a {
  display: block;
  cursor: zoom-in;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.15s ease;
}

.gallery a:hover img {
  opacity: 0.85;
}

.gallery figcaption {
  padding: 0.6em 0.8em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Pure-CSS lightbox: each overlay is a full-viewport link (closes on click anywhere)
   shown only while the URL hash targets it - no JS needed. */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(10, 11, 14, 0.92);
  cursor: zoom-out;
  z-index: 100;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--text);
}

.repo-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6em 0.6em 0.6em 1em;
}

.repo-url code {
  background: none;
  border: none;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-shrink: 0;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.4em 0.7em;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.copy-button svg {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
}

.copy-button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.copy-button.copied {
  color: var(--accent);
  border-color: var(--accent);
}

.commands dt {
  margin-top: 1rem;
}

.commands dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

footer {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1.5rem 3rem;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .repo-url {
    flex-direction: column;
    align-items: stretch;
  }
}
