/* =========================================================
   MosAIc install page — mosaic.directory design system
   dark-900 #0B0C10 · dark-800 #1F2833 · dark-700 #2C3E50
   neon-cyan #66FCF1 → #45a29e · Inter + JetBrains Mono
   ========================================================= */

:root {
  --dark-900: #0b0c10;
  --dark-800: #1f2833;
  --dark-700: #2c3e50;
  --cyan: #66fcf1;
  --cyan-deep: #45a29e;
  --cyan-10: rgba(102, 252, 241, 0.1);
  --cyan-20: rgba(102, 252, 241, 0.2);
  --text: #f8fafc;
  --muted: #9ca3af;
  --warning: #f59e0b;
  --glass-bg: rgba(31, 40, 51, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--dark-900);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* Mosaic tile grid, faint, under the glow */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ===== Background glow ===== */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      620px 420px at 50% -8%,
      rgba(102, 252, 241, 0.14),
      transparent 70%
    ),
    radial-gradient(
      520px 380px at 88% 28%,
      rgba(69, 162, 158, 0.1),
      transparent 70%
    ),
    linear-gradient(180deg, transparent 60%, rgba(11, 12, 16, 0.9));
}

/* ===== Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
  padding: 88px 0 56px;
  text-align: center;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--cyan-20);
  border-radius: 999px;
  background: var(--cyan-10);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  margin-bottom: 28px;
  transition: var(--transition);
}

.release-pill strong {
  font-weight: 600;
}

.release-pill:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.15);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.headline {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--cyan) 20%, var(--cyan-deep) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 18px;
}

.tagline {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== OS cards ===== */
.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.os-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 36px 24px 28px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.os-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(102, 252, 241, 0.08);
}

.os-card.detected {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 1px var(--cyan),
    0 8px 36px rgba(102, 252, 241, 0.12);
}

.official-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cyan-10);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.os-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: rgba(44, 62, 80, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text);
  transition: var(--transition);
}

.os-card:hover .os-icon,
.os-card.detected .os-icon {
  color: var(--cyan);
  border-color: var(--cyan-20);
}

.os-icon svg {
  width: 32px;
  height: 32px;
}

.os-name {
  font-size: 1.3rem;
  font-weight: 700;
}

.os-sub {
  font-size: 0.88rem;
  color: var(--muted);
}

.detected-label {
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cyan-10);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.os-cta {
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan-deep);
  transition: var(--transition);
}

.os-card:hover .os-cta {
  color: var(--cyan);
}

/* ===== All-releases link ===== */
.all-releases {
  text-align: center;
  margin: 22px 0 56px;
  font-size: 0.9rem;
  color: var(--muted);
}

.all-releases a {
  color: var(--cyan);
  text-decoration: none;
}

.all-releases a:hover {
  text-decoration: underline;
}

/* ===== Install sections ===== */
.install-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 72px;
}

.install-section {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 24px;
  transition: var(--transition);
}

.install-section.open {
  border-color: var(--cyan-20);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.section-head:hover {
  background: rgba(102, 252, 241, 0.04);
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(44, 62, 80, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--cyan);
  flex-shrink: 0;
}

.section-icon svg {
  width: 20px;
  height: 20px;
}

.section-name {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.install-section.open .chevron {
  transform: rotate(180deg);
  color: var(--cyan);
}

.section-body {
  display: none;
  padding: 4px 24px 24px;
}

.install-section.open .section-body {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Step cards (inset panels) ===== */
.step-card {
  background: rgba(11, 12, 16, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
  margin-bottom: 14px;
}

.step-card:last-child {
  margin-bottom: 0;
}

.step-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--cyan-10);
  border: 1px solid var(--cyan-20);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-card h4 {
  margin: 22px 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.step-card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 8px;
}

.step-card p strong {
  color: var(--text);
}

.step-card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--cyan);
  background: rgba(102, 252, 241, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.dl-group-label {
  margin-top: 20px;
}

/* ===== Steps list ===== */
.steps-list {
  list-style: none;
  padding-left: 0;
  margin: 6px 0;
}

.steps-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.steps-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 600;
}

ol.steps-list {
  counter-reset: step;
}

ol.steps-list li {
  counter-increment: step;
}

ol.steps-list li::before {
  content: counter(step) ".";
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.steps-list li strong {
  color: var(--text);
}

/* ===== Download buttons ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.download-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(44, 62, 80, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.download-btn:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102, 252, 241, 0.1);
}

.download-btn.recommended {
  border-color: var(--cyan-20);
  background: rgba(102, 252, 241, 0.05);
}

.dl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cyan-10);
  flex-shrink: 0;
}

.dl-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--cyan);
}

.dl-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dl-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.dl-arch {
  font-size: 0.8rem;
  color: var(--muted);
}

.rec-tag {
  position: absolute;
  top: -9px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dark-900);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

/* ===== Code blocks ===== */
.code-block {
  position: relative;
  background: var(--dark-900);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px 96px 16px 18px;
  margin: 12px 0;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--cyan);
  background: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  background: rgba(44, 62, 80, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.copy-btn.copied {
  border-color: var(--cyan);
  background: var(--cyan-10);
  color: var(--cyan);
}

/* ===== Notices ===== */
.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cyan-10);
  border: 1px solid var(--cyan-20);
  border-radius: var(--radius-sm);
  margin: 16px 0 8px;
}

.notice.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.notice-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.notice p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.notice p strong {
  color: var(--text);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 36px 0 44px;
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.92rem;
}

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

footer a:hover {
  text-decoration: underline;
}

.footer-meta {
  margin-top: 8px;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .os-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 40px;
  }

  .subtitle {
    font-size: 1.05rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .container {
    padding: 0 18px;
  }

  .section-head {
    padding: 16px 18px;
  }

  .section-body {
    padding: 2px 14px 16px;
  }

  .step-card {
    padding: 18px 16px;
  }

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

  .code-block {
    padding: 44px 16px 14px 16px;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
