/* ═══════════════════════════════════════════════════════════
   DOWNLOADS — download portal cards, repo rows, verification
   ═══════════════════════════════════════════════════════════ */

/* Download cards — 2-up grid on desktop */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--phi-space-xl);
}
.download-grid .download-card { margin-bottom: 0; }

.download-card {
  position: relative;
  background: var(--phi-bg-card);
  border: 1px solid var(--phi-stroke);
  border-radius: 12px;
  padding: var(--phi-space-xl);
  margin-bottom: var(--phi-space-xl);
  transition: all var(--phi-duration) var(--phi-ease);
  overflow: hidden;
}
.download-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%,
    var(--phi-gold-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--phi-duration) var(--phi-ease);
  pointer-events: none;
}
.download-card:hover {
  border-color: var(--phi-gold);
  transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.15);
}
.download-card:hover::before { opacity: 1; }

.download-card .hex-badge { margin-bottom: var(--phi-space-lg); }

.download-card h3 {
  font-size: var(--phi-h2);
  margin-bottom: var(--phi-space-sm);
}
.download-card .download-desc {
  color: var(--phi-text-dim);
  font-size: var(--phi-body);
  margin-bottom: var(--phi-space-lg);
  line-height: 1.618;
}

.download-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--phi-space-sm);
  margin-bottom: var(--phi-space-lg);
}
.download-name {
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-gold);
  letter-spacing: 0.02em;
}
.download-size {
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-text-dim);
  white-space: nowrap;
}

.checksum {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--phi-text-dim);
  word-break: break-all;
  background: var(--phi-bg-deep);
  padding: var(--phi-space-xs) var(--phi-space-sm);
  border-radius: 4px;
  margin-bottom: var(--phi-space-lg);
  cursor: help;
}
.checksum::before {
  content: 'SHA-256 ';
  color: var(--phi-gold-dim);
}
.checksum-note {
  font-size: var(--phi-caption);
  color: var(--phi-text-dim);
  font-style: italic;
  margin-bottom: var(--phi-space-lg);
}

.download-actions {
  display: flex;
  align-items: center;
  gap: var(--phi-space-lg);
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--phi-space-sm);
  padding: var(--phi-space-md) var(--phi-space-xl);
  background: linear-gradient(135deg, var(--phi-gold-dim), var(--phi-gold));
  color: var(--phi-bg-deep);
  border: none;
  border-radius: 8px;
  font-family: var(--font-sacred);
  font-size: var(--phi-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--phi-ease);
  will-change: transform;
}
.download-btn:hover {
  background: linear-gradient(135deg, var(--phi-gold), var(--phi-gold-bright));
  color: var(--phi-bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}
.download-btn svg { width: 14px; height: 14px; }

.github-link {
  font-family: var(--font-sacred);
  font-size: var(--phi-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--phi-text-dim);
  text-decoration: none;
  transition: color var(--phi-duration) var(--phi-ease);
}
.github-link:hover { color: var(--phi-gold); }

/* ── Repo rows ── */
.repo-list { display: flex; flex-direction: column; gap: var(--phi-space-lg); }

.repo-row {
  display: flex;
  align-items: center;
  gap: var(--phi-space-xl);
  padding: var(--phi-space-lg) var(--phi-space-xl);
  background: var(--phi-bg-card);
  border: 1px solid var(--phi-stroke);
  border-radius: 12px;
  transition: all var(--phi-duration) var(--phi-ease);
  flex-wrap: wrap;
}
.repo-row:hover {
  border-color: var(--phi-gold-dim);
  box-shadow: 0 0 24px rgba(212, 168, 67, 0.1);
}
.repo-row .repo-name {
  font-family: var(--font-mono);
  font-size: var(--phi-h3);
  color: var(--phi-gold);
  min-width: 220px;
}
.repo-row .repo-name:hover { color: var(--phi-gold-bright); }
.repo-row .repo-desc {
  flex: 1;
  color: var(--phi-text-dim);
  font-size: var(--phi-body);
  min-width: 240px;
}
.repo-row .repo-stars {
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-gold);
  white-space: nowrap;
}
.repo-row .repo-clone {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--phi-text-dim);
  background: var(--phi-bg-deep);
  padding: var(--phi-space-xs) var(--phi-space-sm);
  border-radius: 4px;
  user-select: all;
}

/* ── Verification blocks ── */
.verify-block {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--phi-gold);
  background: var(--phi-bg-deep);
  border: 1px solid var(--phi-stroke);
  border-radius: 8px;
  padding: var(--phi-space-md) var(--phi-space-lg);
  margin-bottom: var(--phi-space-lg);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.8;
}
.verify-block .cmt { color: var(--phi-text-dim); }

.verify-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--phi-space-xl);
}
.verify-col .sacred-text { margin-bottom: var(--phi-space-md); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .download-grid, .verify-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .repo-row { flex-direction: column; align-items: flex-start; gap: var(--phi-space-md); }
  .repo-row .repo-name { min-width: 0; }
}
