/* Styles scoped to the /download/ page. Globals (header, footer,
   .platform-card, .platform-card-download, .download-badge) come from
   /assets/css/style.css. */

.download-hero {
  padding: 7rem 0 5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.download-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.download-hero h1 span {
  color: var(--violet);
}
.download-hero p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.release-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--violet-glow);
  border: 1px solid var(--violet);
  color: var(--violet);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-weight: 600;
}
.release-date {
  color: var(--text-muted);
}
.release-meta a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1px;
}
.release-meta a:hover {
  color: var(--violet);
  border-color: var(--violet);
}

.download-section {
  padding: 4rem 0;
}
.download-section + .download-section {
  border-top: 1px solid var(--border);
}

.section-label {
  text-align: center;
  margin-bottom: 2rem;
}
.section-label h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-label p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Primary detected platform */
.primary-download {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--violet-dim);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}
.primary-download .platform-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  stroke: var(--violet);
  fill: none;
  color: var(--violet);
}
.primary-download h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}
.primary-download .detected {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}
.primary-download .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.primary-download .btn:hover {
  opacity: 0.9;
}
.primary-download .file-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}
.primary-download .alt-link {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.primary-download .alt-link:hover {
  color: var(--violet);
}

/* All downloads grid - matches Available Everywhere card style from home,
   but auto-fit so it scales to any number of release assets. */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Release notes */
.notes-wrapper {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}
.notes-wrapper h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}
.notes-wrapper h3:first-child {
  margin-top: 0;
}
.notes-wrapper h2 {
  font-size: 1.25rem;
  margin: 1.25rem 0 0.5rem;
}
.notes-wrapper h2:first-child {
  margin-top: 0;
}
.notes-wrapper p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.notes-wrapper ul, .notes-wrapper ol {
  margin: 0.5rem 0 0.75rem 1.5rem;
  color: var(--text-secondary);
}
.notes-wrapper li {
  line-height: 1.6;
  margin-bottom: 0.25rem;
}
.notes-wrapper code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.notes-wrapper pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.notes-wrapper pre code {
  background: none;
  padding: 0;
}
.notes-wrapper a {
  color: var(--violet);
  text-decoration: none;
}
.notes-wrapper a:hover {
  text-decoration: underline;
}
.notes-wrapper hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.notes-wrapper strong {
  color: var(--text-primary);
}

/* Loading / error / empty states */
.state-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.state-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.state-box p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.state-box .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.state-box .btn-secondary:hover {
  border-color: var(--violet);
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: dl-spin 0.8s linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .download-hero { padding: 3rem 0 1.5rem; }
  .download-hero h1 { font-size: 1.85rem; }
  .download-section { padding: 2.5rem 0; }
  .primary-download { padding: 1.5rem; }
  .notes-wrapper { padding: 1.25rem; }
  .downloads-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
}
